source: branches/libc-0.6/src/gcc/libf2c/readme.netlib

Last change on this file was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 29.4 KB
Line 
1
2====== old index for f2c, now "readme from f2c" ============
3
4FILES:
5
6f2c.h Include file necessary for compiling output of the converter.
7 See the second NOTE below.
8
9f2c.1 Man page for f2c.
10
11f2c.1t Source for f2c.1 (to be processed by troff -man or nroff -man).
12
13libf77 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
17libi77 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, and to
24 install it where you can access it by specifying -lf2c . The
25 definition of link_msg in sysdep.c assumes this arrangement.
26
27 Both libf77 and libi77 are bundles, meant to be unpacked by the
28 Bourne (or Korn) shell. MS-DOS users can use the MKS Toolkit
29 to unpack libf77 and libi77.
30
31libf2c.zip
32 Only available by ftp: combination of libf77 and libi77, with
33 Unix and PC makefiles.
34
35f2c.ps Postscript for a technical report on f2c. After you strip the
36 mail header, the first line should be "%!PS".
37
38fixes The complete change log, reporting bug fixes and other changes.
39 (Some recent change-log entries are given below).
40
41fc A shell script that uses f2c and imitates much of the behavior
42 of commonly found f77 commands. You will almost certainly
43 need to adjust some of the shell-variable assignments to make
44 this script work on your system.
45
46
47SUBDIRECTORY:
48
49f2c/src Source for the converter itself, including a file of checksums
50 and source for a program to compute the checksums (to verify
51 correct transmission of the source), is available: ask netlib
52 (e.g., [email protected]) to
53 send all from f2c/src
54 If the checksums show damage to just a few source files, or if
55 the change log file (see "fixes" below) reports corrections to
56 some source files, you can request those files individually
57 "from f2c/src". For example, to get defs.h and xsum0.out, you
58 would ask netlib to
59 send defs.h xsum0.out from f2c/src
60 "all from f2c/src" is about 640 kilobytes long; for convenience
61 (and checksums), it includes copies of f2c.h, f2c.1, and f2c.1t.
62
63 Tip: if asked to send over 99,000 bytes in one request, netlib
64 breaks the shipment into 1000 line pieces and sends each piece
65 separately (since otherwise some mailers might gag). To avoid
66 the hassle of reassembling the pieces, try to keep each request
67 under 99,000 bytes long. The final number in each line of
68 xsum0.out gives the length of each file in f2c/src. For
69 example,
70 send exec.c expr.c from f2c/src
71 send format.c format_data.c from f2c/src
72 will give you slightly less hassle than
73 send exec.c expr.c format.c format_data.c from f2c/src
74 Alternatively, if all the mailers in your return path allow
75 long messages, you can supply an appropriate mailsize line in
76 your netlib request, e.g.
77 mailsize 200k
78 send exec.c expr.c format.c format_data.c from f2c/src
79
80 The makefile used to generate gram.c; now we distribute a
81 working gram.c, and you must say
82 make gram1.c
83 mv gram1.c gram.c
84 if you want to generate your own gram.c -- there are just too
85 many broken variants of yacc floating around nowadays for
86 generation of gram.c to be the default.
87
88NOTE: You may exercise f2c by sending [email protected]
89 a message whose first line is "execute f2c" and whose remaining
90 lines are the Fortran 77 source that you wish to have converted.
91 Return mail brings you the resulting C, with f2c's error
92 messages between #ifdef uNdEfInEd and #endif at the end.
93 (To understand line numbers in the error messages, regard
94 the "execute f2c" line as line 0. It is stripped away by
95 the netlib software before f2c sees your Fortran input.)
96 Options described in the man page may be transmitted to
97 netlib by having the first line of input be a comment
98 whose first 6 characters are "c$f2c " and whose remaining
99 characters are the desired options, e.g., "c$f2c -R -u".
100
101 You may say "execute f2c" in the Subject line instead of (but
102 *not* in addition to) in the first line of the message body.
103
104 The incoming Fortran is saved, at least for a while. Don't
105 send any secrets!
106
107
108BUGS: Please send bug reports (including the shortest example
109 you can find that illustrates the bug) to research!dmg
110 or [email protected] . You might first check whether
111 the bug goes away when you turn optimization off.
112
113
114NOTE: f2c.h defines several types, e.g., real, integer, doublereal.
115 The definitions in f2c.h are suitable for most machines, but if
116 your machine has sizeof(double) > 2*sizeof(long), you may need
117 to adjust f2c.h appropriately. f2c assumes
118 sizeof(doublecomplex) = 2*sizeof(doublereal)
119 sizeof(doublereal) = sizeof(complex)
120 sizeof(doublereal) = 2*sizeof(real)
121 sizeof(real) = sizeof(integer)
122 sizeof(real) = sizeof(logical)
123 sizeof(real) = 2*sizeof(shortint)
124 EQUIVALENCEs may not be translated correctly if these
125 assumptions are violated.
126
127 On machines, such as those using a DEC Alpha processor, on
128 which sizeof(short) == 2, sizeof(int) == sizeof(float) == 4,
129 and sizeof(long) == sizeof(double) == 8, it suffices to
130 modify f2c.h by removing the first occurrence of "long "
131 on each line containing "long ", e.g., by issuing the
132 commands
133 mv f2c.h f2c.h0
134 sed 's/long //' f2c.h0 >f2c.h
135 On such machines, one can enable INTEGER*8 by uncommenting
136 the typedef of longint in f2c.h, so it reads
137 typedef long longint;
138 by compiling libI77 with -DAllow_TYQUAD, and by adjusting
139 libF77/makefile as described in libF77/README.
140
141 Some machines may have sizeof(int) == 4, sizeof(float) == 8,
142 and sizeof(long long) == 8. On such machines, adjust f2c.h
143 by changing "long int " to "long long ", e.g., by saying
144 mv f2c.h f2c.h0
145 sed 's/long int /long long /' f2c.h0 >f2c.h
146 One can enable INTEGER*8 on such machines as described
147 above, but with
148 typedef long long longint;
149
150 There exists a C compiler that objects to the lines
151 typedef VOID C_f; /* complex function */
152 typedef VOID H_f; /* character function */
153 typedef VOID Z_f; /* double complex function */
154 in f2c.h . If yours is such a compiler, do two things:
155 1. Complain to your vendor about this compiler bug.
156 2. Find the line
157 #define VOID void
158 in f2c.h and change it to
159 #define VOID int
160 (For readability, the f2c.h lines shown above have had two
161 tabs inserted before their first character.)
162
163FTP: All the material described above is now available by anonymous
164 ftp from netlib.bell-labs.com (login: anonymous; Password: your
165 E-mail address; cd netlib/f2c). Note that you can say, e.g.,
166
167 cd /netlib/f2c/src
168 binary
169 prompt
170 mget *.gz
171
172 to get all the .gz files in src. You must uncompress the .gz
173 files once you have a copy of them, e.g., by
174
175 gzip -dN *.gz
176
177 You can also get the entire f2c tree as a tar file:
178
179 ftp://netlib.bell-labs.com/netlib/f2c.tar
180
181 (which is a synthetic file -- created on the fly and not visible
182 to ftp's "ls" or "dir" commands).
183
184 Subdirectory msdos contains two PC versions of f2c,
185 f2c.exe.gz and f2cx.exe.gz; the latter uses extended memory.
186 The README in that directory provides more details.
187
188 Changes appear first in the f2c files available by E-mail
189 from [email protected]. If the deamons work right,
190 changed files are available the next day by ftp from
191 netlib.bell-labs.com. In due course, they reach other netlib servers.
192
193CHANGE NOTIFICATION:
194 Send the E-mail message
195 subscribe f2c
196 to [email protected] to request notification of new and
197 changed f2c files. (Beware that automatically sent change
198 notifications may reach you before changes have reached
199 ftp://netlib.bell-labs.com/netlib/f2c or to other netlib servers.)
200 Send the E-mail message
201 unsubscribe f2c
202 to recant your notification request.
203
204-----------------
205Recent change log (partial)
206-----------------
207
208Mon May 13 23:35:26 EDT 1996
209 Recognize Fortran 90's /= as a synonym for .NE.. (<> remains a
210synonym for .NE..)
211 Emit an empty int function of no arguments to supply an external
212name to named block data subprograms (so they can be called somewhere
213to force them to be loaded from a library).
214 Fix bug (memory fault) in handling the following illegal Fortran:
215 parameter(i=1)
216 equivalence(i,j)
217 end
218 Treat cdabs, cdcos, cdexp, cdlog, cdsin, and cdsqrt as synonyms for
219the double complex intrinsics zabs, zcos, zexp, zlog, zsin, and zsqrt,
220respectively, unless -cd is specified.
221 Recognize the Fortran 90 bit-manipulation intrinsics btest, iand,
222ibclr, ibits, ibset, ieor, ior, ishft, and ishftc, unless -i90 is
223specified. Note that iand, ieor, and ior are thus now synonyms for
224"and", "xor", and "or", respectively.
225 Add three macros (bit_test, bit_clear, bit_set) to f2c.h for use
226with btest, ibclr, and ibset, respectively. Add new functions
227[lq]bit_bits, [lq]bit_shift, and [lq]_bit_cshift to libF77 for
228use with ibits, ishft, and ishftc, respectively.
229 Add integer function ftell(unit) (returning -1 on error) and
230subroutine fseek(unit, offset, whence, *) to libI77 (with branch to
231label * on error).
232
233Tue May 14 23:21:12 EDT 1996
234 Fix glitch (possible memory fault, or worse) in handling multiple
235entry points with names over 28 characters long.
236
237Mon Jun 10 01:20:16 EDT 1996
238 Update netlib E-mail and ftp addresses in f2c/readme and
239f2c/src/readme (which are different files) -- to reflect the upcoming
240breakup of AT&T.
241 libf77: trivial tweaks to F77_aloc.c and system_.c; Version.c not
242changed.
243 libi77: Adjust rsli.c and lread.c so internal list input with too
244few items in the input string will honor end= .
245
246Mon Jun 10 22:59:57 EDT 1996
247 Add Bits_per_Byte to sysdep.h and adjust definition of Table_size
248to depend on Bits_per_Byte (forcing Table_size to be a power of 2); in
249lex.c, change "comstart[c & 0xfff]" to "comstart[c & (Table_size-1)]"
250to avoid an out-of-range subscript on end-of-file.
251
252Wed Jun 12 00:24:28 EDT 1996
253 Fix bug in output.c (dereferencing a freed pointer) revealed in
254 print * !np in out_call in output.c clobbered by free
255 end !during out_expr.
256
257Wed Jun 19 08:12:47 EDT 1996
258 f2c.h: add types uinteger, ulongint (for libF77); add qbit_clear
259and qbit_set macros (in a commented-out section) for integer*8.
260 For integer*8, use qbit_clear and qbit_set for ibclr and ibset.
261 libf77: add casts to unsigned in [lq]bitshft.c.
262
263Thu Jun 20 13:30:43 EDT 1996
264 Complain at character*(*) in common (rather than faulting).
265 Fix bug in recognizing hex constants that start with "16#" (e.g.,
26616#1234abcd, which is a synonym for z'1234abcd').
267 Fix bugs in constant folding of expressions involving btest, ibclr,
268and ibset.
269 Fix bug in constant folding of rshift(16#80000000, -31) (on a 32-bit
270machine; more generally, the bug was in constant folding of
271rshift(ibset(0,NBITS-1), 1-NBITS) when f2c runs on a machine with