fixes 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184
  1. 31 Aug. 1989:
  2. 1. A(min(i,j)) now is translated correctly (where A is an array).
  3. 2. 7 and 8 character variable names are allowed (but elicit a
  4. complaint under -ext).
  5. 3. LOGICAL*1 is treated as LOGICAL, with just one error message
  6. per LOGICAL*1 statement (rather than one per variable declared
  7. in that statement). [Note that LOGICAL*1 is not in Fortran 77.]
  8. Like f77, f2c now allows the format in a read or write statement
  9. to be an integer array.
  10. 5 Sept. 1989:
  11. Fixed botch in argument passing of substrings of equivalenced
  12. variables.
  13. 15 Sept. 1989:
  14. Warn about incorrect code generated when a character-valued
  15. function is not declared external and is passed as a parameter
  16. (in violation of the Fortran 77 standard) before it is invoked.
  17. Example:
  18. subroutine foo(a,b)
  19. character*10 a,b
  20. call goo(a,b)
  21. b = a(3)
  22. end
  23. 18 Sept. 1989:
  24. Complain about overlapping initializations.
  25. 20 Sept. 1989:
  26. Warn about names declared EXTERNAL but never referenced;
  27. include such names as externs in the generated C (even
  28. though most C compilers will discard them).
  29. 24 Sept. 1989:
  30. New option -w8 to suppress complaint when COMMON or EQUIVALENCE
  31. forces word alignment of a double.
  32. Under -A (for ANSI C), ensure that floating constants (terminated
  33. by 'f') contain either a decimal point or an exponent field.
  34. Repair bugs sometimes encountered with CHAR and ICHAR intrinsic
  35. functions.
  36. Restore f77's optimizations for copying and comparing character
  37. strings of length 1.
  38. Always assume floating-point valued routines in libF77 return
  39. doubles, even under -R.
  40. Repair occasional omission of arguments in routines having multiple
  41. entry points.
  42. Repair bugs in computing offsets of character strings involved
  43. in EQUIVALENCE.
  44. Don't omit structure qualification when COMMON variables are used
  45. as FORMATs or internal files.
  46. 2 Oct. 1989:
  47. Warn about variables that appear only in data stmts; don't emit them.
  48. Fix bugs in character DATA for noncharacter variables
  49. involved in EQUIVALENCE.
  50. Treat noncharacter variables initialized (at least partly) with
  51. character data as though they were equivalenced -- put out a struct
  52. and #define the variables. This eliminates the hideous and nonportable
  53. numeric values that were used to initialize such variables.
  54. Treat IMPLICIT NONE as IMPLICIT UNDEFINED(A-Z) .
  55. Quit when given invalid options.
  56. 8 Oct. 1989:
  57. Modified naming scheme for generated intermediate variables;
  58. more are recycled, fewer distinct ones used.
  59. New option -W nn specifies nn characters/word for Hollerith
  60. data initializing non-character variables.
  61. Bug fix: x(i:min(i+10,j)) used to elicit "Can't handle opcode 31 yet".
  62. Integer expressions of the form (i+const1) - (i+const2), where
  63. i is a scalar integer variable, are now simplified to (const1-const2);
  64. this leads to simpler translation of some substring expressions.
  65. Initialize uninitialized portions of character string arrays to 0
  66. rather than to blanks.
  67. 9 Oct. 1989:
  68. New option -c to insert comments showing original Fortran source.
  69. New option -g to insert line numbers of original Fortran source.
  70. 10 Oct. 1989:
  71. ! recognized as in-line comment delimiter (a la Fortran 88).
  72. 24 Oct. 1989:
  73. New options to ease coping with systems that want the structs
  74. that result from COMMON blocks to be defined just once:
  75. -E causes uninitialized COMMON blocks to be declared Extern;
  76. if Extern is undefined, f2c.h #defines it to be extern.
  77. -ec causes a separate .c file to be emitted for each
  78. uninitialized COMMON block: COMMON /ABC/ yields abc_com.c;
  79. thus one can compile *_com.c into a library to ensure
  80. precisely one definition.
  81. -e1c is similar to -ec, except that everything goes into
  82. one file, along with comments that give a sed script for
  83. splitting the file into the pieces that -ec would give.
  84. This is for use with netlib's "execute f2c" service (for which
  85. -ec is coerced into -e1c, and the sed script will put everything
  86. but the COMMON definitions into f2c_out.c ).
  87. 28 Oct. 1989:
  88. Convert "i = i op ..." into "i op= ...;" even when i is a
  89. dummy argument.
  90. 13 Nov. 1989:
  91. Name integer constants (passed as arguments) c__... rather
  92. than c_... so
  93. common /c/stuff
  94. call foo(1)
  95. ...
  96. is translated correctly.
  97. 19 Nov. 1989:
  98. Floating-point constants are now kept as strings unless they
  99. are involved in constant expressions that get simplified. The
  100. floating-point constants kept as strings can have arbitrarily
  101. many significant figures and a very large exponent field (as
  102. large as long int allows on the machine on which f2c runs).
  103. Thus, for example, the body of
  104. subroutine zot(x)
  105. double precision x(6), pi
  106. parameter (pi=3.1415926535897932384626433832795028841972)
  107. x(1) = pi
  108. x(2) = pi+1
  109. x(3) = 9287349823749272.7429874923740978492734D-298374
  110. x(4) = .89
  111. x(5) = 4.0005
  112. x(6) = 10D7
  113. end
  114. now gets translated into
  115. x[1] = 3.1415926535897932384626433832795028841972;
  116. x[2] = 4.1415926535897931;
  117. x[3] = 9.2873498237492727429874923740978492734e-298359;
  118. x[4] = (float).89;
  119. x[5] = (float)4.0005;
  120. x[6] = 1e8;
  121. rather than the former
  122. x[1] = 3.1415926535897931;
  123. x[2] = 4.1415926535897931;
  124. x[3] = 0.;
  125. x[4] = (float)0.89000000000000003;
  126. x[5] = (float)4.0004999999999997;
  127. x[6] = 100000000.;
  128. Recognition of f77 machine-constant intrinsics deleted, i.e.,
  129. epbase, epprec, epemin, epemax, eptiny, ephuge, epmrsp.
  130. 22 Nov. 1989:
  131. Workarounds for glitches on some Sun systems...
  132. libf77: libF77/makefile modified to point out possible need
  133. to compile libF77/main.c with -Donexit=on_exit .
  134. libi77: libI77/wref.c (and libI77/README) modified so non-ANSI
  135. systems can compile with USE_STRLEN defined, which will cause
  136. sprintf(b = buf, "%#.*f", d, x);
  137. n = strlen(b) + d1;
  138. rather than
  139. n = sprintf(b = buf, "%#.*f", d, x) + d1;
  140. to be compiled.
  141. 26 Nov. 1989:
  142. Longer names are now accepted (up to 50 characters); names may
  143. contain underscores (in which case they will have two underscores
  144. appended, to avoid clashes with library names).
  145. 28 Nov. 1989:
  146. libi77 updated:
  147. 1. Allow 3 (or, on Crays, 4) digit exponents under format Ew.d .
  148. 2. Try to get things right on machines where ints have 16 bits.
  149. 29 Nov. 1989:
  150. Supplied missing semicolon in parameterless subroutines that
  151. have multiple entry points (all of them parameterless).
  152. 30 Nov. 1989:
  153. libf77 and libi77 revised to use types from f2c.h.
  154. f2c now types floating-point valued C library routines as "double"
  155. rather than "doublereal" (for use with nonstandard C compilers for
  156. which "double" is IEEE double extended).
  157. 1 Dec. 1989:
  158. f2c.h updated to eliminate #defines rendered unnecessary (and,
  159. indeed, dangerous) by change of 26 Nov. to long names possibly
  160. containing underscores.
  161. libi77 further revised: yesterday's change omitted two tweaks to fmt.h
  162. (tweaks which only matter if float and real or double and doublereal are
  163. different types).
  164. 2 Dec. 1989:
  165. Better error message (than "bad tag") for NAMELIST, which no longer
  166. inhibits C output.
  167. 4 Dec. 1989:
  168. Allow capital letters in hex constants (f77 extension; e.g.,
  169. x'a012BCd', X'A012BCD' and x'a012bcd' are all treated as the integer
  170. 167848909).
  171. libi77 further revised: lio.c lio.h lread.c wref.c wrtfmt.c tweaked
  172. again to allow float and real or double and doublereal to be different.
  173. 6 Dec. 1989:
  174. Revised f2c.h -- required for the following...
  175. Simpler looking translations for abs, min, max, using #defines in
  176. revised f2c.h .
  177. libi77: more corrections to types; additions for NAMELIST.
  178. Corrected casts in some I/O calls.
  179. Translation of NAMELIST; libi77 must still be revised. Currently
  180. libi77 gives you a run-time error message if you attempt NAMELIST I/O.
  181. 7 Dec. 1989:
  182. Fixed bug that prevented local integer variables that appear in DATA
  183. stmts from being ASSIGNed statement labels.
  184. Fillers (for DATA statements initializing EQUIVALENCEd variables and
  185. variables in COMMON) typed integer rather than doublereal (for slightly
  186. more portability, e.g. to Crays).
  187. libi77: missing return values supplied in a few places; some tests
  188. reordered for better working on the Cray.
  189. libf77: better accuracy for complex divide, complex square root,
  190. real mod function (casts to double; double temporaries).
  191. 9 Dec. 1989:
  192. Fixed bug that caused needless (albeit harmless) empty lines to be
  193. inserted in the C output when a comment line contained trailing blanks.
  194. Further tweak to type of fillers: allow doublereal fillers if the
  195. struct has doublereal data.
  196. 11 Dec. 1989:
  197. Alteration of rule for producing external (C) names from names that
  198. contain underscores. Now the external name is always obtained by
  199. appending a pair of underscores.
  200. 12 Dec. 1989:
  201. C production inhibited after most errors.
  202. 15 Dec. 1989:
  203. Fixed bug in headers for subroutines having two or more character
  204. strings arguments: the length arguments were reversed.
  205. 19 Dec. 1989:
  206. f2c.h libf77 libi77: adjusted so #undefs in f2c.h should not foil
  207. compilation of libF77 and libI77.
  208. libf77: getenv_ adjusted to work with unsorted environments.
  209. libi77: the iostat= specifier should now work right with internal I/O.
  210. 20 Dec. 1989:
  211. f2c bugs fixed: In the absence of an err= specifier, the iostat=
  212. specifier was generally set wrong. Character strings containing
  213. explicit nulls (\0) were truncated at the first null.
  214. Unlabeled DO loops recognized; must be terminated by ENDDO.
  215. (Don't ask for CYCLE, EXIT, named DO loops, or DO WHILE.)
  216. 29 Dec. 1989:
  217. Nested unlabeled DO loops now handled properly; new warning for
  218. extraneous text at end of FORMAT.
  219. 30 Dec. 1989:
  220. Fixed bug in translating dble(real(...)), dble(sngl(...)), and
  221. dble(float(...)), where ... is either of type double complex or
  222. is an expression requiring assignment to intermediate variables (e.g.,
  223. dble(real(foo(x+1))), where foo is a function and x is a variable).
  224. Regard nonblank label fields on continuation lines as an error.
  225. 3 Jan. 1990:
  226. New option -C++ yields output that should be understood
  227. by C++ compilers.
  228. 6 Jan. 1989:
  229. -a now excludes variables that appear in a namelist from those
  230. that it makes automatic. (As before, it also excludes variables
  231. that appear in a common, data, equivalence, or save statement.)
  232. The syntactically correct Fortran
  233. read(*,i) x
  234. end
  235. now yields syntactically correct C (even though both the Fortran
  236. and C are buggy -- no FORMAT has not been ASSIGNed to i).
  237. 7 Jan. 1990:
  238. libi77: routines supporting NAMELIST added. Surrounding quotes
  239. made optional when no ambiguity arises in a list or namelist READ
  240. of a character-string value.
  241. 9 Jan. 1990:
  242. f2c.src made available.
  243. 16 Jan. 1990:
  244. New options -P to produce ANSI C or C++ prototypes for procedures
  245. defined. Change to -A and -C++: f2c tries to infer prototypes for
  246. invoked procedures unless the new -!P option is given. New warning
  247. messages for inconsistent calling sequences among procedures within
  248. a single file. Most of f2c/src is affected.
  249. f2c.h: typedefs for procedure arguments added; netlib's f2c service
  250. will insert appropriate typedefs for use with older versions of f2c.h.
  251. 17 Jan. 1990:
  252. f2c/src: defs.h exec.c format.c proc.c putpcc.c version.c xsum0.out
  253. updated. Castargs and protofile made extern in defs.h; exec.c
  254. modified so superfluous else clauses are diagnosed; unused variables
  255. omitted from declarations in format.c proc.c putpcc.c .
  256. 21 Jan. 1990:
  257. No C emitted for procedures declared external but not referenced.
  258. f2c.h: more new types added for use with -P.
  259. New feature: f2c accepts as arguments files ending in .p or .P;
  260. such files are assumed to be prototype files, such as produced by
  261. the -P option. All prototype files are read before any Fortran files
  262. and apply globally to all Fortran files. Suitable prototypes help f2c
  263. warn about calling-sequence errors and can tell f2c how to type
  264. procedures declared external but not explicitly typed; the latter is
  265. mainly of interest for users of the -A and -C++ options. (Prototype
  266. arguments are not available to netlib's "execute f2c" service.)
  267. New option -it tells f2c to try to infer types of untyped external
  268. arguments from their use as parameters to prototyped or previously
  269. defined procedures.
  270. f2c/src: many minor cleanups; most modules changed. Individual
  271. files in f2c/src are now in "bundle" format. The former f2c.1 is
  272. now f2c.1t; "f2c.1t from f2c" and "f2c.1t from f2c/src" are now the
  273. same, as are "f2c.1 from f2c" and "f2c.1 from f2c/src". People who
  274. do not obtain a new copy of "all from f2c/src" should at least add
  275. fclose(sortfp);
  276. after the call on do_init_data(outfile, sortfp) in format_data.c .
  277. 22 Jan. 1990:
  278. Cleaner man page wording (thanks to Doug McIlroy).
  279. -it now also applies to all untyped EXTERNAL procedures, not just
  280. arguments.
  281. 23 Jan. 01:34:00 EST 1990:
  282. Bug fixes: under -A and -C++, incorrect C was generated for
  283. subroutines having multiple entries but no arguments.
  284. Under -A -P, subroutines of no arguments were given prototype
  285. calling sequence () rather than (void).
  286. Character-valued functions elicited erroneous warning messages
  287. about inconsistent calling sequences when referenced by another
  288. procedure in the same file.
  289. f2c.1t: omit first appearance of libF77.a in FILES section;
  290. load order of libraries is -lF77 -lI77, not vice versa (bug
  291. introduced in yesterday's edits); define .F macro for those whose
  292. -man lacks it. (For a while after yesterday's fixes were posted,
  293. f2c.1t was out of date. Sorry!)
  294. 23 Jan. 9:53:24 EST 1990:
  295. Character substring expressions involving function calls having
  296. character arguments (including the intrinsic len function) yielded
  297. incorrect C.
  298. Procedures defined after invocation (in the same file) with
  299. conflicting argument types also got an erroneous message about
  300. the wrong number of arguments.
  301. 24 Jan. 11:44:00 EST 1990:
  302. Bug fixes: -p omitted #undefs; COMMON block names containing
  303. underscores had their C names incorrectly computed; a COMMON block
  304. having the name of a previously defined procedure wreaked havoc;
  305. if all arguments were .P files, f2c tried reading the second as a
  306. Fortran file.
  307. New feature: -P emits comments showing COMMON block lengths, so one
  308. can get warnings of incompatible COMMON block lengths by having f2c
  309. read .P (or .p) files. Now by running f2c twice, first with -P -!c
  310. (or -P!c), then with *.P among the arguments, you can be warned of
  311. inconsistent COMMON usage, and COMMON blocks having inconsistent
  312. lengths will be given the maximum length. (The latter always did
  313. happen within each input file; now -P lets you extend this behavior
  314. across files.)
  315. 26 Jan. 16:44:00 EST 1990:
  316. Option -it made less aggressive: untyped external procedures that
  317. are invoked are now typed by the rules of Fortran, rather than by
  318. previous use of procedures to which they are passed as arguments
  319. before being invoked.
  320. Option -P now includes information about references, i.e., called
  321. procedures, in the prototype files (in the form of special comments).
  322. This allows iterative invocations of f2c to infer more about untyped
  323. external names, particularly when multiple Fortran files are involved.
  324. As usual, there are some obscure bug fixes:
  325. 1. Repair of erroneous warning messages about inconsistent number of
  326. arguments that arose when a character dummy parameter was discovered
  327. to be a function or when multiple entry points involved character
  328. variables appearing in a previous entry point.
  329. 2. Repair of memory fault after error msg about "adjustable character
  330. function".
  331. 3. Under -U, allow MAIN_ as a subroutine name (in the same file as a
  332. main program).
  333. 4. Change for consistency: a known function invoked as a subroutine,
  334. then as a function elicits a warning rather than an error.
  335. 26 Jan. 22:32:00 EST 1990:
  336. Fixed two bugs that resulted in incorrect C for substrings, within
  337. the body of a character-valued function, of the function's name, when
  338. those substrings were arguments to another function (even implicitly,
  339. as in character-string assignment).
  340. 28 Jan. 18:32:00 EST 1990:
  341. libf77, libi77: checksum files added; "make check" looks for
  342. transmission errors. NAMELIST read modified to allow $ rather than &
  343. to precede a namelist name, to allow $ rather than / to terminate
  344. input where the name of another variable would otherwise be expected,
  345. and to regard all nonprinting ASCII characters <= ' ' as spaces.
  346. 29 Jan. 02:11:00 EST 1990:
  347. "fc from f2c" added.
  348. -it option made the default; -!it turns it off. Type information is
  349. now updated in a previously missed case.
  350. -P option tweaked again; message about when rerunning f2c may change
  351. prototypes or declarations made more accurate.
  352. New option -Ps implies -P and returns exit status 4 if rerunning
  353. f2c -P with prototype inputs might change prototypes or declarations.
  354. Now you can execute a crude script like
  355. cat *.f >zap.F
  356. rm -f zap.P
  357. while :; do
  358. f2c -Ps -!c zap.[FP]
  359. case $? in 4) ;; *) break;; esac
  360. done
  361. to get a file zap.P of the best prototypes f2c can determine for *.f .
  362. Jan. 29 07:30:21 EST 1990:
  363. Forgot to check for error status when setting return code 4 under -Ps;
  364. error status (1, 2, 3, or, for caught signal, 126) now takes precedence.
  365. Jan 29 14:17:00 EST 1990:
  366. Incorrect handling of
  367. open(n,'filename')
  368. repaired -- now treated as
  369. open(n,file='filename')
  370. (and, under -ext, given an error message).
  371. New optional source file memset.c for people whose systems don't
  372. provide memset, memcmp, and memcpy; #include <string.h> in mem.c
  373. changed to #include "string.h" so BSD people can create a local
  374. string.h that simply says #include <strings.h> .
  375. Jan 30 10:34:00 EST 1990:
  376. Fix erroneous warning at end of definition of a procedure with
  377. character arguments when the procedure had previously been called with
  378. a numeric argument instead of a character argument. (There were two
  379. warnings, the second one incorrectly complaining of a wrong number of
  380. arguments.)
  381. Jan 30 16:29:41 EST 1990:
  382. Fix case where -P and -Ps erroneously reported another iteration
  383. necessary. (Only harm is the extra iteration.)
  384. Feb 3 01:40:00 EST 1990:
  385. Supply semicolon occasionally omitted under -c .
  386. Try to force correct alignment when numeric variables are initialized
  387. with character data (a non-standard and non-portable practice). You
  388. must use the -W option if your code has such data statements and is
  389. meant to run on a machine with other than 4 characters/word; e.g., for
  390. code meant to run on a Cray, you would specify -W8 .
  391. Allow parentheses around expressions in output lists (in write and
  392. print statements).
  393. Rename source files so their names are <= 12 characters long
  394. (so there's room to append .Z and still have <= 14 characters);
  395. renamed files: formatdata.c niceprintf.c niceprintf.h safstrncpy.c .
  396. f2c material made available by anonymous ftp from research.att.com
  397. (look in dist/f2c ).
  398. Feb 3 03:49:00 EST 1990:
  399. Repair memory fault that arose from use (in an assignment or
  400. call) of a non-argument variable declared CHARACTER*(*).
  401. Feb 9 01:35:43 EST 1990:
  402. Fix erroneous error msg about bad types in
  403. subroutine foo(a,adim)
  404. dimension a(adim)
  405. integer adim
  406. Fix improper passing of character args (and possible memory fault)
  407. in the expression part of a computed goto.
  408. Fix botched calling sequences in array references involving
  409. functions having character args.
  410. Fix memory fault caused by invocation of character-valued functions
  411. of no arguments.
  412. Fix botched calling sequence of a character*1-valued function
  413. assigned to a character*1 variable.
  414. Fix bug in error msg for inconsistent number of args in prototypes.
  415. Allow generation of C output despite inconsistencies in prototypes,
  416. but give exit code 8.
  417. Simplify include logic (by removing some bogus logic); never
  418. prepend "/usr/include/" to file names.
  419. Minor cleanups (that should produce no visible change in f2c's
  420. behavior) in intr.c parse.h main.c defs.h formatdata.c p1output.c .
  421. Feb 10 00:19:38 EST 1990:
  422. Insert (integer) casts when floating-point expressions are used
  423. as subscripts.
  424. Make SAVE stmt (with no variable list) override -a .
  425. Minor cleanups: change field to Field in struct Addrblock (for the
  426. benefit of buggy C compilers); omit system("/bin/cp ...") in misc.c .
  427. Feb 13 00:39:00 EST 1990:
  428. Error msg fix in gram.dcl: change "cannot make %s parameter"
  429. to "cannot make into parameter".
  430. Feb 14 14:02:00 EST 1990:
  431. Various cleanups (invisible on systems with 4-byte ints), thanks
  432. to Dave Regan: vaxx.c eliminated; %d changed to %ld various places;
  433. external names adjusted for the benefit of stupid systems (that ignore
  434. case and recognize only 6 significant characters in external names);
  435. buffer shortened in xsum.c (e.g. for MS-DOS); fopen modes distinguish
  436. text and binary files; several unused functions eliminated; missing
  437. arg supplied to an unlikely fatalstr invocation.
  438. Thu Feb 15 19:15:53 EST 1990:
  439. More cleanups (invisible on systems with 4 byte ints); casts inserted
  440. so most complaints from cyntax(1) and lint(1) go away; a few (int)
  441. versus (long) casts corrected.
  442. Fri Feb 16 19:55:00 EST 1990:
  443. Recognize and translate unnamed Fortran 8x do while statements.
  444. Fix bug that occasionally caused improper breaking of character
  445. strings.
  446. New error message for attempts to provide DATA in a type-declaration
  447. statement.
  448. Sat Feb 17 11:43:00 EST 1990:
  449. Fix infinite loop clf -> Fatal -> done -> clf after I/O error.
  450. Change "if (addrp->vclass = CLPROC)" to "if (addrp->vclass == CLPROC)"
  451. in p1_addr (in p1output.c); this was probably harmless.
  452. Move a misplaced } in lex.c (which slowed initkey()).
  453. Thanks to Gary Word for pointing these things out.
  454. Sun Feb 18 18:07:00 EST 1990:
  455. Detect overlapping initializations of arrays and scalar variables
  456. in previously missed cases.
  457. Treat logical*2 as logical (after issuing a warning).
  458. Don't pass string literals to p1_comment().
  459. Correct a cast (introduced 16 Feb.) in gram.expr; this matters e.g.
  460. on a Cray.
  461. Attempt to isolate UNIX-specific things in sysdep.c (a new source
  462. file). Unless sysdep.c is compiled with SYSTEM_SORT defined, the
  463. intermediate files created for DATA statements are now sorted in-core
  464. without invoking system().
  465. Tue Feb 20 16:10:35 EST 1990:
  466. Move definition of binread and binwrite from init.c to sysdep.c .
  467. Recognize Fortran 8x tokens < <= == >= > <> as synonyms for
  468. .LT. .LE. .EQ. .GE. .GT. .NE.
  469. Minor cleanup in putpcc.c: fully remove simoffset().
  470. More discussion of system dependencies added to libI77/README.
  471. Tue Feb 20 21:44:07 EST 1990:
  472. Minor cleanups for the benefit of EBCDIC machines -- try to remove
  473. the assumption that 'a' through 'z' are contiguous. (Thanks again to
  474. Gary Word.) Also, change log2 to log_2 (shouldn't be necessary).
  475. Wed Feb 21 06:24:56 EST 1990:
  476. Fix botch in init.c introduced in previous change; only matters
  477. to non-ASCII machines.
  478. Thu Feb 22 17:29:12 EST 1990:
  479. Allow several entry points to mention the same array. Protect
  480. parameter adjustments with if's (for the case that an array is not
  481. an argument to all entrypoints).
  482. Under -u, allow
  483. subroutine foo(x,n)
  484. real x(n)
  485. integer n
  486. Compute intermediate variables used to evaluate dimension expressions
  487. at the right time. Example previously mistranslated:
  488. subroutine foo(x,k,m,n)
  489. real x(min(k,m,n))
  490. ...
  491. write(*,*) x
  492. Detect duplicate arguments. (The error msg points to the first
  493. executable stmt -- not wonderful, but not worth fixing.)
  494. Minor cleanup of min/max computation (sometimes slightly simpler).
  495. Sun Feb 25 09:39:01 EST 1990:
  496. Minor tweak to multiple entry points: protect parameter adjustments
  497. with if's only for (array) args that do not appear in all entry points.
  498. Minor tweaks to format.c and io.c (invisible unless your compiler
  499. complained at the duplicate #defines of IOSUNIT and IOSFMT or at
  500. comparisons of p1gets(...) with NULL).
  501. Sun Feb 25 18:40:10 EST 1990:
  502. Fix bug introduced Feb. 22: if a subprogram contained DATA and the
  503. first executable statement was labeled, then the label got lost.
  504. (Just change INEXEC to INDATA in p1output.c; it occurs just once.)
  505. Mon Feb 26 17:45:10 EST 1990:
  506. Fix bug in handling of " and ' in comments.
  507. Wed Mar 28 01:43:06 EST 1990:
  508. libI77:
  509. 1. Repair nasty I/O bug: opening two files and closing the first
  510. (after possibly reading or writing it), then writing the second caused
  511. the last buffer of the second to be lost.
  512. 2. Formatted reads of logical values treated all letters other than
  513. t or T as f (false).
  514. libI77 files changed: err.c rdfmt.c Version.c
  515. (Request "libi77 from f2c" -- you can't get these files individually.)
  516. f2c itself:
  517. Repair nasty bug in translation of
  518. ELSE IF (condition involving complicated abs, min, or max)
  519. -- auxiliary statements were emitted at the wrong place.
  520. Supply semicolon previously omitted from the translation of a label
  521. (of a CONTINUE) immediately preceding an ELSE IF or an ELSE. This
  522. bug made f2c produce invalid C.
  523. Correct a memory fault that occurred (on some machines) when the
  524. error message "adjustable dimension on non-argument" should be given.
  525. Minor tweaks to remove some harmless warnings by overly chatty C
  526. compilers.
  527. Argument arays having constant dimensions but a variable lower bound
  528. (e.g., x(n+1:n+3)) had a * omitted from scalar arguments involved in
  529. the array offset computation.
  530. Wed Mar 28 18:47:59 EST 1990:
  531. libf77: add exit(0) to end of main [return(0) encounters a Cray bug]
  532. Sun Apr 1 16:20:58 EDT 1990:
  533. Avoid dereferencing null when processing equivalences after an error.
  534. Fri Apr 6 08:29:49 EDT 1990:
  535. Calls involving alternate return specifiers omitted processing
  536. needed for things like min, max, abs, and // (concatenation).
  537. INTEGER*2 PARAMETERs were treated as INTEGER*4.
  538. Convert some O(n^2) parsing to O(n).
  539. Tue Apr 10 20:07:02 EDT 1990:
  540. When inconsistent calling sequences involve differing numbers of
  541. arguments, report the first differing argument rather than the numbers
  542. of arguments.
  543. Fix bug under -a: formatted I/O in which either the unit or the
  544. format was a local character variable sometimes resulted in invalid C
  545. (a static struct initialized with an automatic component).
  546. Improve error message for invalid flag after elided -.
  547. Complain when literal table overflows, rather than infinitely
  548. looping. (The complaint mentions the new and otherwise undocumented
  549. -NL option for specifying a larger literal table.)
  550. New option -h for forcing strings to word (or, with -hd, double-word)
  551. boundaries where possible.
  552. Repair a bug that could cause improper splitting of strings.
  553. Fix bug (cast of c to doublereal) in
  554. subroutine foo(c,r)
  555. double complex c
  556. double precision r
  557. c = cmplx(r,real(c))
  558. end
  559. New include file "sysdep.h" has some things from defs.h (and
  560. elsewhere) that one may need to modify on some systems.
  561. Some large arrays that were previously statically allocated are now
  562. dynamically allocated when f2c starts running.
  563. f2c/src files changed:
  564. README cds.c defs.h f2c.1 f2c.1t format.c formatdata.c init.c
  565. io.c lex.c main.c makefile mem.c misc.c names.c niceprintf.c
  566. output.c parse_args.c pread.c put.c putpcc.c sysdep.h
  567. version.c xsum0.out
  568. Wed Apr 11 18:27:12 EDT 1990:
  569. Fix bug in argument consistency checking of character, complex, and
  570. double complex valued functions. If the same source file contained a
  571. definition of such a function with arguments not explicitly typed,
  572. then subsequent references to the function might get erroneous
  573. warnings of inconsistent calling sequences.
  574. Tweaks to sysdep.h for partially ANSI systems.
  575. New options -kr and -krd cause f2c to use temporary variables to
  576. enforce Fortran evaluation-order rules with pernicious, old-style C
  577. compilers that apply the associative law to floating-point operations.
  578. Sat Apr 14 15:50:15 EDT 1990:
  579. libi77: libI77 adjusted to allow list-directed and namelist I/O
  580. of internal files; bug in namelist I/O of logical and character arrays
  581. fixed; list input of complex numbers adjusted to permit d or D to
  582. denote the start of the exponent field of a component.
  583. f2c itself: fix bug in handling complicated lower-bound
  584. expressions for character substrings; e.g., min and max did not work
  585. right, nor did function invocations involving character arguments.
  586. Switch to octal notation, rather than hexadecimal, for nonprinting
  587. characters in character and string constants.
  588. Fix bug (when neither -A nor -C++ was specified) in typing of
  589. external arguments of type complex, double complex, or character:
  590. subroutine foo(c)
  591. external c
  592. complex c
  593. now results in
  594. /* Complex */ int (*c) ();
  595. (as, indeed, it once did) rather than
  596. complex (*c) ();
  597. Sat Apr 14 22:50:39 EDT 1990:
  598. libI77/makefile: updated "make check" to omit lio.c
  599. lib[FI]77/makefile: trivial change: define CC = cc, reference $(CC).
  600. (Request, e.g., "libi77 from f2c" -- you can't ask for individual
  601. files from lib[FI]77.)
  602. Wed Apr 18 00:56:37 EDT 1990:
  603. Move declaration of atof() from defs.h to sysdep.h, where it is
  604. now not declared if stdlib.h is included. (NeXT's stdlib.h has a
  605. #define atof that otherwise wreaks havoc.)
  606. Under -u, provide a more intelligible error message (than "bad tag")
  607. for an attempt to define a function without specifying its type.
  608. Wed Apr 18 17:26:27 EDT 1990:
  609. Recognize \v (vertical tab) in Hollerith as well as quoted strings;
  610. add recognition of \r (carriage return).
  611. New option -!bs turns off recognition of escapes in character strings
  612. (\0, \\, \b, \f, \n, \r, \t, \v).
  613. Move to sysdep.c initialization of some arrays whose initialization
  614. assumed ASCII; #define Table_size in sysdep.h rather than using
  615. hard-coded 256 in allocating arrays of size 1 << (bits/byte).
  616. Thu Apr 19 08:13:21 EDT 1990:
  617. Warn when escapes would make Hollerith extend beyond statement end.
  618. Omit max() definition from misc.c (should be invisible except on
  619. systems that erroneously #define max in stdlib.h).
  620. Mon Apr 23 22:24:51 EDT 1990:
  621. When producing default-style C (no -A or -C++), cast switch
  622. expressions to (int).
  623. Move "-lF77 -lI77 -lm -lc" to link_msg, defined in sysdep.c .
  624. Add #define scrub(x) to sysdep.h, with invocations in format.c and
  625. formatdata.c, so that people who have systems like VMS that would
  626. otherwise create multiple versions of intermediate files can
  627. #define scrub(x) unlink(x)
  628. Tue Apr 24 18:28:36 EDT 1990:
  629. Pass string lengths once rather than twice to a function of character
  630. arguments involved in comparison of character strings of length 1.
  631. Fri Apr 27 13:11:52 EDT 1990:
  632. Fix bug that made f2c gag on concatenations involving char(...) on
  633. some systems.
  634. Sat Apr 28 23:20:16 EDT 1990:
  635. Fix control-stack bug in
  636. if(...) then
  637. else if (complicated condition)
  638. else
  639. endif
  640. (where the complicated condition causes assignment to an auxiliary
  641. variable, e.g., max(a*b,c)).
  642. Mon Apr 30 13:30:10 EDT 1990:
  643. Change fillers for DATA with holes from substructures to arrays
  644. (in an attempt to make things work right with C compilers that have
  645. funny padding rules for substructures, e.g., Sun C compilers).
  646. Minor cleanup of exec.c (should not affect generated C).
  647. Mon Apr 30 23:13:51 EDT 1990:
  648. Fix bug in handling return values of functions having multiple
  649. entry points of differing return types.
  650. Sat May 5 01:45:18 EDT 1990:
  651. Fix type inference bug in
  652. subroutine foo(x)
  653. call goo(x)
  654. end
  655. subroutine goo(i)
  656. i = 3
  657. end
  658. Instead of warning of inconsistent calling sequences for goo,
  659. f2c was simply making i a real variable; now i is correctly
  660. typed as an integer variable, and f2c issues an error message.
  661. Adjust error messages issued at end of declarations so they
  662. don't blame the first executable statement.
  663. Sun May 6 01:29:07 EDT 1990:
  664. Fix bug in -P and -Ps: warn when the definition of a subprogram adds
  665. information that would change prototypes or previous declarations.
  666. Thu May 10 18:09:15 EDT 1990:
  667. Fix further obscure bug with (default) -it: inconsistent calling
  668. sequences and I/O statements could interact to cause a memory fault.
  669. Example:
  670. SUBROUTINE FOO
  671. CALL GOO(' Something') ! Forgot integer first arg
  672. END
  673. SUBROUTINE GOO(IUNIT,MSG)
  674. CHARACTER*(*)MSG
  675. WRITE(IUNIT,'(1X,A)') MSG
  676. END
  677. Fri May 11 16:49:11 EDT 1990:
  678. Under -!c, do not delete any .c files (when there are errors).
  679. Avoid dereferencing 0 when a fatal error occurs while reading
  680. Fortran on stdin.
  681. Wed May 16 18:24:42 EDT 1990:
  682. f2c.ps made available.
  683. Mon Jun 4 12:53:08 EDT 1990:
  684. Diagnose I/O units of invalid type.
  685. Add specific error msg about dummy arguments in common.
  686. Wed Jun 13 12:43:17 EDT 1990:
  687. Under -A, supply a missing "[1]" for CHARACTER*1 variables that appear
  688. both in a DATA statement and in either COMMON or EQUIVALENCE.
  689. Mon Jun 18 16:58:31 EDT 1990:
  690. Trivial updates to f2c.ps . ("Fortran 8x" --> "Fortran 90"; omit
  691. "(draft)" from "(draft) ANSI C".)
  692. Tue Jun 19 07:36:32 EDT 1990:
  693. Fix incorrect code generated for ELSE IF(expression involving
  694. function call passing non-constant substring).
  695. Under -h, preserve the property that strings are null-terminated
  696. where possible.
  697. Remove spaces between # and define in lex.c output.c parse.h .
  698. Mon Jun 25 07:22:59 EDT 1990:
  699. Minor tweak to makefile to reduce unnecessary recompilations.
  700. Tue Jun 26 11:49:53 EDT 1990:
  701. Fix unintended truncation of some integer constants on machines
  702. where casting a long to (int) may change the value. E.g., when f2c
  703. ran on machines with 16-bit ints, "i = 99999" was being translated
  704. to "i = -31073;".
  705. Wed Jun 27 11:05:32 EDT 1990:
  706. Arrange for CHARACTER-valued PARAMETERs to honor their length
  707. specifications. Allow CHAR(nn) in expressions defining such PARAMETERs.
  708. Fri Jul 20 09:17:30 EDT 1990:
  709. Avoid dereferencing 0 when a FORMAT statement has no label.
  710. Thu Jul 26 11:09:39 EDT 1990:
  711. Remarks about VOID and binread,binwrite added to README.
  712. Tweaks to parse_args: should be invisible unless your compiler
  713. complained at (short)*store.
  714. Thu Aug 2 02:07:58 EDT 1990:
  715. f2c.ps: change the first line of page 5 from
  716. include stuff
  717. to
  718. include 'stuff'
  719. Tue Aug 14 13:21:24 EDT 1990:
  720. libi77: libI77 adjusted to treat tabs as spaces in list input.
  721. Fri Aug 17 07:24:53 EDT 1990:
  722. libi77: libI77 adjusted so a blank='ZERO' clause (upper case Z)
  723. in an open of a currently open file works right.
  724. Tue Aug 28 01:56:44 EDT 1990:
  725. Fix bug in warnings of inconsistent calling sequences: if an
  726. argument to a subprogram was never referenced, then a previous
  727. invocation of the subprogram (in the same source file) that
  728. passed something of the wrong type for that argument did not
  729. elicit a warning message.
  730. Thu Aug 30 09:46:12 EDT 1990:
  731. libi77: prevent embedded blanks in list output of complex values;
  732. omit exponent field in list output of values of magnitude between
  733. 10 and 1e8; prevent writing stdin and reading stdout or stderr;
  734. don't close stdin, stdout, or stderr when reopening units 5, 6, 0.
  735. Tue Sep 4 12:30:57 EDT 1990:
  736. Fix bug in C emitted under -I2 or -i2 for INTEGER*4 FUNCTION.
  737. Warn of missing final END even if there are previous errors.
  738. Fri Sep 7 13:55:34 EDT 1990:
  739. Remark about "make xsum.out" and "make f2c" added to README.
  740. Tue Sep 18 23:50:01 EDT 1990:
  741. Fix null dereference (and, on some systems, writing of bogus *_com.c
  742. files) under -ec or -e1c when a prototype file (*.p or *.P) describes
  743. COMMON blocks that do not appear in the Fortran source.
  744. libi77:
  745. Add some #ifdef lines (#ifdef MSDOS, #ifndef MSDOS) to avoid
  746. references to stat and fstat on non-UNIX systems.
  747. On UNIX systems, add component udev to unit; decide that old
  748. and new files are the same iff both the uinode and udev components
  749. of unit agree.
  750. When an open stmt specifies STATUS='OLD', use stat rather than
  751. access (on UNIX systems) to check the existence of the file (in case
  752. directories leading to the file have funny permissions and this is
  753. a setuid or setgid program).
  754. Thu Sep 27 16:04:09 EDT 1990:
  755. Supply missing entry for Impldoblock in blksize array of cpexpr
  756. (in expr.c). No examples are known where this omission caused trouble.
  757. Tue Oct 2 22:58:09 EDT 1990:
  758. libf77: test signal(...) == SIG_IGN rather than & 01 in main().
  759. libi77: adjust rewind.c so two successive rewinds after a write
  760. don't clobber the file.
  761. Thu Oct 11 18:00:14 EDT 1990:
  762. libi77: minor cleanups: add #include "fcntl.h" to endfile.c, err.c,
  763. open.c; adjust g_char in util.c for segmented memories; in f_inqu
  764. (inquire.c), define x appropriately when MSDOS is defined.
  765. Mon Oct 15 20:02:11 EDT 1990:
  766. Add #ifdef MSDOS pointer adjustments to mem.c; treat NAME= as a
  767. synonym for FILE= in OPEN statements.
  768. Wed Oct 17 16:40:37 EDT 1990:
  769. libf77, libi77: minor cleanups: _cleanup() and abort() invocations
  770. replaced by invocations of sig_die in main.c; some error messages
  771. previously lost in buffers will now appear.
  772. Mon Oct 22 16:11:27 EDT 1990:
  773. libf77: separate sig_die from main (for folks who don't want to use
  774. the main in libF77).
  775. libi77: minor tweak to comments in README.
  776. Fri Nov 2 13:49:35 EST 1990:
  777. Use two underscores rather than one in generated temporary variable
  778. names to avoid conflict with COMMON names. f2c.ps updated to reflect
  779. this change and the NAME= extension introduced 15 Oct.
  780. Repair a rare memory fault in io.c .
  781. Mon Nov 5 16:43:55 EST 1990:
  782. libi77: changes to open.c (and err.c): complain if an open stmt
  783. specifies new= and the file already exists (as specified by Fortrans 77
  784. and 90); allow file= to be omitted in open stmts and allow
  785. status='replace' (Fortran 90 extensions).
  786. Fri Nov 30 10:10:14 EST 1990:
  787. Adjust malloc.c for unusual systems whose sbrk() can return values
  788. not properly aligned for doubles.
  789. Arrange for slightly more helpful and less repetitive warnings for
  790. non-character variables initialized with character data; these warnings
  791. are (still) suppressed by -w66.
  792. Fri Nov 30 15:57:59 EST 1990:
  793. Minor tweak to README (about changing VOID in f2c.h).
  794. Mon Dec 3 07:36:20 EST 1990:
  795. Fix spelling of "character" in f2c.1t.
  796. Tue Dec 4 09:48:56 EST 1990:
  797. Remark about link_msg and libf2c added to f2c/README.
  798. Thu Dec 6 08:33:24 EST 1990:
  799. Under -U, render label nnn as L_nnn rather than Lnnn.
  800. Fri Dec 7 18:05:00 EST 1990:
  801. Add more names from f2c.h (e.g. integer, real) to the c_keywords
  802. list of names to which an underscore is appended to avoid confusion.
  803. Mon Dec 10 19:11:15 EST 1990:
  804. Minor tweaks to makefile (./xsum) and README (binread/binwrite).
  805. libi77: a few modifications for POSIX systems; meant to be invisible
  806. elsewhere.
  807. Sun Dec 16 23:03:16 EST 1990:
  808. Fix null dereference caused by unusual erroneous input, e.g.
  809. call foo('abc')
  810. end
  811. subroutine foo(msg)
  812. data n/3/
  813. character*(*) msg
  814. end
  815. (Subroutine foo is illegal because the character statement comes after a
  816. data statement.)
  817. Use decimal rather than hex constants in xsum.c (to prevent
  818. erroneous warning messages about constant overflow).
  819. Mon Dec 17 12:26:40 EST 1990:
  820. Fix rare extra underscore in character length parameters passed
  821. for multiple entry points.
  822. Wed Dec 19 17:19:26 EST 1990:
  823. Allow generation of C despite error messages about bad alignment
  824. forced by equivalence.
  825. Allow variable-length concatenations in I/O statements, such as
  826. open(3, file=bletch(1:n) // '.xyz')
  827. Fri Dec 28 17:08:30 EST 1990:
  828. Fix bug under -p with formats and internal I/O "units" in COMMON,
  829. as in
  830. COMMON /FIGLEA/F
  831. CHARACTER*20 F
  832. F = '(A)'
  833. WRITE (*,FMT=F) 'Hello, world!'
  834. END
  835. Tue Jan 15 12:00:24 EST 1991:
  836. Fix bug when two equivalence groups are merged, the second with
  837. nonzero offset, and the result is then merged into a common block.
  838. Example:
  839. INTEGER W(3), X(3), Y(3), Z(3)
  840. COMMON /ZOT/ Z
  841. EQUIVALENCE (W(1),X(1)), (X(2),Y(1)), (Z(3),X(1))
  842. ***** W WAS GIVEN THE WRONG OFFSET
  843. Recognize Fortran 90's optional NML= in NAMELIST READs and WRITEs.
  844. (Currently NML= and FMT= are treated as synonyms -- there's no
  845. error message if, e.g., NML= specifies a format.)
  846. libi77: minor adjustment to allow internal READs from character
  847. string constants in read-only memory.
  848. Fri Jan 18 22:56:15 EST 1991:
  849. Add comment to README about needing to comment out the typedef of
  850. size_t in sysdep.h on some systems, e.g. Sun 4.1.
  851. Fix misspelling of "statement" in an error message in lex.c
  852. Wed Jan 23 00:38:48 EST 1991:
  853. Allow hex, octal, and binary constants to have the qualifying letter
  854. (z, x, o, or b) either before or after the quoted string containing the
  855. digits. For now this change will not be reflected in f2c.ps .
  856. Tue Jan 29 16:23:45 EST 1991:
  857. Arrange for character-valued statement functions to give results of
  858. the right length (that of the statement function's name).
  859. Wed Jan 30 07:05:32 EST 1991:
  860. More tweaks for character-valued statement functions: an error
  861. check and an adjustment so a right-hand side of nonconstant length
  862. (e.g., a substring) is handled right.
  863. Wed Jan 30 09:49:36 EST 1991:
  864. Fix p1_head to avoid printing (char *)0 with %s.
  865. Thu Jan 31 13:53:44 EST 1991:
  866. Add a test after the cleanup call generated for I/O statements with
  867. ERR= or END= clauses to catch the unlikely event that the cleanup
  868. routine encounters an error.
  869. Mon Feb 4 08:00:58 EST 1991:
  870. Minor cleanup: omit unneeded jumps and labels from code generated for
  871. some NAMELIST READs and WRITEs with IOSTAT=, ERR=, and/or END=.
  872. Tue Feb 5 01:39:36 EST 1991:
  873. Change Mktemp to mktmp (for the benefit of systems so brain-damaged
  874. that they do not distinguish case in external names -- and that for
  875. some reason want to load mktemp). Try to get xsum0.out right this
  876. time (it somehow didn't get updated on 4 Feb. 1991).
  877. Add note to libi77/README about adjusting the interpretation of
  878. RECL= specifiers in OPENs for direct unformatted I/O.
  879. Thu Feb 7 17:24:42 EST 1991:
  880. New option -r casts values of REAL functions, including intrinsics,
  881. to REAL. This only matters for unportable code like
  882. real r
  883. r = asin(1.)
  884. if (r .eq. asin(1.)) ...
  885. [The behavior of such code varies with the Fortran compiler used --
  886. and sometimes is affected by compiler options.] For now, the man page
  887. at the end of f2c.ps is the only part of f2c.ps that reflects this new
  888. option.
  889. Fri Feb 8 18:12:51 EST 1991:
  890. Cast pointer differences passed as arguments to the appropriate type.
  891. This matters, e.g., with MSDOS compilers that yield a long pointer
  892. difference but have int == short.
  893. Disallow nonpositive dimensions.
  894. Fri Feb 15 12:24:15 EST 1991:
  895. Change %d to %ld in sprintf call in putpower in putpcc.c.
  896. Free more memory (e.g. allowing translation of larger Fortran
  897. files under MS-DOS).
  898. Recognize READ (character expression) and WRITE (character expression)
  899. as formatted I/O with the format given by the character expression.
  900. Update year in Notice.
  901. Sat Feb 16 00:42:32 EST 1991:
  902. Recant recognizing WRITE(character expression) as formatted output
  903. -- Fortran 77 is not symmetric in its syntax for READ and WRITE.
  904. Mon Mar 4 15:19:42 EST 1991:
  905. Fix bug in passing the real part of a complex argument to an intrinsic
  906. function. Omit unneeded parentheses in nested calls to intrinsics.
  907. Example:
  908. subroutine foo(x, y)
  909. complex y
  910. x = exp(sin(real(y))) + exp(imag(y))
  911. end
  912. Fri Mar 8 15:05:42 EST 1991:
  913. Fix a comment in expr.c; omit safstrncpy.c (which had bugs in
  914. cases not used by f2c).
  915. Wed Mar 13 02:27:23 EST 1991:
  916. Initialize firstmemblock->next in mem_init in mem.c . [On most
  917. systems it was fortuituously 0, but with System V, -lmalloc could
  918. trip on this missed initialization.]
  919. Wed Mar 13 11:47:42 EST 1991:
  920. Fix a reference to freed memory.
  921. Wed Mar 27 00:42:19 EST 1991:
  922. Fix a memory fault caused by such illegal Fortran as
  923. function foo
  924. x = 3
  925. logical foo ! declaration among executables
  926. foo=.false. ! used to suffer memory fault
  927. end
  928. Fri Apr 5 08:30:31 EST 1991:
  929. Fix loss of % in some format expressions, e.g.
  930. write(*,'(1h%)')
  931. Fix botch introduced 27 March 1991 that caused subroutines with
  932. multiple entry points to have extraneous declarations of ret_val.
  933. Fri Apr 5 12:44:02 EST 1991
  934. Try again to omit extraneous ret_val declarations -- this morning's
  935. fix was sometimes wrong.
  936. Mon Apr 8 13:47:06 EDT 1991:
  937. Arrange for s_rnge to have the right prototype under -A -C .
  938. Wed Apr 17 13:36:03 EDT 1991:
  939. New fatal error message for apparent invocation of a recursive
  940. statement function.
  941. Thu Apr 25 15:13:37 EDT 1991:
  942. F2c and libi77 adjusted so NAMELIST works with -i2. (I forgot
  943. about -i2 when adding NAMELIST.) This required a change to f2c.h
  944. (that only affects NAMELIST I/O under -i2.) Man-page description of
  945. -i2 adjusted to reflect that -i2 stores array lengths in short ints.
  946. Fri Apr 26 02:54:41 EDT 1991:
  947. Libi77: fix some bugs in NAMELIST reading of multi-dimensional arrays
  948. (file rsne.c).
  949. Thu May 9 02:13:51 EDT 1991:
  950. Omit a trailing space in expr.c (could cause a false xsum value if
  951. a mailer drops the trailing blank).
  952. Thu May 16 13:14:59 EDT 1991:
  953. Libi77: increase LEFBL in lio.h to overcome a NeXT bug.
  954. Tweak for compilers that recognize "nested" comments: inside comments,
  955. turn /* into /+ (as well as */ into +/).
  956. Sat May 25 11:44:25 EDT 1991:
  957. libf77: s_rnge: declare line long int rather than int.
  958. Fri May 31 07:51:50 EDT 1991:
  959. libf77: system_: officially return status.
  960. Mon Jun 17 16:52:53 EDT 1991:
  961. Minor tweaks: omit unnecessary declaration of strcmp (that caused
  962. trouble on a system where strcmp was a macro) from misc.c; add
  963. SHELL = /bin/sh to makefiles.
  964. Fix a dereference of null when a CHARACTER*(*) declaration appears
  965. (illegally) after DATA. Complain only once per subroutine about
  966. declarations appearing after DATA.
  967. Mon Jul 1 00:28:13 EDT 1991:
  968. Add test and error message for illegal use of subroutine names, e.g.
  969. SUBROUTINE ZAP(A)
  970. ZAP = A
  971. END
  972. Mon Jul 8 21:49:20 EDT 1991:
  973. Issue a warning about things like
  974. integer i
  975. i = 'abc'
  976. (which is treated as i = ichar('a')). [It might be nice to treat 'abc'
  977. as an integer initialized (in a DATA statement) with 'abc', but
  978. other matters have higher priority.]
  979. Render
  980. i = ichar('A')
  981. as
  982. i = 'A';
  983. rather than
  984. i = 65;
  985. (which assumes ASCII).
  986. Fri Jul 12 07:41:30 EDT 1991:
  987. Note added to README about erroneous definitions of __STDC__ .
  988. Sat Jul 13 13:38:54 EDT 1991:
  989. Fix bugs in double type convesions of complex values, e.g.
  990. sngl(real(...)) or dble(real(...)) (where ... is complex).
  991. Mon Jul 15 13:21:42 EDT 1991:
  992. Fix bug introduced 8 July 1991 that caused erroneous warnings
  993. "ichar([first char. of] char. string) assumed for conversion to numeric"
  994. when a subroutine had an array of character strings as an argument.
  995. Wed Aug 28 01:12:17 EDT 1991:
  996. Omit an unused function in format.c, an unused variable in proc.c .
  997. Under -r8, promote complex to double complex (as the man page claims).
  998. Fri Aug 30 17:19:17 EDT 1991:
  999. f2c.ps updated: slightly expand description of intrinsics and,or,xor,
  1000. not; add mention of intrinsics lshift, rshift; add note about f2c
  1001. accepting Fortran 90 inline comments (starting with !); update Cobalt
  1002. Blue address.
  1003. Tue Sep 17 07:17:33 EDT 1991:
  1004. libI77: err.c and open.c modified to use modes "rb" and "wb"
  1005. when (f)opening unformatted files; README updated to point out
  1006. that it may be necessary to change these modes to "r" and "w"
  1007. on some non-ANSI systems.
  1008. NOTE: "index from f2c" now ends with current timestamps of files in
  1009. "all from f2c/src", sorted by time. To bring your source up to date,
  1010. obtain source files with a timestamp later than the time shown in your
  1011. version.c.