Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2016 22:31:18 +0100
From:      Christian Weisgerber <naddy@FreeBSD.org>
To:        freebsd-x11@freebsd.org
Subject:   x11/luit: fix ^V bug
Message-ID:  <20160113213118.GA17323@lorvorc.mips.inka.de>

next in thread | raw e-mail | index | archive | help
luit(1) fails to make its tty fully transparent and accidentally
leaves lnext (^V) processing enabled.

One way to discover this: Start xterm with an ISO8859-2 locale,
which will automatically start luit.  Start an Emacs-style editor,
try to page down with ^V.  Notice that you need to enter ^V^V.

I think the luit author assumed that switching off ICANON would
disable this kind of input processing, as it does on Linux, but on
BSD, LNEXT is explicitly outside ICANON and only governed by IEXTEN.

I would like to commit this straightforward fix.  Any objections?

(I've also talked to Matthieu Herrb of X.org who will get this
upstream.)

Index: Makefile
===================================================================
--- Makefile	(revision 406068)
+++ Makefile	(working copy)
@@ -2,6 +2,7 @@
 
 PORTNAME=	luit
 PORTVERSION=	1.1.1
+PORTREVISION=	1
 CATEGORIES=	x11
 
 MAINTAINER=	x11@FreeBSD.org
Index: files/patch-sys.c
===================================================================
--- files/patch-sys.c	(revision 0)
+++ files/patch-sys.c	(working copy)
@@ -0,0 +1,11 @@
+--- sys.c.orig	2012-03-23 04:23:07 UTC
++++ sys.c
+@@ -256,7 +256,7 @@ setRawTermios(void)
+     rc = tcgetattr(0, &tio);
+     if (rc < 0)
+ 	return rc;
+-    tio.c_lflag &= (unsigned) ~(ECHO | ICANON | ISIG);
++    tio.c_lflag &= (unsigned) ~(ECHO | ICANON | IEXTEN | ISIG);
+     tio.c_iflag &= (unsigned) ~(ICRNL | IXOFF | IXON | ISTRIP);
+ #ifdef ONLCR
+     tio.c_oflag &= (unsigned) ~ONLCR;

Property changes on: files/patch-sys.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160113213118.GA17323>