about summary refs log tree commit diff
path: root/iconvdata/johab.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-31 22:47:52 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-31 22:47:52 +0000
commit5134584a32101dad1ed7691a25cf3309c2994e50 (patch)
treeb7b83f553d961412a644be3d7fe2e93c2a93a167 /iconvdata/johab.c
parent89533d414f8a24c12c9d5874077d4057bf4ffb6a (diff)
downloadglibc-5134584a32101dad1ed7691a25cf3309c2994e50.tar.gz
glibc-5134584a32101dad1ed7691a25cf3309c2994e50.tar.xz
glibc-5134584a32101dad1ed7691a25cf3309c2994e50.zip
Update.
2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/sjis.c (BODY for FROM_LOOP): Treat the case
	ch >= 0x81 && ch2 < 0x40 as invalid.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/uhc.c (BODY for FROM_LOOP): Reject ch2 == 0xff as invalid.
	(BODY for TO_LOOP): Accept 0x7f. Increment outptr as needed.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/johab.c (BODY for TO_LOOP): After calling
	ucs4_to_ksc5601_sym, fix the conversion to JOHAB.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/t.61.c (to_ucs4): Change values of 0xa4, 0a6, 0xa8, 0xb4,
	0xb8.
	(from_ucs4): Change values of U+00A4, U+00BB, U+00ED.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/macintosh.c (HAS_HOLES): Set to 1.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/iso_6937.c (to_ucs4): Change values of 0x24 and 0xb4.
	(from_ucs4): Change values of U+00A4 and U+00ED.
	(BODY of TO_LOOP): Remove mapping from U+02DC to 0x0020.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/ansi_x3.110.c (from_ucs4): Change entry for 0xed.
	(BODY for TO_LOOP): Map U+2122, U+2126, not U+2022, U+2026.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* iconvdata/Makefile (gen-8bit-gap-modules): Remove isiri-3342.
	* iconvdata/isiri-3342.h: New file.
	* iconvdata/isiri-3342.c (HAS_HOLES): Avoid gaps >= 0xe0, but don't
	treat 0x80 as a gap.

2000-07-30  Bruno Haible  <haible@clisp.cons.org>

	* string/strxfrm.c (encoding_mask, encoding_byte): Remove.
	(utf8_encode): Use simple shifts instead.  Fix return value.
Diffstat (limited to 'iconvdata/johab.c')
-rw-r--r--iconvdata/johab.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/iconvdata/johab.c b/iconvdata/johab.c
index 46649c5923..e4603cb423 100644
--- a/iconvdata/johab.c
+++ b/iconvdata/johab.c
@@ -413,6 +413,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2)
 	else								      \
 	  {								      \
 	    size_t written;						      \
+	    uint32_t temp;						      \
 									      \
 	    written = ucs4_to_ksc5601_sym (ch, outptr, outend - outptr);      \
 	    if (__builtin_expect (written, 1) == 0)			      \
@@ -425,14 +426,10 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2)
 		STANDARD_ERR_HANDLER (4);				      \
 	      }								      \
 									      \
-	    outptr[0] -= 0x4a;						      \
-	    outptr[1] += 0x80;						      \
-									      \
-	    outptr[1] += (outptr[0] % 2					      \
-			  ? 0 : (outptr[1] > 0xee ? 0x43 : 0x31));	      \
-	    outptr[1] -= 0xa1;						      \
-	    outptr[0] /= 2;						      \
-	    outptr[0] += 0xe0;						      \
+	    temp = (outptr[0] < 0x4a ? outptr[0] + 0x191 : outptr[0] + 0x176);\
+	    outptr[1] += (temp % 2 ? 0x5e : 0);				      \
+	    outptr[1] += (outptr[1] < 0x6f ? 0x10 : 0x22);		      \
+	    outptr[0] = temp / 2;					      \
 									      \
 	    outptr += 2;						      \
 	  }								      \