386BSD 0.1 development
[unix-history] / usr / src / usr.bin / awk / fin.h
CommitLineData
a7e60862
WJ
1
2/********************************************
3fin.h
4copyright 1991, Michael D. Brennan
5
6This is a source file for mawk, an implementation of
7the AWK programming language.
8
9Mawk is distributed without warranty under the terms of
10the GNU General Public License, version 2, 1991.
11********************************************/
12
13/*$Log: fin.h,v $
14 * Revision 5.2 92/01/06 08:16:24 brennan
15 * setmode() proto for MSDOS
16 *
17 * Revision 5.1 91/12/05 07:59:20 brennan
18 * 1.1 pre-release
19 *
20*/
21
22/* fin.h */
23
24#ifndef FIN_H
25#define FIN_H
26/* structure to control input files */
27
28typedef struct {
29int fd ;
30FILE *fp ; /* NULL unless interactive */
31char *buff ;
32char *buffp ;
33unsigned nbuffs ; /* sizeof *buff in BUFFSZs */
34int flags ;
35} FIN ;
36
37#define MAIN_FLAG 1 /* part of main input stream if on */
38#define EOF_FLAG 2
39#define START_FLAG 4 /* used when RS == "" */
40
41FIN * PROTO (FINdopen, (int, int) );
42FIN * PROTO (FINopen, (char *, int) );
43void PROTO (FINclose, (FIN *) ) ;
44void PROTO (FINsemi_close, (FIN *)) ;
45char* PROTO (FINgets, (FIN *, unsigned *) ) ;
46unsigned PROTO ( fillbuff, (int, char *, unsigned) ) ;
47
48
49extern FIN *main_fin ; /* for the main input stream */
50void PROTO( open_main, (void) ) ;
51
52void PROTO(setmode, (int,int)) ;
53#endif /* FIN_H */