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
This commit is contained in:
Ralf Wildenhues 2008-07-07 06:18:42 +00:00 committed by Ralf Wildenhues
parent 63ab5b8c18
commit de7776754d
5 changed files with 27 additions and 7 deletions

View File

@ -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>

View File

@ -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 \

View File

@ -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 \

View File

@ -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)

View File

@ -8,6 +8,7 @@ details. */
#include <stdio.h>
#include <stdlib.h>
#include "make-trie.h"
typedef struct trie_node
{