summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-07-07 06:18:42 +0000
committerRalf Wildenhues <rwild@gcc.gnu.org>2008-07-07 06:18:42 +0000
commitde7776754d7f9fe544b322dd0f569c2579050329 (patch)
tree29ed12759e68e35ffaca73de82b5bf77ad6d0b78 /libjava
parent63ab5b8c18e2a51ce8e2089853ca0df900dbf008 (diff)
downloadgcc-de7776754d7f9fe544b322dd0f569c2579050329.tar.gz
make-trie.h: New.
libjava/ * gnu/gcj/convert/make-trie.h: New. * gnu/gcj/convert/gen-from-JIS.c: Include it. * gnu/gcj/convert/make-trie.c: Likewise. Fix typos and compiler warnings, diagnose a missing argument. * Makefile.am (gen_from_JIS_SOURCES): Add gnu/gcj/convert/make-trie.h. * Makefile.in: Regenerate. From-SVN: r137553
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog9
-rw-r--r--libjava/Makefile.am3
-rw-r--r--libjava/Makefile.in5
-rw-r--r--libjava/gnu/gcj/convert/gen-from-JIS.c16
-rw-r--r--libjava/gnu/gcj/convert/make-trie.c1
5 files changed, 27 insertions, 7 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index d0c1d068dbb..4fb9d68fb3f 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,12 @@
+2008-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * gnu/gcj/convert/make-trie.h: New.
+ * gnu/gcj/convert/gen-from-JIS.c: Include it.
+ * gnu/gcj/convert/make-trie.c: Likewise.
+ Fix typos and compiler warnings, diagnose a missing argument.
+ * Makefile.am (gen_from_JIS_SOURCES): Add gnu/gcj/convert/make-trie.h.
+ * Makefile.in: Regenerate.
+
2008-06-30 Joshua Sumali <jsumali@redhat.com>
Andrew Haley <aph@redhat.com>
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index c074f5752a0..ce6dbd201f7 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -727,7 +727,8 @@ noinst_PROGRAMS = gen-from-JIS
gen_from_JIS_SOURCES = \
gnu/gcj/convert/gen-from-JIS.c \
- gnu/gcj/convert/make-trie.c
+ gnu/gcj/convert/make-trie.c \
+ gnu/gcj/convert/make-trie.h
gen_from_JIS_DEPENDENCIES = \
gnu/gcj/convert/JIS0201.h \
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index ba487885efc..4aab2bcc835 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -471,7 +471,7 @@ gcj_dbtool_OBJECTS = $(am_gcj_dbtool_OBJECTS)
am_gcjh_OBJECTS =
gcjh_OBJECTS = $(am_gcjh_OBJECTS)
am__gen_from_JIS_SOURCES_DIST = gnu/gcj/convert/gen-from-JIS.c \
- gnu/gcj/convert/make-trie.c
+ gnu/gcj/convert/make-trie.c gnu/gcj/convert/make-trie.h
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@am_gen_from_JIS_OBJECTS = gnu/gcj/convert/gen-from-JIS.$(OBJEXT) \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.$(OBJEXT)
gen_from_JIS_OBJECTS = $(am_gen_from_JIS_OBJECTS)
@@ -8176,7 +8176,8 @@ extra_headers = java/lang/Object.h java/lang/Class.h
install_data_local_split = 50
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@gen_from_JIS_SOURCES = \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/gen-from-JIS.c \
-@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.c
+@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.c \
+@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.h
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@gen_from_JIS_DEPENDENCIES = \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/JIS0201.h \
diff --git a/libjava/gnu/gcj/convert/gen-from-JIS.c b/libjava/gnu/gcj/convert/gen-from-JIS.c
index 13745805ab8..d4cca14474e 100644
--- a/libjava/gnu/gcj/convert/gen-from-JIS.c
+++ b/libjava/gnu/gcj/convert/gen-from-JIS.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2008 Free Software Foundation
This file is part of libgcj.
@@ -7,6 +7,10 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "make-trie.h"
+
struct chval
{
unsigned char b1; /* 1st byte */
@@ -59,6 +63,11 @@ main(int argc, char** argv)
int low1_uc = 0xFFFF, high1_uc = 0;
int low2_uc = 0xFFFF, high2_uc = 0;
int i; int row, col;
+ if (argc < 2)
+ {
+ fprintf (stderr, "missing argument!\n");
+ exit (-1);
+ }
if (strcmp (argv[1], "JIS0208") == 0)
chtab = chtab_0208;
else if (strcmp (argv[1], "JIS0212") == 0)
@@ -106,8 +115,7 @@ main(int argc, char** argv)
fprintf(out,"/* This file is automatically generated from %s.TXT. */\n",
argv[1]);
- fprintf(out,"#pragma GCC java_exceptions\n",
- argv[1]);
+ fprintf(out,"#pragma GCC java_exceptions\n");
fprintf(out, "unsigned short %s_to_Unicode[%d][%d] = {\n",
argv[1], max1 - min1 + 1, max2 - min2 + 1);
i = 0;
@@ -156,7 +164,7 @@ main(int argc, char** argv)
}
else
{
- fprintf (stderr, "error - char table our of order!\n");
+ fprintf (stderr, "error - char table out of order!\n");
exit (-1);
}
if (col != max2)
diff --git a/libjava/gnu/gcj/convert/make-trie.c b/libjava/gnu/gcj/convert/make-trie.c
index e89f70c5c9f..fe2d7892641 100644
--- a/libjava/gnu/gcj/convert/make-trie.c
+++ b/libjava/gnu/gcj/convert/make-trie.c
@@ -8,6 +8,7 @@ details. */
#include <stdio.h>
#include <stdlib.h>
+#include "make-trie.h"
typedef struct trie_node
{