Subject: bin/6957: libedit changes CR and LF control characters (patch supplied)
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE>
List: netbsd-bugs
Date: 02/07/1999 13:46:13
>Number: 6957
>Category: bin
>Synopsis: libedit changes CR and LF control characters (patch supplied)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 7 04:50:00 1999
>Last-Modified:
>Originator: Wolfgang Helbig
>Organization:
>Release: NetBSD-current Fri Feb 5 17:29:06 UTC 1999
>Environment:
>Description:
libedit's tty.c switches ^M and ^J.
>How-To-Repeat:
sh uses libedit, so you can see the bug by entering:
/bin/sh
set -V
enter:
^V^J
will print:
^M
and enter:
^V^M
will print
^J
>Fix:
Here is a patch I committed to FreeBSD's lib/libedit/tty.c
in January 1998 (rev 1.4).
--- /usr/src/lib/libedit/tty.c Mon Sep 28 13:07:54 1998
+++ tty.c Sun Feb 7 13:21:30 1999
@@ -84,7 +84,7 @@
C_SH(C_PGOFF)|C_SH(C_PAGE)|C_SH(C_STATUS)), 0 }
},
{
- { "iflag:", 0, IXON | IXOFF },
+ { "iflag:", 0, IXON | IXOFF | INLCR | ICRNL },
{ "oflag:", 0, 0 },
{ "cflag:", 0, 0 },
{ "lflag:", 0, ISIG | IEXTEN },
@@ -803,7 +803,7 @@
tty_rawmode(el)
EditLine *el;
{
- if (el->el_tty.t_mode == ED_IO)
+ if (el->el_tty.t_mode == ED_IO || el->el_tty.t_mode == QU_IO)
return (0);
if (tty_getty(el, &el->el_tty.t_ts) == -1) {
>Audit-Trail:
>Unformatted:
System: NetBSD rvc1 1.3I NetBSD 1.3I (RVC1) #4: Sun Feb 7 10:59:47 CET 1999 helbig@rvc1:/usr/src/sys/arch/i386/compile/RVC1 i386