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

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



 .gitignore        |   71 ++++++-
 COPYING           |   42 +---
 Makefile.am       |   11 -
 README            |   20 ++
 configure.ac      |   98 +++-------
 man/.gitignore    |    2 
 man/Makefile.am   |   67 ++----
 man/kbd.man       |   25 --
 src/.gitignore    |    6 
 src/Makefile.am   |   12 -
 src/at_scancode.c |    1 
 src/bsd_KbdMap.c  |    3 
 src/bsd_kbd.c     |   57 -----
 src/bsd_kbd.h     |    2 
 src/hurd_kbd.c    |    5 
 src/kbd.c         |  522 +++++++-----------------------------------------------
 src/lnx_KbdMap.c  |    9 
 src/lnx_kbd.c     |  252 --------------------------
 src/lnx_kbd.h     |    2 
 src/sco_KbdMap.c  |  308 -------------------------------
 src/sco_kbd.c     |  485 --------------------------------------------------
 src/sco_kbd.h     |   20 --
 src/sun_kbd.c     |  210 ++++++++++++++++-----
 src/sun_kbd.h     |   44 ++--
 src/sun_kbdMap.c  |   26 ++
 src/xf86Keymap.h  |    4 
 src/xf86OSKbd.h   |   11 -
 27 files changed, 471 insertions(+), 1844 deletions(-)

New commits:
commit 90f69d7b859caff9f51b6fe20580582a91ed6d0d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Oct 30 09:15:11 2010 -0700

    xf86-input-keyboard 1.5.0
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

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

commit 53f3eb734fe4dfccbce602b3dd19ee06e0850c44
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Oct 30 09:13:47 2010 -0700

    Sun's copyrights now belong to Oracle
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/COPYING b/COPYING
index d5674b1..7ecc2cb 100644
--- a/COPYING
+++ b/COPYING
@@ -202,7 +202,7 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-Copyright 2004-2009 Sun Microsystems, Inc.  All rights reserved.
+Copyright (c) 2004-2009, Oracle and/or its affiliates. All rights reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
diff --git a/man/Makefile.am b/man/Makefile.am
index c027fd2..2d624ed 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -19,7 +19,7 @@
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
-# 
+#
 
 drivermandir = $(DRIVER_MAN_DIR)
 
diff --git a/src/sun_kbd.c b/src/sun_kbd.c
index 00a4c9d..3f98c4e 100644
--- a/src/sun_kbd.c
+++ b/src/sun_kbd.c
@@ -23,7 +23,7 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 /*
- * Copyright © 2004-2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright (c) 2004-2009, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
diff --git a/src/sun_kbd.h b/src/sun_kbd.h
index a32ea11..0192545 100644
--- a/src/sun_kbd.h
+++ b/src/sun_kbd.h
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),

commit 251c5d6dcc09c46be67274853e79026cc3d10fd4
Author: Trevor Woerner <twoerner@gmail.com>
Date:   Mon Oct 18 11:38:48 2010 -0400

    Code cleanup, structure initialization.
    
    The InputDriverRec data structure in xserver/hw/xfree86/common/xf86Xinput.h
    no longer contains an integer refCount member.
    
    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/kbd.c b/src/kbd.c
index 16c9f02..e0b7003 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -65,8 +65,7 @@ _X_EXPORT InputDriverRec KBD = {
 	NULL,
 	KbdPreInit,
 	NULL,
-	NULL,
-	0
+	NULL
 };
 
 _X_EXPORT InputDriverRec KEYBOARD = {
@@ -75,8 +74,7 @@ _X_EXPORT InputDriverRec KEYBOARD = {
 	NULL,
 	KbdPreInit,
 	NULL,
-	NULL,
-	0
+	NULL
 };
 
 static const char *kbdDefaults[] = {

commit 25d1e340eec73b010c4a5b1160aa0fa762a41cd0
Author: Trevor Woerner <twoerner@gmail.com>
Date:   Mon Oct 18 11:38:28 2010 -0400

    Deprecated code cleanup.
    
    Replace calls to deprecated functions with calls to standard dynamic
    memory functions in driver code.
    
    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/kbd.c b/src/kbd.c
index 3aab07d..16c9f02 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -118,7 +118,7 @@ SetXkbOption(InputInfoPtr pInfo, char *name, char **option)
 
    if ((s = xf86SetStrOption(pInfo->options, name, NULL))) {
        if (!s[0]) {
-           xfree(s);
+           free(s);
            *option = NULL;
        } else {
            *option = s;
@@ -165,7 +165,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
         xf86CollectInputOptions(pInfo, kbd98Defaults, NULL);
     xf86ProcessCommonOptions(pInfo, pInfo->options); 
 
-    if (!(pKbd = xcalloc(sizeof(KbdDevRec), 1)))
+    if (!(pKbd = calloc(sizeof(KbdDevRec), 1)))
         return pInfo;
 
     pInfo->private = pKbd;
@@ -191,7 +191,7 @@ KbdPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     	    }
     	    l = strtok(NULL, " \t\n");
         }
-        xfree(s);
+        free(s);
     }
 
     SetXkbOption(pInfo, "XkbRules", &xkb_rules);
diff --git a/src/lnx_KbdMap.c b/src/lnx_KbdMap.c
index 6dde256..21bed2e 100644
--- a/src/lnx_KbdMap.c
+++ b/src/lnx_KbdMap.c
@@ -522,12 +522,12 @@ readKernelMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
   /*
    * Find the Mapping for the special server functions
    */
-  pKbd->specialMap = (TransMapPtr) xcalloc(NUM_CUSTOMKEYS, 1);
+  pKbd->specialMap = (TransMapPtr) calloc(NUM_CUSTOMKEYS, 1);
   if (pKbd->specialMap != NULL) {
       pKbd->specialMap->end = NUM_CUSTOMKEYS;
-      pKbd->specialMap->map = (unsigned char*) xcalloc(NUM_CUSTOMKEYS, 1);
+      pKbd->specialMap->map = (unsigned char*) calloc(NUM_CUSTOMKEYS, 1);
       if (pKbd->specialMap == NULL) {
-      	  xfree(pKbd->specialMap);
+	  free(pKbd->specialMap);
       	  pKbd->specialMap = NULL;
       }
   }
diff --git a/src/lnx_kbd.c b/src/lnx_kbd.c
index 4dcf492..9b3aae3 100644
--- a/src/lnx_kbd.c
+++ b/src/lnx_kbd.c
@@ -181,12 +181,12 @@ OpenKeyboard(InputInfoPtr pInfo)
            break;
         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) {
@@ -196,11 +196,11 @@ 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;
-       xfree(s);
+       free(s);
     }
 
     if (pKbd->isConsole)
@@ -227,7 +227,7 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
     pKbd->OpenKeyboard = OpenKeyboard;
     pKbd->vtSwitchSupported = FALSE;
 
-    pKbd->private = xcalloc(sizeof(LnxKbdPrivRec), 1);
+    pKbd->private = calloc(sizeof(LnxKbdPrivRec), 1);
     if (pKbd->private == NULL) {
        xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n");
        return FALSE;

commit ed3458c0b534a15777b7305cd594e1f9181c80b8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jun 18 14:37:44 2010 +1000

    Don't set AutoRepeat if we're not actually using it.
    
    Autorepeat was removed from the driver with version 1.4.0. So there is not
    much point in setting this option anymore.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/kbd.c b/src/kbd.c
index a9d4890..3aab07d 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -85,7 +85,6 @@ static const char *kbdDefaults[] = {
 #else
     "Protocol",		"standard",
 #endif
-    "AutoRepeat",	"500 30",
     "XkbRules",		"base",
     "XkbModel",		"pc105",
     "XkbLayout",	"us",
@@ -99,7 +98,6 @@ static const char *kbd98Defaults[] = {
 #else
     "Protocol",		"standard",
 #endif
-    "AutoRepeat",	"500 30",
     "XkbRules",		"xfree98",
     "XkbModel",		"pc98",
     "XkbLayout",	"jp",

commit 3a8bae0fd2275a6dc62a88072b2a3a651840326c
Author: Jesse Adkins <jesserayadkins@gmail.com>
Date:   Tue Sep 28 13:29:50 2010 -0700

    Purge cvs tags.
    
    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/man/kbd.man b/man/kbd.man
index 0fcb229..4fb2336 100644
--- a/man/kbd.man
+++ b/man/kbd.man
@@ -1,5 +1,3 @@
-.\" $XdotOrg: $
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.man,v 1.2 2001/01/27 18:20:57 dawes Exp $ 
 .\" shorthand for double quote that works everywhere.
 .ds q \N'34'
 .TH KBD __drivermansuffix__ __vendorversion__
diff --git a/src/bsd_KbdMap.c b/src/bsd_KbdMap.c
index ef43ffa..2697f6a 100644
--- a/src/bsd_KbdMap.c
+++ b/src/bsd_KbdMap.c
@@ -1,5 +1,3 @@
-/* $XFree86$ */
-
 /*
  * Slightly modified xf86KbdBSD.c which is
  *
diff --git a/src/bsd_kbd.h b/src/bsd_kbd.h
index c042d88..202d55c 100644
--- a/src/bsd_kbd.h
+++ b/src/bsd_kbd.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.h,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
-
 extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
 				CARD8 *pModMap);
 
diff --git a/src/hurd_kbd.c b/src/hurd_kbd.c
index d4b8fe4..6063b4b 100644
--- a/src/hurd_kbd.c
+++ b/src/hurd_kbd.c
@@ -20,7 +20,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  *
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c,v 1.8 2002/10/11 01:40:35 dawes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
diff --git a/src/lnx_KbdMap.c b/src/lnx_KbdMap.c
index 72d3ab2..6dde256 100644
--- a/src/lnx_KbdMap.c
+++ b/src/lnx_KbdMap.c
@@ -1,5 +1,3 @@
-/* $XFree86$ */
-
 /*
  * Slightly modified xf86KbdLnx.c which is
  *
diff --git a/src/lnx_kbd.h b/src/lnx_kbd.h
index ac783bf..202d55c 100644
--- a/src/lnx_kbd.h
+++ b/src/lnx_kbd.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.h,v 1.1 2002/10/11 01:40:35 dawes Exp $ */
-
 extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
 				CARD8 *pModMap);
 
diff --git a/src/xf86Keymap.h b/src/xf86Keymap.h
index 5f6a792..f45e177 100644
--- a/src/xf86Keymap.h
+++ b/src/xf86Keymap.h
@@ -31,7 +31,6 @@
  * For Scancodes see notes in atKeynames.h  !!!!
  *
  */
-/* $XConsortium: xf86Keymap.h /main/14 1996/02/21 17:38:47 kaleb $ */
 
 #include "xorg-server.h"
 

commit 66b222493b3af6b7fc200d8a296317e9f3e1820a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 14 01:11:53 2010 -0700

    Revert "Close device fd when called with DEVICE_CLOSE"
    
    This reverts commit f8e219828db920c4cd7a2645a6194de029dc9bb5.
    (Sorry, failed to finish rebase operation to remove before pushing.
     As noted on xorg-devel, this patch was originally made for 1.3.2
     and needs to be reworked to reflect later upstream changes.)

diff --git a/src/kbd.c b/src/kbd.c
index 9b78eba..a9d4890 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -430,14 +430,6 @@ KbdProc(DeviceIntPtr device, int what)
       RemoveEnabledDevice(pInfo->fd);
     pKbd->KbdOff(pInfo, what);
     device->public.on = FALSE;
-
-    if (what == DEVICE_CLOSE) {
-	xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
-	if (pInfo->fd != -1) {
-	    close(pInfo->fd);
-	    pInfo->fd = -1;
-	}
-    }
     break;
   }
   return (Success);

commit 2aaef2754215d1a9f1073ad32f2ba498ce12188a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Aug 13 11:25:34 2010 +1000

    Remove unused keyboardOptions.
    
    These have been unused since May 2009 when the struct that used them was
    removed from the driver. See fe8d1f70fc7edce4f030766159aebae8f8a89ffc.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/kbd.c b/src/kbd.c
index 991fe01..9b78eba 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -79,40 +79,6 @@ _X_EXPORT InputDriverRec KEYBOARD = {
 	0
 };
 
-typedef enum {
-    OPTION_ALWAYS_CORE,
-    OPTION_SEND_CORE_EVENTS,
-    OPTION_CORE_KEYBOARD,
-    OPTION_DEVICE,
-    OPTION_PROTOCOL,
-    OPTION_AUTOREPEAT,
-    OPTION_XLEDS,
-    OPTION_XKB_RULES,
-    OPTION_XKB_MODEL,
-    OPTION_XKB_LAYOUT,
-    OPTION_XKB_VARIANT,
-    OPTION_XKB_OPTIONS,
-    OPTION_CUSTOM_KEYCODES
-} KeyboardOpts;
-
-/* These aren't actually used ... */
-static const OptionInfoRec KeyboardOptions[] = {
-    { OPTION_ALWAYS_CORE,	"AlwaysCore",	  OPTV_BOOLEAN,	{0}, FALSE },
-    { OPTION_SEND_CORE_EVENTS,	"SendCoreEvents", OPTV_BOOLEAN,	{0}, FALSE },
-    { OPTION_CORE_KEYBOARD,	"CoreKeyboard",	  OPTV_BOOLEAN,	{0}, FALSE },
-    { OPTION_DEVICE,		"Device",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_PROTOCOL,		"Protocol",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_AUTOREPEAT,	"AutoRepeat",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_XLEDS,		"XLeds",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_XKB_RULES,		"XkbRules",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_XKB_MODEL,		"XkbModel",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_XKB_LAYOUT,	"XkbLayout",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_XKB_VARIANT,	"XkbVariant",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_XKB_OPTIONS,	"XkbOptions",	  OPTV_STRING,	{0}, FALSE },
-    { OPTION_CUSTOM_KEYCODES,   "CustomKeycodes", OPTV_BOOLEAN,	{0}, FALSE },
-    { -1,			NULL,		  OPTV_NONE,	{0}, FALSE }
-};
-
 static const char *kbdDefaults[] = {
 #ifdef XQUEUE 
     "Protocol",		"Xqueue",

commit 425c1280439fe37497a33c47b5a8432e59cbfb76
Author: Osamu Sayama <osamu.sayama@oracle.com>
Date:   Wed Aug 11 19:00:23 2010 -0700

    sun_kbd: Add mappings for Hangul and Hanja keys on Korean keyboard
    
    Fixes Sun bug 6897086:
      Hangul and Hanja keys on Korean PC 105 keyboard are not recognized
      http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6897086
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/sun_kbdMap.c b/src/sun_kbdMap.c
index d739e1c..174aed9 100644
--- a/src/sun_kbdMap.c
+++ b/src/sun_kbdMap.c
@@ -41,6 +41,17 @@
 #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
+ * in Mac Japanese keyboard. From /usr/X11/lib/X11/xkb/keycodes/xfree86, these
+ * are 209 and 210. So these should be 0xc9(209-8=201) and 0xca(210-8=202).
+ *   <EISU> =   210;          // Alphanumeric mode on macintosh
+ *   <KANA> =   209;          // Kana mode on macintosh
+ */
+#define KEY_Hangul            0xC9    /* Also Kana in Mac Japanaese kbd */
+#define KEY_Hangul_Hanja      0xCA    /* Also Eisu in Mac Japanaese kbd */
+
 /* Override atKeynames.h values with unique keycodes, so we can distinguish
    KEY_F15 from KEY_HKTG & KEY_KP_DEC from KEY_BSlash2 */
 #undef KEY_HKTG
@@ -476,8 +487,8 @@ static unsigned char usbmap[256] = {
 	/* 141 */ KEY_NOTUSED,
 	/* 142 */ KEY_NOTUSED,
 	/* 143 */ KEY_NOTUSED,
-	/* 144 */ KEY_NOTUSED,
-	/* 145 */ KEY_NOTUSED,
+	/* 144 */ KEY_Hangul,		/* Korean 106 Kbd: Hangul */
+	/* 145 */ KEY_Hangul_Hanja,	/* Korean 106 Kbd: Hanja */
 	/* 146 */ KEY_NOTUSED,
 	/* 147 */ KEY_NOTUSED,
 	/* 148 */ KEY_NOTUSED,

commit f8e219828db920c4cd7a2645a6194de029dc9bb5
Author: Aaron Zang <aaron.zang@sun.com>
Date:   Wed Aug 11 18:55:59 2010 -0700

    Close device fd when called with DEVICE_CLOSE
    
    Fixes Solaris bug 6886424:
     VT - keyboard and mouse do not work when switching to vt7
     http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6886424
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/kbd.c b/src/kbd.c
index 96409cf..991fe01 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -464,6 +464,14 @@ KbdProc(DeviceIntPtr device, int what)
       RemoveEnabledDevice(pInfo->fd);
     pKbd->KbdOff(pInfo, what);
     device->public.on = FALSE;
+
+    if (what == DEVICE_CLOSE) {
+	xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
+	if (pInfo->fd != -1) {
+	    close(pInfo->fd);
+	    pInfo->fd = -1;
+	}
+    }
     break;
   }
   return (Success);

commit bfb1b7a319eab8e13542cfc00b8407121eabb4d5
Author: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date:   Thu Jul 1 07:12:02 2010 -0300

    Purge macro NEED_EVENTS
    
    Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
    Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index aa0d473..3653042 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -8,8 +8,6 @@
  * Copyright 1993 by David Dawes <dawes@xfree86.org>
  */
 
-#define NEED_EVENTS
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/hurd_kbd.c b/src/hurd_kbd.c
index fc084a0..d4b8fe4 100644
--- a/src/hurd_kbd.c
+++ b/src/hurd_kbd.c
@@ -22,7 +22,6 @@
  */
 /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c,v 1.8 2002/10/11 01:40:35 dawes Exp $ */
 
-#define NEED_EVENTS
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/kbd.c b/src/kbd.c
index 5060c53..96409cf 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -20,7 +20,6 @@
 #include <unistd.h>
 #include <xorg-server.h>
 
-#define NEED_EVENTS
 #include <X11/X.h>
 #include <X11/Xproto.h>
 
diff --git a/src/lnx_kbd.c b/src/lnx_kbd.c
index 670e990..4dcf492 100644
--- a/src/lnx_kbd.c
+++ b/src/lnx_kbd.c
@@ -12,8 +12,6 @@
  * This program comes with ABSOLUTELY NO WARRANTY.
  */
 
-#define NEED_EVENTS
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif

commit 1c05b48f976d89519a327c791a9a2bd7149ad581
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Wed Jun 16 16:00:01 2010 -0400

    config: restore inputdir automake variable
    
    All input drivers use this variable to set the installation
    path of the input module. For this driver, it was changed
    in commit 708ecbf8557d9e676e3bb07c1f83170f6d9f7cd7.
    One way or another is fine, but breaking a pattern is error prone.
    
    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 9cec886..8aea810 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,8 @@ AC_ARG_WITH(xorg-module-dir,
                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
             [moduledir="$withval"],
             [moduledir="$libdir/xorg/modules"])
-AC_SUBST(moduledir)
+inputdir=${moduledir}/input
+AC_SUBST(inputdir)
 
 # The keyboard driver code is O/S specific
 case $host_os in
diff --git a/src/Makefile.am b/src/Makefile.am
index 7713a07..4062f95 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,7 @@ AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
 kbd_drv_la_LTLIBRARIES = kbd_drv.la
 kbd_drv_la_LDFLAGS = -avoid-version -module
 kbd_drv_la_SOURCES = kbd.c xf86OSKbd.h xf86Keymap.h atKeynames.h
-kbd_drv_ladir = @moduledir@/input
+kbd_drv_ladir = @inputdir@
 
 BSD_SRCS = bsd_KbdMap.c bsd_kbd.c bsd_kbd.h at_scancode.c
 HURD_SRCS = hurd_kbd.c at_scancode.c

commit 2fb99e01f44f7c1dad3fedb0422f2ae39cbd5e49
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Fri Jun 11 13:57:13 2010 -0400

    config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS
    
    It depends on util-macros 1.8
    The existing statement can now be removed from the configuration file.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 49ac2e6..9cec886 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,9 +44,6 @@ m4_ifndef([XORG_MACROS_VERSION],
 XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-# Checks for programs.
-AC_PROG_INSTALL
-
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
 

commit b58f64eb53b5d9a2e116d23c0aee6f1c9079cfa7
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Fri Jun 11 11:53:46 2010 -0400

    config: use AC_PROG_SED now supplied by XORG_MANPAGE_SECTIONS
    
    It depends on util-macros 1.8
    The existing statement can now be removed from the configuration file.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 5124b92..49ac2e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,6 @@ XORG_DEFAULT_OPTIONS
 
 # Checks for programs.
 AC_PROG_INSTALL
-AC_PROG_SED
 
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)

commit 53d1fdd3a716ebcee0e75e0097106ff25db38498
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu May 27 22:01:55 2010 -0400

    config: upgrade to util-macros 1.8 for additional man page support
    
    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
    The value of MAN_SUBST is the same for all X.Org packages.
    
    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 5fd0aa9..5124b92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,10 +38,10 @@ AM_MAINTAINER_MODE
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 
-# Initialize X.Org macros
+# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.4)
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
 # Checks for programs.
diff --git a/man/Makefile.am b/man/Makefile.am
index f312f9d..c027fd2 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -31,27 +31,11 @@ EXTRA_DIST = @DRIVER_NAME@.man
 
 CLEANFILES = $(driverman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
 # should allow configure override like xserver's configure.ac does
 XKBPATH=${datadir}/X11/xkb
 
-MAN_SUBSTS = \
-	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-	-e 's|__xservername__|Xorg|g' \
-	-e 's|__xconfigfile__|xorg.conf|g' \
-	-e 's|__projectroot__|$(prefix)|g' \
-	-e 's|__xkb_path__|$(XKBPATH)|g' \
-	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-	-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
-	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+MAN_SUBSTS += -e 's|__xkb_path__|$(XKBPATH)|g'
 
 SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
 

commit 652bf3657b116af2d012116b15d01a8bb23e7850
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Wed May 12 10:59:49 2010 -0400

    config: fix warnings, m4 quoting and layout
    
    Fix some m4 quoting
    Fix some autoconf warnings
    remove AC_PROG_CC as it overrides AC_PROG_C_C99 from XORG_DEFAULT_OPTIONS
    Regroup statements per section
    Add comments
    
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index bd4bfcf..5fd0aa9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,32 +20,46 @@
 #
 # Process this file with autoconf to produce a configure script
 
-AC_PREREQ(2.60)
+# Initialize Autoconf
+AC_PREREQ([2.60])
 AC_INIT([xf86-input-keyboard],
-        1.4.0,
+        [1.4.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
-        xf86-input-keyboard)
+        [xf86-input-keyboard])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR(.)
 
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Initialize libtool
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
 # Initialize X.Org macros
 m4_ifndef([XORG_MACROS_VERSION],
           [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
 XORG_MACROS_VERSION(1.4)
 XORG_DEFAULT_OPTIONS
 
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
-
-AM_MAINTAINER_MODE
+# Checks for programs.
+AC_PROG_INSTALL
+AC_PROG_SED
 
-DRIVER_NAME=kbd
-AC_SUBST([DRIVER_NAME])
+# Obtain compiler/linker options from server and required extensions
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
 
-# Checks for programs.
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
+# Define a configure option for an alternate input module directory
+AC_ARG_WITH(xorg-module-dir,
+            AC_HELP_STRING([--with-xorg-module-dir=DIR],
+                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
+            [moduledir="$withval"],
+            [moduledir="$libdir/xorg/modules"])
+AC_SUBST(moduledir)
 
+# The keyboard driver code is O/S specific
 case $host_os in
   linux*)
     IS_LINUX="yes"
@@ -74,16 +88,10 @@ AM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes])
 AM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes])
 AM_CONDITIONAL(HURD, [test "x$IS_HURD" = xyes])
 
-AC_ARG_WITH(xorg-module-dir,
-            AC_HELP_STRING([--with-xorg-module-dir=DIR],
-                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
-            [moduledir="$withval"],
-            [moduledir="$libdir/xorg/modules"])
-AC_SUBST(moduledir)
-
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
-
-# Checks for libraries.
+DRIVER_NAME=kbd
+AC_SUBST([DRIVER_NAME])
 
-AC_OUTPUT([Makefile src/Makefile man/Makefile])
+AC_CONFIG_FILES([Makefile
+                 src/Makefile
+                 man/Makefile])
+AC_OUTPUT

commit 613b44eb0878adf05a9bb4af01c84766ab5828d2
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Wed May 12 10:55:11 2010 -0400

    config: remove unrequired AC_HEADER_STDC
    
    Autoconf says:
    "This macro is obsolescent, as current systems have conforming
    header files. New programs need not use this macro".
    
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 8591cda..bd4bfcf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,7 +86,4 @@ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
 
 # Checks for libraries.
 
-# Checks for header files.
-AC_HEADER_STDC
-
 AC_OUTPUT([Makefile src/Makefile man/Makefile])

commit 0aa1afb5b1e52c7e945b3a010372362c3157533b
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Mon May 10 17:36:14 2010 -0400

    config: move inputproto check to PKG_CHECK_MODULES
    
    The XORG_DRIVER_CHECK_EXT macro conditionally adds inputproto
    to PKG_CHECK_MODULES if this extension is defined in xorg-server.h.
    It allows a module to use ifdef XINPUT if the extension is available.
    In this module, the extension is required and not optional.
    
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index b77fe4f..8591cda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,11 +81,8 @@ AC_ARG_WITH(xorg-module-dir,
             [moduledir="$libdir/xorg/modules"])
 AC_SUBST(moduledir)
 
-# Checks for extensions
-XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
-
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
 
 # Checks for libraries.
 

commit 9a93f9c5ad7c3ddf226dfdc987e60c580b6e0912
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Mon May 10 17:35:37 2010 -0400

    config: remove extension check for unused RANDR extension
    
    The randr protocol is not used, no randr*.h are included.
    
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index c690dc0..b77fe4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,7 +82,6 @@ AC_ARG_WITH(xorg-module-dir,
 AC_SUBST(moduledir)
 
 # Checks for extensions
-XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 
 # Checks for pkg-config packages

commit 2b491ed2339047f906e3008c085411da851b87cd
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Mon May 10 17:14:44 2010 -0400

    config: remove extension check for non-existing XKB extension
    
    This extension name does not exist in xorg-server.h and
    cannot be used in XORG_DRIVER_CHECK_EXT.
    Further more, headers from kbproto are not used.
    
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 718c3ca..c690dc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,7 +84,6 @@ AC_SUBST(moduledir)
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
-XORG_DRIVER_CHECK_EXT(XKB, kbproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto $REQUIRED_MODULES)

commit 0ac76bf1a0d5e6b34a89682f1b20f62575ef2389
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Mon May 10 15:54:08 2010 -0400

    config: Upgrade X.Org macros to 1.4 for INSTALL file copying
    
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/configure.ac b/configure.ac
index 61c5065..718c3ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,10 +29,10 @@ AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR(.)
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Initialize X.Org macros
 m4_ifndef([XORG_MACROS_VERSION],
-	  [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+          [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.4)
 XORG_DEFAULT_OPTIONS
 
 AM_INIT_AUTOMAKE([foreign dist-bzip2])


Reply to: