147120Sbostic /*- 260698Sbostic * Copyright (c) 1991, 1993 360698Sbostic * The Regents of the University of California. All rights reserved. 447120Sbostic * 547120Sbostic * This code is derived from software contributed to Berkeley by 647120Sbostic * Kenneth Almquist. 747120Sbostic * 847120Sbostic * %sccs.include.redist.c% 947120Sbostic * 10*69272Schristos * @(#)input.h 8.2 (Berkeley) 05/04/95 1147120Sbostic */ 1247120Sbostic 1347120Sbostic /* PEOF (the end of file marker) is defined in syntax.h */ 1447120Sbostic 1547120Sbostic /* 1647120Sbostic * The input line number. Input.c just defines this variable, and saves 1747120Sbostic * and restores it when files are pushed and popped. The user of this 1847120Sbostic * package must set its value. 1947120Sbostic */ 2047120Sbostic extern int plinno; 2147120Sbostic extern int parsenleft; /* number of characters left in input buffer */ 2247120Sbostic extern char *parsenextc; /* next character in input buffer */ 2354317Smarc extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */ 2447120Sbostic 25*69272Schristos char *pfgets __P((char *, int)); 26*69272Schristos int pgetc __P((void)); 27*69272Schristos int preadbuffer __P((void)); 28*69272Schristos void pungetc __P((void)); 29*69272Schristos void pushstring __P((char *, int, void *)); 30*69272Schristos void popstring __P((void)); 31*69272Schristos void setinputfile __P((char *, int)); 32*69272Schristos void setinputfd __P((int, int)); 33*69272Schristos void setinputstring __P((char *, int)); 34*69272Schristos void popfile __P((void)); 35*69272Schristos void popallfiles __P((void)); 36*69272Schristos void closescript __P((void)); 3747120Sbostic 3847120Sbostic #define pgetc_macro() (--parsenleft >= 0? *parsenextc++ : preadbuffer()) 39