+2003-06-05 Kenichi Handa <handa@m17n.org>
+
+ * process.c (read_process_output): Handle carryover correctly.
+
2003-06-02 Dave Love <fx@gnu.org>
* regex.c (re_search_2): Fix last change.
-2003-05-30 Kenichi Handa <handa@etlken2>
+2003-05-30 Kenichi Handa <handa@m17n.org>
* regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
target_multibyte. Even in a unibyte case, return a converted
}
}
- carryover = nbytes - coding->consumed;
- bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data,
- carryover);
- XSETINT (p->decoding_carryover, carryover);
+ if (coding->carryover_bytes > 0)
+ {
+ bcopy (coding->carryover, XSTRING (p->decoding_buf)->data,
+ coding->carryover_bytes);
+ XSETINT (p->decoding_carryover, coding->carryover_bytes);
+ }
nbytes = STRING_BYTES (XSTRING (text));
nchars = XSTRING (text)->size;
if (nbytes > 0)
proc_encode_coding_system[XINT (p->outfd)]);
}
}
- carryover = nbytes - coding->consumed;
- bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data,
- carryover);
- XSETINT (p->decoding_carryover, carryover);
+ if (coding->carryover_bytes > 0)
+ {
+ bcopy (coding->carryover, XSTRING (p->decoding_buf)->data,
+ coding->carryover_bytes);
+ XSETINT (p->decoding_carryover, coding->carryover_bytes);
+ }
/* Adjust the multibyteness of TEXT to that of the buffer. */
if (NILP (current_buffer->enable_multibyte_characters)
!= ! STRING_MULTIBYTE (text))