diff options
author | 2003-10-31 21:20:51 +0000 | |
---|---|---|
committer | 2003-10-31 21:20:51 +0000 | |
commit | 911f1b7695503ec209f5e7f64c0f46cdaae3b7e9 (patch) | |
tree | 909d5a2836ce9b59ebfb2873f81801c20bffd7ba /sys-apps/kbd/files | |
parent | Add '--tty' switch to setfont, thanks to Krzysztof Kotlenga (diff) | |
download | historical-911f1b7695503ec209f5e7f64c0f46cdaae3b7e9.tar.gz historical-911f1b7695503ec209f5e7f64c0f46cdaae3b7e9.tar.bz2 historical-911f1b7695503ec209f5e7f64c0f46cdaae3b7e9.zip |
Add '--tty' switch to setfont, thanks to Krzysztof Kotlenga
<pocek@polbrokers.ods.org>, bug #32279. Also add a few patches from Redhat,
and update our Sparc patch with a more simple one.
Diffstat (limited to 'sys-apps/kbd/files')
-rw-r--r-- | sys-apps/kbd/files/digest-kbd-1.08-r4 | 1 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.06-othervt.patch | 55 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.08-nowarn.patch | 11 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.08-sparc.patch | 73 | ||||
-rw-r--r-- | sys-apps/kbd/files/kbd-1.08-terminal.patch | 31 |
5 files changed, 171 insertions, 0 deletions
diff --git a/sys-apps/kbd/files/digest-kbd-1.08-r4 b/sys-apps/kbd/files/digest-kbd-1.08-r4 new file mode 100644 index 000000000000..9b77d0dd0db3 --- /dev/null +++ b/sys-apps/kbd/files/digest-kbd-1.08-r4 @@ -0,0 +1 @@ +MD5 924e6a05e52715dc0f96385b35f2f680 kbd-1.08.tar.gz 819924 diff --git a/sys-apps/kbd/files/kbd-1.06-othervt.patch b/sys-apps/kbd/files/kbd-1.06-othervt.patch new file mode 100644 index 000000000000..5a4d69eaa7d0 --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.06-othervt.patch @@ -0,0 +1,55 @@ +--- kbd-1.06/src/setfont.c.p4 Mon Feb 12 11:17:59 2001 ++++ kbd-1.06/src/setfont.c Wed Jul 18 18:06:38 2001 +@@ -84,6 +84,7 @@ + " setfont -{8|14|16} codepage.cp[.gz] Load 8x<N> font from codepage.cp\n" + "Explicitly (with -m or -u) or implicitly (in the fontfile) given mappings\n" + "will be loaded and, in the case of consolemaps, activated.\n" ++" --tty=device Use `device' as console device for ioctls.\n" + " -h<N> (no space) Override font height.\n" + " -m <fn> Load console screen map.\n" + " -u <fn> Load font unicode map.\n" +@@ -101,7 +101,7 @@ + int + main(int argc, char *argv[]) { + char *ifiles[MAXIFILES]; +- char *mfil, *ufil, *Ofil, *ofil, *omfil, *oufil; ++ char *mfil, *ufil, *Ofil, *ofil, *omfil, *oufil, *tty; + int ifilct = 0, fd, i, iunit, hwunit, no_m, no_u; + int restore = 0; + +@@ -111,9 +111,7 @@ + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + +- fd = getfd(); +- +- ifiles[0] = mfil = ufil = Ofil = ofil = omfil = oufil = 0; ++ ifiles[0] = mfil = ufil = Ofil = ofil = omfil = oufil = tty = NULL; + iunit = hwunit = 0; + no_m = no_u = 0; + +@@ -160,6 +158,8 @@ + hwunit = atoi(argv[i]+2); + if (hwunit <= 0 || hwunit > 32) + usage(); ++ } else if (!strncmp(argv[i], "--tty", 5)) { ++ tty = argv[i] + 6; + } else if (argv[i][0] == '-') { + iunit = atoi(argv[i]+1); + if(iunit <= 0 || iunit > 32) +@@ -171,6 +171,15 @@ + } + ifiles[ifilct++] = argv[i]; + } ++ } ++ ++ if (tty) { ++ if ((fd = open(tty, O_RDWR)) == -1) { ++ perror("open"); ++ exit(EX_OSERR); ++ } ++ } else { ++ fd = getfd(); + } + + if (ifilct && restore) { diff --git a/sys-apps/kbd/files/kbd-1.08-nowarn.patch b/sys-apps/kbd/files/kbd-1.08-nowarn.patch new file mode 100644 index 000000000000..7b0f87960292 --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.08-nowarn.patch @@ -0,0 +1,11 @@ +--- kbd-1.08/src/ksyms.c.orig 2003-07-31 15:08:42.000000000 -0400 ++++ kbd-1.08/src/ksyms.c 2003-07-31 15:10:32.000000000 -0400 +@@ -1811,6 +1811,8 @@ + sprintf(buf, "0x%04x", code); + p = buf; + } ++#if 0 /* keep from whining about capslock in unicode mode */ + fprintf(stderr, _("plus before %s ignored\n"), p); ++#endif + return code; + } diff --git a/sys-apps/kbd/files/kbd-1.08-sparc.patch b/sys-apps/kbd/files/kbd-1.08-sparc.patch new file mode 100644 index 000000000000..72d84605ed7d --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.08-sparc.patch @@ -0,0 +1,73 @@ +Don't try unimplemented ioctls on SPARC, even if they +are defined in headers -- that way lies madness. + +--- kbd-1.08/man/man8/kbdrate.8 2002-10-11 07:08:58.000000000 -0400 ++++ kbd-1.08/man/man8/kbdrate.8 2002-11-22 17:28:15.000000000 -0500 +@@ -22,7 +22,7 @@ + without any options will reset the repeat rate to 10.9 characters per second (cps) + and the delay to 250 milliseconds (ms) for Intel- and M68K-based systems. + These are the IBM defaults. On SPARC-based systems it will reset the repeat rate +-to 5 cps and the delay to 200 ms. ++to 20 cps and the delay to 200 ms. + + .SH OPTIONS + .TP +@@ -69,3 +69,5 @@ + .I /etc/rc.local + .br + .I /dev/port ++.br ++.I /dev/kbd +--- kbd-1.08/src/kbdrate.c 2002-10-11 07:09:01.000000000 -0400 ++++ kbd-1.08/src/kbdrate.c 2002-11-22 17:34:48.000000000 -0500 +@@ -104,8 +104,11 @@ + + static int + KDKBDREP_ioctl_ok(double rate, int delay, int silent) { ++#if defined(KDKBDREP) && !defined(__sparc__) + /* This ioctl is defined in <linux/kd.h> but is not +- implemented anywhere - must be in some m68k patches. */ ++ implemented anywhere - must be in some m68k patches. ++ We cannot blindly try unimplemented ioctls on sparc64 - ++ the 32<->64bit transition layer does not like it. */ + struct kbd_repeat kbdrep_s; + + /* don't change, just test */ +@@ -150,6 +153,9 @@ + rate, kbdrep_s.delay ); + + return 1; /* success! */ ++#else /* no KDKBDREP or __sparc__ */ ++ return 0; ++#endif /* KDKBDREP */ + } + + static int +@@ -188,7 +194,7 @@ + int + main( int argc, char **argv ) { + #ifdef __sparc__ +- double rate = 5.0; /* Default rate */ ++ double rate = 20.0; /* Default rate */ + int delay = 200; /* Default delay */ + #else + double rate = 10.9; /* Default rate */ +@@ -238,8 +244,9 @@ + return 0; + + +- /* The ioport way */ ++ /* The ioport way - will crash on sparc */ + ++#ifndef __sparc__ + for (i = 0; i < RATE_COUNT; i++) + if (rate * 10 >= valid_rates[i]) { + value &= 0x60; +@@ -285,5 +292,7 @@ + valid_rates[value & 0x1f] / 10.0, + valid_delays[ (value & 0x60) >> 5 ] ); + ++#endif ++ + return 0; + } diff --git a/sys-apps/kbd/files/kbd-1.08-terminal.patch b/sys-apps/kbd/files/kbd-1.08-terminal.patch new file mode 100644 index 000000000000..13aeeec11512 --- /dev/null +++ b/sys-apps/kbd/files/kbd-1.08-terminal.patch @@ -0,0 +1,31 @@ +Output terminal control sequences only when output is a terminal. + +--- kbd-1.08/src/unicode_start 2002-11-22 19:23:00.000000000 -0500 ++++ kbd-1.08/src/unicode_start 2002-11-22 19:24:34.000000000 -0500 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # Enables Unicode processing in the current console. + # + # 1. The input side: the keyboard driver. +@@ -25,7 +25,9 @@ + # Tell the console output driver that the bytes arriving are UTF-8 + # encoded multibyte sequences. + +-echo -n -e '\033%G' ++if test -t 1 -a -t 2 ; then ++ echo -n -e '\033%G' ++fi + + # Tell the graphics card how to display Unicode characters not + # contained in the IBM 437 character set (on PCs). The font should +--- kbd-1.08/src/unicode_stop 2002-11-22 19:23:30.000000000 -0500 ++++ kbd-1.08/src/unicode_stop 2002-11-22 19:24:15.000000000 -0500 +@@ -1,4 +1,6 @@ + #!/bin/sh + # stop unicode + kbd_mode -a +-echo -n -e '\033%@' ++if test -t ; then ++ echo -n -e '\033%@' ++fi |