changeset 21880:0a3488a71129

(encode_coding_iso2022): If encoding a last block, reset graphic planes and registers.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 May 1998 04:15:48 +0000
parents 14316c9ecdac
children 1a80d464c77a
files src/coding.c
diffstat 1 files changed, 8 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Fri May 01 04:11:54 1998 +0000
+++ b/src/coding.c	Fri May 01 04:15:48 1998 +0000
@@ -1946,17 +1946,14 @@
       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;