aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2003-06-05 07:17:10 +0000
committerKenichi Handa2003-06-05 07:17:10 +0000
commitdd8c7a534e3de21370a7741e81c100b0cd743b71 (patch)
tree45adb0c76460c8b173a5b242d2be4c8617063c6c /src
parentb884eb4db2584372fce1d777fdf2cf8f7ff27e04 (diff)
downloademacs-dd8c7a534e3de21370a7741e81c100b0cd743b71.tar.gz
emacs-dd8c7a534e3de21370a7741e81c100b0cd743b71.zip
(read_process_output): Handle carryover correctly.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/process.c20
2 files changed, 17 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3cd24eff246..4c07d29c07d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,8 +1,12 @@
12003-06-05 Kenichi Handa <handa@m17n.org>
2
3 * process.c (read_process_output): Handle carryover correctly.
4
12003-06-02 Dave Love <fx@gnu.org> 52003-06-02 Dave Love <fx@gnu.org>
2 6
3 * regex.c (re_search_2): Fix last change. 7 * regex.c (re_search_2): Fix last change.
4 8
52003-05-30 Kenichi Handa <handa@etlken2> 92003-05-30 Kenichi Handa <handa@m17n.org>
6 10
7 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not 11 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
8 target_multibyte. Even in a unibyte case, return a converted 12 target_multibyte. Even in a unibyte case, return a converted
diff --git a/src/process.c b/src/process.c
index 5ca96d83e9c..618e7b577b4 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3050,10 +3050,12 @@ read_process_output (proc, channel)
3050 } 3050 }
3051 } 3051 }
3052 3052
3053 carryover = nbytes - coding->consumed; 3053 if (coding->carryover_bytes > 0)
3054 bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data, 3054 {
3055 carryover); 3055 bcopy (coding->carryover, XSTRING (p->decoding_buf)->data,
3056 XSETINT (p->decoding_carryover, carryover); 3056 coding->carryover_bytes);
3057 XSETINT (p->decoding_carryover, coding->carryover_bytes);
3058 }
3057 nbytes = STRING_BYTES (XSTRING (text)); 3059 nbytes = STRING_BYTES (XSTRING (text));
3058 nchars = XSTRING (text)->size; 3060 nchars = XSTRING (text)->size;
3059 if (nbytes > 0) 3061 if (nbytes > 0)
@@ -3151,10 +3153,12 @@ read_process_output (proc, channel)
3151 proc_encode_coding_system[XINT (p->outfd)]); 3153 proc_encode_coding_system[XINT (p->outfd)]);
3152 } 3154 }
3153 } 3155 }
3154 carryover = nbytes - coding->consumed; 3156 if (coding->carryover_bytes > 0)
3155 bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data, 3157 {
3156 carryover); 3158 bcopy (coding->carryover, XSTRING (p->decoding_buf)->data,
3157 XSETINT (p->decoding_carryover, carryover); 3159 coding->carryover_bytes);
3160 XSETINT (p->decoding_carryover, coding->carryover_bytes);
3161 }
3158 /* Adjust the multibyteness of TEXT to that of the buffer. */ 3162 /* Adjust the multibyteness of TEXT to that of the buffer. */
3159 if (NILP (current_buffer->enable_multibyte_characters) 3163 if (NILP (current_buffer->enable_multibyte_characters)
3160 != ! STRING_MULTIBYTE (text)) 3164 != ! STRING_MULTIBYTE (text))