index 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. ====== index for f2c ============
  2. FILES:
  3. f2c.h Include file necessary for compiling output of the converter.
  4. See the second NOTE below.
  5. f2c.1 Man page for f2c.
  6. f2c.1t Source for f2c.1 (to be processed by troff -man or nroff -man).
  7. libf77 Library of non I/O support routines the generated C may need.
  8. Fortran main programs result in a C function named MAIN__ that
  9. is meant to be invoked by the main() in libf77.
  10. libi77 Library of Fortran I/O routines the generated C may need.
  11. Note that some vendors (e.g., BSD, Sun and MIPS) provide a
  12. libF77 and libI77 that are incompatible with f2c -- they
  13. provide some differently named routines or routines with the
  14. names that f2c expects, but with different calling sequences.
  15. On such systems, the recommended procedure is to merge
  16. libf77 and libi77 into a single library, say libf2c, to install
  17. it where you can access it by specifying -lf2c , and to adjust
  18. the definition of link_msg in sysdep.c appropriately.
  19. f2c.ps Postscript for a technical report on f2c. After you strip the
  20. mail header, the first line should be "%!PS".
  21. fixes The complete change log, reporting bug fixes and other changes.
  22. (Some recent change-log entries are given below).
  23. fc A shell script that uses f2c and imitates much of the behavior
  24. of commonly found f77 commands. You will almost certainly
  25. need to adjust some of the shell-variable assignments to make
  26. this script work on your system.
  27. SUBDIRECTORY:
  28. f2c/src Source for the converter itself, including a file of checksums
  29. and source for a program to compute the checksums (to verify
  30. correct transmission of the source), is available: ask netlib to
  31. send all from f2c/src
  32. If the checksums show damage to just a few source files, or if
  33. the change log file (see "fixes" below) reports corrections to
  34. some source files, you can request those files individually
  35. "from f2c/src". For example, to get defs.h and xsum0.out, you
  36. would ask netlib to
  37. send defs.h xsum0.out from f2c/src
  38. "all from f2c/src" is 649642 bytes long.
  39. Tip: if asked to send over 99,000 bytes in one request, netlib
  40. breaks the shipment into 1000 line pieces and sends each piece
  41. separately (since otherwise some mailers might gag). To avoid
  42. the hassle of reassembling the pieces, try to keep each request
  43. under 99,000 bytes long. The final number in each line of
  44. xsum0.out gives the length of each file in f2c/src. For
  45. example,
  46. send exec.c expr.c from f2c/src
  47. send format.c format_data.c from f2c/src
  48. will give you slightly less hassle than
  49. send exec.c expr.c format.c format_data.c from f2c/src
  50. If you have trouble generating gram.c, you can ask netlib to
  51. send gram.c from f2c/src
  52. Then `xsum gram.c` should report
  53. gram.c efa337b3 57282
  54. NOTE: For now, you may exercise f2c by sending netlib a message whose
  55. first line is "execute f2c" and whose remaining lines are
  56. the Fortran 77 source that you wish to have converted.
  57. Return mail brings you the resulting C, with f2c's error
  58. messages between #ifdef uNdEfInEd and #endif at the end.
  59. (To understand line numbers in the error messages, regard
  60. the "execute f2c" line as line 0. It is stripped away by
  61. the netlib software before f2c sees your Fortran input.)
  62. Options described in the man page may be transmitted to
  63. netlib by having the first line of input be a comment
  64. whose first 6 characters are "c$f2c " and whose remaining
  65. characters are the desired options, e.g., "c$f2c -R -u".
  66. This scheme may change -- ask netlib to
  67. send index from f2c
  68. if you do not get the behavior you expect.
  69. During the initial experimental period, incoming Fortran
  70. will be saved in a file. Don't send any secrets!
  71. BUGS: Please send bug reports (including the shortest example
  72. you can find that illustrates the bug) to research!dmg
  73. or dmg@research.att.com . You might first check whether
  74. the bug goes away when you turn optimization off.
  75. NOTE: f2c.h defines several types, e.g., real, integer, doublereal.
  76. The definitions in f2c.h are suitable for most machines, but if
  77. your machine has sizeof(double) > 2*sizeof(long), you may need
  78. to adjust f2c.h appropriately. f2c assumes
  79. sizeof(doublecomplex) = 2*sizeof(doublereal)
  80. sizeof(doublereal) = sizeof(complex)
  81. sizeof(doublereal) = 2*sizeof(real)
  82. sizeof(real) = sizeof(integer)
  83. sizeof(real) = sizeof(logical)
  84. sizeof(real) = 2*sizeof(shortint)
  85. EQUIVALENCEs may not be translated correctly if these
  86. assumptions are violated.
  87. There exists a C compiler that objects to the lines
  88. typedef VOID C_f; /* complex function */
  89. typedef VOID H_f; /* character function */
  90. typedef VOID Z_f; /* double complex function */
  91. in f2c.h . If yours is such a compiler, do two things:
  92. 1. Complain to your vendor about this compiler bug.
  93. 2. Find the line
  94. #define VOID void
  95. in f2c.h and change it to
  96. #define VOID int
  97. (For readability, the f2c.h lines shown above have had two
  98. tabs inserted before their first character.)
  99. FTP: All the material described above is now available by ftp from
  100. research.att.com (login: netlib; Password: your E-mail address;
  101. cd f2c). You must uncompress the .Z files once you have a
  102. copy of them, e.g., by
  103. uncompress *.Z
  104. -----------------
  105. Recent change log (partial)
  106. -----------------
  107. Tue Jan 15 12:00:24 EST 1991:
  108. Fix bug when two equivalence groups are merged, the second with
  109. nonzero offset, and the result is then merged into a common block.
  110. Example:
  111. INTEGER W(3), X(3), Y(3), Z(3)
  112. COMMON /ZOT/ Z
  113. EQUIVALENCE (W(1),X(1)), (X(2),Y(1)), (Z(3),X(1))
  114. ***** W WAS GIVEN THE WRONG OFFSET
  115. Recognize Fortran 90's optional NML= in NAMELIST READs and WRITEs.
  116. (Currently NML= and FMT= are treated as synonyms -- there's no
  117. error message if, e.g., NML= specifies a format.)
  118. libi77: minor adjustment to allow internal READs from character
  119. string constants in read-only memory.
  120. Wed Jan 23 00:38:48 EST 1991:
  121. Allow hex, octal, and binary constants to have the qualifying letter
  122. (z, x, o, or b) either before or after the quoted string containing the
  123. digits. For now this change will not be reflected in f2c.ps .
  124. Tue Jan 29 16:23:45 EST 1991:
  125. Arrange for character-valued statement functions to give results of
  126. the right length (that of the statement function's name).
  127. Wed Jan 30 07:05:32 EST 1991:
  128. More tweaks for character-valued statement functions: an error
  129. check and an adjustment so a right-hand side of nonconstant length
  130. (e.g., a substring) is handled right.
  131. Thu Jan 31 13:53:44 EST 1991:
  132. Add a test after the cleanup call generated for I/O statements with
  133. ERR= or END= clauses to catch the unlikely event that the cleanup
  134. routine encounters an error.
  135. Tue Feb 5 01:39:36 EST 1991:
  136. Change Mktemp to mktmp (for the benefit of systems so brain-damaged
  137. that they do not distinguish case in external names -- and that for
  138. some reason want to load mktemp). Try to get xsum0.out right this
  139. time (it somehow didn't get updated on 4 Feb. 1991).
  140. Add note to libi77/README about adjusting the interpretation of
  141. RECL= specifiers in OPENs for direct unformatted I/O.
  142. Thu Feb 7 17:24:42 EST 1991:
  143. New option -r casts values of REAL functions, including intrinsics,
  144. to REAL. This only matters for unportable code like
  145. real r
  146. r = asin(1.)
  147. if (r .eq. asin(1.)) ...
  148. [The behavior of such code varies with the Fortran compiler used --
  149. and sometimes is affected by compiler options.] For now, the man page
  150. at the end of f2c.ps is the only part of f2c.ps that reflects this new
  151. option.
  152. Fri Feb 8 18:12:51 EST 1991:
  153. Cast pointer differences passed as arguments to the appropriate type.
  154. This matters, e.g., with MSDOS compilers that yield a long pointer
  155. difference but have int == short.
  156. Disallow nonpositive dimensions.
  157. Fri Feb 15 12:24:15 EST 1991:
  158. Change %d to %ld in sprintf call in putpower in putpcc.c.
  159. Free more memory (e.g. allowing translation of larger Fortran
  160. files under MS-DOS).
  161. Recognize READ (character expression)
  162. as formatted I/O with the format given by the character expression.
  163. Update year in Notice.
  164. Mon Mar 4 15:19:42 EST 1991:
  165. Fix bug in passing the real part of a complex argument to an intrinsic
  166. function. Omit unneeded parentheses in nested calls to intrinsics.
  167. Example:
  168. subroutine foo(x, y)
  169. complex y
  170. x = exp(sin(real(y))) + exp(imag(y))
  171. end
  172. Fri Mar 8 15:05:42 EST 1991:
  173. Fix a comment in expr.c; omit safstrncpy.c (which had bugs in
  174. cases not used by f2c).
  175. Wed Mar 13 02:27:23 EST 1991:
  176. Initialize firstmemblock->next in mem_init in mem.c . [On most
  177. systems it was fortuituously 0, but with System V, -lmalloc could
  178. trip on this missed initialization.]
  179. Wed Mar 13 11:47:42 EST 1991:
  180. Fix a reference to freed memory.
  181. Wed Mar 27 00:42:19 EST 1991:
  182. Fix a memory fault caused by such illegal Fortran as
  183. function foo
  184. x = 3
  185. logical foo ! declaration among executables
  186. foo=.false. ! used to suffer memory fault
  187. end
  188. Fri Apr 5 08:30:31 EST 1991:
  189. Fix loss of % in some format expressions, e.g.
  190. write(*,'(1h%)')
  191. Fix botch introduced 27 March 1991 that caused subroutines with
  192. multiple entry points to have extraneous declarations of ret_val.
  193. Fri Apr 5 12:44:02 EST 1991
  194. Try again to omit extraneous ret_val declarations -- this morning's
  195. fix was sometimes wrong.
  196. Mon Apr 8 13:47:06 EDT 1991:
  197. Arrange for s_rnge to have the right prototype under -A -C .
  198. Wed Apr 17 13:36:03 EDT 1991:
  199. New fatal error message for apparent invocation of a recursive
  200. statement function.
  201. Thu Apr 25 15:13:37 EDT 1991:
  202. F2c and libi77 adjusted so NAMELIST works with -i2. (I forgot
  203. about -i2 when adding NAMELIST.) This required a change to f2c.h
  204. (that only affects NAMELIST I/O under -i2.) Man-page description of
  205. -i2 adjusted to reflect that -i2 stores array lengths in short ints.
  206. Fri Apr 26 02:54:41 EDT 1991:
  207. Libi77: fix some bugs in NAMELIST reading of multi-dimensional arrays
  208. (file rsne.c).
  209. Tue May 7 09:04:48 EDT 1991:
  210. gram.c added to f2c/src (for folks who have trouble generating it. It
  211. is not in "all from f2c", nor in the list of current timestamps below.)
  212. Thu May 9 02:13:51 EDT 1991:
  213. Omit a trailing space in expr.c (could cause a false xsum value if
  214. a mailer drops the trailing blank).
  215. Thu May 16 13:14:59 EDT 1991:
  216. libi77: increase LEFBL in lio.h to overcome a NeXT bug.
  217. Tweak for compilers that recognize "nested" comments: inside comments,
  218. turn /* into /+ (as well as */ into +/).
  219. Sat May 25 11:44:25 EDT 1991:
  220. libf77: s_rnge: declare line long int rather than int.
  221. Fri May 31 07:51:50 EDT 1991:
  222. libf77: system_: officially return status.
  223. Mon Jun 17 16:52:53 EDT 1991:
  224. Minor tweaks: omit unnecessary declaration of strcmp (that caused
  225. trouble on a system where strcmp was a macro) from misc.c; add
  226. SHELL = /bin/sh to makefiles.
  227. Fix a dereference of null when a CHARACTER*(*) declaration appears
  228. (illegally) after DATA. Complain only once per subroutine about
  229. declarations appearing after DATA.
  230. Mon Jul 1 00:28:13 EDT 1991:
  231. Add test and error message for illegal use of subroutine names, e.g.
  232. SUBROUTINE ZAP(A)
  233. ZAP = A
  234. END
  235. Mon Jul 8 21:49:20 EDT 1991:
  236. Issue a warning about things like
  237. integer i
  238. i = 'abc'
  239. (which is treated as i = ichar('a')). [It might be nice to treat 'abc'
  240. as an integer initialized (in a DATA statement) with 'abc', but
  241. other matters have higher priority.]
  242. Render
  243. i = ichar('A')
  244. as
  245. i = 'A';
  246. rather than
  247. i = 65;
  248. (which assumes ASCII).
  249. Fri Jul 12 07:41:30 EDT 1991:
  250. Note added to README about erroneous definitions of __STDC__ .
  251. Sat Jul 13 13:38:54 EDT 1991:
  252. Fix bugs in double type convesions of complex values, e.g.
  253. sngl(real(...)) or dble(real(...)) (where ... is complex).
  254. Mon Jul 15 13:21:42 EDT 1991:
  255. Fix bug introduced 8 July 1991 that caused erroneous warnings
  256. "ichar([first char. of] char. string) assumed for conversion to numeric"
  257. when a subroutine had an array of character strings as an argument.
  258. Wed Aug 28 01:12:17 EDT 1991:
  259. Omit an unused function in format.c, an unused variable in proc.c .
  260. Under -r8, promote complex to double complex (as the man page claims).
  261. Fri Aug 30 17:19:17 EDT 1991:
  262. f2c.ps updated: slightly expand description of intrinsics and,or,xor,
  263. not; add mention of intrinsics lshift, rshift; add note about f2c
  264. accepting Fortran 90 inline comments (starting with !); update Cobalt
  265. Blue address.
  266. Tue Sep 17 07:17:33 EDT 1991:
  267. libI77: err.c and open.c modified to use modes "rb" and "wb"
  268. when (f)opening unformatted files; README updated to point out
  269. that it may be necessary to change these modes to "r" and "w"
  270. on some non-ANSI systems.
  271. Current timestamps of files in "all from f2c/src", sorted by time,
  272. appear below (mm/dd/year hh:mm:ss). To bring your source up to date,
  273. obtain source files with a timestamp later than the time shown in your
  274. version.c. Note that the time shown in the current version.c is the
  275. timestamp of the source module that immediately follows version.c below:
  276. 8/28/1991 0:29:01 xsum0.out
  277. 8/28/1991 0:23:26 version.c
  278. 8/28/1991 0:07:02 main.c
  279. 8/28/1991 0:07:01 gram.dcl
  280. 8/28/1991 0:07:01 expr.c
  281. 8/28/1991 0:07:00 defs.h
  282. 8/13/1991 9:06:09 format.c
  283. 8/13/1991 9:04:25 proc.c
  284. 7/13/1991 12:58:37 putpcc.c
  285. 7/12/1991 7:25:33 README
  286. 7/05/1991 7:16:57 intr.c
  287. 6/17/1991 16:43:01 gram.head
  288. 6/06/1991 0:41:56 makefile
  289. 6/05/1991 8:34:09 misc.c
  290. 5/16/1991 13:06:06 p1output.c
  291. 4/25/1991 13:20:26 f2c.1
  292. 4/25/1991 12:56:19 f2c.h
  293. 4/25/1991 12:51:27 f2c.1t
  294. 4/25/1991 12:10:22 io.c
  295. 4/05/1991 7:43:45 mem.c
  296. 3/13/1991 11:18:09 output.c
  297. 3/08/1991 10:14:45 niceprintf.c
  298. 2/15/1991 12:08:26 Notice
  299. 2/08/1991 11:29:18 gram.exec
  300. 2/08/1991 11:29:18 malloc.c
  301. 2/05/1991 0:52:39 exec.c
  302. 1/22/1991 19:25:10 lex.c
  303. 1/15/1991 1:21:00 equiv.c
  304. 12/16/1990 16:46:20 xsum.c
  305. 12/07/1990 17:37:08 names.c
  306. 11/30/1990 9:47:48 data.c
  307. 7/26/1990 10:54:47 parse_args.c
  308. 7/26/1990 10:44:26 parse.h
  309. 6/19/1990 0:18:23 formatdata.c
  310. 5/11/1990 14:17:04 error.c
  311. 4/23/1990 17:35:47 sysdep.h
  312. 4/23/1990 16:37:50 sysdep.c
  313. 4/18/1990 12:25:19 init.c
  314. 4/18/1990 12:25:19 pread.c
  315. 4/18/1990 12:25:18 cds.c
  316. 4/10/1990 0:00:38 put.c
  317. 4/06/1990 0:00:57 gram.io
  318. 4/05/1990 23:40:09 gram.expr
  319. 3/27/1990 16:39:18 names.h
  320. 3/27/1990 10:05:15 p1defs.h
  321. 3/27/1990 10:05:14 defines.h
  322. 2/25/1990 9:04:30 vax.c
  323. 2/16/1990 10:37:27 tokens
  324. 2/14/1990 2:00:20 format.h
  325. 2/14/1990 1:38:46 output.h
  326. 2/14/1990 0:54:06 iob.h
  327. 2/03/1990 0:58:26 niceprintf.h
  328. 1/29/1990 13:26:52 memset.c
  329. 1/11/1990 18:02:51 ftypes.h
  330. 1/07/1990 1:20:01 usignal.h
  331. 11/27/1989 8:27:37 machdefs.h
  332. 7/01/1989 11:59:44 pccdefs.h