1: /*************************************************************************
2: * This program is copyright (C) 1985, 1986 by Jonathan Payne. It is *
3: * provided to you without charge for use only on a licensed Unix *
4: * system. You may copy JOVE provided that this notice is included with *
5: * the copy. You may not sell copies of this program or versions *
6: * modified for use on microcomputer systems, unless the copies are *
7: * included with a Unix system distribution and the source is provided. *
8: *************************************************************************/
9:
10: #define putchar(c) putc(c, stdout)
11: #define putc(c, fp) (--(fp)->f_cnt >= 0 ? (*(fp)->f_ptr++ = (c)) : _flush((c), fp))
12: #define getc(fp) (((--(fp)->f_cnt < 0) ? filbuf(fp) : *(fp)->f_ptr++))
13:
14: typedef struct {
15: int f_cnt, /* number of characters left in buffer */
16: f_bufsize, /* size of what f_base points to */
17: f_fd, /* fildes */
18: f_flags; /* various flags */
19: char *f_ptr, /* current offset */
20: *f_base; /* pointer to base */
21: char *f_name; /* name of open file */
22: } File;
23:
24: #define F_READ 01
25: #define F_WRITE 02
26: #define F_APPEND 04
27: #define F_MODE(x) (x&07)
28: #define F_EOF 010
29: #define F_STRING 020
30: #define F_ERR 040
31: #define F_LOCK 0100 /* don't close this file upon error */
32: #define F_MYBUF 0200 /* f_alloc allocated the buffer, so
33: f_close knows to free it up */
34:
35: extern long io_chars;
36: extern int io_lines;
37:
38: extern File
39: *stdout,
40: *mru_file,
41:
42: *open_file(),
43: *fd_open(),
44: *f_open();
Defined macros
F_EOF
defined in line
28; used 4 times
F_ERR
defined in line
30; used 2 times
F_READ
defined in line
24; used 10 times
getc
defined in line
12; used 2 times
putc
defined in line
11; used 16 times
- in line 10
- in /usr/src/new/jove/fmt.c line
35,
72,
88,
110,
121,
139,
170,
204
- in /usr/src/new/jove/fp.c line
136,
176,
232
- in /usr/src/new/jove/io.c line
72,
78
- in /usr/src/new/jove/rec.c line
63,
72
Usage of this include