cvs commit: ports/sysutils/tmux Makefile
ports/sysutils/tmux/files extra-patch-tty-keys.c patch-tty-keys.c
Pan Tsu
inyaoo at gmail.com
Fri Jun 17 14:17:21 UTC 2011
Wen Heping <wen at 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;
- }
-
%%
More information about the cvs-all
mailing list