home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
OS2_LEX.ZIP
/
LEXGET.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-12-12
|
574b
|
30 lines
/*
* lexget.c
*
* Bob Denny 28-Aug-82 Move stdio dependencies to lexerr(), lexget(),
* lexech() and mapch(). This is one of 4 modules
* in lexlib which depend upon the standard I/O package.
*
* Scott Guthery 20-Nov-83 Adapt for IBM PC & DeSmet C.
*/
#include <lex.h>
int lexgetc(void)
{
extern FILE *lexin;
return(getc(lexin));
}
int lexungetc(int c)
{
extern char *llp1, llbuf[];
if (llp1 <= llbuf) {
lexerror("Token buffer underflow");
exit(1);
}
*(-- llp1) = c & 0377;
}