diff options
| author | Andreas Schwab | 2009-06-28 20:25:49 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2009-06-28 20:25:49 +0000 |
| commit | 347f3cd3dd418025e2137f3c0b8dc9e32a991b31 (patch) | |
| tree | f8345ed336050bcf307fa9d46f97579a3ea5eea2 /src/process.c | |
| parent | b96075879aaebbdf674c39b8d886c2fee2c9215e (diff) | |
| download | emacs-347f3cd3dd418025e2137f3c0b8dc9e32a991b31.tar.gz emacs-347f3cd3dd418025e2137f3c0b8dc9e32a991b31.zip | |
Simplify last change.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/process.c b/src/process.c index 38980d28383..058e20be03b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5550,11 +5550,10 @@ send_process (proc, buf, len, object) | |||
| 5550 | struct Lisp_Process *p = XPROCESS (proc); | 5550 | struct Lisp_Process *p = XPROCESS (proc); |
| 5551 | int rv; | 5551 | int rv; |
| 5552 | struct coding_system *coding; | 5552 | struct coding_system *coding; |
| 5553 | struct gcpro gcpro1, gcpro2; | 5553 | struct gcpro gcpro1; |
| 5554 | SIGTYPE (*volatile old_sigpipe) (); | 5554 | SIGTYPE (*volatile old_sigpipe) (); |
| 5555 | Lisp_Object dst_object = Qnil; | ||
| 5556 | 5555 | ||
| 5557 | GCPRO2 (object, dst_object); | 5556 | GCPRO1 (object); |
| 5558 | 5557 | ||
| 5559 | if (p->raw_status_new) | 5558 | if (p->raw_status_new) |
| 5560 | update_status (p); | 5559 | update_status (p); |
| @@ -5633,8 +5632,8 @@ send_process (proc, buf, len, object) | |||
| 5633 | } | 5632 | } |
| 5634 | 5633 | ||
| 5635 | len = coding->produced; | 5634 | len = coding->produced; |
| 5636 | dst_object = coding->dst_object; | 5635 | object = coding->dst_object; |
| 5637 | buf = SDATA (dst_object); | 5636 | buf = SDATA (object); |
| 5638 | } | 5637 | } |
| 5639 | 5638 | ||
| 5640 | if (pty_max_bytes == 0) | 5639 | if (pty_max_bytes == 0) |
| @@ -5765,9 +5764,7 @@ send_process (proc, buf, len, object) | |||
| 5765 | 5764 | ||
| 5766 | /* Running filters might relocate buffers or strings. | 5765 | /* Running filters might relocate buffers or strings. |
| 5767 | Arrange to relocate BUF. */ | 5766 | Arrange to relocate BUF. */ |
| 5768 | if (CODING_REQUIRE_ENCODING (coding)) | 5767 | if (BUFFERP (object)) |
| 5769 | offset = buf - SDATA (dst_object); | ||
| 5770 | else if (BUFFERP (object)) | ||
| 5771 | offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf); | 5768 | offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf); |
| 5772 | else if (STRINGP (object)) | 5769 | else if (STRINGP (object)) |
| 5773 | offset = buf - SDATA (object); | 5770 | offset = buf - SDATA (object); |
| @@ -5778,9 +5775,7 @@ send_process (proc, buf, len, object) | |||
| 5778 | wait_reading_process_output (1, 0, 0, 0, Qnil, NULL, 0); | 5775 | wait_reading_process_output (1, 0, 0, 0, Qnil, NULL, 0); |
| 5779 | #endif | 5776 | #endif |
| 5780 | 5777 | ||
| 5781 | if (CODING_REQUIRE_ENCODING (coding)) | 5778 | if (BUFFERP (object)) |
| 5782 | buf = offset + SDATA (dst_object); | ||
| 5783 | else if (BUFFERP (object)) | ||
| 5784 | buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset); | 5779 | buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset); |
| 5785 | else if (STRINGP (object)) | 5780 | else if (STRINGP (object)) |
| 5786 | buf = offset + SDATA (object); | 5781 | buf = offset + SDATA (object); |