minor bug fix, use EOF

This commit is contained in:
rlar 2011-07-01 16:08:03 +00:00
parent b06eb95b87
commit 0d12371e7d
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2011-07-01 Robert Larice
* src/xspice/cmpp/mod_lex.l :
minor bug fix, use EOF
2011-07-01 Robert Larice
* src/frontend/help/textdisp.c :
textdisp.c, minor rewrite to swallow type conversion warnings

View File

@ -52,7 +52,7 @@ Z [0-9A-Za-z_]
%%
"/*" {char ch, last_ch;
"/*" {int ch, last_ch;
ECHO; /* a comment - repeat it */
ch = '\0';
do {
@ -62,9 +62,14 @@ Z [0-9A-Za-z_]
#else
ch = input();
#endif
if(ch == EOF) {
mod_yyerror ("Unterminated comment");
break;
}
fputc(ch,mod_yyout);
} while (ch && !((last_ch == '*') && (ch == '/')));
if (!ch) {mod_yyerror ("Unterminated comment");}}
} while (!((last_ch == '*') && (ch == '/')));
}
ARGS {return TOK_ARGS;}
INIT {return TOK_INIT;}