
====== old index for f2c, now "readme from f2c" ============

FILES:

f2c.h	Include file necessary for compiling output of the converter.
	See the second NOTE below.

f2c.1	Man page for f2c.

f2c.1t	Source for f2c.1 (to be processed by troff -man or nroff -man).

libf77	Library of non I/O support routines the generated C may need.
	Fortran main programs result in a C function named MAIN__ that
	is meant to be invoked by the main() in libf77.

libi77	Library of Fortran I/O routines the generated C may need.
	Note that some vendors (e.g., BSD, Sun and MIPS) provide a
	libF77 and libI77 that are incompatible with f2c -- they
	provide some differently named routines or routines with the
	names that f2c expects, but with different calling sequences.
	On such systems, the recommended procedure is to merge
	libf77 and libi77 into a single library, say libf2c, and to
        install it where you can access it by specifying -lf2c .  The
        definition of link_msg in sysdep.c assumes this arrangement.

	Both libf77 and libi77 are bundles, meant to be unpacked by the
	Bourne (or Korn) shell.  MS-DOS users can use the MKS Toolkit
	to unpack libf77 and libi77.

libf2c.zip
	Only available by ftp or http: combination of libf77 and libi77,
	with Unix and PC makefiles.

f2c.ps	Postscript for a technical report on f2c.  After you strip the
	mail header, the first line should be "%!PS".

fixes	The complete change log, reporting bug fixes and other changes.
	(Some recent change-log entries are given below).

fc	A shell script that uses f2c and imitates much of the behavior
	of commonly found f77 commands.  You will almost certainly
	need to adjust some of the shell-variable assignments to make
	this script work on your system.


SUBDIRECTORY:

f2c/src	Source for the converter itself, including a file of checksums
	and source for a program to compute the checksums (to verify
	correct transmission of the source), is available: ask netlib
	(e.g., netlib@netlib.bell-labs.com) to
		send all from f2c/src
	If the checksums show damage to just a few source files, or if
	the change log file (see "fixes" below) reports corrections to
	some source files, you can request those files individually
	"from f2c/src".  For example, to get defs.h and xsum0.out, you
	would ask netlib to
		send defs.h xsum0.out from f2c/src
	"all from f2c/src" is about 640 kilobytes long; for convenience
	(and checksums), it includes copies of f2c.h, f2c.1, and f2c.1t.

	Tip: if asked to send over 99,000 bytes in one request, netlib
	breaks the shipment into 1000 line pieces and sends each piece
	separately (since otherwise some mailers might gag).  To avoid
	the hassle of reassembling the pieces, try to keep each request
	under 99,000 bytes long.  The final number in each line of
	xsum0.out gives the length of each file in f2c/src.  For
	example,
		send exec.c expr.c from f2c/src
		send format.c format_data.c from f2c/src
	will give you slightly less hassle than
		send exec.c expr.c format.c format_data.c from f2c/src
	Alternatively, if all the mailers in your return path allow
	long messages, you can supply an appropriate mailsize line in
	your netlib request, e.g.
		mailsize 200k
		send exec.c expr.c format.c format_data.c from f2c/src

	The makefile used to generate gram.c; now we distribute a
	working gram.c, and you must say
		make gram1.c
		mv gram1.c gram.c
	if you want to generate your own gram.c -- there are just too
	many broken variants of yacc floating around nowadays for
	generation of gram.c to be the default.

NOTE:	You may exercise f2c by sending netlib@netlib.bell-labs.com
	a message whose first line is "execute f2c" and whose remaining
	lines are the Fortran 77 source that you wish to have converted.
	Return mail brings you the resulting C, with f2c's error
	messages between #ifdef uNdEfInEd and #endif at the end.
	(To understand line numbers in the error messages, regard
	the "execute f2c" line as line 0.  It is stripped away by
	the netlib software before f2c sees your Fortran input.)
	Options described in the man page may be transmitted to
	netlib by having the first line of input be a comment
	whose first 6 characters are "c$f2c " and whose remaining
	characters are the desired options, e.g., "c$f2c -R -u".

	You may say "execute f2c" in the Subject line instead of (but
	*not* in addition to) in the first line of the message body.

	The incoming Fortran is saved, at least for a while.  Don't
	send any secrets!


BUGS:	Please send bug reports (including the shortest example
	you can find that illustrates the bug) to research!dmg
	or dmg@bell-labs.com .  You might first check whether
	the bug goes away when you turn optimization off.


NOTE:	f2c.h defines several types, e.g., real, integer, doublereal.
	The definitions in f2c.h are suitable for most machines, but if
	your machine has sizeof(double) > 2*sizeof(long), you may need
	to adjust f2c.h appropriately.  f2c assumes
		sizeof(doublecomplex) = 2*sizeof(doublereal)
		sizeof(doublereal) = sizeof(complex)
		sizeof(doublereal) = 2*sizeof(real)
		sizeof(real) = sizeof(integer)
		sizeof(real) = sizeof(logical)
		sizeof(real) = 2*sizeof(shortint)
	EQUIVALENCEs may not be translated correctly if these
	assumptions are violated.

	On machines, such as those using a DEC Alpha processor, on
	which sizeof(short) == 2, sizeof(int) == sizeof(float) == 4,
	and sizeof(long) == sizeof(double) == 8, it suffices to
	modify f2c.h by removing the first occurrence of "long "
	on each line containing "long ", e.g., by issuing the
	commands
		mv f2c.h f2c.h0
		sed 's/long //' f2c.h0 >f2c.h
	On such machines, one can enable INTEGER*8 by uncommenting
	the typedef of longint in f2c.h, so it reads
		typedef long longint;
	by compiling libI77 with -DAllow_TYQUAD, and by adjusting
	libF77/makefile as described in libF77/README.

	Some machines may have sizeof(int) == 4, sizeof(float) == 8,
	and sizeof(long long) == 8.  On such machines, adjust f2c.h
	by changing "long int " to "long long ", e.g., by saying
		mv f2c.h f2c.h0
		sed 's/long int /long long /' f2c.h0 >f2c.h
	One can enable INTEGER*8 on such machines as described
	above, but with
		typedef long long longint;

	There exists a C compiler that objects to the lines
		typedef VOID C_f;	/* complex function */
		typedef VOID H_f;	/* character function */
		typedef VOID Z_f;	/* double complex function */
	in f2c.h .  If yours is such a compiler, do two things:
	1. Complain to your vendor about this compiler bug.
	2. Find the line
		#define VOID void
	   in f2c.h and change it to
		#define VOID int
	(For readability, the f2c.h lines shown above have had two
	tabs inserted before their first character.)

FTP:	All the material described above is now available by anonymous
	ftp from netlib.bell-labs.com (login: anonymous; Password: your
	E-mail address; cd netlib/f2c).  Note that you can say, e.g.,

		cd /netlib/f2c/src
		binary
		prompt
		mget *.gz

	to get all the .gz files in src.  You must uncompress the .gz
	files once you have a copy of them, e.g., by

		gzip -dN *.gz

	You can also get the entire f2c tree as a tar file:

		ftp://netlib.bell-labs.com/netlib/f2c.tar

	(which is a synthetic file -- created on the fly and not visible
	to ftp's "ls" or "dir" commands).

	Subdirectory msdos contains two PC versions of f2c,
	f2c.exe.gz and f2cx.exe.gz; the latter uses extended memory.
	The README in that directory provides more details.

	Changes appear first in the f2c files available by E-mail
	from netlib@netlib.bell-labs.com.  If the deamons work right,
	changed files are available the next day by ftp from
	netlib.bell-labs.com.  In due course, they reach other netlib servers.

CHANGE NOTIFICATION:
	Send the E-mail message
		subscribe f2c
	to netlib@netlib.bell-labs.com to request notification of new and
	changed f2c files.  (Beware that automatically sent change
	notifications may reach you before changes have reached
	ftp://netlib.bell-labs.com/netlib/f2c or to other netlib servers.)
	Send the E-mail message
		unsubscribe f2c
	to recant your notification request.

-----------------
Recent change log (partial)
-----------------

Mon May 13 23:35:26 EDT 1996
  Recognize Fortran 90's /= as a synonym for .NE..  (<> remains a
synonym for .NE..)
  Emit an empty int function of no arguments to supply an external
name to named block data subprograms (so they can be called somewhere
to force them to be loaded from a library).
  Fix bug (memory fault) in handling the following illegal Fortran:
	parameter(i=1)
	equivalence(i,j)
	end
  Treat cdabs, cdcos, cdexp, cdlog, cdsin, and cdsqrt as synonyms for
the double complex intrinsics zabs, zcos, zexp, zlog, zsin, and zsqrt,
respectively, unless -cd is specified.
  Recognize the Fortran 90 bit-manipulation intrinsics btest, iand,
ibclr, ibits, ibset, ieor, ior, ishft, and ishftc, unless -i90 is
specified.  Note that iand, ieor, and ior are thus now synonyms for
"and", "xor", and "or", respectively.
  Add three macros (bit_test, bit_clear, bit_set) to f2c.h for use
with btest, ibclr, and ibset, respectively.  Add new functions
[lq]bit_bits, [lq]bit_shift, and [lq]_bit_cshift to libF77 for
use with ibits, ishft, and ishftc, respectively.
  Add integer function ftell(unit) (returning -1 on error) and
subroutine fseek(unit, offset, whence, *) to libI77 (with branch to
label * on error).

Tue May 14 23:21:12 EDT 1996
  Fix glitch (possible memory fault, or worse) in handling multiple
entry points with names over 28 characters long.

Mon Jun 10 01:20:16 EDT 1996
  Update netlib E-mail and ftp addresses in f2c/readme and
f2c/src/readme (which are different files) -- to reflect the upcoming
breakup of AT&T.
  libf77: trivial tweaks to F77_aloc.c and system_.c; Version.c not
changed.
  libi77: Adjust rsli.c and lread.c so internal list input with too
few items in the input string will honor end= .

Mon Jun 10 22:59:57 EDT 1996
  Add Bits_per_Byte to sysdep.h and adjust definition of Table_size
to depend on Bits_per_Byte (forcing Table_size to be a power of 2); in
lex.c, change "comstart[c & 0xfff]" to "comstart[c & (Table_size-1)]"
to avoid an out-of-range subscript on end-of-file.

Wed Jun 12 00:24:28 EDT 1996
  Fix bug in output.c (dereferencing a freed pointer) revealed in
	print *		!np in out_call in output.c clobbered by free
	end		!during out_expr.

Wed Jun 19 08:12:47 EDT 1996
  f2c.h: add types uinteger, ulongint (for libF77); add qbit_clear
and qbit_set macros (in a commented-out section) for integer*8.
  For integer*8, use qbit_clear and qbit_set for ibclr and ibset.
  libf77: add casts to unsigned in [lq]bitshft.c.

Thu Jun 20 13:30:43 EDT 1996
  Complain at character*(*) in common (rather than faulting).
  Fix bug in recognizing hex constants that start with "16#" (e.g.,
16#1234abcd, which is a synonym for z'1234abcd').
  Fix bugs in constant folding of expressions involving btest, ibclr,
and ibset.
  Fix bug in constant folding of rshift(16#80000000, -31) (on a 32-bit
machine; more generally, the bug was in constant folding of
rshift(ibset(0,NBITS-1), 1-NBITS) when f2c runs on a machine with
long ints having NBITS bits.

Mon Jun 24 07:58:53 EDT 1996
  Adjust struct Literal and newlabel() function to accommodate huge
source files (with more than 32767 newlabel() invocations).
  Omit .c file when the .f file has a missing final end statement.

Wed Jun 26 14:00:02 EDT 1996
  libi77: Add discussion of MXUNIT (highest allowed Fortran unit number)
to libI77/README.

Fri Jun 28 14:16:11 EDT 1996
  Fix glitch with -onetrip: the temporary variable used for nonconstant
initial loop variable values was recycled too soon.  Example:
	do i = j+1, k
		call foo(i+1)	! temp for j+1 was reused here
		enddo
	end

Tue Jul  2 16:11:27 EDT 1996
  formatdata.c: add a 0 to the end of the basetype array (for TYBLANK)
(an omission that was harmless on most machines).
  expr.c: fix a dereference of NULL that was only possible with buggy
input, such as
	subroutine $sub(s)	! the '$' is erroneous
	character s*(*)
	s(1:) = ' '
	end

Sat Jul  6 00:44:56 EDT 1996
  Fix glitch in the intrinsic "real" function when applied to a
complex (or double complex) variable and passed as an argument to
some intrinsic functions.  Example:
	complex a
	b = sqrt(real(a))
	end
  Fix glitch (only visible if you do not use f2c's malloc and the
malloc you do use is defective in the sense that malloc(0) returns 0)
in handling include files that end with another include (perhaps
followed by comments).
  Fix glitch with character*(*) arguments named "h" and "i" when
the body of the subroutine invokes the intrinsic LEN function.
  Arrange that after a previous "f2c -P foo.f" has produced foo.P,
running "f2c foo.P foo.f" will produce valid C when foo.f contains
	call sub('1234')
	end
	subroutine sub(msg)
	end
Specifically, the length argument in "call sub" is now suppressed.
With or without foo.P, it is also now suppressed when the order of
subprograms in file foo.f is reversed:
	subroutine sub(msg)
	end
	call sub('1234')
	end
  Adjust copyright notices to reflect AT&T breakup.

Wed Jul 10 09:25:49 EDT 1996
  Fix bug (possible memory fault) in handling erroneously placed
and inconsistent declarations.  Example that faulted:
	character*1 w(8)
	call foo(w)
	end
	subroutine foo(m)
	data h /0.5/
	integer m(2)	! should be before data
	end
  Fix bug (possible fault) in handling illegal "if" constructions.
Example (that faulted):
	subroutine foo(i,j)
	if (i) then		! bug: i is integer, not logical
	else if (j) then	! bug: j is integer, not logical
	endif
	end
  Fix glitch with character*(*) argument named "ret_len" to a
character*(*) function.

Wed Jul 10 23:04:16 EDT 1996
  Fix more glitches in the intrinsic "real" function when applied to a
complex (or double complex) variable and passed as an argument to
some intrinsic functions.  Example:
	complex a, b
	r = sqrt(real(conjg(a))) + sqrt(real(a*b))
	end

Thu Jul 11 17:27:16 EDT 1996
  Fix a memory fault associated with complicated, illegal input.
Example:
	subroutine goo
	character a
	call foo(a)	! inconsistent with subsequent def and call
	end
	subroutine foo(a)
	end
	call foo(a)
	end

Wed Jul 17 19:18:28 EDT 1996
  Fix yet another case of intrinsic "real" applied to a complex
argument.  Example:
	complex a(3)
	x = sqrt(real(a(2)))	! gave error message about bad tag
	end

Mon Aug 26 11:28:57 EDT 1996
  Tweak sysdep.c for non-Unix systems in which process ID's can be
over 5 digits long.

Tue Aug 27 08:31:32 EDT 1996
  Adjust the ishft intrinsic to use unsigned right shifts.  (Previously,
a negative constant second operand resulted in a possibly signed shift.)

Thu Sep 12 14:04:07 EDT 1996
  equiv.c: fix glitch with -DKR_headers.
  libi77: fmtlib.c: fix bug in printing the most negative integer.

Fri Sep 13 08:54:40 EDT 1996
  Diagnose some illegal appearances of substring notation.

Tue Sep 17 17:48:09 EDT 1996
  Fix fault in handling some complex parameters.  Example:
	subroutine foo(a)
	double complex a, b
	parameter(b = (0,1))
	a = b	! f2c faulted here
	end

Thu Sep 26 07:47:10 EDT 1996
  libi77:  fmt.h:  for formatted writes of negative integer*1 values,
make ic signed on ANSI systems.  If formatted writes of integer*1
values trouble you when using a K&R C compiler, switch to an ANSI
compiler or use a compiler flag that makes characters signed.

Tue Oct  1 14:41:36 EDT 1996
  Give a better error message when dummy arguments appear in data
statements.

Thu Oct 17 13:37:22 EDT 1996
  Fix bug in typechecking arguments to character and complex (or
double complex) functions; the bug could cause length arguments
for character arguments to be omitted on invocations appearing
textually after the first invocation.  For example, in
	subroutine foo
	character c
	complex zot
	call goo(zot(c), zot(c))
	end
the length was omitted from the second invocation of zot, and
there was an erroneous error message about inconsistent calling
sequences.

Wed Dec  4 13:59:14 EST 1996
  Fix bug revealed by
	subroutine test(cdum,rdum)
	complex cdum
	rdum=cos(real(cdum))	! "Unexpected tag 3 in opconv_fudge"
	end
  Fix glitch in parsing "DO 10 D0 = 1, 10".
  Fix glitch in parsing
	real*8 x
	real*8 x	! erroneous "incompatible type" message
	call foo(x)
	end
  lib[FI]77/makefile: add comment about omitting -x under Solaris.

Mon Dec  9 23:15:02 EST 1996
  Fix glitch in parameter adjustments for arrays whose lower
bound depends on a scalar argument.  Example:
	subroutine bug(p,z,m,n)
	integer z(*),m,n
	double precision p(z(m):z(m) + n)	! p_offset botched
	call foo(p(0), p(n))
	end
  libi77: complain about non-positive rec= in direct read and write
statements.
  libf77: trivial adjustments; Version.c not changed.

Wed Feb 12 00:18:03 EST 1997
  output.c: fix (seldom problematic) glitch in out_call: put parens
around the ... in a test of the form "if (q->tag == TADDR && ...)".
  vax.c: fix bug revealed in the "psi_offset =" assignment in the
following example:
	subroutine foo(psi,m)
	integer z(100),m
	common /a/ z
	double precision psi(z(m):z(m) + 10)
	call foo(m+1, psi(0),psi(10))
	end

Mon Feb 24 23:44:54 EST 1997
  For consistency with f2c's current treatment of adjacent character
strings in FORMAT statements, recognize a Hollerith string following
a string (and merge adjacent strings in FORMAT statements).

Wed Feb 26 13:41:11 EST 1997
  New libf2c.zip, a combination of the libf77 and libi77 bundles (and
available only by ftp).
  libf77: adjust functions with a complex output argument to permit
aliasing it with input arguments.  (For now, at least, this is just
for possible benefit of g77.)
  libi77: tweak to ftell_.c for systems with strange definitions of
SEEK_SET, etc.

Tue Apr  8 20:57:08 EDT 1997
  libf77: [cz]_div.c: tweaks invisible on most systems (that may
improve things slightly with optimized compilation on systems that use
gratuitous extra precision).
  libi77: fmt.c: adjust to complain at missing numbers in formats
(but still treat missing ".nnn" as ".0").

Fri Apr 11 14:05:57 EDT 1997
  libi77: err.c: attempt to make stderr line buffered rather than
fully buffered.  (Buffering is needed for format items T and TR.)

Thu Apr 17 22:42:43 EDT 1997
 libf77: add F77_aloc.o to makefile (and makefile.u in libf2c.zip).

Fri Apr 25 19:32:09 EDT 1997
 libf77: add [de]time_.c (which may give trouble on some systems).

Tue May 27 09:18:52 EDT 1997
 libi77: ftell_.c: fix typo that caused the third argument to be
treated as 2 on some systems.

Mon Jun  9 00:04:37 EDT 1997
 libi77 (and libf2c.zip): adjust include order in err.c lread.c wref.c
rdfmt.c to include fmt.h (etc.) after system includes.  Version.c not
changed.

Mon Jun  9 14:29:13 EDT 1997
 src/gram.c updated; somehow it did not reflect the change of
19961001 to gram.dcl.

Mon Jul 21 16:04:54 EDT 1997
  proc.c: fix glitch in logic for "nonpositive dimension" message.
  libi77: inquire.c: always include string.h (for possible use with
-DNON_UNIX_STDIO); Version.c not changed.

Thu Jul 24 17:11:23 EDT 1997
  Tweak "Notice" to reflect the AT&T breakup -- we missed it when
updating the copyright notices in the source files last summer.
  Adjust src/makefile so malloc.o is not used by default, but can
be specified with "make MALLOC=malloc.o".
  Add comments to src/README about the "CRAY" T3E.

Tue Aug  5 14:53:25 EDT 1997
  Add definition of calloc to malloc.c; this makes f2c's malloc
work on some systems where trouble hitherto arose because references
to calloc brought in the system's malloc.  (On sensible systems,
calloc is defined separately from malloc.  To avoid confusion on
other systems, f2c/malloc.c now defines calloc.)
  libi77: lread.c: adjust to accord with a change to the Fortran 8X
draft (in 1990 or 1991) that rescinded permission to elide quote marks
in namelist input of character data; to get the old behavior, compile
with F8X_NML_ELIDE_QUOTES #defined.  wrtfmt.o: wrt_G: tweak to print
the right number of 0's for zero under G format.

Sat Aug 16 05:45:32 EDT 1997
  libi77: iio.c: fix bug in internal writes to an array of character
strings that sometimes caused one more array element than required by
the format to be blank-filled.  Example: format(1x).

Wed Sep 17 00:39:29 EDT 1997
  libi77: fmt.[ch] rdfmt.c wrtfmt.c: tweak struct syl for machines
with 64-bit pointers and 32-bit ints that did not 64-bit align
struct syl (e.g., Linux on the DEC Alpha).  This change should be
invisible on other machines.

Sun Sep 21 22:05:19 EDT 1997
  libf77: [de]time_.c (Unix systems only): change return type to double.

Thu Dec  4 22:10:09 EST 1997
  Fix bug with handling large blocks of comments (over 4k); parts of the
second and subsequent blocks were likely to be lost (not copied into
comments in the resulting C).  Allow comment lines to be longer before
breaking them.

Mon Jan 19 17:19:27 EST 1998
  makefile: change the rule for making gram.c to one for making gram1.c;
henceforth, asking netlib to "send all from f2c/src" will bring you a
working gram.c.  Nowadays there are simply too many broken versions of
yacc floating around.
  libi77: backspace.c: for b->ufmt==0, change sizeof(int) to
sizeof(uiolen).  On machines where this would make a difference, it is
best for portability to compile libI77 with -DUIOLEN_int, which will
render the change invisible.

Tue Feb 24 08:35:33 EST 1998
  makefile: remove gram.c from the "make clean" rule.

Wed Feb 25 08:29:39 EST 1998
  makefile: change CFLAGS assignment to -O; add "veryclean" rule.

Wed Mar  4 13:13:21 EST 1998
  libi77: open.c: fix glitch in comparing file names under
-DNON_UNIX_STDIO.

Mon Mar  9 23:56:56 EST 1998
  putpcc.c: omit an unnecessary temporary variable in computing
(expr)**3.
  libf77, libi77: minor tweaks to make some C++ compilers happy;
Version.c not changed.

Wed Mar 18 18:08:47 EST 1998
  libf77: minor tweaks to [ed]time_.c; Version.c not changed.
  libi77: endfile.c, open.c: acquire temporary files from tmpfile(),
unless compiled with -DNON_ANSI_STDIO, which uses mktemp().
New buffering scheme independent of NON_UNIX_STDIO for handling T
format items.  Now -DNON_UNIX_STDIO is no longer be necessary for
Linux, and libf2c no longer causes stderr to be buffered -- the former
setbuf or setvbuf call for stderr was to make T format items work.
open.c: use the Posix access() function to check existence or
nonexistence of files, except under -DNON_POSIX_STDIO, where trial
fopen calls are used.  In open.c, fix botch in changes of 19980304.
  libf2c.zip: the PC makefiles are now set for NT/W95, with comments
about changes for DOS.

Fri Apr  3 17:22:12 EST 1998
  Adjust fix of 19960913 to again permit substring notation on
character variables in data statements.

Sun Apr  5 19:26:50 EDT 1998
  libi77: wsfe.c: make $ format item work: this was lost in the changes
of 17 March 1998.

Sat May 16 19:08:51 EDT 1998
  Adjust output of ftnlen constants: rather than appending L,
prepend (ftnlen).  This should make the resulting C more portable,
e.g., to systems (such as DEC Alpha Unix systems) on which long
may be longer than ftnlen.
  Adjust -r so it also casts REAL expressions passed to intrinsic
functions to REAL.

Wed May 27 16:02:35 EDT 1998
  libf2c.zip: tweak description of compiling libf2c for INTEGER*8
to accord with makefile.u rather than libF77/makefile.

Thu May 28 22:45:59 EDT 1998
  libi77: backspace.c dfe.c due.c iio.c lread.c rsfe.c sue.c wsfe.c:
set f__curunit sooner so various error messages will correctly
identify the I/O unit involved.
  libf2c.zip: above, plus tweaks to PC makefiles: for some purposes,
it's still best to compile with -DMSDOS (even for use with NT).

Thu Jun 18 01:22:52 EDT 1998
  libi77: lread.c: modified so floating-point numbers (containing
either a decimal point or an exponent field) are treated as errors
when they appear as list input for integer data.  Compile lread.c with
-DALLOW_FLOAT_IN_INTEGER_LIST_INPUT to restore the old behavior.

Mon Aug 31 10:38:54 EDT 1998
  formatdata.c: if possible, and assuming doubles must be aligned on
double boundaries, use existing holes in DATA for common blocks to
force alignment of the block.  For example,
	block data
	common /abc/ a, b
	double precision a
	integer b(2)
	data b(2)/1/
	end
used to generate
	struct {
	    integer fill_1[3];
	    integer e_2;
	    doublereal e_3;
	    } abc_ = { {0}, 1, 0. };
and now generates
	struct {
	    doublereal fill_1[1];
	    integer fill_2[1];
	    integer e_3;
	    } abc_ = { {0}, {0}, 1 };
In the old generated C, e_3 was added to force alignment; in the new C,
fill_1 does this job.

Mon Sep  7 19:48:51 EDT 1998
  libi77: move e_wdfe from sfe.c to dfe.c, where it was originally.
Why did it ever move to sfe.c?

Tue Sep  8 10:22:50 EDT 1998
  Treat dreal as a synonym for dble unless -cd is specified on the
command line.

Sun Sep 13 22:23:41 EDT 1998
  format.c: fix bug in writing prototypes under f2c -A ... *.P:
under some circumstances involving external functions with no known
type, a null pointer was passed to printf.

Tue Oct 20 23:25:54 EDT 1998
  Comments added to libf2c/README and libF77/README, pointing out
the need to modify signal1.h on some systems.

Thu Nov 12 15:34:09 EST 1998
  libf77, libf2c.zip: minor tweaks to [de]time_.c and the makefiles,
so makefile.sy, makefile.vc, and makefile.wat deal with [de]time_.c.

Wed Feb 10 22:59:52 EST 1999
  defs.h lex.c: permit long names (up to at least roughly
MAX_SHARPLINE_LEN = 1000 characters long) in #line lines (which only
matters under -g).
  fc: add -U option; recognize .so files.

Sat Feb 13 10:18:27 EST 1999
  libf2c: endfile.c, lread.c, signal1.h0: minor tweaks to make some
(C++) compilers happier; f77_aloc.c: make exit_() visible to C++
compilers.  Version strings not changed.

Thu Mar 11 23:14:02 EST 1999
  Modify f2c (exec.c, expr.c) to diagnose incorrect mixing of types
when (f2c extended) intrinsic functions are involved, as in
(not(17) .and. 4).  Catching this in the first executable statement
is a bit tricky, as some checking must be postponed until all statement
function declarations have been parsed.  Thus there is a chance of
today's changes introducing bugs under (let us hope) unusual conditions.

Sun Mar 28 13:17:44 EST 1999
  lex.c: tweak to get the file name right in error messages caused
by statements just after a # nnn "filename" line emitted by the C
preprocessor.  (The trouble is that the line following the # nnn line
must be read to see if it is a continuation of the stuff that preceded
the # nnn line.)  When # nnn "filename" lines appear among the lines
for a Fortran statement, the filename reported in an error message for
the statement should now be the file that was current when the first
line of the statement was read.

Sun May  2 22:38:25 EDT 1999
  libf77, libi77, libf2c.zip: make getenv_() more portable (call
getenv() rather than knowing about char **environ); adjust some
complex intrinsics to work with overlapping arguments (caused by
inappropriate use of equivalence); open.c: get "external" versus
"internal" right in the error message if a file cannot be opened;
err.c: cast a pointer difference to (int) for %d; rdfmt.c: omit
fixed-length buffer that could be overwritten by formats Inn or Lnn
with nn > 83.

Mon May  3 13:14:07 EDT 1999
  "Invisible" changes to omit a few compiler warnings in f2c and
libf2c; two new casts in libf2c/open.c that matter with 64-bit longs,
and one more tweak (libf2c/c_log.c) for pathological equivalences.
  Minor update to "fc" script: new -L flag and comment correction.

Tue May  4 10:06:26 EDT 1999
  libf77, libf2c.zip: forgot to copy yesterday's latest updates to
netlib.

Fri Jun 18 02:33:08 EDT 1999
  libf2c.zip: rename backspace.c backspac.c, and fix a glitch in it
-- b->ufd may change in t_runc().  (For now, it's still backspace.c
in the libi77 bundle.)

Sun Jun 27 22:05:47 EDT 1999
  libf2c.zip, libi77: rsne.c: fix bug in namelist input: a misplaced
increment could cause wrong array elements to be assigned; e.g.,
"&input k(5)=10*1 &end" assigned k(5) and k(15 .. 23).

Tue Sep  7 14:10:24 EDT 1999
  f2c.h, libf2c/f2c.h0, libf2c/README: minor tweaks so a simple
sed command converts f2c.h == libf2c/f2c.h0 to a form suitable for
machines with 8-byte longs and doubles, 4-byte int's and floats,
while working with a forthcoming (ill-advised) update to the C
standard that outlaws plain "unsigned".
  f2c.h, libf2c/f2c.h0: change "if 0" to "#ifdef INTEGER_STAR_8".
  libf77, libf2c.zip: [cz]_div.c and README: arrange for compilation
under -DIEEE_COMPLEX_DIVIDE to make these routines avoid calling sig_die
when the denominator of a complex or double complex division vanishes;
instead, they return pairs of NaNs or Infinities, depending whether the
numerator also vanishes or not.

Tue Oct  5 23:50:14 EDT 1999
  formatdata.c, io.c, output.c, sysdep.c: adjust to make format
strings legal when they contain 8-bit characters with the high bit on.
(For many C compilers, this is not necessary, but it the ANSI/ISO C
standard does not require this to work.)
  libf2c.zip: tweak README and correct xsum0.out.

Mon Oct 25 17:30:54 EDT 1999
  io.c: fix glitch introduced in the previous change (19991005) that
caused format(' %') to print "%%" rather than "%".

Mon Nov 15 12:10:35 EST 1999
  libf2c.zip: fix bug with the sequence backspace(n); endfile(n);
rewind(n); read(n).  Supply missing (long) casts in a couple of places
where they matter when size(ftnint) == sizeof(int) < sizeof(long).

Tue Jan 18 19:22:24 EST 2000
  Arrange for parameter statements involving min(...) and max(...)
functions of three or more arguments to work.
  Warn about text after "end" (rather than reporting a syntax error
with a surprising line number).
  Accept preprocessor line numbers of the form "# 1234" (possibly
with trailing blanks).
  Accept a comma after write(...) and before a list of things to write.

Fri Jan 21 17:26:27 EST 2000
  Minor updates to make compiling Win32 console binaries easier.  A
side effect is that the MSDOS restriction of only one Fortran file
per invocation is lifted (and "f2c *.f") works.

Tue Feb  1 18:38:32 EST 2000
  f2c/src/tokdefs.h added (to help people on non-Unix systems -- the
makefile has always had a rule for generating tokdefs.h).

Fri Mar 10 18:48:17 EST 2000
  libf77, libf2c.zip: z_log.c: the real part of the double complex log
of numbers near, e.g., (+-1,eps) with |eps| small is now more accurate.
For example if z = (1,1d-7), then "write(*,*) z" now writes
"(5.E-15,1.E-07" rather than the previous "(4.88498131E-15,1.E-07)".

Thu Apr 20 13:02:54 EDT 2000
  libf77, libi77, libf2c.zip: s_cat.c, rsne.c, xwsne.c: fix type
errors that only matter if sizeof(ftnint) != sizeof(ftnlen).

Tue May 30 23:36:18 EDT 2000
  expr.c: adjust subcheck() to use a temporary variable of type TYLONG
rather than TYSHORT under -C -I2.

Wed May 31 08:48:03 EDT 2000
  Simplify yesterday's adjustment; today's change should be invisible.

Tue Jul  4 22:52:21 EDT 2000
  misc.c, function "addressable": fix fault with "f2c -I2 foo.f" when
foo.f consists of the 4 lines
	subroutine foo(c)
	character*(*) c
	i = min(len(c),23)
	end
  Sundry files: tweaks for portability, e.g., for compilation by overly
fastidious C++ compilers; "false" and "true" now treated as C keywords
(so they get two underscores appended).
  libf77, libi77, libf2c.zip: "invisible" adjustments to permit
compilation by C++ compilers; version numbers not changed.

Wed Jul  5 09:29:12 EDT 2000
  Fix (rarely seen) memory fault in error message about names that
are 51-60 characters long long.  An example that provoked that bug:
	subroutine foo
	return
  c  erroneous comment line in that this line does not start in column one.
	end

Thu Jul  6 23:46:07 EDT 2000
  Various files: tweaks to banish more compiler warnings.
  lib?77, libf2c.zip/makefile.u: add "|| true" to ranlib invocations.
  Thanks to Nelson H. F. Beebe for messages leading to these changes
(and to many of the ones two days ago).
  xsum.c: tweak include order.

Fri Jul  7 18:01:25 EDT 2000
  fc: accept -m xxx or -mxxx, pass them to the compiler as -mxxx
(suggestion of Nelson Beebe).  Note that fc simply appends to CFLAGS,
so system-specific stuff can be supplied in the environment variable
CFLAGS.  With some shells, invocations of the form
	CFLAGS='system-specific stuff' fc ...
are one way to do this.

Thu Aug 17 21:38:36 EDT 2000
  Fix obscure glitch: in "Error on line nnn of ...: Bad # line:...",
get nnn right.

Sat Sep 30 00:28:30 EDT 2000
  libf77, libf2c.zip: dtime_.c, etime_.c: use floating-point divide;
dtime_.d, erf_.c, erfc_.c, etime.c: for use with "f2c -R", compile with
-DREAL=float.

Tue Dec  5 22:55:56 EST 2000
  libf2c: lread.c: under namelist input, when reading a logical array,
treat Tstuff= and Fstuff= as new assignments rather than as logical
constants.

Fri Feb 23 00:43:56 EST 2001
  libf2c: endfile.c: adjust to use truncate() unless compiled with
-DNO_TRUNCATE (or with -DMSDOS).  Add libf2c/mkfile.plan9.

Sat Feb 24 21:14:24 EST 2001
  Prevent malloc(0) when a subroutine of no arguments has an entry
with no arguments, as in
	subroutine foo
	entry goo
	end
  Fix a fault that was possible when MAIN (illegally) had entry points.
  Fix a buffer overflow connected with the error message for names more
than MAXNAMELEN (i.e., 50) bytes long.
  Fix a bug in command-line argument passing that caused the invocation
"f2c -!czork foo.f" to complain about two invalid flags ('-ork' and
'-oo.f') instead of just one ('-ork').
  fc: add -s option (strip executable); portability tweaks.
  Adjustments to handling of integer*8 to permit processing 8-byte hex,
binary, octal, and decimal constants.  The adjustments are only useful
when an integer type providing >= 64 bit integers is available to
f2c.  Compile f2c with -DNO_LONG_LONG or -DNO_TYQUAD if no such type is
available.  Otherwise, the types "long long" and "unsigned long long"
specified by the C99 standard are used for the 64-bit integer types
(unless alternative -DLlong=...  and -DULlong=...  preprocessor
assignments are in effect).  As has long been the case, compilation of
f2c itself with -DNO_TYQUAD eliminates recognition of integer*8
altogether.  Compilation with just -DNO_LONG_LONG permits the previous
handling of integer*8, which could only handle 32-bit constants
associated with integer*8 variables.
  New command-line argument -i8const (available only when f2c itself
is compiled with neither -DNO_TYQUAD nor -DNO_LONG_LONG) suppresses the
new automatic promotion of integer constants too long to express as
32-bit values to type integer*8.  There are corresponding updates to
f2c.1 and f2c.1t.

Wed Feb 28 00:50:04 EST 2001
  Adjust misc.c for (older) systems that recognize long long but do not
have LLONG_MAX or LONGLONG_MAX in limits.h.
  main.c: filter out bad files before dofork loop to avoid trouble
in Win32 "f2c.exe" binaries.

Thu Mar  1 16:25:19 EST 2001
  Cosmetic change for consistency with some other netlib directories:
change NO_LONGLONG to NO_LONG_LONG.  (This includes adjusting the above
entry for Feb 23 2001.)  No change (other than timestamp) to version.c.
  libf2c:  endfile.c:  switch to ftruncate (absent -DNO_TRUNCATE),
thus permitting truncation of scratch files on true Unix systems,
where scratch files have no name.  Add an fflush() (surprisingly)
needed on some Linux systems.

Tue Mar 20 22:03:23 EST 2001
  expr.c:  complain ("impossible conversion") about attempts to assign
character expressions ... to integer variables, rather than implicitly
assigning ichar(...).

Sat Jun 23 23:08:22 EDT 2001
  New command-line option -trapuv adds calls on _uninit_f2c() to prologs
to dynamically initialize local variables, except those appearing in
SAVE or DATA statements, with values that may help find references to
uninitialized variables.  For example, with IEEE arithmetic, floating-
point variables are initialized to signaling NaNs.
  expr.c: new warning for out-of-bounds constant substring expressions.
Under -C, such expressions now inhibit C output.
  libf2c/mkfile.plan9: fix glitch with rule for "check" (or xsum.out).
  libf2c.zip: add uninit.c (for _uninit_f2c()) in support of -trapuv.
  fc, f2c.1, f2c.1t: adjust for -trapuv.

Thu Jul  5 22:00:51 EDT 2001
  libf2c.zip: modify uninit.c for __mc68k__ under Linux.

Wed Aug 22 08:01:37 EDT 2001
  cds.c, expr.c: in constants, preserve the sign of 0.
  expr.c: fix some glitches in folding constants to integer*8
(when NO_LONG_LONG is not #defined).
  intr.c: fold constant min(...) and max(...) expressions.

Fri Nov 16 02:00:03 EST 2001
  libf2c.zip:  tweak to permit handling files over 2GB long where
possible, with suitable -D options, provided for some systems in
new header file sysdep1.h (copied from sysdep1.h0 by default).
Add an fseek to endfile.c to fix a glitch on some systems.

Wed Nov 28 17:58:12 EST 2001
  libf2c.zip:  on IEEE systems, print -0 as -0 when the relevant
libf2c/makefile.* is suitably adjusted:  see comments about
-DSIGNED_ZEROS in libf2c/makefile.*.

Fri Jan 18 16:17:44 EST 2002
  libf2c.zip:   fix bugs (reported by Holger Helmke) in qbit_bits():
wrong return type, missing ~ on y in return value.  This affects
the intrinsic ibits function for first argument of type integer*8.

Thu Feb  7 17:14:43 EST 2002
  Fix bug handling leading array dimensions in common:  invalid C
resulted.  Example (after one provided by Dmitry G. Baksheyev):

	subroutine foo(a)
	common/c/m
	integer m, n
	equivalence(m,n)
	integer a(n,2)
	a(1,2) = 3
	end

  Fix a bug, apparently introduced sometime after 19980913, in
handling certain substring expressions that involve temporary
assignments and the first invocation of an implicitly typed function.
When the expressions appeared in "else if (...)"  and "do while(...)",
the temporary assignments appeared too soon.  Examples are hard to
find, but here is one (after an example provided by Nat Bachman):

	subroutine foo(n)
	character*8 s
	do while (moo(s(n+1:n+2)) .ge. 2)
		n = n + 1
		enddo
	end

It is hard for f2c to get this sort of example correct when the
"untyped" function is a generic intrinsic.  When incorrect code would
otherwise result, f2c now issues an error message and declines to
produce C.  For example,

	subroutine foo(n)
	character*8 s
	double precision goo
	do while (sin(goo(s(n+1:n+2))) .ge. 0.2)
		n = n + 1
		enddo
	end

gives the new error message, but both

	subroutine foo(n)
	character*8 s
	double precision goo
	do while (dsin(goo(s(n+1:n+2))) .ge. 0.2)
		n = n + 1
		enddo
	end
and
	subroutine foo(n)
	character*8 s
	double precision goo
	do while (sin(goo(min(n, (n-3)**2))) .ge. 0.2)
		n = n + 1
		enddo
	end

give correct C.

Fri Feb  8 08:43:40 EST 2002
  Make a cleaner fix of the bug fixed yesterday in handling certain
"do while(...)" and "else if (...)" constructs involving auxiliary
assignments.  (Yesterday's changes to expr.c are recanted; expr.c
is now restored to that of 20010820.)  Now

	subroutine foo(n)
	character*8 s
	double precision goo
	do while (sin(goo(s(n+1:n+2))) .ge. 0.2)
		n = n + 1
		enddo
	end

is correctly translated.

Thu Mar 14 12:53:08 EST 2002
  lex.c:  adjust to avoid an error message under -72 when source files
are in CRLF form ("text mode" on Microsoft systems), a source line is
exactly 72 characters long, and f2c is run on a system (such as a Unix
or Linux system) that does not distinguish text and binary modes.
Example (in CRLF form):
      write(*,*)"Hello world, with a source line that is 72 chars long."
      end
  libf2c/z_log.c:  add code to cope with buggy compilers (e.g., some
versions of gcc under -O2 or -O3) that do floating-point comparisons
against values computed into extended-precision registers on some
systems (such as Intel IA32 systems).  Compile with
-DNO_DOUBLE_EXTENDED to omit the kludge that circumvents this bug.

Thu May  2 19:09:01 EDT 2002
  src/misc.c, src/sysdep.h, src/gram.c: tweaks for KR_headers (a rare
concern today); version.c touched but left unchanged.
  libf2c: fix glitch in makefile.vc; KR_header tweaks in s_stop.c
and uninit.c (which also had a misplaced #endif).

Wed Jun  5 16:13:34 EDT 2002
  libf2c: uninit.c: for Linux on an ARM processor, add some
#ifndef _FPU... tests; f77vers.c not changed.

Tue Jun 25 15:13:32 EDT 2002
  New command-line option -K requests old-style ("K&R") C.  The
default is changed to -A (ANSI/ISO style).
  Under -K, cast string-length arguments to (ftnlen).  This should
matter only in the unusual case that "readme" instructs obtaining
f2c.h by
	sed 's/long int /long long /' f2c.h0 >f2c.h
  Increase defaults for some table sizes:  make -Nn802 -Nq300 -Nx400
the default.

Fri Sep  6 18:39:24 EDT 2002
  libf2c.zip: rsne.c: fix bug with multiple repeat counts in reading
namelists, e.g., &nl a(2) = 3*1.0, 2*2.0, 3*3.0 /
(Bug found by Jim McDonald, reported by Toon Moene.)

Current timestamps of files in "all from f2c/src", sorted by time,
appear below (mm/dd/year hh:mm:ss).  To bring your source up to date,
obtain source files with a timestamp later than the time shown in your
version.c.  Note that the time shown in the current version.c is the
timestamp of the source module that immediately follows version.c below:

 6/25/2002  15:13:28  xsum0.out
 6/21/2002  14:40:38  f2c.1
 6/21/2002  14:40:35  f2c.1t
 6/21/2002  14:36:03  version.c
 6/21/2002  14:35:38  main.c
 6/21/2002  14:35:35  defs.h
 6/21/2002  14:20:59  output.c
 5/02/2002  19:03:25  gram.c
 5/02/2002  18:52:12  sysdep.h
 5/02/2002  18:36:23  misc.c
 3/14/2002   7:16:16  lex.c
 2/08/2002   8:06:11  gram.exec
 2/08/2002   8:06:11  putpcc.c
 2/07/2002  16:29:28  vax.c
 8/21/2001   0:01:42  intr.c
 8/20/2001  23:33:04  expr.c
 8/20/2001  11:33:03  cds.c
 4/10/2001   9:41:10  format.c
 3/05/2001  11:54:40  makefile
 3/01/2001  16:16:13  put.c
 3/01/2001  16:16:13  p1output.c
 3/01/2001  16:16:12  ftypes.h
 3/01/2001  16:16:12  data.c
 3/01/2001  16:16:12  formatdata.c
 2/24/2001  12:55:03  parse_args.c
 2/24/2001   8:29:17  gram.expr
 2/23/2001  16:11:38  init.c
 1/30/2001  11:09:54  proc.c
 7/06/2000  17:51:15  xsum.c
 7/06/2000  11:32:44  exec.c
 7/04/2000  20:43:34  names.c
 7/04/2000  19:28:53  pread.c
 7/04/2000  19:22:16  io.c
 7/04/2000  19:13:12  niceprintf.c
 7/04/2000  19:11:29  error.c
 7/04/2000  18:54:54  sysdep.c
 7/03/2000   9:51:34  memset.c
 7/02/2000  19:10:55  equiv.c
 7/02/2000  18:56:42  malloc.c
 1/19/2000  10:49:50  mem.c
 1/18/2000  18:52:33  gram.io
 1/18/2000  18:20:28  gram.head
 9/07/1999  13:46:24  f2c.h
 4/03/1998  17:14:59  gram.dcl
 7/24/1997  17:10:55  README
 7/24/1997  16:06:19  Notice
 6/19/1996   2:52:05  defines.h
 2/25/1994   2:07:19  parse.h
 2/22/1994  19:07:20  iob.h
 2/22/1994  18:56:53  p1defs.h
 2/22/1994  18:53:46  output.h
 2/22/1994  18:51:14  names.h
 2/22/1994  18:30:41  format.h
 1/18/1994  18:12:52  tokens
 2/03/1990   0:58:26  niceprintf.h
 1/07/1990   1:20:01  usignal.h
11/27/1989   8:27:37  machdefs.h
 7/01/1989  11:59:44  pccdefs.h
