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 1) + appendseparator(fp, 1, utf8); +#endif + if (debug) printf ("\nchar %03x: ", i); + for(j=0; jprev; - 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");