home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / OS2_LEX.ZIP / LEXERR.C < prev    next >
C/C++ Source or Header  |  1989-10-05  |  502b  |  23 lines

  1. /*
  2.  * Bob Denny 28-Aug-82    Move stdio dependencies to lexerr(), lexget(),
  3.  *                        lexech() and mapch(). This is one of 4 modules 
  4.  *                        in lexlib which depend upon the standard I/O package.
  5.  * Scott Guthery 20-Nov-83  Adapt for IBM PC & DeSmet C
  6.  */
  7.  
  8. #include <lex.h>
  9. #include <stdarg.h>
  10.  
  11. extern int yyline;
  12.  
  13. void lexerror(char *s)
  14. {
  15.     va_list a1;
  16.  
  17.     if (yyline)
  18.         fprintf(stderr, "%d: ", yyline);
  19.     va_start(a1, s);
  20.     vfprintf(stderr, s, a1);
  21.     va_end(a1);
  22. }
  23.