emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/ccl.c,v


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/ccl.c,v
Date: Fri, 01 Feb 2008 01:18:07 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/02/01 01:18:06

Index: ccl.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ccl.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -b -r1.103 -r1.104
--- ccl.c       31 Jan 2008 11:27:46 -0000      1.103
+++ ccl.c       1 Feb 2008 01:18:05 -0000       1.104
@@ -748,13 +748,16 @@
     int bytes = SINGLE_BYTE_CHAR_P (ch) ? 1: CHAR_BYTES (ch);          \
     if (!dst)                                                          \
       CCL_INVALID_CMD;                                                 \
-    if (ccl->eight_bit_control                                         \
-       && bytes == 1 && (ch) >= 0x80 && (ch) < 0xA0)                   \
-      extra_bytes++;                                                   \
-    if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src))      \
+    else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src))  \
       {                                                                        
\
        if (bytes == 1)                                                 \
+         {                                                             \
          *dst++ = (ch);                                                \
+           if (extra_bytes && (ch) >= 0x80 && (ch) < 0xA0)             \
+             /* We may have to convert this eight-bit char to          \
+                multibyte form later.  */                              \
+             extra_bytes++;                                            \
+         }                                                             \
        else if (CHAR_VALID_P (ch, 0))                                  \
          dst += CHAR_STRING (ch, dst);                                 \
        else                                                            \
@@ -772,7 +775,7 @@
     int bytes = CHAR_BYTES (ch);                                       \
     if (!dst)                                                          \
       CCL_INVALID_CMD;                                                 \
-    else if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src)) \
+    else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src))  \
       {                                                                        
\
        if (CHAR_VALID_P ((ch), 0))                                     \
          dst += CHAR_STRING ((ch), dst);                               \
@@ -916,7 +919,7 @@
      each of them will be converted to multibyte form of 2-byte
      sequence.  For that conversion, we remember how many more bytes
      we must keep in DESTINATION in this variable.  */
-  int extra_bytes = 0;
+  int extra_bytes = ccl->eight_bit_control;
   int eof_ic = ccl->eof_ic;
   int eof_hit = 0;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]