mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
Be kind to translators, save some useless translations.
* main.c (banner): New function. (fatal_banner): Use it. (warn_banner): Use it.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2000-03-17 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
Be kind to translators, save some useless translations.
|
||||||
|
|
||||||
|
* main.c (banner): New function.
|
||||||
|
(fatal_banner): Use it.
|
||||||
|
(warn_banner): Use it.
|
||||||
|
|
||||||
2000-03-17 Akim Demaille <akim@epita.fr>
|
2000-03-17 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* reader.c (copy_definition): Use copy_string and copy_comment.
|
* reader.c (copy_definition): Use copy_string and copy_comment.
|
||||||
|
|||||||
50
src/main.c
50
src/main.c
@@ -1,22 +1,22 @@
|
|||||||
/* Top level entry point of bison,
|
/* Top level entry point of bison,
|
||||||
Copyright (C) 1984, 1986, 1989, 1992, 1995 Free Software Foundation, Inc.
|
Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
Bison is free software; you can redistribute it and/or modify
|
Bison is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
any later version.
|
any later version.
|
||||||
|
|
||||||
Bison is distributed in the hope that it will be useful,
|
Bison is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -145,13 +145,22 @@ int_to_string (int i)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Display filename and lino if available. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
banner (void)
|
||||||
|
{
|
||||||
|
if (infile == 0)
|
||||||
|
fprintf(stderr, "%s: ", program_name);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s:%d: ", infile, lineno);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fatal_banner (void)
|
fatal_banner (void)
|
||||||
{
|
{
|
||||||
if (infile == 0)
|
banner ();
|
||||||
fprintf(stderr, _("%s: fatal error: "), program_name);
|
fputs (_("fatal error: "), stderr);
|
||||||
else
|
|
||||||
fprintf(stderr, _("%s:%d: fatal error: "), infile, lineno);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print the message S for a fatal error. */
|
/* Print the message S for a fatal error. */
|
||||||
@@ -181,10 +190,7 @@ fatals (char *fmt, char *x1)
|
|||||||
static void
|
static void
|
||||||
warn_banner (void)
|
warn_banner (void)
|
||||||
{
|
{
|
||||||
if (infile == 0)
|
banner ();
|
||||||
fprintf(stderr, _("%s: "), program_name);
|
|
||||||
else
|
|
||||||
fprintf(stderr, _("%s:%d: "), infile, lineno);
|
|
||||||
failure = 1;
|
failure = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user