aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-11-29 12:40:08 +0100
committermarha <marha@users.sourceforge.net>2014-11-29 12:40:08 +0100
commita1011d63ffb5cc4f41bf0f4622ee3f1493d419d9 (patch)
tree3875aa5d80808dfe3c52035a4148384d7090fb8a /xkbcomp
parentd6d5581d5fba846c8476ad4d593da662306765d7 (diff)
downloadvcxsrv-a1011d63ffb5cc4f41bf0f4622ee3f1493d419d9.tar.gz
vcxsrv-a1011d63ffb5cc4f41bf0f4622ee3f1493d419d9.tar.bz2
vcxsrv-a1011d63ffb5cc4f41bf0f4622ee3f1493d419d9.zip
fontconfig libX11 libxcb libxcb/xcb-proto mesa xserver xkbcomp xkeyboard-config git update 29 Nov 2014
xserver commit c52a2b1ebad56820af932dfbc871701a8b04fd9c libxcb commit bbca7b82f803fa13fd30a2891ec06f2a213a28c2 libxcb/xcb-proto commit 691d2b97e5989d6d7006304d81bd8fa128477ca1 xkeyboard-config commit b664d7fb8aab9b0f834dd9c81d273c7809561b34 libX11 commit f3831dde6972e4da9e018c6a5f4013d8756a5e78 xkbcomp commit 1e8ee9d0aad072f04186df84752f5636340574e0 fontconfig commit b732bf057f4b3ec3bac539803005e9c42d056b2a mesa commit 67c498086d0858a94d53ebb6921cfda847250368
Diffstat (limited to 'xkbcomp')
-rw-r--r--xkbcomp/configure.ac2
-rw-r--r--xkbcomp/xkbcomp.c32
2 files changed, 27 insertions, 7 deletions
diff --git a/xkbcomp/configure.ac b/xkbcomp/configure.ac
index fb71294c0..8937d84b0 100644
--- a/xkbcomp/configure.ac
+++ b/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.2.4],
+AC_INIT([xkbcomp], [1.3.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xkbcomp])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/xkbcomp/xkbcomp.c b/xkbcomp/xkbcomp.c
index 956e79c0f..adfa89a74 100644
--- a/xkbcomp/xkbcomp.c
+++ b/xkbcomp/xkbcomp.c
@@ -576,17 +576,37 @@ parseArgs(int argc, char *argv[])
}
else if (strncmp(argv[i], "-w", 2) == 0)
{
- if ((i >= (argc - 1)) || (!isdigit(argv[i + 1][0])))
+ unsigned long utmp;
+ char *tmp2;
+ /* If text is just after "-w" in the same word, then it must
+ * be a number and it is the warning level. Otherwise, if the
+ * next argument is a number, then it is the warning level,
+ * else the warning level is assumed to be 0.
+ */
+ if (argv[i][2] == '\0')
{
warningLevel = 0;
- if (isdigit(argv[i][2]))
- if (sscanf(&argv[i][2], "%i", &itmp) == 1)
- warningLevel = itmp;
+ if (i < argc - 1)
+ {
+ utmp = strtoul(argv[i+1], &tmp2, 10);
+ if (argv[i+1][0] != '\0' && *tmp2 == '\0')
+ {
+ warningLevel = utmp > 10 ? 10 : utmp;
+ i++;
+ }
+ }
}
else
{
- if (sscanf(argv[++i], "%i", &itmp) == 1)
- warningLevel = itmp;
+ utmp = strtoul(&argv[i][2], &tmp2, 10);
+ if (*tmp2 == '\0')
+ warningLevel = utmp > 10 ? 10 : utmp;
+ else
+ {
+ ERROR1("Unknown flag \"%s\" on command line\n", argv[i]);
+ Usage(argc, argv);
+ return False;
+ }
}
}
else if ((strcmp(argv[i], "-xkb") == 0) && (!xkblist))