|
|
1.1 ! root 1: ! 2: ====== old index for f2c, now "readme from f2c" ============ ! 3: ! 4: FILES: ! 5: ! 6: f2c.h Include file necessary for compiling output of the converter. ! 7: See the second NOTE below. ! 8: ! 9: f2c.1 Man page for f2c. ! 10: ! 11: f2c.1t Source for f2c.1 (to be processed by troff -man or nroff -man). ! 12: ! 13: libf77 Library of non I/O support routines the generated C may need. ! 14: Fortran main programs result in a C function named MAIN__ that ! 15: is meant to be invoked by the main() in libf77. ! 16: ! 17: libi77 Library of Fortran I/O routines the generated C may need. ! 18: Note that some vendors (e.g., BSD, Sun and MIPS) provide a ! 19: libF77 and libI77 that are incompatible with f2c -- they ! 20: provide some differently named routines or routines with the ! 21: names that f2c expects, but with different calling sequences. ! 22: On such systems, the recommended procedure is to merge ! 23: libf77 and libi77 into a single library, say libf2c, to install ! 24: it where you can access it by specifying -lf2c , and to adjust ! 25: the definition of link_msg in sysdep.c appropriately. ! 26: ! 27: f2c.ps Postscript for a technical report on f2c. After you strip the ! 28: mail header, the first line should be "%!PS". ! 29: ! 30: fixes The complete change log, reporting bug fixes and other changes. ! 31: (Some recent change-log entries are given below). ! 32: ! 33: fc A shell script that uses f2c and imitates much of the behavior ! 34: of commonly found f77 commands. You will almost certainly ! 35: need to adjust some of the shell-variable assignments to make ! 36: this script work on your system. ! 37: ! 38: ! 39: SUBDIRECTORY: ! 40: ! 41: f2c/src Source for the converter itself, including a file of checksums ! 42: and source for a program to compute the checksums (to verify ! 43: correct transmission of the source), is available: ask netlib to ! 44: send all from f2c/src ! 45: If the checksums show damage to just a few source files, or if ! 46: the change log file (see "fixes" below) reports corrections to ! 47: some source files, you can request those files individually ! 48: "from f2c/src". For example, to get defs.h and xsum0.out, you ! 49: would ask netlib to ! 50: send defs.h xsum0.out from f2c/src ! 51: "all from f2c/src" is 654329 bytes long. ! 52: ! 53: Tip: if asked to send over 99,000 bytes in one request, netlib ! 54: breaks the shipment into 1000 line pieces and sends each piece ! 55: separately (since otherwise some mailers might gag). To avoid ! 56: the hassle of reassembling the pieces, try to keep each request ! 57: under 99,000 bytes long. The final number in each line of ! 58: xsum0.out gives the length of each file in f2c/src. For ! 59: example, ! 60: send exec.c expr.c from f2c/src ! 61: send format.c format_data.c from f2c/src ! 62: will give you slightly less hassle than ! 63: send exec.c expr.c format.c format_data.c from f2c/src ! 64: Alternatively, if all the mailers in your return path allow ! 65: long messages, you can supply an appropriate mailsize line in ! 66: your netlib request, e.g. ! 67: mailsize 200k ! 68: send exec.c expr.c format.c format_data.c from f2c/src ! 69: ! 70: If you have trouble generating gram.c, you can ask netlib to ! 71: send gram.c from f2c/src ! 72: Then `xsum gram.c` should report ! 73: gram.c e2eca42c 57277 ! 74: NOTE: For now, you may exercise f2c by sending netlib a message whose ! 75: first line is "execute f2c" and whose remaining lines are ! 76: the Fortran 77 source that you wish to have converted. ! 77: Return mail brings you the resulting C, with f2c's error ! 78: messages between #ifdef uNdEfInEd and #endif at the end. ! 79: (To understand line numbers in the error messages, regard ! 80: the "execute f2c" line as line 0. It is stripped away by ! 81: the netlib software before f2c sees your Fortran input.) ! 82: Options described in the man page may be transmitted to ! 83: netlib by having the first line of input be a comment ! 84: whose first 6 characters are "c$f2c " and whose remaining ! 85: characters are the desired options, e.g., "c$f2c -R -u". ! 86: This scheme may change -- ask netlib to ! 87: send index from f2c ! 88: if you do not get the behavior you expect. ! 89: ! 90: During the initial experimental period, incoming Fortran ! 91: will be saved in a file. Don't send any secrets! ! 92: ! 93: ! 94: BUGS: Please send bug reports (including the shortest example ! 95: you can find that illustrates the bug) to research!dmg ! 96: or [email protected] . You might first check whether ! 97: the bug goes away when you turn optimization off. ! 98: ! 99: ! 100: NOTE: f2c.h defines several types, e.g., real, integer, doublereal. ! 101: The definitions in f2c.h are suitable for most machines, but if ! 102: your machine has sizeof(double) > 2*sizeof(long), you may need ! 103: to adjust f2c.h appropriately. f2c assumes ! 104: sizeof(doublecomplex) = 2*sizeof(doublereal) ! 105: sizeof(doublereal) = sizeof(complex) ! 106: sizeof(doublereal) = 2*sizeof(real) ! 107: sizeof(real) = sizeof(integer) ! 108: sizeof(real) = sizeof(logical) ! 109: sizeof(real) = 2*sizeof(shortint) ! 110: EQUIVALENCEs may not be translated correctly if these ! 111: assumptions are violated. ! 112: ! 113: There exists a C compiler that objects to the lines ! 114: typedef VOID C_f; /* complex function */ ! 115: typedef VOID H_f; /* character function */ ! 116: typedef VOID Z_f; /* double complex function */ ! 117: in f2c.h . If yours is such a compiler, do two things: ! 118: 1. Complain to your vendor about this compiler bug. ! 119: 2. Find the line ! 120: #define VOID void ! 121: in f2c.h and change it to ! 122: #define VOID int ! 123: (For readability, the f2c.h lines shown above have had two ! 124: tabs inserted before their first character.) ! 125: ! 126: FTP: All the material described above is now available by ftp from ! 127: research.att.com (login: netlib; Password: your E-mail address; ! 128: cd f2c). You must uncompress the .Z files once you have a ! 129: copy of them, e.g., by ! 130: uncompress *.Z ! 131: ! 132: ----------------- ! 133: Recent change log (partial) ! 134: ----------------- ! 135: ! 136: Tue Oct 15 10:25:49 EDT 1991: ! 137: Minor tweaks that make some PC compilers happier: insert some ! 138: casts, add args to signal functions. ! 139: Change -g to emit uncommented #line lines -- and to emit more of them; ! 140: update fc, f2c.1, f2c.1t, f2c.ps to reflect this. ! 141: ! 142: Thu Oct 17 09:22:05 EDT 1991: ! 143: libi77: README, fio.h, sue.c, uio.c changed so the length field ! 144: in unformatted sequential records has type long rather than int ! 145: (unless UIOLEN_int is #defined). This is for systems where sizeof(int) ! 146: can vary, depending on the compiler or compiler options. ! 147: ! 148: Thu Oct 17 13:42:59 EDT 1991: ! 149: libi77: inquire.c: when MSDOS is defined, don't strcmp units[i].ufnm ! 150: when it is NULL. ! 151: ! 152: Tue Oct 22 18:12:56 EDT 1991: ! 153: Fix memory fault when a character*(*) argument is used (illegally) ! 154: as a dummy variable in the definition of a statement function. (The ! 155: memory fault occurred when the statement function was invoked.) ! 156: Complain about implicit character*(*). ! 157: ! 158: Thu Nov 14 08:50:42 EST 1991: ! 159: libi77: change uint to Uint in fmt.h, rdfmt.c, wrtfmt.c; this change ! 160: should be invisible unless you're running a brain-damaged system. ! 161: ! 162: Mon Nov 25 19:04:40 EST 1991: ! 163: libi77: correct botches introduced 17 Oct. 1991 and 14 Nov. 1991 ! 164: (change uint to Uint in lwrite.c; other changes that only matter if ! 165: sizeof(int) != sizeof(long)). ! 166: Add a more meaningful error message when bailing out due to an attempt ! 167: to invoke a COMMON variable as a function. ! 168: ! 169: Sun Dec 1 19:29:24 EST 1991: ! 170: libi77: uio.c: add test for read failure (seq. unformatted reads); ! 171: adjust an error return from EOF to off end of record. ! 172: ! 173: Tue Dec 10 17:42:28 EST 1991: ! 174: Add tests to prevent memory faults with bad uses of character*(*). ! 175: ! 176: Thu Dec 12 11:24:41 EST 1991: ! 177: libi77: fix bug with internal list input that caused the last ! 178: character of each record to be ignored; adjust error message in ! 179: internal formatted input from "end-of-file" to "off end of record" ! 180: if the format specifies more characters than the record contains. ! 181: ! 182: Wed Dec 18 17:48:11 EST 1991: ! 183: Fix bug in translating nonsensical ichar invocations involving ! 184: concatenations. ! 185: Fix bug in passing intrinsics lle, llt, lge, lgt as arguments; ! 186: hl_le was being passed rather than l_le, etc. ! 187: libf77: adjust length parameters from long to ftnlen, for ! 188: compiling with f2c_i2 defined. ! 189: ! 190: Sat Dec 21 15:30:57 EST 1991: ! 191: Allow DO nnn ... to end with an END DO statement labeled nnn. ! 192: ! 193: Tue Dec 31 13:53:47 EST 1991: ! 194: Fix bug in handling dimension a(n**3,2) -- pow_ii was called ! 195: incorrectly. ! 196: Fix bug in translating ! 197: subroutine x(abc,n) ! 198: character abc(n) ! 199: write(abc,'(i10)') 123 ! 200: end ! 201: (omitted declaration and initialiation of abc_dim1). ! 202: ! 203: Fri Jan 17 11:54:20 EST 1992: ! 204: Diagnose some illegal uses of main program name (rather than ! 205: memory faulting). ! 206: libi77: (1) In list and namelist input, treat "r* ," and "r*," ! 207: alike (where r is a positive integer constant), and fix a bug in ! 208: handling null values following items with repeat counts (e.g., ! 209: 2*1,,3). (2) For namelist reading of a numeric array, allow a new ! 210: name-value subsequence to terminate the current one (as though the ! 211: current one ended with the right number of null values). ! 212: (3) [lio.h, lwrite.c]: omit insignificant zeros in list and namelist ! 213: output. (Compile with -DOld_list_output to get the old behavior.) ! 214: ! 215: Sat Jan 18 15:58:01 EST 1992: ! 216: libi77: make list output consistent with F format by printing .1 ! 217: rather than 0.1 (introduced yesterday). ! 218: ! 219: Wed Jan 22 08:32:43 EST 1992: ! 220: libi77: add comment to README pointing out preconnection of ! 221: Fortran units 5, 6, 0 to stdin, stdout, stderr (respectively). ! 222: ! 223: Mon Feb 3 11:57:53 EST 1992: ! 224: libi77: fix namelist read bug that caused the character following ! 225: a comma to be ignored. ! 226: ! 227: Fri Feb 28 01:04:26 EST 1992: ! 228: libf77: fix buggy z_sqrt.c (double precision square root), which ! 229: misbehaved for arguments in the southwest quadrant. ! 230: ! 231: Thu Mar 19 15:05:18 EST 1992: ! 232: Fix bug (introduced 17 Jan 1992) in handling multiple entry points ! 233: of differing types (with implicitly typed entries appearing after ! 234: the first executable statement). ! 235: Fix memory fault in the following illegal Fortran: ! 236: double precision foo(i) ! 237: * illegal: above should be "double precision function foo(i)" ! 238: foo = i * 3.2 ! 239: entry moo(i) ! 240: end ! 241: Note about ANSI_Libraries (relevant, e.g., to IRIX 4.0.1 and AIX) ! 242: added to README. ! 243: Abort zero divides during constant simplification. ! 244: ! 245: Sat Mar 21 01:27:09 EST 1992: ! 246: Tweak ckalloc (misc.c) for systems where malloc(0) = 0; this matters ! 247: for subroutines with multiple entry points but no arguments. ! 248: Add "struct memblock;" to init.c (irrelevant to most compilers). ! 249: ! 250: Wed Mar 25 13:31:05 EST 1992: ! 251: Fix bug with IMPLICIT INTEGER*4(...): under -i2 or -I2, the *4 was ! 252: ignored. ! 253: ! 254: Tue May 5 09:53:55 EDT 1992: ! 255: Tweaks to README; e.g., ANSI_LIbraries changed to ANSI_Libraries . ! 256: ! 257: Wed May 6 23:49:07 EDT 1992 ! 258: Under -A and -C++, have subroutines return 0 (even if they have ! 259: no * arguments). ! 260: Adjust libi77 (rsne.c and lread.c) for systems where ungetc is ! 261: a macro. Tweak lib[FI]77/makefile to use unique intermediate file ! 262: names (for parallel makes). ! 263: ! 264: Tue May 19 09:03:05 EDT 1992: ! 265: Adjust libI77 to make err= work with internal list and formatted I/O. ! 266: ! 267: Sat May 23 18:17:42 EDT 1992: ! 268: Under -A and -C++, supply "return 0;" after the code generated for ! 269: a STOP statement -- the C compiler doesn't know that s_stop won't ! 270: return. ! 271: New (mutually exclusive) options: ! 272: -f treats all input lines as free-format lines, ! 273: honoring text that appears after column 72 ! 274: and not padding lines shorter than 72 characters ! 275: with blanks (which matters if a character string ! 276: is continued across 2 or more lines). ! 277: -72 treats text appearing after column 72 as an error. ! 278: ! 279: Sun May 24 09:45:37 EDT 1992: ! 280: Tweak description of -f in f2c.1 and f2c.1t; update f2c.ps . ! 281: ! 282: Fri May 29 01:17:15 EDT 1992: ! 283: Complain about externals used as variables. Example ! 284: subroutine foo(a,b) ! 285: external b ! 286: a = a*b ! illegal use of b; perhaps should be b() ! 287: end ! 288: ! 289: Mon Jun 15 11:15:27 EDT 1992: ! 290: Fix bug in handling namelists with names that have underscores. ! 291: ! 292: Sat Jun 27 17:30:59 EDT 1992: ! 293: Under -A and -C++, end Main program aliases with "return 0;". ! 294: Under -A and -C++, use .P files and usage in previous subprograms ! 295: in the current file to give prototypes for functions declared EXTERNAL ! 296: but not invoked. ! 297: Fix memory fault under -d1 -P . ! 298: Under -A and -C++, cast arguments to the right types in calling ! 299: a function that has been defined in the current file or in a .P file. ! 300: Fix bug in handling multi-dimensional arrays with array references ! 301: in their leading dimensions. ! 302: Fix bug in the intrinsic cmplx function when the first argument ! 303: involves an expression for which f2c generates temporary variables, ! 304: e.g. cmplx(abs(real(a)),1.) . ! 305: ! 306: Sat Jul 18 07:36:58 EDT 1992: ! 307: Fix buglet with -e1c (invisible on most systems) temporary file ! 308: f2c_functions was unlinked before being closed. ! 309: libf77: fix bugs in evaluating m**n for integer n < 0 and m an ! 310: integer different from 1 or a real or double precision 0. ! 311: Catch SIGTRAP (to print "Trace trap" before aborting). Programs ! 312: that previously erroneously computed 1 for 0**-1 may now fault. ! 313: Relevant routines: main.c pow_di.c pow_hh.c pow_ii.c pow_ri.c . ! 314: ! 315: Sat Jul 18 08:40:10 EDT 1992: ! 316: libi77: allow namelist input to end with & (e.g. &end). ! 317: ! 318: Thu Jul 23 00:14:43 EDT 1992: ! 319: Append two underscores rather than one to C keywords used as ! 320: local variables to avoid conflicts with similarly named COMMON blocks. ! 321: ! 322: Thu Jul 23 11:20:55 EDT 1992: ! 323: libf77, libi77 updated to assume ANSI prototypes unless KR_headers ! 324: is #defined. ! 325: libi77 now recognizes a Z format item as in Fortran 90; ! 326: the implementation assumes 8-bit bytes and botches character strings ! 327: on little-endian machines (by printing their bytes from right to ! 328: left): expect this bug to persist; fixing it would require a ! 329: change to the I/O calling sequences. ! 330: ! 331: Tue Jul 28 15:18:33 EDT 1992: ! 332: libi77: insert missed "#ifdef KR_headers" lines around getnum ! 333: header in rsne.c. Version not updated. ! 334: ! 335: Thu Aug 6 14:19:22 EDT 1992: ! 336: Update "names.c from f2c/src", which missed being updated on 23 July. ! 337: ! 338: Fri Aug 14 08:07:09 EDT 1992: ! 339: libi77: tweak wrt_E in wref.c to avoid signing NaNs. ! 340: ! 341: Sun Aug 23 19:05:22 EDT 1992: ! 342: fc: supply : after O in getopt invocation (for -O1 -O2 -O3). ! 343: ! 344: Mon Aug 24 18:37:59 EDT 1992: ! 345: Recant above tweak to fc: getopt is dumber than I thought; ! 346: it's necessary to say -O 1 (etc.). ! 347: libF77/README: add comments about ABORT, ERF, DERF, ERFC, DERFC, ! 348: GETARG, GETENV, IARGC, SIGNAL, and SYSTEM. ! 349: ! 350: Tue Oct 27 01:57:42 EST 1992: ! 351: libf77, libi77: ! 352: 1. Fix botched indirection in signal_.c. ! 353: 2. Supply missing l_eof = 0 assignment to s_rsne() in rsne.c (so ! 354: end-of-file on other files won't confuse namelist reads of external ! 355: files). ! 356: 3. Prepend f__ to external names that are only of internal ! 357: interest to lib[FI]77. ! 358: ! 359: Current timestamps of files in "all from f2c/src", sorted by time, ! 360: appear below (mm/dd/year hh:mm:ss). To bring your source up to date, ! 361: obtain source files with a timestamp later than the time shown in your ! 362: version.c. Note that the time shown in the current version.c is the ! 363: timestamp of the source module that immediately follows version.c below: ! 364: ! 365: 7/23/1992 0:03:19 xsum0.out ! 366: 7/22/1992 22:54:58 version.c ! 367: 7/22/1992 22:54:52 misc.c ! 368: 7/18/1992 0:41:22 names.c ! 369: 6/27/1992 14:50:07 vax.c ! 370: 6/27/1992 14:17:39 expr.c ! 371: 6/20/1992 13:36:37 output.c ! 372: 6/20/1992 11:41:38 pread.c ! 373: 6/20/1992 11:06:07 putpcc.c ! 374: 6/20/1992 10:58:23 proc.c ! 375: 6/20/1992 8:14:11 format.c ! 376: 6/20/1992 8:03:20 defs.h ! 377: 6/20/1992 5:34:05 sysdep.c ! 378: 6/19/1992 7:15:28 main.c ! 379: 5/24/1992 9:44:46 f2c.1 ! 380: 5/24/1992 8:57:16 f2c.1t ! 381: 5/23/1992 14:18:33 lex.c ! 382: 5/22/1992 23:09:57 gram.exec ! 383: 5/05/1992 9:44:35 README ! 384: 3/25/1992 12:58:56 init.c ! 385: 1/17/1992 10:56:46 Notice ! 386: 12/30/1991 17:17:44 io.c ! 387: 12/21/1991 15:24:34 exec.c ! 388: 12/18/1991 16:11:29 intr.c ! 389: 12/18/1991 15:32:02 put.c ! 390: 10/15/1991 9:09:35 niceprintf.c ! 391: 10/15/1991 1:27:37 formatdata.c ! 392: 10/15/1991 1:26:39 sysdep.h ! 393: 10/14/1991 12:30:48 p1output.c ! 394: 10/11/1991 18:59:37 defines.h ! 395: 9/09/1991 23:15:17 xsum.c ! 396: 8/28/1991 0:07:01 gram.dcl ! 397: 6/17/1991 16:43:01 gram.head ! 398: 6/06/1991 0:41:56 makefile ! 399: 4/25/1991 12:56:19 f2c.h ! 400: 4/05/1991 7:43:45 mem.c ! 401: 2/08/1991 11:29:18 malloc.c ! 402: 1/15/1991 1:21:00 equiv.c ! 403: 11/30/1990 9:47:48 data.c ! 404: 7/26/1990 10:54:47 parse_args.c ! 405: 7/26/1990 10:44:26 parse.h ! 406: 5/11/1990 14:17:04 error.c ! 407: 4/18/1990 12:25:18 cds.c ! 408: 4/06/1990 0:00:57 gram.io ! 409: 4/05/1990 23:40:09 gram.expr ! 410: 3/27/1990 16:39:18 names.h ! 411: 3/27/1990 10:05:15 p1defs.h ! 412: 2/16/1990 10:37:27 tokens ! 413: 2/14/1990 2:00:20 format.h ! 414: 2/14/1990 1:38:46 output.h ! 415: 2/14/1990 0:54:06 iob.h ! 416: 2/03/1990 0:58:26 niceprintf.h ! 417: 1/29/1990 13:26:52 memset.c ! 418: 1/11/1990 18:02:51 ftypes.h ! 419: 1/07/1990 1:20:01 usignal.h ! 420: 11/27/1989 8:27:37 machdefs.h ! 421: 7/01/1989 11:59:44 pccdefs.h
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.