[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TCP vs raw-text-dos
From: |
Kenichi Handa |
Subject: |
Re: TCP vs raw-text-dos |
Date: |
Thu, 31 Jul 2003 10:27:48 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
Sorry for the late reply.
In article <address@hidden>, Kazu Yamamoto (山本和彦) <address@hidden> writes:
> Hello,
> Summary: If a TCP connection is combined with 'raw-text-dos, Emacs
> accidentally closes the connection with a special input
> pattern.
I've just installed the attached change in HEAD. Could you
please try it?
---
Ken'ichi HANDA
address@hidden
2003-07-31 Kenichi Handa <address@hidden>
* process.c (read_process_output): Return the actually read bytes
instead of the result of decoding.
Index: process.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/process.c,v
retrieving revision 1.407
retrieving revision 1.408
diff -u -c -r1.407 -r1.408
cvs server: conflicting specifications of output style
*** process.c 22 Jun 2003 00:04:44 -0000 1.407
--- process.c 31 Jul 2003 01:24:27 -0000 1.408
***************
*** 4571,4579 ****
text = (STRING_MULTIBYTE (text)
? Fstring_as_unibyte (text)
: Fstring_to_multibyte (text));
! nbytes = SBYTES (text);
! nchars = SCHARS (text);
! if (nbytes > 0)
internal_condition_case_1 (read_process_output_call,
Fcons (outstream,
Fcons (proc, Fcons (text, Qnil))),
--- 4571,4577 ----
text = (STRING_MULTIBYTE (text)
? Fstring_as_unibyte (text)
: Fstring_to_multibyte (text));
! if (SBYTES (text) > 0)
internal_condition_case_1 (read_process_output_call,
Fcons (outstream,
Fcons (proc, Fcons (text, Qnil))),
***************
*** 4607,4613 ****
start_vms_process_read (vs);
#endif
unbind_to (count, Qnil);
! return nchars;
}
/* If no filter, write into buffer if it isn't dead. */
--- 4605,4611 ----
start_vms_process_read (vs);
#endif
unbind_to (count, Qnil);
! return nbytes;
}
/* If no filter, write into buffer if it isn't dead. */
***************
*** 4678,4688 ****
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);
/* Make sure the process marker's position is valid when the
process buffer is changed in the signal_after_change above.
--- 4676,4685 ----
text = (STRING_MULTIBYTE (text)
? Fstring_as_unibyte (text)
: Fstring_to_multibyte (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,
! 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.