diff options
author | rwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-07 06:18:42 +0000 |
---|---|---|
committer | rwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-07 06:18:42 +0000 |
commit | a221eaffd802c021ad8dae931eac4ea25a8663ad (patch) | |
tree | 29ed12759e68e35ffaca73de82b5bf77ad6d0b78 /libjava/gnu | |
parent | 561c1db5b2d89300df283e626ece4739e1c4a2b7 (diff) | |
download | gcc-a221eaffd802c021ad8dae931eac4ea25a8663ad.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137553 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu')
-rw-r--r-- | libjava/gnu/gcj/convert/gen-from-JIS.c | 16 | ||||
-rw-r--r-- | libjava/gnu/gcj/convert/make-trie.c | 1 |
2 files changed, 13 insertions, 4 deletions
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 { |