changeset 88607:18436bf3d6dd

(Fdefine_coding_system_internal): Fix previous change. (decode_coding_charset): Workaround for the bug of GCC 2.96.
author Kenichi Handa <handa@m17n.org>
date Thu, 23 May 2002 10:54:07 +0000
parents 1db59c97efef
children 87f434e79e80
files src/coding.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Thu May 23 01:02:36 2002 +0000
+++ b/src/coding.c	Thu May 23 10:54:07 2002 +0000
@@ -4346,10 +4346,11 @@
 	    {
 	      charset = CHARSET_FROM_ID (XFASTINT (val));
 	      dim = CHARSET_DIMENSION (charset);
-	      while (len++ < dim)
+	      while (len < dim)
 		{
 		  ONE_MORE_BYTE (c);
 		  code = (code << 8) | c;
+		  len++;
 		}
 	      CODING_DECODE_CHAR (coding, src, src_base, src_end,
 				  charset, code, c);
@@ -4363,10 +4364,11 @@
 		{
 		  charset = CHARSET_FROM_ID (XFASTINT (XCAR (val)));
 		  dim = CHARSET_DIMENSION (charset);
-		  while (len++ < dim)
+		  while (len < dim)
 		    {
 		      ONE_MORE_BYTE (c);
 		      code = (code << 8) | c;
+		      len++;
 		    }
 		  CODING_DECODE_CHAR (coding, src, src_base,
 				      src_end, charset, code, c);
@@ -7420,9 +7422,9 @@
 		{
 		  dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (tmp)));
 		  if (dim < dim2)
-		    tmp = Fcons (tmp, Fcons (XCAR (tail), Qnil));
+		    tmp = Fcons (XCAR (tail), Fcons (tmp, Qnil));
 		  else
-		    tmp = Fcons (XCAR (tail), Fcons (tmp, Qnil));
+		    tmp = Fcons (tmp, Fcons (XCAR (tail), Qnil));
 		}
 	      else
 		{