|
From: | richardeng |
Subject: | bug#1523: [Ivan Shmakov] process-send-string apparently mangles \r into \n |
Date: | Tue, 13 Jan 2009 01:58:56 +0800 |
User-agent: | Thunderbird 2.0.0.19 (Windows/20081209) |
Sven Joachim wrote:
send again, the "plain text only" format has some problem...I received the following report via the Debian bug tracking system. It is reproducible in the trunk. (start-process "foo" "*foo*" "od" "-td1") // pty is used, pty driver will map '\r' <-> '\n' (call-process-region start end "od" t t t "-td1") // temp file is used, no such problem --- process.c.~1.577.~ 2009-01-03 07:03:59.000000000 -0800 +++ process.c 2009-01-13 01:18:08.000000000 -0800 @@ -1871,6 +1871,13 @@ forkin = forkout = -1; #endif /* not USG, or USG_SUBTTY_WORKS */ pty_flag = 1; + { + struct emacs_tty settings; + EMACS_GET_TTY(outchannel, &settings); + settings.main.c_iflag &= ~ICRNL; /* Disable map of CR to NL on input */ + settings.main.c_iflag &= ~INLCR; /* Disable map of NL to CR on input */ + EMACS_SET_TTY(outchannel, &settings, 1); + } } else #endif /* HAVE_PTYS */ |
[Prev in Thread] | Current Thread | [Next in Thread] |