| 253 |
|
|
| 254 |
|
|
| 255 |
|
/* C-comment ignoring routine -kre*/ |
| 256 |
< |
void ccomment(void) |
| 256 |
> |
void |
| 257 |
> |
ccomment(void) |
| 258 |
|
{ |
| 259 |
< |
int c; |
| 259 |
> |
int c = 0; |
| 260 |
|
|
| 261 |
|
/* log(L_NOTICE, "got comment"); */ |
| 262 |
|
while (1) |
| 263 |
|
{ |
| 264 |
< |
while ((c = input()) != '*' && c != EOF) |
| 265 |
< |
if (c == '\n') ++linenum; |
| 266 |
< |
if (c == '*') |
| 267 |
< |
{ |
| 268 |
< |
while ((c = input()) == '*'); |
| 269 |
< |
if (c == '/') break; |
| 270 |
< |
else if (c == '\n') |
| 271 |
< |
++linenum; |
| 272 |
< |
} |
| 264 |
> |
while ((c = input()) != '*' && c != EOF) |
| 265 |
> |
if (c == '\n') |
| 266 |
> |
++linenum; |
| 267 |
> |
|
| 268 |
> |
if (c == '*') |
| 269 |
> |
{ |
| 270 |
> |
while ((c = input()) == '*') |
| 271 |
> |
/* Nothing */ ; |
| 272 |
> |
if (c == '/') |
| 273 |
> |
break; |
| 274 |
> |
else if (c == '\n') |
| 275 |
> |
++linenum; |
| 276 |
> |
} |
| 277 |
> |
|
| 278 |
|
if (c == EOF) |
| 279 |
|
{ |
| 280 |
< |
YY_FATAL_ERROR("EOF in comment"); |
| 281 |
< |
/* XXX hack alert this disables |
| 282 |
< |
* the stupid unused function warning |
| 283 |
< |
* gcc generates |
| 284 |
< |
*/ |
| 285 |
< |
if(1 == 0) |
| 286 |
< |
yy_fatal_error("EOF in comment"); |
| 287 |
< |
break; |
| 280 |
> |
YY_FATAL_ERROR("EOF in comment"); |
| 281 |
> |
|
| 282 |
> |
/* XXX hack alert this disables |
| 283 |
> |
* the stupid unused function warning |
| 284 |
> |
* gcc generates |
| 285 |
> |
*/ |
| 286 |
> |
if (1 == 0) |
| 287 |
> |
yy_fatal_error("EOF in comment"); |
| 288 |
> |
break; |
| 289 |
|
} |
| 290 |
|
} |
| 291 |
|
} |
| 285 |
– |
|