diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-21 11:31:27 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-21 11:31:27 -0400 |
commit | a4b14ca34b68f5a6a496aec53dafd4ee06222f83 (patch) | |
tree | 23dde46aeab056f63971a28a43b3fbdb6161243f | |
parent | ebaf16b08d739e798b36a0bc2ff139d068612d4d (diff) |
X11R5 change lost the update for yylineno needed to make parse messages
useful; a subsequent X11R6 change made the behavior a little worse.
This change repairs that old damage.
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r-- | src/lex.l | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |