Hi Enrico, On 9/27/06, Enrico Zini <[EMAIL PROTECTED]> wrote:
* Package name : cnf
[snip]
The CNF package comprises two sets of software which ease the task of writing portable programs in a mixture of FORTRAN and C. F77 is a set of C macros for handling the FORTRAN/C subroutine linkage in a portable way, and CNF is a set of functions to handle the difference between FORTRAN and C character strings, logical values and pointers to dynamically allocated memory.
Wondering -- what does this do differently than cfortran? Note, I'm *not* trying to imply that because cfortran is already in Debian, this is redundant. Just asking out of curiosity in the hope I learn something :-) Does CNF/F77 have a way to deal with the different semantics of functions returning REAL [*] in f2c and g77 as compared with gfortran? (E.g., I hacked up cfortran.h to behave differently depending on whether f2cFortran or gFortran macros are #defined.) By default, code generated for REAL-returning functions by f2c and g77 returns C-style "doubles", while that generated by gfortran returns C-style "floats". For more info, see the g77 and gfortran info pages, specifically documentation of the -ff2c and -fno-f2c compiler flags, and the "Dropping f2c compatibility" section of the g77 info pages. [*] Functions returning COMPLEX are also affected, but I wouldn't expect much C code to try to interface with COMPLEX-returning Fortran functions due to the additional, well, complexity of doing so. best regards, -- Kevin B. McCarty <[EMAIL PROTECTED]> Physics Department WWW: http://www.princeton.edu/~kmccarty/ Princeton University GPG: public key ID 4F83C751 Princeton, NJ 08544 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]