From b8285599636e98ef2aced5adcac16858b7d32ce9 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Mon, 21 May 2018 17:46:27 +0000 Subject: Update to xkbcomp 1.4.1 --- app/xkbcomp/ChangeLog | 126 ++++++++++++++++++++++++++++++++++++++++++++++ app/xkbcomp/aclocal.m4 | 64 +++++++++++++++-------- app/xkbcomp/compile | 11 ++-- app/xkbcomp/configure | 86 +++++++++++++++++++++---------- app/xkbcomp/configure.ac | 2 +- app/xkbcomp/keycodes.c | 28 ++++++++--- app/xkbcomp/misc.c | 29 +++++++++-- app/xkbcomp/xkbcomp.pc.in | 2 + 8 files changed, 283 insertions(+), 65 deletions(-) (limited to 'app') diff --git a/app/xkbcomp/ChangeLog b/app/xkbcomp/ChangeLog index ce9d2757c..3ea87bd46 100644 --- a/app/xkbcomp/ChangeLog +++ b/app/xkbcomp/ChangeLog @@ -1,3 +1,129 @@ +commit 34842845b191082fd1cfff3b7038332cdcadb825 +Author: Adam Jackson +Date: Thu Mar 1 11:15:18 2018 -0500 + + xkbcomp 1.4.1 + + Signed-off-by: Adam Jackson + +commit 993d4916a92b56b5043cf0b90f550568c817ad2b +Author: Peter Hutterer +Date: Tue Feb 13 13:48:46 2018 +1000 + + pkgconfig: add the exec_prefix substitution + + bindir gets replaced with: + bindir=${exec_prefix}/bin + but exec_prefix isn't set so we end up with an invalid bindir. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jon Turney + +commit 3e2a6ad4edfbf21c3f76f8319f0039b7f589944f +Author: Adam Jackson +Date: Mon Nov 6 12:54:41 2017 -0500 + + pkgconfig: Add our bindir to xkbcomp.pc + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit 3fcd5f4490adee266eb4c0110d058c7f4e515e36 +Author: Daniel Stone +Date: Mon May 1 15:59:28 2017 +0100 + + xkbcomp 1.4.0 + + Signed-off-by: Daniel Stone + +commit 7fdfabd753a39dbdcfcfa65ec33d0192448119d8 +Author: Daniel Stone +Date: Thu Apr 6 15:52:10 2017 +0100 + + keycodes: Ignore high keycodes + + Rather than throwing a fatal error when a keycode definition exceeds the + declared maximum (i.e. 255), just ignore the definition and continue. + + This allows xkeyboard-config to start shipping datasets including high + keycodes, which will work in xkbcommon as it ignores explicit range + declarations. + + Signed-off-by: Daniel Stone + Reviewed-by: Ran Benita + Reviewed-by: Peter Hutterer + Reported-by: Christian Kellner + +commit 9f1e3e8c8914b349b9b52501bb4acadedb31081d +Author: Mihail Konev +Date: Thu Jan 26 14:00:21 2017 +1000 + + autogen: add default patch prefix + + Signed-off-by: Mihail Konev + +commit 6f16a2e38667bea33e0cb566734a87c2b92c9391 +Author: Emil Velikov +Date: Mon Mar 9 12:00:52 2015 +0000 + + autogen.sh: use quoted string variables + + Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent + fall-outs, when they contain space. + + Signed-off-by: Emil Velikov + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit bbc55549ee44830747eccfadd61df3ed38a99202 +Author: Peter Hutterer +Date: Tue Jan 24 10:32:07 2017 +1000 + + autogen.sh: use exec instead of waiting for configure to finish + + Syncs the invocation of configure with the one from the server. + + Signed-off-by: Peter Hutterer + Reviewed-by: Emil Velikov + +commit 8995ac58e15595de9158c2d8df9e02b0c925e8f4 +Author: Ran Benita +Date: Wed Jan 6 21:32:52 2016 +0100 + + When a file contains several maps, look for a default map + + Rather than always taking the first one in the file. This is exactly the + intended use of the 'default' flag. + + Note that pretty much the same code is duplicated in xkbcomp.c when + compiling a single file from the command line, but there it is + implemented correctly (look for XkbLC_Default). + + https://bugs.freedesktop.org/show_bug.cgi?id=69950 + + Signed-off-by: Ran Benita + Tested-by: Benno Schulenberg + Acked-by: Sergey Udaltsov + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit bf4d7d059daf5c6f81d70f8d3e5e2a87265381b7 +Author: Benno Schulenberg +Date: Thu Sep 11 22:04:21 2014 +0200 + + When overriding a key, adjust also its number of levels (#57242). + + Specifying an explicit key type when overriding a key should adjust + the number of levels to that of the specified type. This gets rid of + the age-old warning of the right Alt key being ONE_LEVEL but having + two symbols assigned. + + Fixes bug #57242 . + + Signed-off-by: Benno Schulenberg + Reviewed-by: Ran Benita + Signed-off-by: Peter Hutterer + commit f909259b1da70bc145f19e5ce595c8e945a2a808 Author: Peter Hutterer Date: Thu Nov 5 12:19:22 2015 +1000 diff --git a/app/xkbcomp/aclocal.m4 b/app/xkbcomp/aclocal.m4 index c0dbcfb1f..8bef9a948 100644 --- a/app/xkbcomp/aclocal.m4 +++ b/app/xkbcomp/aclocal.m4 @@ -1242,7 +1242,7 @@ AC_SUBST([am__untar]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl -dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), @@ -1279,7 +1279,7 @@ dnl DEALINGS IN THE SOFTWARE. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.19.0]) +m4_define([vers_have], [1.19.2]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -1357,6 +1357,17 @@ AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_SED]) +case $host_os in + solaris*) + # Solaris 2.0 - 11.3 use SysV man page section numbers, so we + # check for a man page file found in later versions that use + # traditional section numbers instead + AC_CHECK_FILE([/usr/share/man/man7/attributes.7], + [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) + ;; + *) SYSV_MAN_SECTIONS=false ;; +esac + if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi @@ -1372,9 +1383,9 @@ if test x$LIB_MAN_DIR = x ; then fi if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; + case $SYSV_MAN_SECTIONS in + true) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then @@ -1382,9 +1393,9 @@ if test x$FILE_MAN_DIR = x ; then fi if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; + case $SYSV_MAN_SECTIONS in + true) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then @@ -1392,9 +1403,9 @@ if test x$MISC_MAN_DIR = x ; then fi if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; + case $SYSV_MAN_SECTIONS in + true) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then @@ -1402,9 +1413,9 @@ if test x$DRIVER_MAN_DIR = x ; then fi if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; + case $SYSV_MAN_SECTIONS in + true) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then @@ -1665,13 +1676,24 @@ m4_ifval([$1], fi]) # Test for the ability of xmlto to generate a text target +# +# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the +# following test for empty XML docbook files. +# For compatibility reasons use the following empty XML docbook file and if +# it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF AS_IF([test "$have_xmlto" = yes], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], - [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) + [# Try it again with a non-empty XML file. + cat > conftest.xml << "EOF" + +EOF + AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], + [have_xmlto_text=yes], + [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) rm -f conftest.xml AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) @@ -3067,8 +3089,9 @@ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ -|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ -echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ +touch \$(top_srcdir)/INSTALL; \ +echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL dnl Copyright 2005 Red Hat, Inc @@ -3129,10 +3152,11 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ # # AC_DEFUN([XORG_CHANGELOG], [ -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ -|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" +|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ +touch \$(top_srcdir)/ChangeLog; \ +echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" AC_SUBST([CHANGELOG_CMD]) ]) # XORG_CHANGELOG diff --git a/app/xkbcomp/compile b/app/xkbcomp/compile index 531136b06..de0005d4f 100644 --- a/app/xkbcomp/compile +++ b/app/xkbcomp/compile @@ -1,9 +1,9 @@ -#! /bin/sh +#!/bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -342,6 +343,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/app/xkbcomp/configure b/app/xkbcomp/configure index b09bb2186..7e98d5a06 100644 --- a/app/xkbcomp/configure +++ b/app/xkbcomp/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xkbcomp 1.3.1. +# Generated by GNU Autoconf 2.69 for xkbcomp 1.4.1. # # Report bugs to . # @@ -581,8 +581,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xkbcomp' PACKAGE_TARNAME='xkbcomp' -PACKAGE_VERSION='1.3.1' -PACKAGE_STRING='xkbcomp 1.3.1' +PACKAGE_VERSION='1.4.1' +PACKAGE_STRING='xkbcomp 1.4.1' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' @@ -1319,7 +1319,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xkbcomp 1.3.1 to adapt to many kinds of systems. +\`configure' configures xkbcomp 1.4.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1389,7 +1389,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xkbcomp 1.3.1:";; + short | recursive ) echo "Configuration of xkbcomp 1.4.1:";; esac cat <<\_ACEOF @@ -1511,7 +1511,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xkbcomp configure 1.3.1 +xkbcomp configure 1.4.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1835,7 +1835,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xkbcomp $as_me 1.3.1, which was +It was created by xkbcomp $as_me 1.4.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2664,7 +2664,7 @@ fi # Define the identity of the package. PACKAGE='xkbcomp' - VERSION='1.3.1' + VERSION='1.4.1' cat >>confdefs.h <<_ACEOF @@ -10308,10 +10308,11 @@ _ACEOF -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ -|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" +|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ +touch \$(top_srcdir)/ChangeLog; \ +echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" @@ -10319,14 +10320,45 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)" macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ -|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ -echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ +touch \$(top_srcdir)/INSTALL; \ +echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" +case $host_os in + solaris*) + # Solaris 2.0 - 11.3 use SysV man page section numbers, so we + # check for a man page file found in later versions that use + # traditional section numbers instead + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5 +$as_echo_n "checking for /usr/share/man/man7/attributes.7... " >&6; } +if ${ac_cv_file__usr_share_man_man7_attributes_7+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "/usr/share/man/man7/attributes.7"; then + ac_cv_file__usr_share_man_man7_attributes_7=yes +else + ac_cv_file__usr_share_man_man7_attributes_7=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5 +$as_echo "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; } +if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes; then : + SYSV_MAN_SECTIONS=false +else + SYSV_MAN_SECTIONS=true +fi + + ;; + *) SYSV_MAN_SECTIONS=false ;; +esac + if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi @@ -10342,9 +10374,9 @@ if test x$LIB_MAN_DIR = x ; then fi if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; + case $SYSV_MAN_SECTIONS in + true) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then @@ -10352,9 +10384,9 @@ if test x$FILE_MAN_DIR = x ; then fi if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; + case $SYSV_MAN_SECTIONS in + true) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then @@ -10362,9 +10394,9 @@ if test x$MISC_MAN_DIR = x ; then fi if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; + case $SYSV_MAN_SECTIONS in + true) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then @@ -10372,9 +10404,9 @@ if test x$DRIVER_MAN_DIR = x ; then fi if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; + case $SYSV_MAN_SECTIONS in + true) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then @@ -11200,7 +11232,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xkbcomp $as_me 1.3.1, which was +This file was extended by xkbcomp $as_me 1.4.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11266,7 +11298,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xkbcomp config.status 1.3.1 +xkbcomp config.status 1.4.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/app/xkbcomp/configure.ac b/app/xkbcomp/configure.ac index 0c8063e41..273e72d8a 100644 --- a/app/xkbcomp/configure.ac +++ b/app/xkbcomp/configure.ac @@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure. # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xkbcomp], [1.3.1], +AC_INIT([xkbcomp], [1.4.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xkbcomp]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) diff --git a/app/xkbcomp/keycodes.c b/app/xkbcomp/keycodes.c index 22d9eae85..d5ac762a5 100644 --- a/app/xkbcomp/keycodes.c +++ b/app/xkbcomp/keycodes.c @@ -31,6 +31,8 @@ #include "misc.h" #include "alias.h" +static Bool high_keycode_warned; + char * longText(unsigned long val, unsigned format) { @@ -330,10 +332,15 @@ AddKeyName(KeyNamesInfo * info, if ((kc < info->effectiveMin) || (kc > info->effectiveMax)) { - ERROR2("Illegal keycode %d for name <%s>\n", kc, name); - ACTION2("Must be in the range %d-%d inclusive\n", - info->effectiveMin, info->effectiveMax); - return False; + if (!high_keycode_warned) + { + WARN2("Unsupported high keycode %d for name <%s> ignored\n", + kc, name); + ACTION2("X11 cannot support keycodes above 255.\n"); + ACTION2("This warning only shows for the first high keycode.\n"); + high_keycode_warned = True; + } + return True; } if (kc < info->computedMin) info->computedMin = kc; @@ -589,10 +596,15 @@ HandleKeycodeDef(KeycodeDef * stmt, unsigned merge, KeyNamesInfo * info) code = result.ival; if ((code < info->effectiveMin) || (code > info->effectiveMax)) { - ERROR2("Illegal keycode %d for name <%s>\n", code, stmt->name); - ACTION2("Must be in the range %d-%d inclusive\n", - info->effectiveMin, info->effectiveMax); - return 0; + if (!high_keycode_warned) + { + WARN2("Unsupported high keycode %d for name <%s> ignored\n", + code, stmt->name); + ACTION2("X11 cannot support keycodes above 255.\n"); + ACTION2("This warning only shows for the first high keycode.\n"); + high_keycode_warned = True; + } + return 1; } if (stmt->merge != MergeDefault) { diff --git a/app/xkbcomp/misc.c b/app/xkbcomp/misc.c index 4990a7439..848ed8c3e 100644 --- a/app/xkbcomp/misc.c +++ b/app/xkbcomp/misc.c @@ -88,6 +88,15 @@ ProcessIncludeFile(IncludeStmt * stmt, fclose(file); XkbAddFileToCache(stmt->file, file_type, stmt->path, rtrn); } + + /* + * A single file may contain several maps. Here's how we choose the map: + * - If a specific map was requested, look for it exclusively. + * - Otherwise, if the file only contains a single map, return it. + * - Otherwise, if the file has maps tagged as default, return the + * first one. + * - If all fails, return the first map in the file. + */ mapToUse = rtrn; if (stmt->map != NULL) { @@ -105,12 +114,24 @@ ProcessIncludeFile(IncludeStmt * stmt, return False; } } - else if ((rtrn->common.next != NULL) && (warningLevel > 5)) + else if (rtrn->common.next != NULL) { - WARN1("No map in include statement, but \"%s\" contains several\n", - stmt->file); - ACTION1("Using first defined map, \"%s\"\n", rtrn->name); + while ((mapToUse) && !(mapToUse->flags & XkbLC_Default)) + { + mapToUse = (XkbFile *) mapToUse->common.next; + } + if (!mapToUse) + { + if (warningLevel > 5) + { + WARN1("No map in include statement, but \"%s\" contains several without a default map\n", + stmt->file); + ACTION1("Using first defined map, \"%s\"\n", rtrn->name); + } + mapToUse = rtrn; + } } + setScanState(oldFile, oldLine); if (mapToUse->type != file_type) { diff --git a/app/xkbcomp/xkbcomp.pc.in b/app/xkbcomp/xkbcomp.pc.in index b8d60235c..a4791a9cb 100644 --- a/app/xkbcomp/xkbcomp.pc.in +++ b/app/xkbcomp/xkbcomp.pc.in @@ -1,4 +1,6 @@ prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ datarootdir=@datarootdir@ datadir=@datadir@ xkbconfigdir=@XKBCONFIGROOT@ -- cgit v1.2.3