LEXGET.C 441 B

1234567891011121314151617181920
  1. /*
  2. * lexget.c
  3. *
  4. * Bob Denny 28-Aug-82 Move stdio dependencies to lexerr(), lexget(),
  5. * lexech() and mapch(). This is one of 4 modules
  6. * in lexlib which depend upon the standard I/O package.
  7. *
  8. * Scott Guthery 20-Nov-83 Adapt for IBM PC & DeSmet C.
  9. */
  10. #include <stdio.h>
  11. #include <lex.h>
  12. extern char expression[4096];
  13. extern int pos;
  14. lexgetc()
  15. {
  16. char c = expression[pos];
  17. if (c) pos++;
  18. return( c != 0 ? c : -1);
  19. }