chiark / gitweb /
Correct quoting of include-lookup directory. Closes:#837391. (With new directives...
[userv.git] / lexer.l.m4
index 78aab9d4020f4ced1b63aa6942844679f82e6aa0..1c3f8ef4143d5fefdd0e8e408357f3c2b238d36b 100644 (file)
@@ -51,7 +51,7 @@ typedef int directive_fnt(int dtoken);
 static directive_fnt df_reject, df_execute, df_executefrompath;
 static directive_fnt df_executefromdirectory, df_executebuiltin;
 static directive_fnt df_errorstostderr, df_errorstosyslog, df_errorstofile;
-static directive_fnt dfg_fdwant, dfg_setflag;
+static directive_fnt dfg_fdwant, dfg_setflag, dfg_lookupquotemode;
 static directive_fnt df_reset, df_cd, df_userrcfile, df_include;
 static directive_fnt df_includelookup, df_includedirectory;
 static directive_fnt df_message, df_error, df_quit, df_eof;
@@ -134,11 +134,10 @@ static struct error_handling eh = { tokv_word_errorstostderr, 0,0,0,0,0 };
 static int dequote(char *inplace);
 static void countnewlines(void);
 
-#define YY_NO_UNPUT
-
 %}
 
 %option noyywrap
+%option nounput
 
 %%
 
@@ -156,7 +155,7 @@ changequote({*,*})
                          char *ep;
                          lr_min= (int)strtoul(yytext,&ep,10);
                          assert(*ep == HYPHEN);
-                         assert(*++ep);
+                         ep++;  assert(*ep);
                          lr_max= (int)strtoul(ep,&ep,10);
                          assert(!*ep);
                          if (lr_max < lr_min)
@@ -167,7 +166,7 @@ changequote({*,*})
                          char *ep;
                          lr_min= (int)strtoul(yytext,&ep,10);
                          assert(*ep == HYPHEN);
-                         assert(!*++ep);
+                         ep++;  assert(!*ep);
                          lr_max=-1;
                          return tokv_fdstoend;
                        }