date and time created 91/03/07 20:28:03 by bostic
[unix-history] / usr / src / bin / sh / input.h
CommitLineData
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 */
20extern int plinno;
21extern int parsenleft; /* number of characters left in input buffer */
22extern char *parsenextc; /* next character in input buffer */
23
24
25#ifdef __STDC__
26char *pfgets(char *, int);
27int pgetc(void);
28int preadbuffer(void);
29void pungetc(void);
30void ppushback(char *, int);
31void setinputfile(char *, int);
32void setinputfd(int, int);
33void setinputstring(char *, int);
34void popfile(void);
35void popallfiles(void);
36void closescript(void);
37#else
38char *pfgets();
39int pgetc();
40int preadbuffer();
41void pungetc();
42void ppushback();
43void setinputfile();
44void setinputfd();
45void setinputstring();
46void popfile();
47void popallfiles();
48void closescript();
49#endif
50
51#define pgetc_macro() (--parsenleft >= 0? *parsenextc++ : preadbuffer())