about summary refs log tree commit diff
path: root/iconvdata/jis0208.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /iconvdata/jis0208.h
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'iconvdata/jis0208.h')
-rw-r--r--iconvdata/jis0208.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/iconvdata/jis0208.h b/iconvdata/jis0208.h
index 329e30f9b2..9dea38973c 100644
--- a/iconvdata/jis0208.h
+++ b/iconvdata/jis0208.h
@@ -1,5 +1,5 @@
 /* Access functions for JISX0208 conversion.
-   Copyright (C) 1997,1998,1999,2000,2003,2005 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -24,6 +24,15 @@
 #include <gconv.h>
 #include <stdint.h>
 
+/* Conversion table.  */
+extern const uint16_t __jis0208_to_ucs[];
+
+extern const char __jisx0208_from_ucs4_lat1[256][2];
+extern const char __jisx0208_from_ucs4_greek[0xc1][2];
+extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
+extern const char __jisx0208_from_ucs_tab[][2];
+
+
 /* Struct for table with indeces in UCS mapping table.  */
 struct jisx0208_ucs_idx
 {
@@ -33,18 +42,6 @@ struct jisx0208_ucs_idx
 };
 
 
-/* Conversion table.  */
-extern const uint16_t __jis0208_to_ucs[];
-
-#define JIS0208_LAT1_MIN 0xa2
-#define JIS0208_LAT1_MAX 0xf7
-extern const char __jisx0208_from_ucs4_lat1[JIS0208_LAT1_MAX + 1
-					    - JIS0208_LAT1_MIN][2];
-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
-extern const char __jisx0208_from_ucs_tab[][2];
-
-
 static inline uint32_t
 __attribute ((always_inline))
 jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
@@ -83,8 +80,8 @@ ucs4_to_jisx0208 (uint32_t wch, char *s, size_t avail)
   if (avail < 2)
     return 0;
 
-  if (ch >= JIS0208_LAT1_MIN && ch <= JIS0208_LAT1_MAX)
-    cp = __jisx0208_from_ucs4_lat1[ch - JIS0208_LAT1_MIN];
+  if (ch < 0x100)
+    cp = __jisx0208_from_ucs4_lat1[ch];
   else if (ch >= 0x391 && ch <= 0x451)
     cp = __jisx0208_from_ucs4_greek[ch - 0x391];
   else