]> git.eshelyaron.com Git - emacs.git/commitdiff
(encode_coding_iso2022): If encoding a last block,
authorKenichi Handa <handa@m17n.org>
Fri, 1 May 1998 04:15:48 +0000 (04:15 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 1 May 1998 04:15:48 +0000 (04:15 +0000)
reset graphic planes and registers.

src/coding.c

index f30942e32276a47d2978cbbefd848fa078a0ac67..75ef204326d809beab8d72003e4099ce38d4e31e 100644 (file)
@@ -1946,17 +1946,14 @@ encode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
       break;
     }
 
-  if (src < src_end)
-    {
-      if (result == CODING_FINISH_NORMAL)
-       result = CODING_FINISH_INSUFFICIENT_DST;
-      else
-       /* If this is the last block of the text to be encoded, we
-          must reset graphic planes and registers to the initial
-          state, and flush out the carryover if any.  */
-       if (coding->mode & CODING_MODE_LAST_BLOCK)
-         ENCODE_RESET_PLANE_AND_REGISTER;
-    }
+  if (src < src_end && result == CODING_FINISH_NORMAL)
+    result = CODING_FINISH_INSUFFICIENT_DST;
+
+  /* If this is the last block of the text to be encoded, we must
+     reset graphic planes and registers to the initial state, and
+     flush out the carryover if any.  */
+  if (coding->mode & CODING_MODE_LAST_BLOCK)
+    ENCODE_RESET_PLANE_AND_REGISTER;
 
   coding->consumed = src - source;
   coding->produced = coding->produced_char = dst - destination;