diff options
| author | Kenichi Handa | 2003-06-05 12:31:46 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-06-05 12:31:46 +0000 |
| commit | 54ab3d3bb06d0102b9c17da9db464607399d220f (patch) | |
| tree | 181c1c43f6c920cd19ab44cbac5042cd3413d5b3 | |
| parent | dd8c7a534e3de21370a7741e81c100b0cd743b71 (diff) | |
| download | emacs-54ab3d3bb06d0102b9c17da9db464607399d220f.tar.gz emacs-54ab3d3bb06d0102b9c17da9db464607399d220f.zip | |
(Fcall_process): Handle carryover correctly.
| -rw-r--r-- | src/callproc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/callproc.c b/src/callproc.c index da3654a3411..8c6df89ea7e 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -797,13 +797,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 797 | 797 | ||
| 798 | TEMP_SET_PT_BOTH (PT + process_coding.produced_char, | 798 | TEMP_SET_PT_BOTH (PT + process_coding.produced_char, |
| 799 | PT_BYTE + process_coding.produced); | 799 | PT_BYTE + process_coding.produced); |
| 800 | nread -= process_coding.consumed; | 800 | carryover = process_coding.carryover_bytes; |
| 801 | carryover = nread; | ||
| 802 | if (carryover > 0) | 801 | if (carryover > 0) |
| 803 | /* As CARRYOVER should not be that large, we had | 802 | /* As CARRYOVER should not be that large, we had |
| 804 | better avoid overhead of bcopy. */ | 803 | better avoid overhead of bcopy. */ |
| 805 | BCOPY_SHORT (bufptr + process_coding.consumed, bufptr, | 804 | BCOPY_SHORT (process_coding.carryover, bufptr, |
| 806 | carryover); | 805 | process_coding.carryover_bytes); |
| 807 | } | 806 | } |
| 808 | } | 807 | } |
| 809 | 808 | ||