# HG changeset patch # User Kenichi Handa # Date 1059614667 0 # Node ID 25ad7be098ba1423e0581d96566873079d4478d6 # Parent ef0c4b13c02bdbad90b1718ea7a3f5e85293bea1 (read_process_output): Return the actually read bytes instead of the result of decoding. diff -r ef0c4b13c02b -r 25ad7be098ba src/process.c --- a/src/process.c Thu Jul 31 00:52:19 2003 +0000 +++ b/src/process.c Thu Jul 31 01:24:27 2003 +0000 @@ -4571,9 +4571,7 @@ text = (STRING_MULTIBYTE (text) ? Fstring_as_unibyte (text) : Fstring_to_multibyte (text)); - nbytes = SBYTES (text); - nchars = SCHARS (text); - if (nbytes > 0) + if (SBYTES (text) > 0) internal_condition_case_1 (read_process_output_call, Fcons (outstream, Fcons (proc, Fcons (text, Qnil))), @@ -4607,7 +4605,7 @@ start_vms_process_read (vs); #endif unbind_to (count, Qnil); - return nchars; + return nbytes; } /* If no filter, write into buffer if it isn't dead. */ @@ -4678,11 +4676,10 @@ text = (STRING_MULTIBYTE (text) ? Fstring_as_unibyte (text) : Fstring_to_multibyte (text)); - nbytes = SBYTES (text); - nchars = SCHARS (text); /* Insert before markers in case we are inserting where the buffer's mark is, and the user's next command is Meta-y. */ - insert_from_string_before_markers (text, 0, 0, nchars, nbytes, 0); + insert_from_string_before_markers (text, 0, 0, + SCHARS (text), SBYTES (text), 0); /* Make sure the process marker's position is valid when the process buffer is changed in the signal_after_change above.