1: /***************************************************************************
2: * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne. JOVE *
3: * is provided to you without charge, and with no warranty. You may give *
4: * away copies of JOVE, including sources, provided that this notice is *
5: * included in all the files. *
6: ***************************************************************************/
7:
8: #define putchar(c) putc(c, stdout)
9: #define putc(c, fp) (--(fp)->f_cnt >= 0 ? (*(fp)->f_ptr++ = (c)) : _flush((c), fp))
10: #define getc(fp) (((--(fp)->f_cnt < 0) ? filbuf(fp) : *(fp)->f_ptr++))
11:
12: typedef struct File {
13: int f_cnt, /* number of characters left in buffer */
14: f_bufsize, /* size of what f_base points to */
15: f_fd, /* fildes */
16: f_flags; /* various flags */
17: char *f_ptr, /* current offset */
18: *f_base; /* pointer to base */
19: char *f_name; /* name of open file */
20: } File;
21:
22: #define F_READ 01
23: #define F_WRITE 02
24: #define F_APPEND 04
25: #define F_MODE(x) (x&07)
26: #define F_EOF 010
27: #define F_STRING 020
28: #define F_ERR 040
29: #define F_LOCKED 0100 /* don't close this file upon error */
30: #define F_MYBUF 0200 /* f_alloc allocated the buffer, so
31: f_close knows to free it up */
32: #define F_TELLALL 0400 /* whether to display info upon close */
33:
34: extern long io_chars;
35: extern int io_lines;
36:
37: extern File
38: *stdout,
39:
40: *open_file(),
41: *fd_open(),
42: *f_open();
43:
44: #ifdef VMUNIX
45: # define MAXTTYBUF 2048
46: #else
47: # define MAXTTYBUF 512
48: #endif
Defined struct's
File
defined in line
12;
never used
Defined typedef's
File
defined in line
20; used 47 times
- in line 37
- in /usr/src/new/jove/abbrev.c line
196,
226
- in /usr/src/new/jove/extend.c line
294,
992
- in /usr/src/new/jove/fmt.c line
25,
57,
132,
213,
364
- in /usr/src/new/jove/fp.c line
33-38(2),
55-62(3),
87,
94,
102,
132,
148,
190,
206,
213,
225,
251,
294,
308,
318,
336-337(2)
- in /usr/src/new/jove/io.c line
127,
145,
182,
208,
559,
664,
748,
754,
828,
1029
- in /usr/src/new/jove/macros.c line
253,
270
- in /usr/src/new/jove/proc.c line
548,
752
- in /usr/src/new/jove/re1.c line
228
- in /usr/src/new/jove/rec.c line
18,
65
Defined macros
F_EOF
defined in line
26; used 6 times
F_ERR
defined in line
28; used 4 times
F_READ
defined in line
22; used 11 times
getc
defined in line
10; used 8 times
putc
defined in line
9; used 21 times
- in line 8
- in /usr/src/new/jove/fmt.c line
67,
153,
172,
197,
208,
225,
263,
282
- in /usr/src/new/jove/fp.c line
193,
246,
353
- in /usr/src/new/jove/io.c line
160,
167-169(2)
- in /usr/src/new/jove/macros.c line
256-261(3),
281
- in /usr/src/new/jove/rec.c line
71,
80
Usage of this include