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

xserver-xorg-input-keyboard: Changes to 'upstream-unstable'



 .gitignore        |   75 ++++++++-
 COPYING           |   42 ++---
 Makefile.am       |   11 -
 configure.ac      |   93 ++++-------
 man/Makefile.am   |   67 +++-----
 man/kbd.man       |    6 
 src/Makefile.am   |   12 -
 src/at_scancode.c |    1 
 src/bsd_KbdMap.c  |  203 -------------------------
 src/bsd_kbd.c     |   59 ++-----
 src/bsd_kbd.h     |    2 
 src/hurd_kbd.c    |   12 -
 src/kbd.c         |  222 ++++++++--------------------
 src/lnx_KbdMap.c  |   13 -
 src/lnx_kbd.c     |   22 --
 src/lnx_kbd.h     |    2 
 src/sco_KbdMap.c  |  308 ---------------------------------------
 src/sco_kbd.c     |  425 ------------------------------------------------------
 src/sco_kbd.h     |   20 --
 src/sun_kbd.c     |   85 +++-------
 src/sun_kbd.h     |   43 ++---
 src/sun_kbdMap.c  |   26 ++-
 src/xf86Keymap.h  |  140 -----------------
 src/xf86OSKbd.h   |   26 ---
 24 files changed, 310 insertions(+), 1605 deletions(-)

New commits:
commit 6496bb21074faff2642e09389b5476225dc4fdb3
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Feb 21 09:59:14 2011 +1000

    keyboard 1.5.99.901
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index f6fdf26..522d2fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-keyboard],
-        [1.5.0],
+        [1.5.99.901],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-keyboard])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 15f0a4b71b4580c7dd9a0abd7b8fb92756b6733a
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Thu Feb 17 15:40:29 2011 +0500

    Removed unnecessary code, since ABI_XINPUT_VERSION >= 2
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/kbd.c b/src/kbd.c
index e0f0d33..d89d234 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -276,51 +276,7 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl)
 static void
 InitKBD(InputInfoPtr pInfo, Bool init)
 {
-  xEvent          kevent;
   KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 1
-  DeviceIntPtr    pKeyboard = pInfo->dev;
-  KeyClassRec     *keyc = pKeyboard->key;
-  KeySym          *map = keyc->curKeySyms.map;
-  unsigned int    i;
-#endif
-
-  kevent.u.keyButtonPointer.time = GetTimeInMillis();
-  kevent.u.keyButtonPointer.rootX = 0;
-  kevent.u.keyButtonPointer.rootY = 0;
-
-/* The server does this for us with i-h. */
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 1
-  /*
-   * Hmm... here is the biggest hack of every time !
-   * It may be possible that a switch-vt procedure has finished BEFORE
-   * you released all keys neccessary to do this. That peculiar behavior
-   * can fool the X-server pretty much, cause it assumes that some keys
-   * were not released. TWM may stuck alsmost completly....
-   * OK, what we are doing here is after returning from the vt-switch
-   * exeplicitely unrelease all keyboard keys before the input-devices
-   * are reenabled.
-   */
-  for (i = keyc->curKeySyms.minKeyCode, map = keyc->curKeySyms.map;
-       i < keyc->curKeySyms.maxKeyCode;
-       i++, map += keyc->curKeySyms.mapWidth)
-     if (KeyPressed(i))
-      {
-        switch (*map) {
-        /* Don't release the lock keys */
-        case XK_Caps_Lock:
-        case XK_Shift_Lock:
-        case XK_Num_Lock:
-        case XK_Scroll_Lock:
-        case XK_Kana_Lock:
-          break;
-        default:
-          kevent.u.u.detail = i;
-          kevent.u.u.type = KeyRelease;
-          (* pKeyboard->public.processInputProc)(&kevent, pKeyboard, 1);
-        }
-      }
-#endif
 
   pKbd->scanPrefix      = 0;
 

commit de7a5c120f646e293cc216007a5df865b41833b8
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Thu Feb 17 15:40:28 2011 +0500

    Require server 1.4 or later
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index f6ebb96..f6fdf26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
 # Obtain compiler/linker options from server and required extensions
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4] xproto inputproto)
 
 # Define a configure option for an alternate input module directory
 AC_ARG_WITH(xorg-module-dir,

commit a02757d7c3d8018f44c63553578763fcef41bcca
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Wed Feb 16 13:21:03 2011 +0500

    Cleanup set the value of CustomKeycodes
    
    Also, do not print values of variables CustomKeycodes twice.
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index 3b45e22..710470a 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -443,7 +443,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
     pKbd->RemapScanCode = NULL;
 
     pKbd->OpenKeyboard = OpenKeyboard;
-    pKbd->CustomKeycodes = FALSE;
 
     pKbd->private = calloc(sizeof(BsdKbdPrivRec), 1);
     if (pKbd->private == NULL) {
diff --git a/src/hurd_kbd.c b/src/hurd_kbd.c
index dde5fbb..8c0cd60 100644
--- a/src/hurd_kbd.c
+++ b/src/hurd_kbd.c
@@ -158,7 +158,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
     pKbd->KbdGetMapping = KbdGetMapping;
     pKbd->RemapScanCode = ATScancode;
     pKbd->OpenKeyboard  = OpenKeyboard;
-    pKbd->CustomKeycodes = FALSE;
     pKbd->private       = NULL;
     pInfo->read_input   = ReadInput;
     return TRUE;
diff --git a/src/kbd.c b/src/kbd.c
index 43a194e..e0f0d33 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -85,7 +85,6 @@ static const char *kbdDefaults[] = {
     "XkbRules",		"base",
     "XkbModel",		"pc105",
     "XkbLayout",	"us",
-    "CustomKeycodes",	"off",
     NULL
 };
 
@@ -94,7 +93,6 @@ static const char *kbd98Defaults[] = {
     "XkbRules",		"xfree98",
     "XkbModel",		"pc98",
     "XkbLayout",	"jp",
-    "CustomKeycodes",	"off",
     NULL
 };
 
@@ -143,7 +141,6 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 #endif
 {
     KbdDevPtr pKbd;
-    MessageType from = X_DEFAULT;
     char *s;
     const char **defaults;
     int rc = Success;
@@ -212,16 +209,8 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
     xkb_variant = xf86SetStrOption(pInfo->options, "XkbVariant", NULL);
     xkb_options = xf86SetStrOption(pInfo->options, "XkbOptions", NULL);
 
-  pKbd->CustomKeycodes = FALSE;
-  from = X_DEFAULT; 
-  if (xf86FindOption(pInfo->options, "CustomKeycodes")) {
-      pKbd->CustomKeycodes = xf86SetBoolOption(pInfo->options, "CustomKeycodes",
-                                               pKbd->CustomKeycodes);
-     from = X_CONFIG;
-  }
-
-  xf86Msg(from, "%s: CustomKeycodes %s\n",
-               pInfo->name, pKbd->CustomKeycodes ? "enabled" : "disabled");
+    pKbd->CustomKeycodes = xf86SetBoolOption(pInfo->options, "CustomKeycodes",
+                                             FALSE);
 
 out:
   return rc;
diff --git a/src/sun_kbd.c b/src/sun_kbd.c
index 05d1bd9..a240087 100644
--- a/src/sun_kbd.c
+++ b/src/sun_kbd.c
@@ -518,8 +518,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
 
     pKbd->OpenKeyboard = OpenKeyboard;
 
-    pKbd->CustomKeycodes = FALSE;
-
     pKbd->private = calloc(sizeof(sunKbdPrivRec), 1);
     if (pKbd->private == NULL) {
        xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n");

commit f45f3dbcf1f2a54d7d6a51d6e9884820cff4be12
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Fri Feb 11 15:33:00 2011 +0500

    Do not print values of Protocol twice
    
    Protocol printed when found in xf86SetStrOption().
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index 127b6ab..3b45e22 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -357,7 +357,6 @@ OpenKeyboard(InputInfoPtr pInfo)
            free(s);
            return FALSE;
     }
-    xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s);
     free(s);
 
     s = xf86SetStrOption(pInfo->options, "Device", NULL);
diff --git a/src/lnx_kbd.c b/src/lnx_kbd.c
index 5292f77..e69e1b6 100644
--- a/src/lnx_kbd.c
+++ b/src/lnx_kbd.c
@@ -183,7 +183,6 @@ OpenKeyboard(InputInfoPtr pInfo)
            return FALSE;
     }
 
-    xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s);
     free(s);
 
     s = xf86SetStrOption(pInfo->options, "Device", NULL);

commit 6fca7f2371c113796d4cf27cca5635f3c6fb30af
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Fri Feb 11 15:32:59 2011 +0500

    Remove unused XQUEUE
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/kbd.c b/src/kbd.c
index f4b51ff..43a194e 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -81,11 +81,7 @@ _X_EXPORT InputDriverRec KEYBOARD = {
 };
 
 static const char *kbdDefaults[] = {
-#ifdef XQUEUE 
-    "Protocol",		"Xqueue",
-#else
     "Protocol",		"standard",
-#endif
     "XkbRules",		"base",
     "XkbModel",		"pc105",
     "XkbLayout",	"us",
@@ -94,11 +90,7 @@ static const char *kbdDefaults[] = {
 };
 
 static const char *kbd98Defaults[] = {
-#ifdef XQUEUE
-    "Protocol",		"Xqueue",
-#else
     "Protocol",		"standard",
-#endif
     "XkbRules",		"xfree98",
     "XkbModel",		"pc98",
     "XkbLayout",	"jp",

commit 8a540fa439bd7ea30c49d43ff3339ab599a7ba14
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Fri Feb 11 15:32:57 2011 +0500

    lnx: Fix detect CustomKeycodes for __powerpc__
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/lnx_kbd.c b/src/lnx_kbd.c
index 63b51d9..5292f77 100644
--- a/src/lnx_kbd.c
+++ b/src/lnx_kbd.c
@@ -233,7 +233,7 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
     f = fopen("/proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes","r");
     if (f) {
         if (fgetc(f) == '0')
-            pKbd->CustomKeycodes = TRUE;
+            xf86ReplaceBoolOption(pInfo->options, "CustomKeycodes", TRUE);
         fclose(f);
     }
   }

commit 849f5092efd770cf169ce9950e9dbb0bccbf9017
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Sat Jan 8 17:09:10 2011 +0500

    Removing unused bell_pitch and bell_duration
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h
index 5e90134..cba049f 100644
--- a/src/xf86OSKbd.h
+++ b/src/xf86OSKbd.h
@@ -65,8 +65,6 @@ typedef struct {
     OpenKeyboardProc	OpenKeyboard;
     PostEventProc	PostEvent;
 
-    int			bell_pitch;
-    int			bell_duration;
     unsigned long	leds;
     unsigned long	xledsMask;
     unsigned long	keyLeds;

commit dd9ed7921ccffff9cacb6dc128b3f426f9312535
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Sat Jan 8 20:09:48 2011 +0500

    Removing unused PROT_XQUEUE and PROT_USB
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h
index dc8219a..5e90134 100644
--- a/src/xf86OSKbd.h
+++ b/src/xf86OSKbd.h
@@ -85,9 +85,7 @@ typedef struct {
 
 typedef enum {
     PROT_STD,
-    PROT_XQUEUE,
     PROT_WSCONS,
-    PROT_USB,
     PROT_UNKNOWN_KBD
 } KbdProtocolId;
 

commit 78652023a9f7758635e5507255826d79fbb2b028
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Sat Jan 8 17:09:38 2011 +0500

    bsd: Replace deprecated xfree/xcalloc with free & calloc
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index ebaeae5..127b6ab 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -354,11 +354,11 @@ OpenKeyboard(InputInfoPtr pInfo)
 #endif
         default:
            xf86Msg(X_ERROR,"\"%s\" is not a valid keyboard protocol name\n", s);
-           xfree(s);
+           free(s);
            return FALSE;
     }
     xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s);
-    xfree(s);
+    free(s);
 
     s = xf86SetStrOption(pInfo->options, "Device", NULL);
     if (s == NULL) {
@@ -375,12 +375,12 @@ OpenKeyboard(InputInfoPtr pInfo)
 	pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
        if (pInfo->fd == -1) {
            xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
-           xfree(s);
+           free(s);
            return FALSE;
        }
        pKbd->isConsole = FALSE;
        pKbd->consType = xf86Info.consType;
-       xfree(s);
+       free(s);
     }
 
 #ifdef WSCONS_SUPPORT
@@ -445,8 +445,8 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
 
     pKbd->OpenKeyboard = OpenKeyboard;
     pKbd->CustomKeycodes = FALSE;
-    
-    pKbd->private = xcalloc(sizeof(BsdKbdPrivRec), 1);
+
+    pKbd->private = calloc(sizeof(BsdKbdPrivRec), 1);
     if (pKbd->private == NULL) {
        xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n");
        return FALSE;

commit f7a81ab4225e14a50e26a49a0a17a2cf773a4ab1
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Sat Jan 8 17:08:41 2011 +0500

    Remove random History comment and OS_KBD_VERSION_CURRENT
    
    In xf86-input-mouse similar cleanup already done, can also make for keyboard?
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h
index 561bf89..dc8219a 100644
--- a/src/xf86OSKbd.h
+++ b/src/xf86OSKbd.h
@@ -97,21 +97,3 @@ typedef struct {
 } KbdProtocolRec;
 
 Bool xf86OSKbdPreInit(InputInfoPtr pInfo);
-
-/* Adjust this when the kbd interface changes. */
-
-/*
- * History:
- *
- *  1.0.0 - Initial version.
- */
-
-#define OS_KBD_VERSION_MAJOR 1
-#define OS_KBD_VERSION_MINOR 0
-#define OS_KBD_VERSION_PATCH 0
-
-#define OS_KBD_VERSION_CURRENT						\
-	BUILTIN_INTERFACE_VERSION_NUMERIC(OS_KBD_VERSION_MAJOR,		\
-					  OS_KBD_VERSION_MINOR,		\
-					  OS_KBD_VERSION_PATCH)
-

commit e2f6e5d976ff8bbe68dc41b51d983cc95c11db84
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Thu Jan 6 14:43:13 2011 +0500

    Do not print values of variables XkbRules etc. twice
    
    xf86SetStrOption prints in log value of the variables XkbRules etc.,
    there is no need to take this information twice.
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/kbd.c b/src/kbd.c
index 2dac655..f4b51ff 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -60,7 +60,6 @@ static void KbdBell(int percent, DeviceIntPtr dev, pointer ctrl, int unused);
 static void PostKbdEvent(InputInfoPtr pInfo, unsigned int key, Bool down);
 
 static void InitKBD(InputInfoPtr pInfo, Bool init);
-static void SetXkbOption(InputInfoPtr pInfo, char *name, char **option);
 static void UpdateLeds(InputInfoPtr pInfo);
 
 _X_EXPORT InputDriverRec KBD = {
@@ -113,22 +112,6 @@ static char *xkb_layout;
 static char *xkb_variant;
 static char *xkb_options;
 
-static void
-SetXkbOption(InputInfoPtr pInfo, char *name, char **option)
-{
-   char *s;
-
-   if ((s = xf86SetStrOption(pInfo->options, name, NULL))) {
-       if (!s[0]) {
-           free(s);
-           *option = NULL;
-       } else {
-           *option = s;
-           xf86Msg(X_CONFIG, "%s: %s: \"%s\"\n", pInfo->name, name, s);
-       }
-    }
-}
-
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
 static int
 NewKbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
@@ -231,11 +214,11 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
         free(s);
     }
 
-    SetXkbOption(pInfo, "XkbRules", &xkb_rules);
-    SetXkbOption(pInfo, "XkbModel", &xkb_model);
-    SetXkbOption(pInfo, "XkbLayout", &xkb_layout);
-    SetXkbOption(pInfo, "XkbVariant", &xkb_variant);
-    SetXkbOption(pInfo, "XkbOptions", &xkb_options);
+    xkb_rules = xf86SetStrOption(pInfo->options, "XkbRules", NULL);
+    xkb_model = xf86SetStrOption(pInfo->options, "XkbModel", NULL);
+    xkb_layout = xf86SetStrOption(pInfo->options, "XkbLayout", NULL);
+    xkb_variant = xf86SetStrOption(pInfo->options, "XkbVariant", NULL);
+    xkb_options = xf86SetStrOption(pInfo->options, "XkbOptions", NULL);
 
   pKbd->CustomKeycodes = FALSE;
   from = X_DEFAULT; 

commit 7d03efb3a3af77ca6831492a793d18b89cc64083
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Thu Jan 6 13:37:39 2011 +0500

    bsd: Fix print wscons type keyboard for Sun5
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index d0cedcd..ebaeae5 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -413,9 +413,9 @@ OpenKeyboard(InputInfoPtr pInfo)
                break;
 #endif
 #ifdef WSKBD_TYPE_SUN5
-     case WSKBD_TYPE_SUN5:
-	     xf86Msg(X_PROBED, "Keyboard type: Sun5\n");
-	     break;
+           case WSKBD_TYPE_SUN5:
+               printWsType("Sun5", pInfo->name);
+               break;
 #endif
            default:
                xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",

commit 40ed9bb3dc87702510d5e54c42a60a2cdd73c135
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Thu Jan 6 13:21:35 2011 +0500

    Fix default options for PC98
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/kbd.c b/src/kbd.c
index 629b534..2dac655 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -190,7 +190,7 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
         defaults = kbdDefaults;
     else
         defaults = kbd98Defaults;
-    xf86CollectInputOptions(pInfo, kbdDefaults
+    xf86CollectInputOptions(pInfo, defaults
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
             , NULL
 #endif

commit e929446a401e73bcc680c488ada2fc50eb225b23
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Thu Jan 6 12:59:19 2011 +0500

    Removing unused SetKbdRepeat
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index ebf16c2..d0cedcd 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -138,25 +138,6 @@ GetKbdLeds(InputInfoPtr pInfo)
     return(leds);
 }
 
-static void
-SetKbdRepeat(InputInfoPtr pInfo, char rad)
-{
-    KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
-    switch (pKbd->consType) {
-
-#ifdef PCCONS_SUPPORT
-	case PCCONS:
-		break;
-#endif
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-	case SYSCONS:
-	case PCVT:
-		ioctl(pInfo->fd, KDSETRAD, rad);
-		break;
-#endif
-    }
-}
-
 static int
 KbdOn(InputInfoPtr pInfo, int what)
 {
@@ -458,7 +439,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
     pKbd->Bell		= SoundBell;
     pKbd->SetLeds	= SetKbdLeds;
     pKbd->GetLeds	= GetKbdLeds;
-    pKbd->SetKbdRepeat	= SetKbdRepeat;
     pKbd->KbdGetMapping	= KbdGetMapping;
 
     pKbd->RemapScanCode = NULL;
diff --git a/src/hurd_kbd.c b/src/hurd_kbd.c
index 27746da..dde5fbb 100644
--- a/src/hurd_kbd.c
+++ b/src/hurd_kbd.c
@@ -95,12 +95,6 @@ GetKbdLeds(InputInfoPtr pInfo)
     return 0;
 }
 
-static void 
-SetKbdRepeat(InputInfoPtr pInfo, char rad)
-{
-    return;
-}
-
 static void
 KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
 {
@@ -161,7 +155,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
     pKbd->Bell          = SoundKbdBell;
     pKbd->SetLeds       = SetKbdLeds;
     pKbd->GetLeds       = GetKbdLeds;
-    pKbd->SetKbdRepeat  = SetKbdRepeat;
     pKbd->KbdGetMapping = KbdGetMapping;
     pKbd->RemapScanCode = ATScancode;
     pKbd->OpenKeyboard  = OpenKeyboard;
diff --git a/src/sun_kbd.c b/src/sun_kbd.c
index 4dcd01b..05d1bd9 100644
--- a/src/sun_kbd.c
+++ b/src/sun_kbd.c
@@ -409,13 +409,6 @@ GetKbdLeds(InputInfoPtr pInfo)
     return leds;
 }
 
-/* ARGSUSED0 */
-static void
-SetKbdRepeat(InputInfoPtr pInfo, char rad)
-{
-    /* Nothing to do */
-}
-
 static void
 CloseKeyboard(InputInfoPtr pInfo)
 {
@@ -519,7 +512,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
     pKbd->Bell          = SoundKbdBell;
     pKbd->SetLeds       = SetKbdLeds;
     pKbd->GetLeds       = GetKbdLeds;
-    pKbd->SetKbdRepeat  = SetKbdRepeat;
     pKbd->KbdGetMapping = KbdGetMapping;
 
     pKbd->RemapScanCode = NULL;
diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h
index 0e9fa4d..561bf89 100644
--- a/src/xf86OSKbd.h
+++ b/src/xf86OSKbd.h
@@ -40,7 +40,6 @@ typedef	void	(*BellProc)(InputInfoPtr pInfo,
                             int loudness, int pitch, int duration);
 typedef	void	(*SetLedsProc)(InputInfoPtr pInfo, int leds);
 typedef	int	(*GetLedsProc)(InputInfoPtr pInfo);
-typedef	void	(*SetKbdRepeatProc)(InputInfoPtr pInfo, char rad);
 typedef	void	(*KbdGetMappingProc)(InputInfoPtr pInfo,
                                      KeySymsPtr pKeySyms, CARD8* pModMap);
 typedef	int	(*RemapScanCodeProc)(InputInfoPtr pInfo, int *scanCode);
@@ -60,7 +59,6 @@ typedef struct {
     BellProc		Bell;
     SetLedsProc		SetLeds;
     GetLedsProc		GetLeds;
-    SetKbdRepeatProc	SetKbdRepeat;
     KbdGetMappingProc	KbdGetMapping;
     RemapScanCodeProc	RemapScanCode;
 

commit cc1a2ba8c9aa3a4bed25394c981b41c903502c84
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Dec 23 15:53:32 2010 -0800

    sun_kbd: Replace deprecated xfree/xcalloc with free & calloc
    
    Also greatly simplified option/pointer handling to avoid generating
    new warnings from passing const char * pointers to free()
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/sun_kbd.c b/src/sun_kbd.c
index 86b8f97..4dcd01b 100644
--- a/src/sun_kbd.c
+++ b/src/sun_kbd.c
@@ -489,35 +489,23 @@ ReadInput(InputInfoPtr pInfo)
 static Bool
 OpenKeyboard(InputInfoPtr pInfo)
 {
-    const char *kbdPath = NULL;
-    const char *defaultKbd = "/dev/kbd";
-
-    if (pInfo->options != NULL) {
-	kbdPath = xf86SetStrOption(pInfo->options, "Device", NULL);
-    }
-    if (kbdPath == NULL) {
-        kbdPath = defaultKbd;
-    }
+    char *kbdPath = xf86SetStrOption(pInfo->options, "Device", "/dev/kbd");
+    Bool ret;
 
     pInfo->fd = open(kbdPath, O_RDONLY | O_NONBLOCK);
     
     if (pInfo->fd == -1) {
-        xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, kbdPath);
+	xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, kbdPath);
+	ret = FALSE;
     } else {
 	xf86MsgVerb(X_INFO, 3, "%s: Opened device \"%s\"\n", pInfo->name,
 		    kbdPath);
-    }
-    
-    if ((kbdPath != NULL) && (kbdPath != defaultKbd)) {
-	xfree(kbdPath);
-    }
-
-    if (pInfo->fd == -1) {
-	return FALSE;
-    } else {
 	pInfo->read_input = ReadInput;
-	return TRUE;
+	ret = TRUE;
     }
+
+    free(kbdPath);
+    return ret;
 }
 
 _X_EXPORT Bool
@@ -540,7 +528,7 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
 
     pKbd->CustomKeycodes = FALSE;
 
-    pKbd->private = xcalloc(sizeof(sunKbdPrivRec), 1);
+    pKbd->private = calloc(sizeof(sunKbdPrivRec), 1);
     if (pKbd->private == NULL) {
        xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n");
        return FALSE;

commit bd099b5a87399d6ff1fd324172bfcc4bc07a362b
Author: Javier Acosta <javier.acosta@oracle.com>
Date:   Thu Dec 23 09:43:51 2010 -0800

    Make key codes for Sun Japanese keyboard match xkb-config mappings
    
    Solaris bug #7005752:
      http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=7005752
    
    Signed-off-by: Javier Acosta <javier.acosta@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/sun_kbdMap.c b/src/sun_kbdMap.c
index 174aed9..1e0a366 100644
--- a/src/sun_kbdMap.c
+++ b/src/sun_kbdMap.c
@@ -37,10 +37,6 @@
 
 /* Map the Solaris keycodes to the "XFree86" keycodes. */
 
-/* Additional Sun Japanese Keyboard Keys not defined in atKeynames.h */
-#define KEY_Kanji	0x82
-#define KEY_Execute	0x83
-
 /*
  * Additional Korean 106 Keyboard Keys not defined in atKeynames.h
  * These are exactly same USB usage id with Kana(0x90) and Eisu(0x91) keys
@@ -479,10 +475,10 @@ static unsigned char usbmap[256] = {
 	/* 133 */ KEY_NOTUSED,
 	/* 134 */ KEY_NOTUSED,
 	/* 135 */ KEY_BSlash2,	/* Sun Japanese Kbd: Backslash / Underscore */
-	/* 136 */ KEY_XFER,	/* Sun Japanese Kbd: Henkan Mode */
+	/* 136 */ KEY_HKTG,	/* Sun Japanese type7 Kbd: Hirugana/Katakana */
 	/* 137 */ KEY_Yen,	/* Sun Japanese Kbd: Yen / Brokenbar */
-	/* 138 */ KEY_Kanji,	/* Sun Japanese Kbd: Kanji */
-	/* 139 */ KEY_Execute,	/* Sun Japanese Kbd: Execute */
+	/* 138 */ KEY_XFER,	/* Sun Japanese Kbd: Kanji Transfer */
+	/* 139 */ KEY_NFER,	/* Sun Japanese Kbd: No Kanji Transfer */
 	/* 140 */ KEY_NOTUSED,
 	/* 141 */ KEY_NOTUSED,
 	/* 142 */ KEY_NOTUSED,
@@ -604,8 +600,6 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
      * Add Sun keyboard keysyms to default map
      */
 #define map_for_key(k,c) 	map[(k * GLYPHS_PER_KEY) + c]   
-    map_for_key(KEY_Kanji,	0) = XK_Kanji;
-    map_for_key(KEY_Execute,	0) = XK_Execute;
     map_for_key(KEY_Power,	0) = SunXK_PowerSwitch;
     map_for_key(KEY_Power,	1) = SunXK_PowerSwitchShift;
     map_for_key(KEY_Mute,	0) = SunXK_AudioMute;

commit cb8b2fca90810a1a2d6e5f930e4eac0f929947c6
Author: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Date:   Tue Nov 30 20:12:24 2010 +0500

    Removing unused OpenBSD PCCONS code
    
    In OpenBSD removed support PCCONS in 2002 year
    http://marc.info/?l=openbsd-cvs&m=102435816424294&w=2
    
    Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/bsd_KbdMap.c b/src/bsd_KbdMap.c
index 6cfdbe4..1b5cc3e 100644
--- a/src/bsd_KbdMap.c
+++ b/src/bsd_KbdMap.c
@@ -189,98 +189,6 @@ static KeySym eascii_to_x[512] = {
 	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol
 };
 
-#ifdef __OpenBSD__
-/* don't mark AltR and  CtrlR for remapping, since they 
- * cannot be remapped by pccons */
-static unsigned char pccons_remap[128] = {
-     0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,   /* 0x00 - 0x07 */
-  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,   /* 0x08 - 0x0f */
-  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,   /* 0x10 - 0x17 */
-  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,   /* 0x18 - 0x1f */
-  0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,   /* 0x20 - 0x27 */
-  0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,   /* 0x28 - 0x2f */
-  0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,    0,   /* 0x30 - 0x37 */
-  0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,   /* 0x38 - 0x3f */
-  0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46,    0,   /* 0x40 - 0x47 */
-     0,    0,    0,    0,    0,    0,    0,    0,   /* 0x48 - 0x4f */
-     0,    0,    0,    0,    0,    0, 0x56, 0x57,   /* 0x50 - 0x57 */
-  0x58,    0,    0,    0,    0,    0,    0,    0,   /* 0x58 - 0x5f */
-     0,    0,    0,    0,    0,    0,    0,    0,   /* 0x60 - 0x67 */
-     0,    0,    0,    0,    0,    0,    0,    0,   /* 0x68 - 0x6f */
-     0,    0,    0,    0,    0,    0,    0,    0,   /* 0x70 - 0x77 */
-     0,    0,    0,    0,    0,    0,    0,    0,   /* 0x78 - 0x7f */
-};
-
-/* This table assumes an iso8859_1 encoding for the characters 
- * > 80, as returned by pccons */
-static KeySym latin1_to_x[256] = {
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	XK_BackSpace,	XK_Tab,		XK_Linefeed,	NoSymbol,
-	NoSymbol,	XK_Return,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	XK_Escape,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	XK_space,	XK_exclam,	XK_quotedbl,	XK_numbersign,
-	XK_dollar,	XK_percent,	XK_ampersand,	XK_apostrophe,
-	XK_parenleft,	XK_parenright,	XK_asterisk,	XK_plus,
-	XK_comma,	XK_minus,	XK_period,	XK_slash,
-	XK_0,		XK_1,		XK_2,		XK_3,
-	XK_4,		XK_5,		XK_6,		XK_7,
-	XK_8,		XK_9,		XK_colon,	XK_semicolon,
-	XK_less,	XK_equal,	XK_greater,	XK_question,
-	XK_at,		XK_A,		XK_B,		XK_C,
-	XK_D,		XK_E,		XK_F,		XK_G,
-	XK_H,		XK_I,		XK_J,		XK_K,
-	XK_L,		XK_M,		XK_N,		XK_O,
-	XK_P,		XK_Q,		XK_R,		XK_S,
-	XK_T,		XK_U,		XK_V,		XK_W,
-	XK_X,		XK_Y,		XK_Z,		XK_bracketleft,
-	XK_backslash,	XK_bracketright,XK_asciicircum,	XK_underscore,
-	XK_grave,	XK_a,		XK_b,		XK_c,
-	XK_d,		XK_e,		XK_f,		XK_g,
-	XK_h,		XK_i,		XK_j,		XK_k,
-	XK_l,		XK_m,		XK_n,		XK_o,
-	XK_p,		XK_q,		XK_r,		XK_s,
-	XK_t,		XK_u,		XK_v,		XK_w,
-	XK_x,		XK_y,		XK_z,		XK_braceleft,
-	XK_bar,		XK_braceright,	XK_asciitilde,	XK_Delete,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	XK_nobreakspace,XK_exclamdown,	XK_cent,	XK_sterling,
-	XK_currency,	XK_yen,		XK_brokenbar,	XK_section,
-	XK_diaeresis,	XK_copyright,	XK_ordfeminine,	XK_guillemotleft,
-	XK_notsign,	XK_hyphen,	XK_registered,	XK_macron,
-	XK_degree,	XK_plusminus,	XK_twosuperior,	XK_threesuperior,
-	XK_acute,	XK_mu,		XK_paragraph,	XK_periodcentered,
-	XK_cedilla,	XK_onesuperior,	XK_masculine,	XK_guillemotright,
-	XK_onequarter,	XK_onehalf,	XK_threequarters,XK_questiondown,
-	XK_Agrave,	XK_Aacute,	XK_Acircumflex,	XK_Atilde,
-	XK_Adiaeresis,	XK_Aring,	XK_AE,		XK_Ccedilla,
-	XK_Egrave,	XK_Eacute,	XK_Ecircumflex,	XK_Ediaeresis,
-	XK_Igrave,	XK_Iacute,	XK_Icircumflex,	XK_Idiaeresis,
-	XK_ETH,		XK_Ntilde,	XK_Ograve,	XK_Oacute,
-	XK_Ocircumflex,	XK_Otilde,	XK_Odiaeresis,	XK_multiply,
-	XK_Ooblique,	XK_Ugrave,	XK_Uacute,	XK_Ucircumflex,
-	XK_Udiaeresis,	XK_Yacute,	XK_THORN,	XK_ssharp,
-	XK_agrave,	XK_aacute,	XK_acircumflex,	XK_atilde,
-	XK_adiaeresis,	XK_aring,	XK_ae,	        XK_ccedilla,
-	XK_egrave,	XK_eacute,	XK_ecircumflex,	XK_ediaeresis,
-	XK_igrave,	XK_iacute,	XK_icircumflex, XK_idiaeresis,
-	XK_eth,		XK_ntilde,	XK_ograve, 	XK_oacute,
-	XK_ocircumflex,	XK_otilde,	XK_odiaeresis,	XK_division,
-	XK_oslash,	XK_ugrave,	XK_uacute,	XK_ucircumflex,
-	XK_udiaeresis,	XK_yacute,	XK_thorn, 	XK_ydiaeresis
-      };
-#endif
-
 #ifdef SYSCONS_SUPPORT
 static
 unsigned char sysconsCODEMap[] = {
@@ -838,112 +746,6 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
 #ifndef __bsdi__
   switch (pKbd->consType) {
 
-#ifdef PCCONS_SUPPORT
-  case PCCONS:
-#if defined(__OpenBSD__)
-    /*
-     * on OpenBSD, the pccons keymap is programmable, too
-     */
-    {
-      pccons_keymap_t keymap[KB_NUM_KEYS];
-      if (ioctl(pInfo->fd, CONSOLE_GET_KEYMAP, &keymap) != -1) {
-	for (i = 0; i < KB_NUM_KEYS; i++) 
-	  if (pccons_remap[i]) {
-	    k = map + (pccons_remap[i] << 2);
-	    switch (keymap[i].type) {
-	    case KB_ASCII:
-	      /* For ASCII keys, there is only one char in the keymap */
-	      k[0] = latin1_to_x[(unsigned char)keymap[i].unshift[0]];
-	      k[1] = latin1_to_x[(unsigned char)keymap[i].shift[0]];
-	      k[2] = latin1_to_x[(unsigned char)keymap[i].altgr[0]];
-	      k[3] = latin1_to_x[(unsigned char)keymap[i].shift_altgr[0]];
-	      break;
-	    case KB_SCROLL:
-	      k[0] = XK_Scroll_Lock;
-	      goto special;
-	    case KB_NUM:
-	      k[0] = XK_Num_Lock;
-	      goto special;
-	    case KB_CAPS:
-	      k[0] = XK_Caps_Lock;
-	      goto special;
-	    case KB_SHIFT:
-	      switch (keymap[i].unshift[0]) {
-	      case 1:
-		/* left shift */
-		k[0] = XK_Shift_L;
-		break;
-	      case 2:
-		/* right shift */
-		k[0] = XK_Shift_R;
-		break;
-	      default:
-		k[0] = NoSymbol;
-	      }
-	      goto special;
-	    case KB_CTL:
-	      k[0] = XK_Control_L;
-	      goto special;
-	    case KB_ALT:
-	      k[0] = XK_Alt_L;
-	      goto special;
-	    case KB_FUNC:
-	      switch (keymap[i].unshift[2]) {
-	      case 'M':
-		k[0] = XK_F1;
-		break;
-	      case 'N':
-		k[0] = XK_F2;


Reply to: