Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand Translate ascii keycode to help those wi...



details:   https://anonhg.NetBSD.org/src/rev/c570e978a654
branches:  trunk
changeset: 559267:c570e978a654
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sat Mar 13 22:41:37 2004 +0000

description:
Translate ascii keycode to help those with azerty keyboard type straight.

diffstat:

 sys/arch/i386/stand/boot/Makefile.boot |   3 ++-
 sys/arch/i386/stand/lib/boot_params.S  |   3 ++-
 sys/arch/i386/stand/lib/pcio.c         |  16 ++++++++++++----
 3 files changed, 16 insertions(+), 6 deletions(-)

diffs (73 lines):

diff -r f9608954633e -r c570e978a654 sys/arch/i386/stand/boot/Makefile.boot
--- a/sys/arch/i386/stand/boot/Makefile.boot    Sat Mar 13 22:40:51 2004 +0000
+++ b/sys/arch/i386/stand/boot/Makefile.boot    Sat Mar 13 22:41:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.boot,v 1.13 2003/11/08 00:02:02 dsl Exp $
+# $NetBSD: Makefile.boot,v 1.14 2004/03/13 22:41:37 dsl Exp $
 
 S=     ${.CURDIR}/../../../../../
 
@@ -58,6 +58,7 @@
 CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
 
 CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
+CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
 
 CPPFLAGS+= -DSUPPORT_USTARFS
 CPPFLAGS+= -DSUPPORT_DOSFS
diff -r f9608954633e -r c570e978a654 sys/arch/i386/stand/lib/boot_params.S
--- a/sys/arch/i386/stand/lib/boot_params.S     Sat Mar 13 22:40:51 2004 +0000
+++ b/sys/arch/i386/stand/lib/boot_params.S     Sat Mar 13 22:41:37 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot_params.S,v 1.1 2003/10/09 10:29:39 dsl Exp $      */
+/*     $NetBSD: boot_params.S,v 1.2 2004/03/13 22:41:37 dsl Exp $      */
 
 /* Default boot parameters */
 
@@ -7,3 +7,4 @@
        .long   0                       /* console device 0 => CONSDEV_PC */
        .long   9600                    /* serial baud rate */
        .space  16                      /* md5 boot password */
+       .space  16                      /* keyboard xlat map */
diff -r f9608954633e -r c570e978a654 sys/arch/i386/stand/lib/pcio.c
--- a/sys/arch/i386/stand/lib/pcio.c    Sat Mar 13 22:40:51 2004 +0000
+++ b/sys/arch/i386/stand/lib/pcio.c    Sat Mar 13 22:41:37 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcio.c,v 1.15 2003/10/08 04:25:45 lukem Exp $   */
+/*     $NetBSD: pcio.c,v 1.16 2004/03/13 22:41:38 dsl Exp $     */
 
 /*
  * Copyright (c) 1996, 1997
@@ -244,13 +244,21 @@
 int
 getchar()
 {
+       int c;
 #ifdef SUPPORT_SERIAL
-       int c;
        switch (iodev) {
            default: /* to make gcc -Wall happy... */
            case CONSDEV_PC:
 #endif
-               return (congetc());
+               c = congetc();
+#ifdef CONSOLE_KEYMAP
+               {
+                       char *cp = strchr(CONSOLE_KEYMAP, c);
+                       if (cp != 0 && cp[1] != 0)
+                               c = cp[1];
+               }
+#endif
+               return c;
 #ifdef SUPPORT_SERIAL
            case CONSDEV_COM0:
            case CONSDEV_COM1:
@@ -333,7 +341,7 @@
 
 out:
        if (tell)
-               printf("0\n");
+               printf("0 \n");
 
        return(c);
 }



Home | Main Index | Thread Index | Old Index