ports/84647: [PATCH] x11/rxvt, x11/rxvt-devel: fix ERASE2 support
Marcin Cieslak
saper at system.pl
Sun Aug 7 15:50:14 UTC 2005
>Number: 84647
>Category: ports
>Synopsis: [PATCH] x11/rxvt, x11/rxvt-devel: fix ERASE2 support
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Aug 07 15:50:11 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Marcin Cieslak
>Release: FreeBSD 5.4-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD saperski.saper.info 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Mon Mar 14 18:50:08 CET 2005 saper at saperski.saper.info:/usr/obj/usr/src/sys/VAIO i386
rxvt 2.6.4 or 2.7.0
fluxbox 0.9.13
ithgtvnc 1.2.9
>Description:
Under some strange conditions - running rxvt 2.6.4 or rxvt 2.7.10
with the fluxbox windowmanager under Xvnc, some strange character
is set as ERASE2 control character.
Sometimes it's ^@ but usually I get H (plain shift-H).
stty -a shows:
erase2 = H
It is quite annoying I must admit :-)
>How-To-Repeat:
>Fix:
In get_ttymode function struct ttymode_t* tio is not initialized
correctly, random character is taken as ERASE2.
The patch is trivial:
for x11/rxvt (rxvt 2.6.4)
[Replace existing files/patch-ad]
--- src/command.c.orig Fri Nov 2 01:18:57 2001
+++ src/command.c Sun Aug 7 16:03:37 2005
@@ -322,7 +322,7 @@
ttydev = tty_name;
# define PTYCHAR1 "pqrstuvwxyz"
-# define PTYCHAR2 "0123456789abcdef"
+# define PTYCHAR2 "0123456789abcdefghijklmnopqrstuv"
for (c1 = PTYCHAR1; *c1; c1++) {
ptydev[len] = ttydev[len] = *c1;
for (c2 = PTYCHAR2; *c2; c2++) {
@@ -519,6 +519,9 @@
# ifdef VEOL2
FOO(VEOL2, "VEOL2");
# endif
+# ifdef VERASE2
+ FOO(VERASE2, "VERASE2");
+# endif
# ifdef VSWTC
FOO(VSWTC, "VSWTC");
# endif
@@ -596,6 +599,9 @@
# ifdef VSWTCH
tio->c_cc[VSWTCH] = VDISABLE;
# endif
+# ifdef VERASE2
+ tio->c_cc[VERASE2] = CERASE2;
+# endif
# if VMIN != VEOF
tio->c_cc[VMIN] = 1;
# endif
@@ -2376,7 +2382,7 @@
unsigned char buf[256];
va_start(arg_ptr, fmt);
- vsprintf(buf, fmt, arg_ptr);
+ vsnprintf(buf, sizeof(buf), fmt, arg_ptr);
va_end(arg_ptr);
tt_write(buf, strlen(buf));
}
for x11/rxvt-devel (rxvt 2.7.10)
[ new file files/patchs-src::init.c]
--- src/init.c.orig Sun Aug 7 16:12:32 2005
+++ src/init.c Sun Aug 7 16:13:19 2005
@@ -1531,6 +1531,9 @@
# ifdef VEOL2
tio->c_cc[VEOL2] = VDISABLE;
# endif
+# ifdef VERASE2
+ tio->c_cc[VERASE2] = CERASE2;
+# endif
# ifdef VSWTC
tio->c_cc[VSWTC] = VDISABLE;
# endif
@@ -1650,6 +1653,9 @@
FOO(VEOL, "VEOL");
# ifdef VEOL2
FOO(VEOL2, "VEOL2");
+# endif
+# ifdef VERASE2
+ FOO(VERASE2, "VERASE2");
# endif
# ifdef VSWTC
FOO(VSWTC, "VSWTC");
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list