diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-12 00:03:51 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-12 00:03:51 +0300 |
commit | f8ca129aaf4876dfa9778c34ed5bd8a669ca22e8 (patch) | |
tree | 9364824e2bc04d62c14a9f539e6b258131e437ad /src | |
parent | 3e5d6e9683d5d3efa3a82556d0f73892d674ed71 (diff) | |
download | grecs-f8ca129aaf4876dfa9778c34ed5bd8a669ca22e8.tar.gz grecs-f8ca129aaf4876dfa9778c34ed5bd8a669ca22e8.tar.bz2 |
Bugfixes.
Diffstat (limited to 'src')
-rw-r--r-- | src/grecs.h | 2 | ||||
-rw-r--r-- | src/preproc.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/grecs.h b/src/grecs.h index 40ade87..b2ef734 100644 --- a/src/grecs.h +++ b/src/grecs.h | |||
@@ -283,6 +283,8 @@ void *grecs_list_pop(struct grecs_list *lp); | |||
283 | void *grecs_list_locate(struct grecs_list *lp, void *data); | 283 | void *grecs_list_locate(struct grecs_list *lp, void *data); |
284 | void *grecs_list_index(struct grecs_list *lp, size_t idx); | 284 | void *grecs_list_index(struct grecs_list *lp, size_t idx); |
285 | void *grecs_list_remove_tail(struct grecs_list *lp); | 285 | void *grecs_list_remove_tail(struct grecs_list *lp); |
286 | void grecs_list_remove_entry(struct grecs_list *lp, | ||
287 | struct grecs_list_entry *ent); | ||
286 | void grecs_list_clear(struct grecs_list *lp); | 288 | void grecs_list_clear(struct grecs_list *lp); |
287 | void grecs_list_free(struct grecs_list *lp); | 289 | void grecs_list_free(struct grecs_list *lp); |
288 | void grecs_list_add(struct grecs_list *dst, struct grecs_list *src); | 290 | void grecs_list_add(struct grecs_list *dst, struct grecs_list *src); |
diff --git a/src/preproc.c b/src/preproc.c index cff8224..cd83e2f 100644 --- a/src/preproc.c +++ b/src/preproc.c | |||
@@ -416,7 +416,8 @@ push_source(const char *name, int once) | |||
416 | 416 | ||
417 | fp = fopen(name, "r"); | 417 | fp = fopen(name, "r"); |
418 | if (!fp) { | 418 | if (!fp) { |
419 | grecs_error(&LOCUS, errno, _("Cannot open `%s'"), name); | 419 | grecs_error(context_stack ? &LOCUS : NULL, errno, |
420 | _("Cannot open `%s'"), name); | ||
420 | return 1; | 421 | return 1; |
421 | } | 422 | } |
422 | 423 | ||
@@ -457,15 +458,15 @@ pop_source() | |||
457 | 458 | ||
458 | if (!context_stack) { | 459 | if (!context_stack) { |
459 | if (grecs_yy_flex_debug) | 460 | if (grecs_yy_flex_debug) |
460 | fprintf (stderr, "End of input\n"); | 461 | fprintf(stderr, "End of input\n"); |
461 | return 1; | 462 | return 1; |
462 | } | 463 | } |
463 | 464 | ||
464 | LOCUS.line++; | 465 | LOCUS.line++; |
465 | 466 | ||
466 | if (grecs_yy_flex_debug) | 467 | if (grecs_yy_flex_debug) |
467 | fprintf (stderr, "Resuming file `%s' at line %lu\n", | 468 | fprintf(stderr, "Resuming file `%s' at line %lu\n", |
468 | LOCUS.file, (unsigned long) LOCUS.line); | 469 | LOCUS.file, (unsigned long) LOCUS.line); |
469 | 470 | ||
470 | pp_line_stmt(); | 471 | pp_line_stmt(); |
471 | 472 | ||