A couple of speakup fixes

Shane Wegner shane at cm.nu
Sun Aug 19 05:27:14 EDT 2001


Hi,

I've been merging the Speakup code into my 2.2 kernel and
have come upon a couple issues which the developers may
wich to address.  These patches are for the 2.2.x branch of
speakup's CVS tree as of 2001-08-08.

The first patch causes speakup to use it's own keymap c
source rather than overwriting defkeymap.c.  The problem is
if the user turns off the speakup keymap and enables
defkeymap.map, the kernel will not generate a new
defkeymap.c because it is newer than defkeymap.map.  It
also would allow speakup to distribute speakupmap.c in the
speakup directory and thus eliminating the need for the
loadkeys tool when building a speakup kernel with its
keymap.

--- linux.orig/drivers/char/Makefile	Sun Aug 19 01:35:01 2001
+++ linux/drivers/char/Makefile	Sun Aug 19 02:08:39 2001
@@ -65,13 +65,21 @@
 OX_OBJS += keyboard.o
  ifneq ($(ARCH),m68k)
   ifneq ($(ARCH),s390)
+  ifeq ($(CONFIG_SPEAKUP_KEYMAP),y)
+   O_OBJS += pc_keyb.o speakup/speakupmap.o
+  else
    O_OBJS += pc_keyb.o defkeymap.o
  endif
  endif
+ endif
 endif
 else
 ifdef CONFIG_PCI
+  ifeq ($(CONFIG_SPEAKUP_KEYMAP),y)
+O_OBJS += speakup/speakupmap.o
+else
 O_OBJS += defkeymap.o
+endif
 OX_OBJS += keyboard.o
 endif
 endif
@@ -756,4 +764,7 @@
 
 defkeymap.c: $(KEYMAPFILE)
 	loadkeys --mktable $(KEYMAPFILE) > defkeymap.c
+
+speakup/speakupmap.c: speakup/speakupmap.map
+	loadkeys --mktable speakup/speakupmap.map > speakup/speakupmap.c
 

Finally, this one-liner fixes a compile error if
CONFIG_SPEAKUP is disabled.

--- linux.orig/drivers/char/keyboard.c	Sun Aug 19 01:35:28 2001
+++ linux/drivers/char/keyboard.c	Sun Aug 19 01:35:59 2001
@@ -145,7 +145,11 @@
 
 /* Key types processed even in raw modes */
 
+#ifdef CONFIG_SPEAKUP
 #define TYPES_ALLOWED_IN_RAW_MODE ((1 << KT_SPEC) | (1 << KT_SHIFT) | (1 << KT_SPKUP))
+#else
+#define TYPES_ALLOWED_IN_RAW_MODE ((1 << KT_SPEC) | (1 << KT_SHIFT))
+#endif
 
 typedef void (*void_fnp)(void);
 typedef void (void_fn)(void);


Regards,
Shane

-- 
Shane Wegner: shane at cm.nu
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D




More information about the Speakup mailing list