X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/293405714925aa5609613cc1934a580ebcbf18cd..3d05a5de82e9119ec0783801456a2ba5f5493ba1:/src/main.c diff --git a/src/main.c b/src/main.c index d14b6c46..0b6e2464 100644 --- a/src/main.c +++ b/src/main.c @@ -90,6 +90,7 @@ main(argc, argv) /* output the tables and the parser to ftable. In file output. */ output(); done(failure); + return failure; } /* functions to report errors which prevent a parser from being generated */ @@ -100,7 +101,7 @@ main(argc, argv) char * printable_version(c) - char c; + int c; { static char buf[10]; if (c < ' ' || c >= '\177') @@ -134,9 +135,9 @@ fatal(s) extern char *infile; if (infile == 0) - fprintf(stderr, _("fatal error: %s\n"), s); + fprintf(stderr, _("bison: fatal error: %s\n"), s); else - fprintf(stderr, _("\"%s\", line %d: %s\n"), infile, lineno, s); + fprintf(stderr, _("%s:%d: fatal error: %s\n"), infile, lineno, s); done(1); } @@ -162,9 +163,9 @@ warn(s) extern char *infile; if (infile == 0) - fprintf(stderr, _("error: %s\n"), s); + fprintf(stderr, _("bison: %s\n"), s); else - fprintf(stderr, _("(\"%s\", line %d) error: %s\n"), + fprintf(stderr, _("%s:%d: %s\n"), infile, lineno, s); failure = 1; @@ -227,7 +228,7 @@ toomany(s) char *s; { char buffer[200]; - sprintf(buffer, _("limit of %d exceeded, too many %s"), MAXSHORT, s); + sprintf(buffer, _("too many %s (max %d)"), s, MAXSHORT); fatal(buffer); } @@ -237,6 +238,6 @@ void berror(s) char *s; { - fprintf(stderr, _("internal error, %s\n"), s); + fprintf(stderr, _("bison: internal error: %s\n"), s); abort(); }