|
|
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\fP
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: f2c \(mi Convert Fortran 77 to C or C++
19: .SH SYNOPSIS
20: .B f2c
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 f2c
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 f77 (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 f77 (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 -Df2c_i2 ),
132: so
133: .SM INTEGER
134: and
135: .SM LOGICAL
136: variables may be assigned by
137: .SM INQUIRE.
138: .TP
139: .B -it
140: Infer types of untyped
141: .SM EXTERNAL
142: arguments from usage.
143: .TP
144: .B -P
145: Write a
146: .IB file .P
147: of ANSI (or C++) prototypes
148: for procedures defined in each input
149: .IB file .f
150: or
151: .IB file .F .
152: When reading Fortran from standard input, write prototypes
153: at the beginning of standard output.
154: Implies
155: .B -A
156: unless option
157: .L -C++
158: is present.
159: .TP
160: .B -p
161: Supply preprocessor definitions to make common-block members
162: look like local variables.
163: .TP
164: .B -R
165: Do not promote
166: .SM REAL
167: functions and operations to
168: .SM DOUBLE PRECISION.
169: Option
170: .L -!R
171: confirms the default, which imitates
172: .IR f77 .
173: .TP
174: .B -r8
175: Promote
176: .SM REAL
177: to
178: .SM DOUBLE PRECISION, COMPLEX
179: to
180: .SM DOUBLE COMPLEX.
181: .TP
182: .BI -T dir
183: Put temporary files in directory
184: .I dir.
185: .TP
186: .B -w8
187: Suppress warnings when
188: .SM COMMON
189: or
190: .SM EQUIVALENCE
191: forces odd-word alignment of doubles.
192: .TP
193: .BI -W n
194: Assume
195: .I n
196: characters/word (default 4)
197: when initializing numeric variables with character data.
198: .TP
199: .B -z
200: Do not implicitly recognize
201: .SM DOUBLE COMPLEX.
202: .TP
203: .B -!c
204: Inhibit C output, but produce
205: .B -P
206: output.
207: .TP
208: .B -!I
209: Reject
210: .B include
211: statements.
212: .TP
213: .B -!P
214: Do not attempt to infer
215: .SM ANSI
216: or C++
217: prototypes from usage.
218: .PD
219: .PP
220: The resulting C invokes the support routines of
221: .IR f77 ;
222: object code should be loaded by
223: .I f77
224: or with
225: .IR ld (1)
226: or
227: .IR cc (1)
228: options
229: .BR "-lI77 -lF77 -lm" .
230: .SH FILES
231: .F /usr/include/f2c.h
232: .br
233: Other files as in
234: .IR f77 (1).
235: .SH "SEE ALSO"
236: S. I. Feldman and
237: P. J. Weinberger,
238: `A Portable Fortran 77 Compiler',
239: this manual, Volume 2.
240: .SH BUGS
241: Floating-point constant expressions are
242: accurate to at most 16 or 17 decimal places.
243: .br
244: Untypable
245: .SM EXTERNAL
246: functions are declared
247: .BR int .
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.