summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-15 06:14:56 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-15 06:14:56 +0000
commit7888313d3c00975b1f5a0b8e624b85c1b520b134 (patch)
treea6511083de1adcf96c11f2f50e2935dc9557d834
parentea1efc6f4974e8daaa9ea9ac84636ba333ce1ef0 (diff)
downloadglibc-7888313d3c00975b1f5a0b8e624b85c1b520b134.tar.gz
glibc-7888313d3c00975b1f5a0b8e624b85c1b520b134.tar.xz
glibc-7888313d3c00975b1f5a0b8e624b85c1b520b134.zip
Update.
2000-07-14  Ulrich Drepper  <drepper@redhat.com>

	* iconv/loop.c (STANDARD_ERR_HANDLER): If one of the
	transliteration function did its job, continue, don't stop.

	* iconvdata/iso646.c: Little optimizations in body for conversion
	from UCS4.
-rw-r--r--ChangeLog8
-rw-r--r--iconv/loop.c4
-rw-r--r--iconvdata/iso646.c6
3 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ea6b428d29..26faaf9a7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-07-14  Ulrich Drepper  <drepper@redhat.com>
+
+	* iconv/loop.c (STANDARD_ERR_HANDLER): If one of the
+	transliteration function did its job, continue, don't stop.
+
+	* iconvdata/iso646.c: Little optimizations in body for conversion
+	from UCS4.
+
 2000-07-14  Mark Kettenis  <kettenis@gnu.org>
 
 	* dlfcn/dlerror.c (free_key_mem): Add cast to silence compiler warning.
diff --git a/iconv/loop.c b/iconv/loop.c
index b8e798682e..9d168d84e9 100644
--- a/iconv/loop.c
+++ b/iconv/loop.c
@@ -190,9 +190,9 @@
 	if (result != __GCONV_ILLEGAL_INPUT)				      \
 	  break;							      \
       }									      \
-    /* If any of them recognized the input stop.  */			      \
+    /* If any of them recognized the input continue with the loop.  */	      \
     if (result != __GCONV_ILLEGAL_INPUT)				      \
-      break;								      \
+      continue;								      \
 									      \
     /* Next see whether we have to ignore the error.  If not, stop.  */	      \
     if (! ignore_errors_p ())						      \
diff --git a/iconvdata/iso646.c b/iconvdata/iso646.c
index 99dc0251b0..d26ed5e3e4 100644
--- a/iconvdata/iso646.c
+++ b/iconvdata/iso646.c
@@ -434,11 +434,11 @@ gconv_end (struct __gconv_step *data)
 #define LOOPFCT			TO_LOOP
 #define BODY \
   {									      \
-    unsigned char ch;							      \
+    unsigned int ch;							      \
     int failure = __GCONV_OK;						      \
 									      \
     ch = get32 (inptr);							      \
-    switch (*((uint32_t *) inptr))					      \
+    switch (ch)								      \
       {									      \
       case 0x23:							      \
 	if (var == GB || var == ES || var == IT || var == FR || var == FR1    \
@@ -878,7 +878,7 @@ gconv_end (struct __gconv_step *data)
 	ch = 0x5d;							      \
 	break;								      \
       default:								      \
-	if (*((uint32_t *) inptr) > 0x7f)				      \
+	if (__builtin_expect (ch, 0) > 0x7f)				      \
 	  failure = __GCONV_ILLEGAL_INPUT;				      \
 	break;								      \
       }									      \