[PATCH keyboard] Remove calls to xf86IsPc98()

Peter Hutterer peter.hutterer at who-t.net
Sun Sep 25 16:56:17 PDT 2011


This call is being removed from the server and this isn't work keeping
ifdefs around for.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/at_scancode.c |    4 +---
 src/kbd.c         |   28 +++++++---------------------
 2 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/src/at_scancode.c b/src/at_scancode.c
index 245945c..7209c20 100644
--- a/src/at_scancode.c
+++ b/src/at_scancode.c
@@ -48,8 +48,7 @@ ATScancode(InputInfoPtr pInfo, int *scanCode)
                   pKbd->scanPrefix = *scanCode;  /* special prefixes */
                   return TRUE;
           }
-          if (!xf86IsPc98()) {
-            switch (*scanCode) {
+          switch (*scanCode) {
              case 0x59: *scanCode = KEY_0x59; break;
              case 0x5a: *scanCode = KEY_0x5A; break;
              case 0x5b: *scanCode = KEY_0x5B; break;
@@ -78,7 +77,6 @@ ATScancode(InputInfoPtr pInfo, int *scanCode)
              case 0x74: *scanCode = KEY_0x74; break;
              case 0x75: *scanCode = KEY_0x75; break;
              case 0x76: *scanCode = KEY_0x76; break;
-            }
           }
           break;
        case KEY_Prefix0:
diff --git a/src/kbd.c b/src/kbd.c
index 19bafb8..e04c340 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -88,14 +88,6 @@ static const char *kbdDefaults[] = {
     NULL
 };
 
-static const char *kbd98Defaults[] = {
-    "Protocol",		"standard",
-    "XkbRules",		"xfree98",
-    "XkbModel",		"pc98",
-    "XkbLayout",	"jp",
-    NULL
-};
-
 static char *xkb_rules;
 static char *xkb_model;
 static char *xkb_layout;
@@ -158,10 +150,7 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
     pInfo->fd = -1;
     pInfo->dev = NULL;
 
-    if (!xf86IsPc98())
-        defaults = kbdDefaults;
-    else
-        defaults = kbd98Defaults;
+    defaults = kbdDefaults;
     xf86CollectInputOptions(pInfo, defaults
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
             , NULL
@@ -399,6 +388,7 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
   KbdDevPtr    pKbd = (KbdDevPtr) pInfo->private;
   DeviceIntPtr device = pInfo->dev;
   KeyClassRec  *keyc = device->key;
+  int state;
 
 #ifdef DEBUG
   ErrorF("kbd driver rec scancode: 0x02%x %s\n", scanCode, down?"down":"up");
@@ -425,16 +415,12 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
    * physical keyboard key.
    */
 
-  if (!xf86IsPc98()) {
-    int state;
-
-    state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
+  state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
 
-    if (((state & AltMask) == AltMask) && (scanCode == KEY_SysReqest))
-      scanCode = KEY_Print;
-    else if (scanCode == KEY_Break)
-      scanCode = KEY_Pause;
-  }
+  if (((state & AltMask) == AltMask) && (scanCode == KEY_SysReqest))
+    scanCode = KEY_Print;
+  else if (scanCode == KEY_Break)
+    scanCode = KEY_Pause;
 
   xf86PostKeyboardEvent(device, scanCode + MIN_KEYCODE, down);
 }
-- 
1.7.6



More information about the xorg-devel mailing list