Browse code

core: handle '\r' as end of included file name

- reported by Pirjo Ahvenainen

Daniel-Constantin Mierla authored on 19/11/2012 09:45:41
Showing 1 changed files
... ...
@@ -1341,7 +1341,7 @@ IMPORTFILE      "import_file"
1341 1341
 <SELECT>.               { unput(yytext[0]); state = INITIAL_S; BEGIN(INITIAL); } /* Rescan the token in INITIAL state */
1342 1342
 
1343 1343
 <INCLF>[ \t]*      /* eat the whitespace */
1344
-<INCLF>[^ \t\n]+   { /* get the include file name */
1344
+<INCLF>[^ \t\r\n]+   { /* get the include file name */
1345 1345
 				memset(&s_buf, 0, sizeof(s_buf));
1346 1346
 				addstr(&s_buf, yytext, yyleng);
1347 1347
 				r = pp_subst_run(&s_buf.s);
... ...
@@ -1355,7 +1355,7 @@ IMPORTFILE      "import_file"
1355 1355
 }
1356 1356
 
1357 1357
 <IMPTF>[ \t]*      /* eat the whitespace */
1358
-<IMPTF>[^ \t\n]+   { /* get the import file name */
1358
+<IMPTF>[^ \t\r\n]+   { /* get the import file name */
1359 1359
 				memset(&s_buf, 0, sizeof(s_buf));
1360 1360
 				addstr(&s_buf, yytext, yyleng);
1361 1361
 				r = pp_subst_run(&s_buf.s);