400 lines
12 KiB
Diff
400 lines
12 KiB
Diff
|
diff -ur kbd-1.12.orig/data/keymaps/i386/include/ctrl.map kbd-1.12-0/data/keymaps/i386/include/ctrl.map
|
||
|
--- kbd-1.12.orig/data/keymaps/i386/include/ctrl.map 2002-10-11 13:08:50.000000000 +0200
|
||
|
+++ kbd-1.12-0/data/keymaps/i386/include/ctrl.map 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -1,3 +1,6 @@
|
||
|
keycode 29 = Caps_Lock
|
||
|
keycode 58 = Control
|
||
|
keycode 97 = Compose
|
||
|
+# keycode 97 = Control
|
||
|
+# Shift keycode 97 = Compose is also popular
|
||
|
+# (Right Ctrl + Shift for Compose)
|
||
|
diff -ur kbd-1.12.orig/data/keymaps/i386/qwerty/defkeymap.map kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap.map
|
||
|
--- kbd-1.12.orig/data/keymaps/i386/qwerty/defkeymap.map 2002-10-13 02:03:56.000000000 +0200
|
||
|
+++ kbd-1.12-0/data/keymaps/i386/qwerty/defkeymap.map 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -251,9 +251,9 @@
|
||
|
keycode 122 =
|
||
|
keycode 123 =
|
||
|
keycode 124 =
|
||
|
-keycode 125 =
|
||
|
-keycode 126 =
|
||
|
-keycode 127 =
|
||
|
+keycode 125 = Decr_Console Last_Console Incr_Console Compose
|
||
|
+keycode 126 = Incr_Console Last_Console Decr_Console Compose
|
||
|
+keycode 127 = Compose Decr_Console Incr_Console Last_Console
|
||
|
string F1 = "\033[[A"
|
||
|
string F2 = "\033[[B"
|
||
|
string F3 = "\033[[C"
|
||
|
diff -ur kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH-latin1.map kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH-latin1.map
|
||
|
--- kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH-latin1.map 2002-10-11 13:08:48.000000000 +0200
|
||
|
+++ kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH-latin1.map 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -3,7 +3,6 @@
|
||
|
keymaps 0-2,4-6,8,12
|
||
|
include "qwertz-layout"
|
||
|
include "linux-with-alt-and-altgr"
|
||
|
- plain keycode 83 = KP_Comma
|
||
|
strings as usual
|
||
|
|
||
|
keycode 1 = Escape Escape
|
||
|
diff -ur kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH.map kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH.map
|
||
|
--- kbd-1.12.orig/data/keymaps/i386/qwertz/fr_CH.map 2002-10-11 13:08:48.000000000 +0200
|
||
|
+++ kbd-1.12-0/data/keymaps/i386/qwertz/fr_CH.map 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -3,7 +3,6 @@
|
||
|
keymaps 0-2,4-6,8,12
|
||
|
include "qwertz-layout"
|
||
|
include "linux-with-alt-and-altgr"
|
||
|
- plain keycode 83 = KP_Comma
|
||
|
strings as usual
|
||
|
|
||
|
keycode 1 = Escape Escape
|
||
|
diff -ur kbd-1.12.orig/data/keymaps/mac/all/mac-de_CH.map kbd-1.12-0/data/keymaps/mac/all/mac-de_CH.map
|
||
|
--- kbd-1.12.orig/data/keymaps/mac/all/mac-de_CH.map 2002-10-11 13:08:52.000000000 +0200
|
||
|
+++ kbd-1.12-0/data/keymaps/mac/all/mac-de_CH.map 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -43,3 +43,5 @@
|
||
|
keycode 44 = minus underscore backslash Control_underscore Meta_minus Meta_Control_underscore
|
||
|
keycode 47 = period colon
|
||
|
keycode 10 = less greater
|
||
|
+keycode 16 = z
|
||
|
+keycode 6 = y
|
||
|
diff -ur kbd-1.12.orig/data/keymaps/mac/all/mac-dk-latin1.map kbd-1.12-0/data/keymaps/mac/all/mac-dk-latin1.map
|
||
|
--- kbd-1.12.orig/data/keymaps/mac/all/mac-dk-latin1.map 2002-10-11 13:08:52.000000000 +0200
|
||
|
+++ kbd-1.12-0/data/keymaps/mac/all/mac-dk-latin1.map 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -28,7 +28,7 @@
|
||
|
keycode 30 = diaeresis circumflex asciitilde
|
||
|
keycode 41 = ae AE adiaeresis Adiaeresis
|
||
|
keycode 39 = oslash Oslash odiaeresis Odiaeresis
|
||
|
-keycode 42 = numbersign apostrophe
|
||
|
+keycode 42 = apostrophe asterisk
|
||
|
keycode 43 = comma semicolon
|
||
|
keycode 47 = period colon
|
||
|
keycode 44 = minus underscore Meta_minus
|
||
|
@@ -36,8 +36,6 @@
|
||
|
keycode 49 = space space Meta_space nul
|
||
|
keycode 10 = less greater bar
|
||
|
|
||
|
-keycode 16 = z
|
||
|
-keycode 6 = y
|
||
|
|
||
|
alt keycode 12 = at
|
||
|
alt keycode 50 = bar
|
||
|
diff -ur kbd-1.12.orig/src/Makefile.in kbd-1.12-0/src/Makefile.in
|
||
|
--- kbd-1.12.orig/src/Makefile.in 2004-01-03 18:53:54.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/Makefile.in 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -54,7 +54,8 @@
|
||
|
|
||
|
WARN = -Wall -Wmissing-prototypes -Wstrict-prototypes
|
||
|
DEFS = -DDATADIR=\"$(DATA_DIR)\"
|
||
|
-CFLAGS = -O2
|
||
|
+RPM_OPT_FLAGS = -O2 -Wall
|
||
|
+CFLAGS = $(RPM_OPT_FLAGS)
|
||
|
LDFLAGS = -s
|
||
|
|
||
|
CC = gcc
|
||
|
diff -ur kbd-1.12.orig/po/Makefile.in kbd-1.12-0/po/Makefile.in
|
||
|
--- kbd-1.12.orig/po/Makefile.in 2004-03-02 00:04:10.727687162 +0100
|
||
|
+++ kbd-1.12/po/Makefile.in 2004-03-02 00:04:26.390543066 +0100
|
||
|
@@ -13,7 +13,7 @@
|
||
|
FOREIGN=
|
||
|
SHELL = /bin/sh
|
||
|
|
||
|
-prefix = $(DESTDIR)@prefix@
|
||
|
+prefix = $(DESTDIR)/usr
|
||
|
datadir = $(prefix)/share
|
||
|
localedir = $(datadir)/locale
|
||
|
gnulocaledir = $(prefix)/share/locale
|
||
|
diff -ur kbd-1.12.orig/src/kdfontop.c kbd-1.12-0/src/kdfontop.c
|
||
|
--- kbd-1.12.orig/src/kdfontop.c 2004-01-16 20:45:31.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/kdfontop.c 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -170,6 +170,8 @@
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
+ /* The other methods do not support width != 8 */
|
||
|
+ if (width) *width = 8;
|
||
|
/* Second attempt: GIO_FONTX */
|
||
|
cfd.charcount = *count;
|
||
|
cfd.charheight = 0;
|
||
|
@@ -179,8 +181,6 @@
|
||
|
*count = cfd.charcount;
|
||
|
if (height)
|
||
|
*height = cfd.charheight;
|
||
|
- if (width)
|
||
|
- *width = 8;
|
||
|
return 0;
|
||
|
}
|
||
|
if (errno != ENOSYS && errno != EINVAL) {
|
||
|
@@ -201,8 +201,6 @@
|
||
|
*count = 256;
|
||
|
if (height)
|
||
|
*height = 0; /* undefined, at most 32 */
|
||
|
- if (width)
|
||
|
- *width = 8;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
diff -ur kbd-1.12.orig/src/loadunimap.c kbd-1.12-0/src/loadunimap.c
|
||
|
--- kbd-1.12.orig/src/loadunimap.c 2004-01-16 20:45:31.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/loadunimap.c 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -35,6 +35,7 @@
|
||
|
#include "version.h"
|
||
|
int verbose = 0;
|
||
|
int force = 0;
|
||
|
+int debug = 0;
|
||
|
|
||
|
static void
|
||
|
usage(void) {
|
||
|
@@ -345,13 +346,29 @@
|
||
|
descr = getunicodemap(fd);
|
||
|
list = descr.entries;
|
||
|
|
||
|
+
|
||
|
for(i=0; i<fontsize; i++) {
|
||
|
- for(j=0; j<descr.entry_ct; j++)
|
||
|
+#if 0
|
||
|
+ /* More than one mapping is not a sequence! */
|
||
|
+ int no = 0;
|
||
|
+ for(j=0; j<descr.entry_ct; j++)
|
||
|
if (list[j].fontpos == i)
|
||
|
+ no++;
|
||
|
+ if (no > 1)
|
||
|
+ appendseparator(fp, 1, utf8);
|
||
|
+#endif
|
||
|
+ if (debug) printf ("\nchar %03x: ", i);
|
||
|
+ for(j=0; j<descr.entry_ct; j++)
|
||
|
+ if (list[j].fontpos == i) {
|
||
|
+ if (debug)
|
||
|
+ printf ("%04x ", list[j].unicode);
|
||
|
appendunicode(fp, list[j].unicode, utf8);
|
||
|
+ }
|
||
|
appendseparator(fp, 0, utf8);
|
||
|
}
|
||
|
|
||
|
+
|
||
|
+ if (debug) printf ("\n");
|
||
|
if (verbose)
|
||
|
printf(_("Appended Unicode map\n"));
|
||
|
}
|
||
|
diff -ur kbd-1.12.orig/src/loadunimap.h kbd-1.12-0/src/loadunimap.h
|
||
|
--- kbd-1.12.orig/src/loadunimap.h 1999-09-27 20:17:52.000000000 +0200
|
||
|
+++ kbd-1.12-0/src/loadunimap.h 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -1,4 +1,10 @@
|
||
|
/* loadunimap.h */
|
||
|
+
|
||
|
+#ifndef _LOADUNIMAP_H
|
||
|
+#define _LOADUNIMAP_H
|
||
|
+
|
||
|
void saveunicodemap(int fd, char *oufil); /* save humanly readable */
|
||
|
void loadunicodemap(int fd, char *ufil);
|
||
|
void appendunicodemap(int fd, FILE *fp, int ct, int utf8);
|
||
|
+
|
||
|
+#endif /* _LOADUNIMAP_H */
|
||
|
diff -ur kbd-1.12.orig/src/mapscrn.c kbd-1.12-0/src/mapscrn.c
|
||
|
--- kbd-1.12.orig/src/mapscrn.c 2004-01-16 20:45:31.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/mapscrn.c 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -32,6 +32,7 @@
|
||
|
#include "version.h"
|
||
|
|
||
|
int verbose = 0;
|
||
|
+int debug = 0;
|
||
|
|
||
|
int
|
||
|
main(int argc, char *argv[]) {
|
||
|
diff -ur kbd-1.12.orig/src/paths.h kbd-1.12-0/src/paths.h
|
||
|
--- kbd-1.12.orig/src/paths.h 1999-11-15 23:46:31.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/paths.h 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -28,3 +28,4 @@
|
||
|
extern void fpclose(FILE *fp);
|
||
|
|
||
|
extern int verbose;
|
||
|
+extern int debug;
|
||
|
diff -ur kbd-1.12.orig/src/psf.h kbd-1.12-0/src/psf.h
|
||
|
--- kbd-1.12.orig/src/psf.h 2001-02-09 13:58:44.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/psf.h 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -1,3 +1,5 @@
|
||
|
+/* psf.h */
|
||
|
+
|
||
|
/*
|
||
|
* Format of a psf font file:
|
||
|
*
|
||
|
@@ -30,6 +32,9 @@
|
||
|
* namely when there is no precomposed Unicode value for the glyph.
|
||
|
*/
|
||
|
|
||
|
+#ifndef _PSF_H
|
||
|
+#define _PSF_H
|
||
|
+
|
||
|
|
||
|
#define PSF1_MAGIC0 0x36
|
||
|
#define PSF1_MAGIC1 0x04
|
||
|
@@ -91,3 +96,5 @@
|
||
|
#define PSF2_MAGIC_OK(x) ((x)[0]==PSF2_MAGIC0 && (x)[1]==PSF2_MAGIC1 \
|
||
|
&& (x)[2]==PSF2_MAGIC2 && (x)[3]==PSF2_MAGIC3)
|
||
|
|
||
|
+
|
||
|
+#endif /* _PSF_H */
|
||
|
diff -ur kbd-1.12.orig/src/psffontop.c kbd-1.12-0/src/psffontop.c
|
||
|
--- kbd-1.12.orig/src/psffontop.c 2004-01-16 20:45:31.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/psffontop.c 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -10,6 +10,7 @@
|
||
|
#include "psf.h"
|
||
|
#include "psffontop.h"
|
||
|
#include "utf8.h"
|
||
|
+#include "paths.h"
|
||
|
|
||
|
extern char *progname;
|
||
|
|
||
|
@@ -32,16 +33,18 @@
|
||
|
|
||
|
static void
|
||
|
addseq(struct unicode_list *up, unsigned int uc) {
|
||
|
- struct unicode_list *ul;
|
||
|
struct unicode_seq *us;
|
||
|
+ struct unicode_seq *usl;
|
||
|
+ struct unicode_list *ul = up->prev;
|
||
|
|
||
|
- ul = up->prev;
|
||
|
+ usl = ul->seq;
|
||
|
+ while (usl->next) usl = usl->next;
|
||
|
us = xmalloc(sizeof(struct unicode_seq));
|
||
|
us->uc = uc;
|
||
|
- us->prev = ul->seq->prev;
|
||
|
- us->prev->next = us;
|
||
|
+ us->prev = usl;
|
||
|
us->next = NULL;
|
||
|
- ul->seq->prev = us;
|
||
|
+ usl->next = us;
|
||
|
+ //ul->seq->prev = us;
|
||
|
}
|
||
|
|
||
|
static unsigned int
|
||
|
@@ -190,7 +193,7 @@
|
||
|
* just read the entire file.
|
||
|
*/
|
||
|
if (fontf) {
|
||
|
- inputbuflth = 16384; /* random */
|
||
|
+ inputbuflth = MAXFONTSIZE/4; /* random */
|
||
|
inputbuf = xmalloc(inputbuflth);
|
||
|
n = 0;
|
||
|
|
||
|
@@ -366,6 +369,13 @@
|
||
|
perror("appendunimap");
|
||
|
exit(1);
|
||
|
}
|
||
|
+ if (debug) {
|
||
|
+ printf ("(");
|
||
|
+ if (!utf8)
|
||
|
+ printf ("U+");
|
||
|
+ while (n < 6) printf ("%02x ", out[n++]);
|
||
|
+ printf (")");
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
void
|
||
|
@@ -437,7 +447,7 @@
|
||
|
}
|
||
|
|
||
|
|
||
|
-void
|
||
|
+int
|
||
|
writepsffont(FILE *ofil, char *fontbuf, int width, int height, int fontlen,
|
||
|
int psftype, struct unicode_list *uclistheads) {
|
||
|
int bytewidth, charsize, flags, utf8, i;
|
||
|
@@ -456,7 +466,8 @@
|
||
|
utf8 = (psftype == 2);
|
||
|
|
||
|
fwrite(fontbuf, charsize, fontlen, ofil);
|
||
|
- if (uclistheads != NULL) {
|
||
|
+ /* unimaps: -1 => do nothing: caller will append map */
|
||
|
+ if (uclistheads != NULL && uclistheads != (struct unicode_list*)-1) {
|
||
|
struct unicode_list *ul;
|
||
|
struct unicode_seq *us;
|
||
|
|
||
|
@@ -475,5 +486,6 @@
|
||
|
appendseparator(ofil, 0, utf8);
|
||
|
}
|
||
|
}
|
||
|
+ return utf8;
|
||
|
}
|
||
|
|
||
|
diff -ur kbd-1.12.orig/src/psffontop.h kbd-1.12-0/src/psffontop.h
|
||
|
--- kbd-1.12.orig/src/psffontop.h 2000-12-31 15:22:17.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/psffontop.h 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -1,3 +1,11 @@
|
||
|
+/* psffontop.h */
|
||
|
+
|
||
|
+#ifndef _PSFFONTOP_H
|
||
|
+#define _PSFFONTOP_H
|
||
|
+
|
||
|
+/* Maximum font size that we try to handle */
|
||
|
+#define MAXFONTSIZE 65536
|
||
|
+
|
||
|
typedef unsigned int unicode;
|
||
|
|
||
|
struct unicode_seq {
|
||
|
@@ -17,7 +25,7 @@
|
||
|
int *fontwidthp, int *fontlenp, int fontpos0,
|
||
|
struct unicode_list **uclistheadsp);
|
||
|
|
||
|
-extern void writepsffont(FILE *ofil, char *fontbuf,
|
||
|
+extern int writepsffont(FILE *ofil, char *fontbuf,
|
||
|
int width, int height, int fontlen, int psftype,
|
||
|
struct unicode_list *uclistheads);
|
||
|
|
||
|
@@ -29,3 +37,5 @@
|
||
|
|
||
|
extern void appendunicode(FILE *fp, unsigned int uc, int utf8);
|
||
|
extern void appendseparator(FILE *fp, int seq, int utf8);
|
||
|
+
|
||
|
+#endif /* _PSFFONTOP_H */
|
||
|
diff -ur kbd-1.12.orig/src/psfxtable.c kbd-1.12-0/src/psfxtable.c
|
||
|
--- kbd-1.12.orig/src/psfxtable.c 2004-01-16 20:45:31.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/psfxtable.c 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -225,6 +225,8 @@
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+int debug = 0;
|
||
|
+
|
||
|
int
|
||
|
main(int argc, char **argv) {
|
||
|
char *ifname, *ofname, *itname, *otname;
|
||
|
diff -ur kbd-1.12.orig/src/setfont.c kbd-1.12-0/src/setfont.c
|
||
|
--- kbd-1.12.orig/src/setfont.c 2004-01-16 20:45:31.000000000 +0100
|
||
|
+++ kbd-1.12-0/src/setfont.c 2004-02-26 21:55:25.000000000 +0100
|
||
|
@@ -48,6 +48,7 @@
|
||
|
|
||
|
int verbose = 0;
|
||
|
int force = 0;
|
||
|
+int debug = 0;
|
||
|
|
||
|
/* search for the font in these directories (with trailing /) */
|
||
|
char *fontdirpath[] = { "", DATADIR "/" FONTDIR "/", 0 };
|
||
|
@@ -331,15 +332,28 @@
|
||
|
up = xmalloc(maxct * sizeof(struct unipair));
|
||
|
for (i = 0; i < fontsize; i++) {
|
||
|
ul = uclistheads[i].next;
|
||
|
+ if (debug) printf ("char %03x:", i);
|
||
|
while(ul) {
|
||
|
us = ul->seq;
|
||
|
if (us && ! us->next) {
|
||
|
up[ct].unicode = us->uc;
|
||
|
up[ct].fontpos = i;
|
||
|
ct++;
|
||
|
+ if (debug) printf (" %04x", us->uc);
|
||
|
}
|
||
|
+ else
|
||
|
+ if (debug) {
|
||
|
+ printf (" seq: <");
|
||
|
+ while (us) {
|
||
|
+ printf (" %04x", us->uc);
|
||
|
+ us = us->next;
|
||
|
+ }
|
||
|
+ printf (" >");
|
||
|
+ }
|
||
|
ul = ul->next;
|
||
|
+ if (debug) printf (",");
|
||
|
}
|
||
|
+ if (debug) printf ("\n");
|
||
|
}
|
||
|
if (ct != maxct) {
|
||
|
char *u = _("%s: bug in do_loadtable\n");
|