|
|
1.1 root 1: static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 23 June 1993\n";
2:
3: /*
4: 2.01 $ format added
5: 2.02 Coding bug in open.c repaired
6: 2.03 fixed bugs in lread.c (read * with negative f-format) and lio.c
7: and lio.h (e-format conforming to spec)
8: 2.04 changed open.c and err.c (fopen and freopen respectively) to
9: update to new c-library (append mode)
10: 2.05 added namelist capability
11: 2.06 allow internal list and namelist I/O
12: */
13:
14: /*
15: close.c:
16: allow upper-case STATUS= values
17: endfile.c
18: create fort.nnn if unit nnn not open;
19: else if (file length == 0) use creat() rather than copy;
20: use local copy() rather than forking /bin/cp;
21: rewind, fseek to clear buffer (for no reading past EOF)
22: err.c
23: use neither setbuf nor setvbuf; make stderr buffered
24: fio.h
25: #define _bufend
26: inquire.c
27: upper case responses;
28: omit byfile test from SEQUENTIAL=
29: answer "YES" to DIRECT= for unopened file (open to debate)
30: lio.c
31: flush stderr, stdout at end of each stmt
32: space before character strings in list output only at line start
33: lio.h
34: adjust LEW, LED consistent with old libI77
35: lread.c
36: use atof()
37: allow "nnn*," when reading complex constants
38: open.c
39: try opening for writing when open for read fails, with
40: special uwrt value (2) delaying creat() to first write;
41: set curunit so error messages don't drop core;
42: no file name ==> fort.nnn except for STATUS='SCRATCH'
43: rdfmt.c
44: use atof(); trust EOF == end-of-file (so don't read past
45: end-of-file after endfile stmt)
46: sfe.c
47: flush stderr, stdout at end of each stmt
48: wrtfmt.c:
49: use upper case
50: put wrt_E and wrt_F into wref.c, use sprintf()
51: rather than ecvt() and fcvt() [more accurate on VAX]
52: */
53:
54: /* 16 Oct. 1988: uwrt = 3 after write, rewind, so close won't zap the file. */
55:
56: /* 10 July 1989: change _bufend to buf_end in fio.h, wsfe.c, wrtfmt.c */
57:
58: /* 28 Nov. 1989: corrections for IEEE and Cray arithmetic */
59: /* 29 Nov. 1989: change various int return types to long for f2c */
60: /* 30 Nov. 1989: various types from f2c.h */
61: /* 6 Dec. 1989: types corrected various places */
62: /* 19 Dec. 1989: make iostat= work right for internal I/O */
63: /* 8 Jan. 1990: add rsne, wsne -- routines for handling NAMELIST */
64: /* 28 Jan. 1990: have NAMELIST read treat $ as &, general white
65: space as blank */
66: /* 27 Mar. 1990: change an = to == in rd_L(rdfmt.c) so formatted reads
67: of logical values reject letters other than fFtT;
68: have nowwriting reset cf */
69: /* 14 Aug. 1990: adjust lread.c to treat tabs as spaces in list input */
70: /* 17 Aug. 1990: adjust open.c to recognize blank='Z...' as well as
71: blank='z...' when reopening an open file */
72: /* 30 Aug. 1990: prevent embedded blanks in list output of complex values;
73: omit exponent field in list output of values of
74: magnitude between 10 and 1e8; prevent writing stdin
75: and reading stdout or stderr; don't close stdin, stdout,
76: or stderr when reopening units 5, 6, 0. */
77: /* 18 Sep. 1990: add component udev to unit and consider old == new file
78: iff uinode and udev values agree; use stat rather than
79: access to check existence of file (when STATUS='OLD')*/
80: /* 2 Oct. 1990: adjust rewind.c so two successive rewinds after a write
81: don't clobber the file. */
82: /* 9 Oct. 1990: add #include "fcntl.h" to endfile.c, err.c, open.c;
83: adjust g_char in util.c for segmented memories. */
84: /* 17 Oct. 1990: replace abort() and _cleanup() with calls on
85: sig_die(...,1) (defined in main.c). */
86: /* 5 Nov. 1990: changes to open.c: complain if new= is specified and the
87: file already exists; allow file= to be omitted in open stmts
88: and allow status='replace' (Fortran 90 extensions). */
89: /* 11 Dec. 1990: adjustments for POSIX. */
90: /* 15 Jan. 1991: tweak i_ungetc in rsli.c to allow reading from
91: strings in read-only memory. */
92: /* 25 Apr. 1991: adjust namelist stuff to work with f2c -i2 */
93: /* 26 Apr. 1991: fix some bugs with NAMELIST read of multi-dim. arrays */
94: /* 16 May 1991: increase LEFBL in lio.h to bypass NeXT bug */
95: /* 17 Oct. 1991: change type of length field in sequential unformatted
96: records from int to long (for systems where sizeof(int)
97: can vary, depending on the compiler or compiler options). */
98: /* 14 Nov. 1991: change uint to Uint in fmt.h, rdfmt.c, wrtfmt.c.
99: /* 25 Nov. 1991: change uint to Uint in lwrite.c; change sizeof(int) to
100: sizeof(uioint) in fseeks in sue.c (missed on 17 Oct.). */
101: /* 1 Dec. 1991: uio.c: add test for read failure (seq. unformatted reads);
102: adjust an error return from EOF to off end of record */
103: /* 12 Dec. 1991: rsli.c: fix bug with internal list input that caused
104: the last character of each record to be ignored.
105: iio.c: adjust error message in internal formatted
106: input from "end-of-file" to "off end of record" if
107: the format specifies more characters than the
108: record contains. */
109: /* 17 Jan. 1992: lread.c, rsne.c: in list and namelist input,
110: treat "r* ," and "r*," alike (where r is a
111: positive integer constant), and fix a bug in
112: handling null values following items with repeat
113: counts (e.g., 2*1,,3); for namelist reading
114: of a numeric array, allow a new name-value subsequence
115: to terminate the current one (as though the current
116: one ended with the right number of null values).
117: lio.h, lwrite.c: omit insignificant zeros in
118: list and namelist output. To get the old
119: behavior, compile with -DOld_list_output . */
120: /* 18 Jan. 1992: make list output consistent with F format by
121: printing .1 rather than 0.1 (introduced yesterday). */
122: /* 3 Feb. 1992: rsne.c: fix namelist read bug that caused the
123: character following a comma to be ignored. */
124: /* 19 May 1992: adjust iio.c, ilnw.c, rdfmt.c and rsli.c to make err=
125: work with internal list and formatted I/O. */
126: /* 18 July 1992: adjust rsne.c to allow namelist input to stop at
127: an & (e.g. &end). */
128: /* 23 July 1992: switch to ANSI prototypes unless KR_headers is #defined ;
129: recognize Z format (assuming 8-bit bytes). */
130: /* 14 Aug. 1992: tweak wrt_E in wref.c to avoid -NaN */
131: /* 23 Oct. 1992: Supply missing l_eof = 0 assignment to s_rsne() in rsne.c
132: (so end-of-file on other files won't confuse namelist
133: reads of external files). Prepend f__ to external
134: names that are only of internal interest to lib[FI]77. */
135: /* 1 Feb. 1993: backspace.c: fix bug that bit when last char of 2nd
136: buffer == '\n'.
137: endfile.c: guard against tiny L_tmpnam; close and reopen
138: files in t_runc().
139: lio.h: lengthen LINTW (buffer size in lwrite.c).
140: err.c, open.c: more prepending of f__ (to [rw]_mode). */
141: /* 5 Feb. 1993: tweaks to NAMELIST: rsne.c: ? prints the namelist being
142: sought; namelists of the wrong name are skipped (after
143: an error message; xwsne.c: namelist writes have a
144: newline before each new variable.
145: open.c: ACCESS='APPEND' positions sequential files
146: at EOF (nonstandard extension -- that doesn't require
147: changing data structures). */
148: /* 9 Feb. 1993: Change some #ifdef MSDOS lines to #ifdef NON_UNIZ_STDIO.
149: err.c: under NON_UNIX_STDIO, avoid close(creat(name,0666))
150: when the unit has another file descriptor for name. */
151: /* 4 March 1993: err.c, open.c: take declaration of fdopen from rawio.h;
152: open.c: always give f__w_mode[] 4 elements for use
153: in t_runc (in endfile.c -- for change of 1 Feb. 1993). */
154: /* 6 March 1993: uio.c: adjust off-end-of-record test for sequential
155: unformatted reads to respond to err= rather than end=. */
156: /* 12 March 1993: various tweaks for C++ */
157: /* 6 April 1993: adjust error returns for formatted inputs to flush
158: the current input line when err=label is specified.
159: To restore the old behavior (input left mid-line),
160: either adjust the #definition of errfl in fio.h or
161: omit the invocation of f__doend in err__fl (in err.c). */
162: /* 23 June 1993: iio.c: fix bug in format reversions for internal writes */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.