1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)fiodefs.h 5.2 (Berkeley) 7/30/85
7: */
8:
9: /*
10: * fortran file i/o type definitions
11: */
12:
13: #include <stdio.h>
14: #include "f_errno.h"
15:
16: /* Logical Unit Table Size */
17: #define MXUNIT 100
18:
19: #define GLITCH '\2' /* special quote for Stu, generated in f77pass1 */
20:
21: #define NAMELIST -2
22: #define LISTDIRECTED -1
23: #define FORMATTED 1
24:
25: #define ERROR 1
26: #define OK 0
27: #define YES 1
28: #define NO 0
29:
30: #define STDERR 0
31: #define STDIN 5
32: #define STDOUT 6
33:
34: #define WRITE 1
35: #define READ 2
36: #define SEQ 3
37: #define DIR 4
38: #define FMT 5
39: #define UNF 6
40: #define EXT 7
41: #define INT 8
42:
43: typedef char ioflag;
44: typedef long ftnint;
45: typedef ftnint flag;
46: typedef long ftnlen;
47:
48: typedef struct /*external read, write*/
49: { flag cierr;
50: ftnint ciunit;
51: flag ciend;
52: char *cifmt;
53: ftnint cirec;
54: } cilist;
55:
56: typedef struct /*internal read, write*/
57: { flag icierr;
58: char *iciunit;
59: flag iciend;
60: char *icifmt;
61: ftnint icirlen;
62: ftnint icirnum;
63: ftnint icirec;
64: } icilist;
65:
66: typedef struct /*open*/
67: { flag oerr;
68: ftnint ounit;
69: char *ofnm;
70: ftnlen ofnmlen;
71: char *osta;
72: char *oacc;
73: char *ofm;
74: ftnint orl;
75: char *oblnk;
76: } olist;
77:
78: typedef struct /*close*/
79: { flag cerr;
80: ftnint cunit;
81: char *csta;
82: } cllist;
83:
84: typedef struct /*rewind, backspace, endfile*/
85: { flag aerr;
86: ftnint aunit;
87: } alist;
88:
89: typedef struct /*units*/
90: { FILE *ufd; /*0=unconnected*/
91: char *ufnm;
92: long uinode;
93: int url; /*0=sequential*/
94: flag useek; /*true=can backspace, use dir, ...*/
95: flag ufmt;
96: flag uprnt;
97: flag ublnk;
98: flag uend;
99: flag uwrt; /*last io was write*/
100: flag uscrtch;
101: } unit;
102:
103: typedef struct /* inquire */
104: { flag inerr;
105: ftnint inunit;
106: char *infile;
107: ftnlen infilen;
108: ftnint *inex; /*parameters in standard's order*/
109: ftnint *inopen;
110: ftnint *innum;
111: ftnint *innamed;
112: char *inname;
113: ftnlen innamlen;
114: char *inacc;
115: ftnlen inacclen;
116: char *inseq;
117: ftnlen inseqlen;
118: char *indir;
119: ftnlen indirlen;
120: char *inform;
121: ftnlen informlen;
122: char *infmt;
123: ftnint infmtlen;
124: char *inunf;
125: ftnlen inunflen;
126: ftnint *inrecl;
127: ftnint *innrec;
128: char *inblank;
129: ftnlen inblanklen;
130: } inlist;
131:
132: typedef union
133: { float pf;
134: double pd;
135: } ufloat;
136:
137: typedef union
138: { short is;
139: char ic;
140: long il;
141: } uint;
142:
143: struct ioiflg {
144: short if_oeof;
145: short if_ctrl;
146: short if_bzro;
147: };
148: #define opneof ioiflg_.if_oeof
149: #define ccntrl ioiflg_.if_ctrl
150: #define blzero ioiflg_.if_bzro
Defined struct's
Defined typedef's
flag
defined in line
45; used 35 times
- in line 49-51(2),
57-59(2),
67,
79,
85,
94-104(8)
- in /usr/src/usr.lib/libI77/c_dfe.c line
15,
31
- in /usr/src/usr.lib/libI77/c_sfe.c line
15,
29
- in /usr/src/usr.lib/libI77/close.c line
71-73(2),
84-86(2)
- in /usr/src/usr.lib/libI77/dolio.c line
17,
27
- in /usr/src/usr.lib/libI77/due.c line
38,
50
- in /usr/src/usr.lib/libI77/err.c line
24-27(4),
44
- in /usr/src/usr.lib/libI77/fio.h line
29
- in /usr/src/usr.lib/libI77/sue.c line
50,
61
ftnint
defined in line
44; used 43 times
- in line 45-53(3),
61-68(4),
74,
80,
86,
105-111(5),
123-127(3)
- in /usr/src/usr.lib/libI77/c_dfe.c line
31
- in /usr/src/usr.lib/libI77/c_sfe.c line
29
- in /usr/src/usr.lib/libI77/close.c line
59
- in /usr/src/usr.lib/libI77/dofio.c line
25,
37
- in /usr/src/usr.lib/libI77/dolio.c line
27,
39
- in /usr/src/usr.lib/libI77/douio.c line
19,
41,
50
- in /usr/src/usr.lib/libI77/due.c line
50
- in /usr/src/usr.lib/libI77/endfile.c line
30
- in /usr/src/usr.lib/libI77/err.c line
39,
59,
169-170(2)
- in /usr/src/usr.lib/libI77/fio.h line
37
- in /usr/src/usr.lib/libI77/lread.c line
89
- in /usr/src/usr.lib/libI77/lwrite.c line
50-53(2),
111,
121
- in /usr/src/usr.lib/libI77/open.c line
176
- in /usr/src/usr.lib/libI77/rsnmle.c line
298
- in /usr/src/usr.lib/libI77/sue.c line
61
ftnlen
defined in line
46; used 36 times
- in line 70,
107,
113-129(7)
- in /usr/src/usr.lib/libI77/dofio.c line
37
- in /usr/src/usr.lib/libI77/dolio.c line
39
- in /usr/src/usr.lib/libI77/douio.c line
19,
41,
50
- in /usr/src/usr.lib/libI77/lread.c line
89
- in /usr/src/usr.lib/libI77/lwrite.c line
50,
128,
157-162(2),
177-182(2)
- in /usr/src/usr.lib/libI77/rdfmt.c line
20,
104,
147,
165,
282
- in /usr/src/usr.lib/libI77/rsnmle.c line
298
- in /usr/src/usr.lib/libI77/util.c line
52,
59
- in /usr/src/usr.lib/libI77/wrtfmt.c line
21,
97,
151,
164,
175,
248,
272
Defined macros
DIR
defined in line
37; used 3 times
ERROR
defined in line
25; used 3 times
EXT
defined in line
40;
never used
FMT
defined in line
38; used 5 times
INT
defined in line
41;
never used
MXUNIT
defined in line
17; used 14 times
NO
defined in line
28; used 81 times
- in /usr/src/usr.lib/libI77/backspace.c line
25,
35
- in /usr/src/usr.lib/libI77/c_dfe.c line
17-21(2),
41
- in /usr/src/usr.lib/libI77/c_iio.c line
35,
69,
83-84(2),
107,
155-165(4)
- in /usr/src/usr.lib/libI77/c_sfe.c line
23,
39
- in /usr/src/usr.lib/libI77/close.c line
25,
67
- in /usr/src/usr.lib/libI77/dofio.c line
55,
70,
96-97(2),
149-152(2)
- in /usr/src/usr.lib/libI77/dolio.c line
20,
33
- in /usr/src/usr.lib/libI77/due.c line
30-32(2),
41-42(2)
- in /usr/src/usr.lib/libI77/endfile.c line
24
- in /usr/src/usr.lib/libI77/fmt.c line
350
- in /usr/src/usr.lib/libI77/inquire.c line
23,
32,
47
- in /usr/src/usr.lib/libI77/lread.c line
57,
97,
431
- in /usr/src/usr.lib/libI77/lwrite.c line
22,
29-30(2)
- in /usr/src/usr.lib/libI77/open.c line
38,
96,
105,
115,
124,
140,
149,
158-159(2),
168,
196-197(2),
218-219(2)
- in /usr/src/usr.lib/libI77/rdfmt.c line
114-115(2),
127
- in /usr/src/usr.lib/libI77/rewind.c line
22,
31
- in /usr/src/usr.lib/libI77/rsli.c line
26
- in /usr/src/usr.lib/libI77/rsnmle.c line
116,
284,
527,
562
- in /usr/src/usr.lib/libI77/sue.c line
39,
45,
53-55(2)
- in /usr/src/usr.lib/libI77/util.c line
35,
49
- in /usr/src/usr.lib/libI77/wdfe.c line
23-25(2)
- in /usr/src/usr.lib/libI77/wfi.c line
21
- in /usr/src/usr.lib/libI77/wsfe.c line
23-28(2),
59
- in /usr/src/usr.lib/libI77/wsli.c line
20
- in /usr/src/usr.lib/libI77/wsnmle.c line
30,
36-37(2)
OK
defined in line
26; used 149 times
- in /usr/src/usr.lib/libI77/backspace.c line
32-40(3),
49,
55-63(3)
- in /usr/src/usr.lib/libI77/c_dfe.c line
42
- in /usr/src/usr.lib/libI77/c_iio.c line
52,
70-75(3),
94,
117,
129,
166
- in /usr/src/usr.lib/libI77/c_sfe.c line
40
- in /usr/src/usr.lib/libI77/close.c line
29-33(2),
54,
81,
87
- in /usr/src/usr.lib/libI77/dofio.c line
60-62(2),
93-95(2),
108-110(2)
- in /usr/src/usr.lib/libI77/dolio.c line
36
- in /usr/src/usr.lib/libI77/douio.c line
38,
62
- in /usr/src/usr.lib/libI77/due.c line
24,
34,
60-65(2),
75
- in /usr/src/usr.lib/libI77/fmt.c line
63-67(2)
- in /usr/src/usr.lib/libI77/inquire.c line
126
- in /usr/src/usr.lib/libI77/lread.c line
65,
86,
103,
132,
172,
191,
210,
223,
229,
275,
298-300(2),
311,
318-320(2),
336,
344,
352-359(3),
390,
400,
414-419(2)
- in /usr/src/usr.lib/libI77/lwrite.c line
32,
41,
47,
103,
117,
143,
197,
211,
219
- in /usr/src/usr.lib/libI77/open.c line
84,
173
- in /usr/src/usr.lib/libI77/rdfe.c line
33,
39,
84
- in /usr/src/usr.lib/libI77/rdfmt.c line
76,
83-88(2),
143,
161,
278,
300,
317,
337
- in /usr/src/usr.lib/libI77/rewind.c line
28,
35
- in /usr/src/usr.lib/libI77/rfi.c line
38,
49
- in /usr/src/usr.lib/libI77/rsfe.c line
34,
48
- in /usr/src/usr.lib/libI77/rsli.c line
32
- in /usr/src/usr.lib/libI77/rsnmle.c line
129,
186,
193,
220,
245,
267,
316,
323,
329-348(6),
400,
419,
482,
521,
538,
568,
608
- in /usr/src/usr.lib/libI77/sue.c line
27,
46,
69,
79,
85
- in /usr/src/usr.lib/libI77/wdfe.c line
34,
40,
48,
62
- in /usr/src/usr.lib/libI77/wfi.c line
38,
49
- in /usr/src/usr.lib/libI77/wrtfmt.c line
66-71(2),
77,
106,
113,
124,
137-139(2),
148,
160,
172,
192,
207,
236,
244,
265,
290,
304
- in /usr/src/usr.lib/libI77/wsfe.c line
39,
48,
62-66(2)
- in /usr/src/usr.lib/libI77/wsnmle.c line
76,
91
READ
defined in line
35; used 8 times
SEQ
defined in line
36; used 6 times
STDERR
defined in line
30; used 24 times
- in /usr/src/usr.lib/libF77/main.c line
104-110(3),
116-120(3)
- in /usr/src/usr.lib/libF77/trapov_.c line
173,
279,
300,
337,
352,
437,
464,
538,
557,
574,
619
- in /usr/src/usr.lib/libF77/trpfpe_.c line
346
- in /usr/src/usr.lib/libI77/close.c line
30
- in /usr/src/usr.lib/libI77/f77_abort.c line
40
- in /usr/src/usr.lib/libI77/open.c line
139,
167,
204
- in /usr/src/usr.lib/libU77/perror_.c line
46
STDIN
defined in line
31; used 2 times
UNF
defined in line
39; used 2 times
WRITE
defined in line
34; used 9 times
YES
defined in line
27; used 81 times
- in /usr/src/usr.lib/libI77/backspace.c line
26
- in /usr/src/usr.lib/libI77/c_dfe.c line
18,
24,
34
- in /usr/src/usr.lib/libI77/c_iio.c line
25,
32,
67,
87-88(2),
99,
153-156(2)
- in /usr/src/usr.lib/libI77/c_sfe.c line
19,
32-37(2)
- in /usr/src/usr.lib/libI77/close.c line
26,
59
- in /usr/src/usr.lib/libI77/dofio.c line
56,
63,
158(3)
- in /usr/src/usr.lib/libI77/dolio.c line
21,
30
- in /usr/src/usr.lib/libI77/due.c line
21,
44,
53
- in /usr/src/usr.lib/libI77/endfile.c line
35
- in /usr/src/usr.lib/libI77/fmt.c line
357
- in /usr/src/usr.lib/libI77/inquire.c line
26,
35,
50
- in /usr/src/usr.lib/libI77/lread.c line
52-56(2),
74,
187,
412,
430
- in /usr/src/usr.lib/libI77/open.c line
39,
110,
148-154(3),
198,
217-218(2)
- in /usr/src/usr.lib/libI77/rdfe.c line
23,
55
- in /usr/src/usr.lib/libI77/rdfmt.c line
75,
82-87(2),
106,
167,
308,
325
- in /usr/src/usr.lib/libI77/rewind.c line
23
- in /usr/src/usr.lib/libI77/rfi.c line
21
- in /usr/src/usr.lib/libI77/rsfe.c line
22-23(2),
44,
63
- in /usr/src/usr.lib/libI77/rsli.c line
20-24(2)
- in /usr/src/usr.lib/libI77/rsnmle.c line
68,
273,
281-282(2),
290,
530,
537
- in /usr/src/usr.lib/libI77/sue.c line
23,
29,
52,
64
- in /usr/src/usr.lib/libI77/util.c line
44
- in /usr/src/usr.lib/libI77/wrtfmt.c line
65-70(2),
76
- in /usr/src/usr.lib/libI77/wsfe.c line
24,
31,
55
Usage of this include