home *** CD-ROM | disk | FTP | other *** search
- /*
- * 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;
- }
-