Commit | Line | Data |
---|---|---|
da486063 KB |
1 | /*- |
2 | * Copyright (c) 1991 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * This code is derived from software contributed to Berkeley by | |
6 | * Kenneth Almquist. | |
7 | * | |
8 | * %sccs.include.redist.c% | |
9 | * | |
10 | * @(#)input.h 5.1 (Berkeley) %G% | |
11 | */ | |
12 | ||
13 | /* PEOF (the end of file marker) is defined in syntax.h */ | |
14 | ||
15 | /* | |
16 | * The input line number. Input.c just defines this variable, and saves | |
17 | * and restores it when files are pushed and popped. The user of this | |
18 | * package must set its value. | |
19 | */ | |
20 | extern int plinno; | |
21 | extern int parsenleft; /* number of characters left in input buffer */ | |
22 | extern char *parsenextc; /* next character in input buffer */ | |
23 | ||
24 | ||
25 | #ifdef __STDC__ | |
26 | char *pfgets(char *, int); | |
27 | int pgetc(void); | |
28 | int preadbuffer(void); | |
29 | void pungetc(void); | |
30 | void ppushback(char *, int); | |
31 | void setinputfile(char *, int); | |
32 | void setinputfd(int, int); | |
33 | void setinputstring(char *, int); | |
34 | void popfile(void); | |
35 | void popallfiles(void); | |
36 | void closescript(void); | |
37 | #else | |
38 | char *pfgets(); | |
39 | int pgetc(); | |
40 | int preadbuffer(); | |
41 | void pungetc(); | |
42 | void ppushback(); | |
43 | void setinputfile(); | |
44 | void setinputfd(); | |
45 | void setinputstring(); | |
46 | void popfile(); | |
47 | void popallfiles(); | |
48 | void closescript(); | |
49 | #endif | |
50 | ||
51 | #define pgetc_macro() (--parsenleft >= 0? *parsenextc++ : preadbuffer()) |