Thread: [Doxygen-users] Re: Documentation of Fortran code?
Brought to you by:
dimitri
From: Ole S. <ole...@gm...> - 2001-08-20 14:05:47
|
Hello John! Ole Streicher wrote: >> Is there a possibility to use Doxygen to document FORTRAN code? Or is >> it easy to extend Doxygen for this language? >We have used Doxygen to document FORTRAN code by using an INPUT_FILTER >to convert the original FORTRAN source to C-style function prototypes. Can you send or post me this INPUT_FILTER? BTW, is there also a good way to document FORTRAN callable functions wrapped by cfortran.h? Tschuessi Ole |
From: Ole S. <ole...@gm...> - 2001-08-21 07:10:39
|
Hello John! John Sturton wrote: > > >We have used Doxygen to document FORTRAN code by using an INPUT_FILTER > > >to convert the original FORTRAN source to C-style function prototypes. > > Can you send or post me this INPUT_FILTER? > No, sorry I can't. :-( Is it a commercial program, or something you developed internally? > if you do mixed FORTRAN/C programming then you've probably got some > handy script somewhere that automatically creates a header file from > you FORTRAN source code, haven't you? Unfortunately, I don't. I use cfortran.h to mix C and Fortran, and I write the header files necessary by hand. > Dunno - what's cfortran.h?? It is a header file that allows a portable mixing between Fortran-77 and C (C++). http://www-zeus.desy.de/~burow/cfortran It needs that you write for every Fortran function which should be callable by C something like #define MYFUNC(A,B,C) CCALLSFFUN3(MYFUNC, myfunc, INT, STRING, PINT, A, B, C) when the F77 function is like FUNCTION MYFUNC(A, B, C) INTEGER A CHARACTER*(*) B INTEGER C C ... As far as I know, there is no tool available that is able to create the C header file automatically. Is there anything I could use for documentation in such an environment? How difficult is it to add Fortran to doxygen? Tschuessi Ole |
From: John S. <joh...@se...> - 2001-08-22 06:52:24
|
Ole Streicher wrote: > > Hello John! > > John Sturton wrote: > > > >We have used Doxygen to document FORTRAN code by using an INPUT_FILTER > > > >to convert the original FORTRAN source to C-style function prototypes. > > > Can you send or post me this INPUT_FILTER? > > No, sorry I can't. > > :-( Is it a commercial program, or something you developed internally? > It's an internal development, basically a 500-line awk script, that produces a C header file compatible with our in-house version of the cfortran.h file you mentioned. Maybe the author of cfortran.h has, or knows of, a more readily available FORTRAN->C-header script that you could modify. Good luck, John |
From: Clayton C. <crc...@cs...> - 2001-08-22 15:15:20
|
Would f2c do the trick? It's a GNU project that claims to convert FROTRAN to C. It's worth a shot I guess, if you don't want to roll your own. http://cm.bell-labs.com/netlib/f2c/index.html --c On Wed, Aug 22, 2001 at 08:49:26AM +0200, John Sturton wrote: > Ole Streicher wrote: > > > > Hello John! > > > > John Sturton wrote: > > > > >We have used Doxygen to document FORTRAN code by using an INPUT_FILTER > > > > >to convert the original FORTRAN source to C-style function prototypes. > > > > Can you send or post me this INPUT_FILTER? > > > No, sorry I can't. > > > > :-( Is it a commercial program, or something you developed internally? > > > > It's an internal development, basically a 500-line awk script, that > produces a C header file compatible with our in-house version of the > cfortran.h file you mentioned. Maybe the author of cfortran.h has, or > knows of, a more readily available FORTRAN->C-header script that you > could modify. > > Good luck, > > John > > _______________________________________________ > Doxygen-users mailing list > Dox...@li... > http://lists.sourceforge.net/lists/listinfo/doxygen-users -- Clayton Carter crcarter @ cs indiana edu "My mom says I'm the handsomest guy [at work]" |
From: John S. <joh...@se...> - 2001-08-20 14:28:55
|
Ole Streicher wrote: > > Hello John! > > Ole Streicher wrote: > >> Is there a possibility to use Doxygen to document FORTRAN code? Or is > >> it easy to extend Doxygen for this language? > > >We have used Doxygen to document FORTRAN code by using an INPUT_FILTER > >to convert the original FORTRAN source to C-style function prototypes. > > Can you send or post me this INPUT_FILTER? > No, sorry I can't. On the other hand, if you do mixed FORTRAN/C programming then you've probably got some handy script somewhere that automatically creates a header file from you FORTRAN source code, haven't you? i.e. if you've got some FORTRAN functions that you call from C, then someone/something/somewhere must have generated an associated C header file to give the FORTRAN functions' prototypes. If so, then you just need to tweak this script to include the Doxygen comments in its output... > BTW, is there also a good way to document FORTRAN callable functions > wrapped by cfortran.h? Dunno - what's cfortran.h?? Cheers, John |