]> code.delx.au - gnu-emacs/blobdiff - src/coding.c
*** empty log message ***
[gnu-emacs] / src / coding.c
index a7484b427113a26278b90df131a8ed413d99ce65..6d36cc397c6bf02a6a524e480e1bfdc79442c8f6 100644 (file)
@@ -345,6 +345,7 @@ encode_coding_XXX (coding, source, destination, src_bytes, dst_bytes)
 #include "ccl.h"
 #include "coding.h"
 #include "window.h"
+#include "intervals.h"
 
 #else  /* not emacs */
 
@@ -1822,7 +1823,7 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
 
   while (1)
     {
-      int c1, c2;
+      int c1, c2 = 0;
 
       src_base = src;
       ONE_MORE_BYTE (c1);
@@ -3049,7 +3050,7 @@ decode_coding_sjis_big5 (coding, source, destination,
   coding->produced_char = 0;
   while (1)
     {
-      int c, charset, c1, c2;
+      int c, charset, c1, c2 = 0;
 
       src_base = src;
       ONE_MORE_BYTE (c1);
@@ -4505,7 +4506,11 @@ encoding_buffer_size (coding, src_bytes)
   int magnification;
 
   if (coding->type == coding_type_ccl)
-    magnification = coding->spec.ccl.encoder.buf_magnification;
+    {
+      magnification = coding->spec.ccl.encoder.buf_magnification;
+      if (coding->eol_type == CODING_EOL_CRLF)
+       magnification *= 2;
+    }
   else if (CODING_REQUIRE_ENCODING (coding))
     magnification = 3;
   else
@@ -5993,12 +5998,13 @@ run_pre_post_conversion_on_str (str, coding, encodep)
   buffer = Fget_buffer_create (build_string (" *code-converting-work*"));
   buf = XBUFFER (buffer);
 
+  delete_all_overlays (buf);
   buf->directory = current_buffer->directory;
   buf->read_only = Qnil;
   buf->filename = Qnil;
   buf->undo_list = Qt;
-  buf->overlays_before = Qnil;
-  buf->overlays_after = Qnil;
+  eassert (buf->overlays_before == NULL);
+  eassert (buf->overlays_after == NULL);
 
   set_buffer_internal (buf);
   /* We must insert the contents of STR as is without
@@ -7875,3 +7881,5 @@ emacs_strerror (error_number)
 
 #endif /* emacs */
 
+/* arch-tag: 3a3a2b01-5ff6-4071-9afe-f5b808d9229d
+   (do not change this comment) */