Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jun 2011 18:17:05 +0400
From:      Pan Tsu <inyaoo@gmail.com>
To:        Wen Heping <wen@FreeBSD.org>
Cc:        cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/sysutils/tmux Makefile ports/sysutils/tmux/files extra-patch-tty-keys.c patch-tty-keys.c
Message-ID:  <861uys7db2.fsf@gmail.com>
In-Reply-To: <201105250029.p4P0TXhA008979__41653.1806732111$1306283404$gmane$org@repoman.freebsd.org> (Wen Heping's message of "Wed, 25 May 2011 00:29:33 %2B0000 (UTC)")
References:  <201105250029.p4P0TXhA008979__41653.1806732111$1306283404$gmane$org@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Wen Heping <wen@FreeBSD.org> writes:

[...]
>   Log:
>   - Add an option to use patch-tty-key.c [2]
[...]
>   Revision  Changes    Path
>   1.1       +11 -0     ports/sysutils/tmux/files/extra-patch-tty-keys.c (new)
>   1.2       +0 -11     ports/sysutils/tmux/files/patch-tty-keys.c (dead)

Wouldn't providing alternate backspace character be better?

%%
Index: sysutils/tmux/Makefile
===================================================================
RCS file: /a/.cvsup/ports/sysutils/tmux/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- sysutils/tmux/Makefile	16 Jun 2011 08:42:28 -0000	1.28
+++ sysutils/tmux/Makefile	17 Jun 2011 13:52:15 -0000
@@ -26,7 +26,7 @@ PORTEXAMPLES=	*
 OPTIONS=	KQUEUE   	"Build without define HAVE_BROKEN_KQUEUE " On \
 		LIBEVENT2	"Use libevent version 2" Off \
 		LIBEVENT_STATIC	"Build with static libevent" Off \
-		BACKSPACE 	"Build with tty/keys patch" Off
+		BACKSPACE 	"Use BS for termios(4) ERASE (default is DEL)" Off
 
 # Now I set tmux build without #define HAVE_BROKEN_KQUEUE as default and an option,
 # If it still hang the system or other run error, try as upstream suggest:
@@ -73,7 +73,7 @@ EXTRA_PATCHES=	${PATCHDIR}/extra-patch-f
 .endif
 
 .if defined(WITH_BACKSPACE)
-EXTRA_PATCHES=	${PATCHDIR}/extra-patch-tty-keys.c
+EXTRA_PATCHES=	${PATCHDIR}/extra-patch-bspace
 .endif
 
 post-patch:
Index: sysutils/tmux/files/extra-patch-bspace
===================================================================
RCS file: sysutils/tmux/files/extra-patch-bspace
diff -N sysutils/tmux/files/extra-patch-bspace
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysutils/tmux/files/extra-patch-bspace	17 Jun 2011 13:46:00 -0000
@@ -0,0 +1,26 @@
+Index: input-keys.c
+===================================================================
+--- input-keys.c	(revision 2525)
++++ input-keys.c	(working copy)
+@@ -41,7 +41,7 @@
+ 
+ const struct input_key_ent input_keys[] = {
+ 	/* Backspace key. */
+-	{ KEYC_BSPACE,		"\177",		0 },
++	{ KEYC_BSPACE,		"\010",		0 },
+ 
+ 	/* Function keys. */
+ 	{ KEYC_F1,		"\033OP",	0 },
+Index: window.c
+===================================================================
+--- window.c	(revision 2525)
++++ window.c	(working copy)
+@@ -634,7 +634,7 @@
+ 			fatal("tcgetattr failed");
+ 		if (tio != NULL)
+ 			memcpy(tio2.c_cc, tio->c_cc, sizeof tio2.c_cc);
+-		tio2.c_cc[VERASE] = '\177';
++		tio2.c_cc[VERASE] = '\010';
+ 		if (tcsetattr(STDIN_FILENO, TCSANOW, &tio2) != 0)
+ 			fatal("tcgetattr failed");
+ 
Index: sysutils/tmux/files/extra-patch-tty-keys.c
===================================================================
RCS file: sysutils/tmux/files/extra-patch-tty-keys.c
diff -N sysutils/tmux/files/extra-patch-tty-keys.c
--- sysutils/tmux/files/extra-patch-tty-keys.c	25 May 2011 00:29:33 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- tty-keys.c.orig	2010-06-04 08:45:52.000000000 +0800
-+++ tty-keys.c	2010-06-04 08:46:45.000000000 +0800
-@@ -456,8 +456,6 @@
- 		 * used. termios should have a better idea.
- 		 */
- 		bspace = tty->tio.c_cc[VERASE];
--		if (bspace != _POSIX_VDISABLE && key == bspace)
--			key = KEYC_BSPACE;
- 		goto handle_key;
- 	}
- 
%%



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