summaryrefslogtreecommitdiff
path: root/gcc/java/jvgenmain.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2004-02-10 19:12:34 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2004-02-10 19:12:34 +0000
commit0237b2dc30312a14a02cd6cc42daeec82b49b913 (patch)
tree5164f4a96fabe5e2f67cebaaee4cba2f0cdec4b3 /gcc/java/jvgenmain.c
parent7b38bcac645a40e200bcb270f8857ac7cf73a717 (diff)
downloadgcc-0237b2dc30312a14a02cd6cc42daeec82b49b913.tar.gz
gjavah.c: Include "intl.h".
* gjavah.c: Include "intl.h". (error): New function. (main): Call gcc_init_libintl. (get_field_name, throwable_p, print_c_decl, print_full_cxx_name, print_stub_or_jni, process_file, main): Use error rather than fprintf. (print_method_info, usage, help, version, main): Mark strings for translation with _. Avoid splitting up sentences. Send information messages to stdout. * jcf-dump.c: Include "intl.h". (main): Call gcc_init_libintl. (process_class, usage, help, version, main, CHECK_PC_IN_RANGE): Mark error, usage and version messages for translation with _. Avoid splitting up sentences. * jv-scan.c: Include "intl.h". (fatal_error, warning): Change parameter s to msgid. Translate messages. (main): Call gcc_init_libintl. (usage, help, version): Mark error, usage and version messages for translation with _. Avoid splitting up sentences. * jvgenmain.c: Include "intl.h". (main): Call gcc_init_libintl. (usage, main): Mark error messages for translation with _. * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS, JVGENMAIN_OBJS): Add intl.o. (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o, java/jvgenmain.o): Update dependencies. From-SVN: r77614
Diffstat (limited to 'gcc/java/jvgenmain.c')
-rw-r--r--gcc/java/jvgenmain.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/java/jvgenmain.c b/gcc/java/jvgenmain.c
index 1bf2d77cb52..1e228a16191 100644
--- a/gcc/java/jvgenmain.c
+++ b/gcc/java/jvgenmain.c
@@ -1,5 +1,5 @@
/* Program to generate "main" a Java(TM) class containing a main method.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GCC.
@@ -33,6 +33,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "jcf.h"
#include "tree.h"
#include "java-tree.h"
+#include "intl.h"
static char * do_mangle_classname (const char *string);
@@ -44,7 +45,8 @@ static void usage (const char *) ATTRIBUTE_NORETURN;
static void
usage (const char *name)
{
- fprintf (stderr, "Usage: %s [OPTIONS]... CLASSNAMEmain [OUTFILE]\n", name);
+ fprintf (stderr, _("Usage: %s [OPTIONS]... CLASSNAMEmain [OUTFILE]\n"),
+ name);
exit (1);
}
@@ -56,6 +58,8 @@ main (int argc, char **argv)
const char *mangled_classname;
int i, last_arg;
+ gcc_init_libintl ();
+
if (argc < 2)
usage (argv[0]);
@@ -91,7 +95,7 @@ main (int argc, char **argv)
stream = fopen (outfile, "w");
if (stream == NULL)
{
- fprintf (stderr, "%s: Cannot open output file: %s\n",
+ fprintf (stderr, _("%s: Cannot open output file: %s\n"),
argv[0], outfile);
exit (1);
}
@@ -128,7 +132,7 @@ main (int argc, char **argv)
fprintf (stream, "}\n");
if (stream != stdout && fclose (stream) != 0)
{
- fprintf (stderr, "%s: Failed to close output file %s\n",
+ fprintf (stderr, _("%s: Failed to close output file %s\n"),
argv[0], argv[2]);
exit (1);
}