changeset 24667:6156dc5f5ce0

[andrewi] (decode_eol): Set produced/consumed values to zero if src_bytes is <= 0 on entry. [handa] (setup_raw_text_coding_system): Call setup_coding_system to initialize the fields of struct coding_system correctly.
author Andrew Innes <andrewi@gnu.org>
date Sun, 02 May 1999 10:05:22 +0000
parents 239ee0e7b828
children 6c9eaa09906c
files src/coding.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Sun May 02 09:59:03 1999 +0000
+++ b/src/coding.c	Sun May 02 10:05:22 1999 +0000
@@ -2577,7 +2577,11 @@
   coding->fake_multibyte = 0;
 
   if (src_bytes <= 0)
-    return result;
+    {
+      coding->produced = coding->produced_char = 0;
+      coding->consumed = coding->consumed_char = 0;
+      return result;
+    }
 
   switch (coding->eol_type)
     {
@@ -3240,6 +3244,7 @@
 	    coding->symbol
 	      = XVECTOR (subsidiaries)->contents[coding->eol_type];
 	}
+      setup_coding_system (coding->symbol, coding);
     }
   return;
 }