|
|
1.1 ! root 1: . \" Definitions of L and LR for the benefit of systems ! 2: . \" whose -man lacks them... ! 3: .de L ! 4: .nh ! 5: .if n \%`\\$1' ! 6: .if t \%\&\f(CW\\$1\fR ! 7: .hy 14 ! 8: .. ! 9: .de LR ! 10: .nh ! 11: .if n \%`\\$1'\\$2 ! 12: .if t \%\&\f(CW\\$1\fR\\$2 ! 13: .hy 14 ! 14: .. ! 15: .TH F2C 1 ! 16: .CT 1 prog_other ! 17: .SH NAME ! 18: f\^2c \(mi Convert Fortran 77 to C or C++ ! 19: .SH SYNOPSIS ! 20: .B f\^2c ! 21: [ ! 22: .I option ... ! 23: ] ! 24: .I file ... ! 25: .SH DESCRIPTION ! 26: .I F2c ! 27: converts Fortran 77 source code in ! 28: .I files ! 29: with names ending in ! 30: .L .f ! 31: or ! 32: .L .F ! 33: to C (or C++) source files in the ! 34: current directory, with ! 35: .L .c ! 36: substituted ! 37: for the final ! 38: .L .f ! 39: or ! 40: .LR .F . ! 41: If no Fortran files are named, ! 42: .I f\^2c ! 43: reads Fortran from standard input and ! 44: writes C on standard output. ! 45: .I File ! 46: names that end with ! 47: .L .p ! 48: or ! 49: .L .P ! 50: are taken to be prototype ! 51: files, as produced by option ! 52: .LR -P , ! 53: and are read first. ! 54: .PP ! 55: The options are ! 56: .HP ! 57: .BR -w , ! 58: .BR -w66 , ! 59: .BR -onetrip , ! 60: .BR -u , ! 61: .BR -C , ! 62: .BR -I2 , ! 63: .B -I4 ! 64: (default), ! 65: .BR -U ! 66: .br ! 67: Same as in ! 68: .IR f\^77 (1). ! 69: .PD0 ! 70: .TP ! 71: .B -A ! 72: Produce ! 73: .SM ANSI ! 74: C. ! 75: Default is old-style C. ! 76: .TP ! 77: .B -a ! 78: Make local variables automatic rather than static ! 79: unless they appear in a ! 80: .SM "DATA, EQUIVALENCE, NAMELIST," ! 81: or ! 82: .SM SAVE ! 83: statement. ! 84: .TP ! 85: .B -C++ ! 86: Output C++ code. ! 87: .TP ! 88: .B -c ! 89: Include original Fortran source as comments. ! 90: .TP ! 91: .B -E ! 92: Declare uninitialized ! 93: .SM COMMON ! 94: to be ! 95: .B Extern ! 96: (overridably defined in ! 97: .F f2c.h ! 98: as ! 99: .B extern). ! 100: .TP ! 101: .B -ec ! 102: Place uninitialized ! 103: .SM COMMON ! 104: blocks in separate files: ! 105: .B COMMON /ABC/ ! 106: appears in file ! 107: .BR abc_com.c . ! 108: Option ! 109: .LR -e1c ! 110: bundles the separate files ! 111: into the output file, with comments that give an unbundling ! 112: .IR sed (1) ! 113: script. ! 114: .TP ! 115: .B -ext ! 116: Complain about ! 117: .IR f\^77 (1) ! 118: extensions. ! 119: .TP ! 120: .B -g ! 121: Include original Fortran line numbers as comments. ! 122: .TP ! 123: .B -i2 ! 124: Similar to ! 125: .BR -I2 , ! 126: but assume a modified ! 127: .I libF77 ! 128: and ! 129: .I libI77 ! 130: (compiled with ! 131: .BR -Df\^2c_i2 ), ! 132: so ! 133: .SM INTEGER ! 134: and ! 135: .SM LOGICAL ! 136: variables may be assigned by ! 137: .SM INQUIRE. ! 138: .TP ! 139: .B -P ! 140: Write a ! 141: .IB file .P ! 142: of ANSI (or C++) prototypes ! 143: for procedures defined in each input ! 144: .IB file .f ! 145: or ! 146: .IB file .F . ! 147: When reading Fortran from standard input, write prototypes ! 148: at the beginning of standard output. ! 149: Implies ! 150: .B -A ! 151: unless option ! 152: .L -C++ ! 153: is present. Option ! 154: .B -Ps ! 155: implies ! 156: .B -P ! 157: and gives exit status 4 if rerunning ! 158: .I f\^2c ! 159: may change prototypes or declarations. ! 160: .TP ! 161: .B -p ! 162: Supply preprocessor definitions to make common-block members ! 163: look like local variables. ! 164: .TP ! 165: .B -R ! 166: Do not promote ! 167: .SM REAL ! 168: functions and operations to ! 169: .SM DOUBLE PRECISION. ! 170: Option ! 171: .L -!R ! 172: confirms the default, which imitates ! 173: .IR f\^77 . ! 174: .TP ! 175: .B -r8 ! 176: Promote ! 177: .SM REAL ! 178: to ! 179: .SM DOUBLE PRECISION, COMPLEX ! 180: to ! 181: .SM DOUBLE COMPLEX. ! 182: .TP ! 183: .BI -T dir ! 184: Put temporary files in directory ! 185: .I dir. ! 186: .TP ! 187: .B -w8 ! 188: Suppress warnings when ! 189: .SM COMMON ! 190: or ! 191: .SM EQUIVALENCE ! 192: forces odd-word alignment of doubles. ! 193: .TP ! 194: .BI -W n ! 195: Assume ! 196: .I n ! 197: characters/word (default 4) ! 198: when initializing numeric variables with character data. ! 199: .TP ! 200: .B -z ! 201: Do not implicitly recognize ! 202: .SM DOUBLE COMPLEX. ! 203: .TP ! 204: .B -!c ! 205: Inhibit C output, but produce ! 206: .B -P ! 207: output. ! 208: .TP ! 209: .B -!I ! 210: Reject ! 211: .B include ! 212: statements. ! 213: .TP ! 214: .B -!it ! 215: Do not infer return types of untyped ! 216: .SM EXTERNAL ! 217: procedures from use as arguments. ! 218: .TP ! 219: .B -!P ! 220: Do not infer ! 221: .SM ANSI ! 222: or C++ ! 223: prototypes from usage. ! 224: .PD ! 225: .PP ! 226: The resulting C invokes the support routines of ! 227: .IR f\^77 ; ! 228: object code should be loaded by ! 229: .I f\^77 ! 230: or with ! 231: .IR ld (1) ! 232: or ! 233: .IR cc (1) ! 234: options ! 235: .BR "-lF77 -lI77 -lm" . ! 236: .SH FILES ! 237: .F /usr/include/f2c.h ! 238: .br ! 239: Other files as in ! 240: .IR f\^77 (1). ! 241: .SH "SEE ALSO" ! 242: S. I. Feldman and ! 243: P. J. Weinberger, ! 244: `A Portable Fortran 77 Compiler', ! 245: this manual, Volume 2. ! 246: .SH BUGS ! 247: Floating-point constant expressions are ! 248: accurate to at most 16 or 17 decimal places. ! 249: . ".br ! 250: . "Untypable ! 251: . ".SM EXTERNAL ! 252: . "functions are declared ! 253: . ".BR int .
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.