Apply kbd-1.12.diff cumulative patch from SUSE distribution.
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)
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"
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
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
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
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
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
FOREIGN=
SHELL = /bin/sh
-prefix = $(DESTDIR)@prefix@
+prefix = $(DESTDIR)/usr
datadir = $(prefix)/share
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
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
return -1;
}
+ /* The other methods do not support width != 8 */
+ if (width) *width = 8;
/* Second attempt: GIO_FONTX */
cfd.charcount = *count;
cfd.charheight = 0;
*count = cfd.charcount;
if (height)
*height = cfd.charheight;
- if (width)
- *width = 8;
return 0;
}
if (errno != ENOSYS && errno != EINVAL) {
*count = 256;
if (height)
*height = 0; /* undefined, at most 32 */
- if (width)
- *width = 8;
return 0;
}
#include "version.h"
int verbose = 0;
int force = 0;
+int debug = 0;
static void
usage(void) {
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"));
}
/* 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 */
#include "version.h"
int verbose = 0;
+int debug = 0;
int
main(int argc, char *argv[]) {
extern void fpclose(FILE *fp);
extern int verbose;
+extern int debug;
+/* psf.h */
+
/*
* Format of a psf font file:
*
* 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
#define PSF2_MAGIC_OK(x) ((x)[0]==PSF2_MAGIC0 && (x)[1]==PSF2_MAGIC1 \
&& (x)[2]==PSF2_MAGIC2 && (x)[3]==PSF2_MAGIC3)
+
+#endif /* _PSF_H */
#include "psf.h"
#include "psffontop.h"
#include "utf8.h"
+#include "paths.h"
extern char *progname;
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
* just read the entire file.
*/
if (fontf) {
- inputbuflth = 16384; /* random */
+ inputbuflth = MAXFONTSIZE/4; /* random */
inputbuf = xmalloc(inputbuflth);
n = 0;
perror("appendunimap");
exit(1);
}
+ if (debug) {
+ printf ("(");
+ if (!utf8)
+ printf ("U+");
+ while (n < 6) printf ("%02x ", out[n++]);
+ printf (")");
+ }
}
void
}
-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;
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;
appendseparator(ofil, 0, utf8);
}
}
+ return utf8;
}
+/* 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 {
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);
extern void appendunicode(FILE *fp, unsigned int uc, int utf8);
extern void appendseparator(FILE *fp, int seq, int utf8);
+
+#endif /* _PSFFONTOP_H */
}
}
+int debug = 0;
+
int
main(int argc, char **argv) {
char *ifname, *ofname, *itname, *otname;
int verbose = 0;
int force = 0;
+int debug = 0;
/* search for the font in these directories (with trailing /) */
char *fontdirpath[] = { "", DATADIR "/" FONTDIR "/", 0 };
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");