char *argv[];
{
program_name = argv[0];
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
failure = 0;
lineno = 0;
getargs(argc, argv);
/* output the tables and the parser to ftable. In file output. */
output();
done(failure);
+ return failure;
}
\f
/* functions to report errors which prevent a parser from being generated */
char *
printable_version(c)
- char c;
+ int c;
{
static char buf[10];
if (c < ' ' || c >= '\177')
extern char *infile;
if (infile == 0)
- fprintf(stderr, "fatal error: %s\n", s);
+ fprintf(stderr, _("%s: fatal error: %s\n"), program_name, 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);
}
extern char *infile;
if (infile == 0)
- fprintf(stderr, "error: %s\n", s);
+ fprintf(stderr, _("%s: %s\n"), program_name, s);
else
- fprintf(stderr, "(\"%s\", line %d) error: %s\n",
+ fprintf(stderr, _("%s:%d: %s\n"),
infile, lineno, s);
failure = 1;
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);
}
berror(s)
char *s;
{
- fprintf(stderr, "internal error, %s\n", s);
+ fprintf(stderr, _("%s: internal error: %s\n"), program_name, s);
abort();
}