NameDateSize

..22-Nov-201218

backspace.cH A D22-Nov-20121.3 KiB

close.cH A D22-Nov-20121.8 KiB

configureH A D22-Nov-201251.1 KiB

configure.inH A D22-Nov-20125.8 KiB

dfe.cH A D22-Nov-20122.6 KiB

dolio.cH A D22-Nov-2012404

due.cH A D22-Nov-20121.6 KiB

endfile.cH A D22-Nov-20122 KiB

err.cH A D22-Nov-20126.5 KiB

f2ch.addH A D22-Nov-20125.9 KiB

fio.hH A D22-Nov-20122.6 KiB

fmt.cH A D22-Nov-20128.9 KiB

fmt.hH A D22-Nov-20121.9 KiB

fmtlib.cH A D22-Nov-2012798

fp.hH A D22-Nov-2012665

ftell_.cH A D22-Nov-2012859

iio.cH A D22-Nov-20122.6 KiB

ilnw.cH A D22-Nov-20121.1 KiB

inquire.cH A D22-Nov-20122.6 KiB

lio.hH A D22-Nov-20121.5 KiB

lread.cH A D22-Nov-201212.8 KiB

lwrite.cH A D22-Nov-20124.4 KiB

Makefile.inH A D22-Nov-20123.9 KiB

makefile.netlibH A D22-Nov-20122.2 KiB

NoticeH A D22-Nov-20121.2 KiB

open.cH A D22-Nov-20125.8 KiB

rawio.hH A D22-Nov-2012852

rdfmt.cH A D22-Nov-20128.6 KiB

README.netlibH A D22-Nov-20129.6 KiB

rewind.cH A D22-Nov-2012462

rsfe.cH A D22-Nov-20121.4 KiB

rsli.cH A D22-Nov-20121.7 KiB

rsne.cH A D22-Nov-201211.2 KiB

sfe.cH A D22-Nov-2012616

sue.cH A D22-Nov-20121.8 KiB

typesize.cH A D22-Nov-2012319

uio.cH A D22-Nov-20121.6 KiB

util.cH A D22-Nov-2012916

Version.cH A D22-Nov-201215.3 KiB

wref.cH A D22-Nov-20124.4 KiB

wrtfmt.cH A D22-Nov-20127.2 KiB

wsfe.cH A D22-Nov-20121.3 KiB

wsle.cH A D22-Nov-2012648

wsne.cH A D22-Nov-2012412

xwsne.cH A D22-Nov-20121.1 KiB

README.netlib

1If your compiler does not recognize ANSI C headers,
2compile with KR_headers defined:  either add -DKR_headers
3to the definition of CFLAGS in the makefile, or insert
4
5#define KR_headers
6
7at the top of f2c.h and fmtlib.c .
8
9
10If you have a really ancient K&R C compiler that does not understand
11void, add -Dvoid=int to the definition of CFLAGS in the makefile.
12
13If you use a C++ compiler, first create a local f2c.h by appending
14f2ch.add to the usual f2c.h, e.g., by issuing the command
15	make f2c.h
16which assumes f2c.h is installed in /usr/include .
17
18If your system lacks /usr/include/fcntl.h , then you
19should simply create an empty fcntl.h in this directory.
20If your compiler then complains about creat and open not
21having a prototype, compile with OPEN_DECL defined.
22On many systems, open and creat are declared in fcntl.h .
23
24If your system has /usr/include/fcntl.h, you may need to add
25-D_POSIX_SOURCE to the makefile's definition of CFLAGS.
26
27If your system's sprintf does not work the way ANSI C
28specifies -- specifically, if it does not return the
29number of characters transmitted -- then insert the line
30
31#define USE_STRLEN
32
33at the end of fmt.h .  This is necessary with
34at least some versions of Sun and DEC software.
35In particular, if you get a warning about an improper
36pointer/integer combination in compiling wref.c, then
37you need to compile with -DUSE_STRLEN .
38
39If your system's fopen does not like the ANSI binary
40reading and writing modes "rb" and "wb", then you should
41compile open.c with NON_ANSI_RW_MODES #defined.
42
43If you get error messages about references to cf->_ptr
44and cf->_base when compiling wrtfmt.c and wsfe.c or to
45stderr->_flag when compiling err.c, then insert the line
46
47#define NON_UNIX_STDIO
48
49at the beginning of fio.h, and recompile everything (or
50at least those modules that contain NON_UNIX_STDIO).
51
52Unformatted sequential records consist of a length of record
53contents, the record contents themselves, and the length of
54record contents again (for backspace).  Prior to 17 Oct. 1991,
55the length was of type int; now it is of type long, but you
56can change it back to int by inserting
57
58#define UIOLEN_int
59
60at the beginning of fio.h.  This affects only sue.c and uio.c .
61
62On VAX, Cray, or Research Tenth-Edition Unix systems, you may
63need to add -DVAX, -DCRAY, or -DV10 (respectively) to CFLAGS
64to make fp.h work correctly.  Alternatively, you may need to
65edit fp.h to suit your machine.
66
67You may need to supply the following non-ANSI routines:
68
69  fstat(int fileds, struct stat *buf) is similar
70to stat(char *name, struct stat *buf), except that
71the first argument, fileds, is the file descriptor
72returned by open rather than the name of the file.
73fstat is used in the system-dependent routine
74canseek (in the libI77 source file err.c), which
75is supposed to return 1 if it's possible to issue
76seeks on the file in question, 0 if it's not; you may
77need to suitably modify err.c .  On non-UNIX systems,
78you can avoid references to fstat and stat by compiling
79with NON_UNIX_STDIO defined; in that case, you may need
80to supply access(char *Name,0), which is supposed to
81return 0 if file Name exists, nonzero otherwise.
82
83  char * mktemp(char *buf) is supposed to replace the
846 trailing X's in buf with a unique number and then
85return buf.  The idea is to get a unique name for
86a temporary file.
87
88On non-UNIX systems, you may need to change a few other,
89e.g.: the form of name computed by mktemp() in endfile.c and
90open.c; the use of the open(), close(), and creat() system
91calls in endfile.c, err.c, open.c; and the modes in calls on
92fopen() and fdopen() (and perhaps the use of fdopen() itself
93-- it's supposed to return a FILE* corresponding to a given
94an integer file descriptor) in err.c and open.c (component ufmt
95of struct unit is 1 for formatted I/O -- text mode on some systems
96-- and 0 for unformatted I/O -- binary mode on some systems).
97Compiling with -DNON_UNIX_STDIO omits all references to creat()
98and almost all references to open() and close(), the exception
99being in the function f__isdev() (in open.c).
100
101For MS-DOS, compile all of libI77 with -DMSDOS (which implies
102-DNON_UNIX_STDIO).  You may need to make other compiler-dependent
103adjustments; for example, for Turbo C++ you need to adjust the mktemp
104invocations and to #undef ungetc in lread.c and rsne.c .
105
106If you want to be able to load against libI77 but not libF77,
107then you will need to add sig_die.o (from libF77) to libI77.
108
109If you wish to use translated Fortran that has funny notions
110of record length for direct unformatted I/O (i.e., that assumes
111RECL= values in OPEN statements are not bytes but rather counts
112of some other units -- e.g., 4-character words for VMS), then you
113should insert an appropriate #define for url_Adjust at the
114beginning of open.c .  For VMS Fortran, for example,
115#define url_Adjust(x) x *= 4
116would suffice.
117
118To check for transmission errors, issue the command
119	make check
120This assumes you have the xsum program whose source, xsum.c,
121is distributed as part of "all from f2c/src".  If you do not
122have xsum, you can obtain xsum.c by sending the following E-mail
123message to netlib@netlib.bell-labs.com
124	send xsum.c from f2c/src
125
126The makefile assumes you have installed f2c.h in a standard
127place (and does not cause recompilation when f2c.h is changed);
128f2c.h comes with "all from f2c" (the source for f2c) and is
129available separately ("f2c.h from f2c").
130
131By default, Fortran I/O units 5, 6, and 0 are pre-connected to
132stdin, stdout, and stderr, respectively.  You can change this
133behavior by changing f_init() in err.c to suit your needs.
134Note that f2c assumes READ(*... means READ(5... and WRITE(*...
135means WRITE(6... .  Moreover, an OPEN(n,... statement that does
136not specify a file name (and does not specify STATUS='SCRATCH')
137assumes FILE='fort.n' .  You can change this by editing open.c
138and endfile.c suitably.
139
140Unless you adjust the "#define MXUNIT" line in fio.h, Fortran units
1410, 1, ..., 99 are available, i.e., the highest allowed unit number
142is MXUNIT - 1.
143
144Lines protected from compilation by #ifdef Allow_TYQUAD
145are for a possible extension to 64-bit integers in which
146integer = int = 32 bits and longint = long = 64 bits.
147
148Extensions (Feb. 1993) to NAMELIST processing:
149 1. Reading a ? instead of &name (the start of a namelist) causes
150the namelist being sought to be written to stdout (unit 6);
151to omit this feature, compile rsne.c with -DNo_Namelist_Questions.
152 2. Reading the wrong namelist name now leads to an error message
153and an attempt to skip input until the right namelist name is found;
154to omit this feature, compile rsne.c with -DNo_Bad_Namelist_Skip.
155 3. Namelist writes now insert newlines before each variable; to omit
156this feature, compile xwsne.c with -DNo_Extra_Namelist_Newlines.
157 4. (Sept. 1995) When looking for the &name that starts namelist
158input, lines whose first non-blank character is something other
159than &, $, or ? are treated as comment lines and ignored, unless
160rsne.c is compiled with -DNo_Namelist_Comments.
161
162Nonstandard extension (Feb. 1993) to open: for sequential files,
163ACCESS='APPEND' (or access='anything else starting with "A" or "a"')
164causes the file to be positioned at end-of-file, so a write will
165append to the file.
166
167Some buggy Fortran programs use unformatted direct I/O to write
168an incomplete record and later read more from that record than
169they have written.  For records other than the last, the unwritten
170portion of the record reads as binary zeros.  The last record is
171a special case: attempting to read more from it than was written
172gives end-of-file -- which may help one find a bug.  Some other
173Fortran I/O libraries treat the last record no differently than
174others and thus give no help in finding the bug of reading more
175than was written.  If you wish to have this behavior, compile
176uio.c with -DPad_UDread .
177
178If you want to be able to catch write failures (e.g., due to a
179disk being full) with an ERR= specifier, compile dfe.c, due.c,
180sfe.c, sue.c, and wsle.c with -DALWAYS_FLUSH.  This will lead to
181slower execution and more I/O, but should make ERR= work as
182expected, provided fflush returns an error return when its
183physical write fails.
184
185Carriage controls are meant to be interpreted by the UNIX col
186program (or a similar program).  Sometimes it's convenient to use
187only ' ' as the carriage control character (normal single spacing).
188If you compile lwrite.c and wsfe.c with -DOMIT_BLANK_CC, formatted
189external output lines will have an initial ' ' quietly omitted,
190making use of the col program unnecessary with output that only
191has ' ' for carriage control.
192
193The Fortran 77 Standard leaves it up to the implementation whether
194formatted writes of floating-point numbers of absolute value < 1 have
195a zero before the decimal point.  By default, libI77 omits such
196superfluous zeros, but you can cause them to appear by compiling
197lwrite.c, wref.c, and wrtfmt.c with -DWANT_LEAD_0 .
198
199If your system lacks a ranlib command, you don't need it.
200Either comment out the makefile's ranlib invocation, or install
201a harmless "ranlib" command somewhere in your PATH, such as the
202one-line shell script
203
204	exit 0
205
206or (on some systems)
207
208	exec /usr/bin/ar lts $1 >/dev/null
209
210Most of the routines in libI77 are support routines for Fortran
211I/O.  There are a few exceptions, summarized below -- I/O related
212functions and subroutines that appear to your program as ordinary
213external Fortran routines.
214
2151.	CALL FLUSH flushes all buffers.
216
2172.	FTELL(i) is an INTEGER function that returns the current
218	offset of Fortran unit i (or -1 if unit i is not open).
219
2203.	CALL FSEEK(i, offset, whence, *errlab) attemps to move
221	Fortran unit i to the specified offset: absolute offset
222	if whence = 0; relative to the current offset if whence = 1;
223	relative to the end of the file if whence = 2.  It branches
224	to label errlab if unit i is not open or if the call
225	otherwise fails.
226