Browse Source

minor bug fix, use EOF

rlar 15 years ago
parent
commit
0d12371e7d
  1. 4
      ChangeLog
  2. 11
      src/xspice/cmpp/mod_lex.l

4
ChangeLog

@ -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

11
src/xspice/cmpp/mod_lex.l

@ -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;}

Loading…
Cancel
Save