summaryrefslogtreecommitdiff
path: root/src/lex.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/lex.l')
-rw-r--r--src/lex.l4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lex.l b/src/lex.l
index 4718154..d07a085 100644
--- a/src/lex.l
+++ b/src/lex.l
@@ -62,6 +62,8 @@ in this Software without prior written authorization from The Open Group.
***********************************************************************/
/* $XFree86: xc/programs/twm/lex.l,v 3.13 2001/08/27 21:11:39 dawes Exp $ */
+#define YY_NO_INPUT /* we have our own! */
+
/* #include <stdio.h> */ /* lex already includes stdio.h */
#include "twm.h"
#include "gram.h"
@@ -85,6 +87,8 @@ doinput(char *buf, int size)
return (0);
buf[0] = (char) c;
+ if (c == '\n')
+ ++yylineno;
return (1);
}
#define YY_NO_UNPUT