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

x11-xkb-utils: Changes to 'debian-unstable'



 debian/changelog     |    6 ++
 xkbcomp/ChangeLog    |   12 +++++
 xkbcomp/config.h.in  |    3 +
 xkbcomp/configure    |  105 +++++++++++++++++++++++++++++++++++++++++++++++++++
 xkbcomp/configure.ac |    1 
 xkbcomp/parseutils.c |   12 +++++
 xkbcomp/xkbparse.c   |    2 
 xkbcomp/xkbparse.y   |    2 
 8 files changed, 141 insertions(+), 2 deletions(-)

New commits:
commit 129c9b283867442ead2833b993dea2ed63b02d7f
Author: Julien Cristau <jcristau@debian.org>
Date:   Fri Jul 9 19:53:33 2010 +0100

    Pull an xkbcomp fix from git, thanks to Alexandre Isoard for the report.

diff --git a/debian/changelog b/debian/changelog
index 11526d3..d13ed63 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+x11-xkb-utils (7.5+4) unstable; urgency=low
+
+  * Pull an xkbcomp fix from git, thanks to Alexandre Isoard for the report.
+
+ -- Julien Cristau <jcristau@debian.org>  Fri, 09 Jul 2010 19:53:29 +0100
+
 x11-xkb-utils (7.5+3) unstable; urgency=low
 
   * debian/rules: add get-tarballs target.
diff --git a/xkbcomp/ChangeLog b/xkbcomp/ChangeLog
index 7f1a062..15ccfbb 100644
--- a/xkbcomp/ChangeLog
+++ b/xkbcomp/ChangeLog
@@ -1,3 +1,15 @@
+commit a281386fa887e6bf4110840779aed46dd0ac89b6
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Fri Jul 9 19:34:29 2010 +0100
+
+    Fix parsing of 0x1a2b3c4d-style symbols
+    
+    Raw keysyms were not getting parsed correctly, due to forgetting to add
+    the code to libX11, forgetting to add the backwards-compat code for old
+    libX11s, and then stuffing the lexing up anyway.  Yeesh.
+    
+    Signed-off-by: Daniel Stone <daniel@fooishbar.org>
+
 commit 0b04ecbb7a6afb223c91d3b15baab0bc48542281
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Tue Jun 15 19:26:19 2010 +0100
diff --git a/xkbcomp/config.h.in b/xkbcomp/config.h.in
index d60fda1..2b2b039 100644
--- a/xkbcomp/config.h.in
+++ b/xkbcomp/config.h.in
@@ -3,6 +3,9 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
diff --git a/xkbcomp/configure b/xkbcomp/configure
index 5cd33af..377ef53 100755
--- a/xkbcomp/configure
+++ b/xkbcomp/configure
@@ -1782,6 +1782,99 @@ $as_echo "$ac_res" >&6; }
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
 } # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## ---------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
+## ---------------------------------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -5390,6 +5483,18 @@ _ACEOF
 fi
 done
 
+for ac_header in limits.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
+if test "x$ac_cv_header_limits_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIMITS_H 1
+_ACEOF
+
+fi
+
+done
+
 
 # Checks for pkg-config packages
 
diff --git a/xkbcomp/configure.ac b/xkbcomp/configure.ac
index 3ad342c..6ed68c6 100644
--- a/xkbcomp/configure.ac
+++ b/xkbcomp/configure.ac
@@ -41,6 +41,7 @@ AC_PROG_INSTALL
 
 
 AC_CHECK_FUNCS([strdup strcasecmp])
+AC_CHECK_HEADERS([limits.h])
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XKBCOMP, x11 xkbfile)
diff --git a/xkbcomp/parseutils.c b/xkbcomp/parseutils.c
index d59e3fb..3242965 100644
--- a/xkbcomp/parseutils.c
+++ b/xkbcomp/parseutils.c
@@ -30,6 +30,10 @@
 #include <X11/keysym.h>
 #include <X11/extensions/XKBgeom.h>
 #include <X11/Xalloca.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#include <stdlib.h>
 
 XkbFile *rtrnValue;
 
@@ -623,6 +627,7 @@ int
 LookupKeysym(char *str, KeySym * sym_rtrn)
 {
     KeySym sym;
+    char *tmp;
 
     if ((!str) || (uStrCaseCmp(str, "any") == 0)
         || (uStrCaseCmp(str, "nosymbol") == 0))
@@ -642,6 +647,13 @@ LookupKeysym(char *str, KeySym * sym_rtrn)
         *sym_rtrn = sym;
         return 1;
     }
+    if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x') {
+        sym = strtoul(str, &tmp, 16);
+        if (sym != ULONG_MAX && (!tmp || *tmp == '\0')) {
+            *sym_rtrn = sym;
+            return 1;
+        }
+    }
     return 0;
 }
 
diff --git a/xkbcomp/xkbparse.c b/xkbcomp/xkbparse.c
index 585ed66..e19307d 100644
--- a/xkbcomp/xkbparse.c
+++ b/xkbcomp/xkbparse.c
@@ -3193,7 +3193,7 @@ yyreduce:
 #line 727 "xkbparse.y"
     {
 			    if ((yyvsp[(1) - (1)].ival)<10)	{ (yyval.str)= malloc(2); (yyval.str)[0]= '0' + (yyvsp[(1) - (1)].ival); (yyval.str)[1]= '\0'; }
-			    else	{ (yyval.str)= malloc(17); snprintf((yyval.str), 17, "%x", (yyvsp[(1) - (1)].ival)); }
+			    else	{ (yyval.str)= malloc(19); snprintf((yyval.str), 19, "0x%x", (yyvsp[(1) - (1)].ival)); }
 			}
     break;
 
diff --git a/xkbcomp/xkbparse.y b/xkbcomp/xkbparse.y
index 862acd8..d73b92a 100644
--- a/xkbcomp/xkbparse.y
+++ b/xkbcomp/xkbparse.y
@@ -726,7 +726,7 @@ KeySym		:	IDENT           { $$= strdup(scanBuf); }
 		|	Integer		
 			{
 			    if ($1<10)	{ $$= malloc(2); $$[0]= '0' + $1; $$[1]= '\0'; }
-			    else	{ $$= malloc(17); snprintf($$, 17, "%x", $1); }
+			    else	{ $$= malloc(19); snprintf($$, 19, "0x%x", $1); }
 			}
 		;
 


Reply to: