Hello community,
here is the log from the commit of package xmodmap for openSUSE:Factory checked in at 2015-04-27 12:59:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xmodmap (Old)
and /work/SRC/openSUSE:Factory/.xmodmap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xmodmap"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xmodmap/xmodmap.changes 2013-09-13 14:47:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xmodmap.new/xmodmap.changes 2015-04-27 12:59:14.000000000 +0200
@@ -1,0 +2,11 @@
+Fri Apr 24 15:09:54 UTC 2015 - sndirsch@suse.com
+
+- Update to version 1.0.9:
+ * configure: Drop AM_MAINTAINER_MODE
+ * autogen.sh: Honor NOCONFIGURE=1
+ * Add -version option to print program version
+ * Print which option was in error along with usage message
+ * Avoid null pointer use if malloc() fails
+ * Remove unneeded casts on malloc, realloc, and free calls
+
+-------------------------------------------------------------------
Old:
----
xmodmap-1.0.8.tar.bz2
New:
----
xmodmap-1.0.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xmodmap.spec ++++++
--- /var/tmp/diff_new_pack.tzTmti/_old 2015-04-27 12:59:15.000000000 +0200
+++ /var/tmp/diff_new_pack.tzTmti/_new 2015-04-27 12:59:15.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package xmodmap
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: xmodmap
-Version: 1.0.8
+Version: 1.0.9
Release: 0
Summary: Utility to modify keymaps and pointer button mappings in X
License: MIT
++++++ xmodmap-1.0.8.tar.bz2 -> xmodmap-1.0.9.tar.bz2 ++++++
++++ 3437 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/ChangeLog new/xmodmap-1.0.9/ChangeLog
--- old/xmodmap-1.0.8/ChangeLog 2013-09-08 19:05:42.000000000 +0200
+++ new/xmodmap-1.0.9/ChangeLog 2015-04-17 09:07:37.000000000 +0200
@@ -1,3 +1,73 @@
+commit 1e0d98566d01fb5da9836e1fc402fb28f8d8b499
+Author: Alan Coopersmith
+Date: Fri Apr 17 00:06:59 2015 -0700
+
+ xmodmap 1.0.9
+
+ Signed-off-by: Alan Coopersmith
+
+commit d50db4361a57062f9c0c0a1c6c18d296e11dd4bf
+Author: Alan Coopersmith
+Date: Fri Aug 1 23:20:34 2014 -0700
+
+ Remove unneeded casts on malloc, realloc, and free calls
+
+ Signed-off-by: Alan Coopersmith
+
+commit 02f145f175894399fed33992e4e7e5a87d7e7a2a
+Author: Alan Coopersmith
+Date: Fri Aug 1 23:15:29 2014 -0700
+
+ Avoid null pointer use if malloc() fails
+
+ Error: Null pointer dereference (CWE 476)
+ Read from null pointer str
+ at line 282 of handle.c in function 'parse_number'.
+ Function copy_to_scratch may return constant 'NULL' at line 98,
+ called at line 875 in function 'do_pointer'.
+ Constant 'NULL' passed into function parse_number, argument str,
+ from call at line 876.
+ Null pointer introduced at line 98 in function 'copy_to_scratch'.
+
+ [ This bug was found by the Parfait 1.4.0 bug checking tool.
+ http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ]
+
+ Signed-off-by: Alan Coopersmith
+
+commit e320555a2281ff6b5ad9409480a62c976a289dc1
+Author: Alan Coopersmith
+Date: Sun Jun 1 00:13:58 2014 -0700
+
+ Print which option was in error along with usage message
+
+ Signed-off-by: Alan Coopersmith
+
+commit 82f549d1c8780538fb115ee2768d2f4024d302b2
+Author: Alan Coopersmith
+Date: Sat May 31 23:49:27 2014 -0700
+
+ Add -version option to print program version
+
+ Signed-off-by: Alan Coopersmith
+
+commit 156921246c26f5e12790d52b8b9f395a56f61c87
+Author: Alan Coopersmith
+Date: Sat May 31 23:41:50 2014 -0700
+
+ autogen.sh: Honor NOCONFIGURE=1
+
+ See http://people.gnome.org/~walters/docs/build-api.txt
+
+ Signed-off-by: Alan Coopersmith
+
+commit c624c9c29ed4af8f941108368786ddb5f0d55ba6
+Author: Alan Coopersmith
+Date: Sat May 31 23:41:50 2014 -0700
+
+ configure: Drop AM_MAINTAINER_MODE
+
+ Signed-off-by: Alan Coopersmith
+
commit e09a9195be80bd29c59f56e641dda52789d837b5
Author: Alan Coopersmith
Date: Sun Sep 8 10:05:00 2013 -0700
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/INSTALL new/xmodmap-1.0.9/INSTALL
--- old/xmodmap-1.0.8/INSTALL 2013-09-08 19:05:42.000000000 +0200
+++ new/xmodmap-1.0.9/INSTALL 2015-04-17 09:07:37.000000000 +0200
@@ -1,11 +1,13 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
- This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
Basic Installation
==================
@@ -13,7 +15,11 @@
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -42,7 +48,7 @@
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
-The simplest way to compile this package is:
+ The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
@@ -53,12 +59,22 @@
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
- the package.
+ the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
- documentation.
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
- 5. You can remove the program binaries and object files from the
+ 6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
@@ -67,8 +83,15 @@
all sorts of other programs in order to regenerate files that came
with the distribution.
- 6. Often, you can also type `make uninstall' to remove the installed
- files again.
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
Compilers and Options
=====================
@@ -93,7 +116,8 @@
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
@@ -120,7 +144,8 @@
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
@@ -131,15 +156,46 @@
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-Optional Features
-=================
-
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -152,6 +208,13 @@
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
Particular systems
==================
@@ -159,10 +222,15 @@
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
- ./configure CC="cc -Ae"
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
@@ -174,6 +242,16 @@
./configure CC="cc -nodtk"
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
Specifying the System Type
==========================
@@ -189,7 +267,8 @@
where SYSTEM can have one of these forms:
- OS KERNEL-OS
+ OS
+ KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
@@ -277,7 +356,7 @@
`configure' can determine that directory automatically.
`--prefix=DIR'
- Use DIR as the installation prefix. *Note Installation Names::
+ Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/autogen.sh new/xmodmap-1.0.9/autogen.sh
--- old/xmodmap-1.0.8/autogen.sh 2013-09-08 19:05:08.000000000 +0200
+++ new/xmodmap-1.0.9/autogen.sh 2015-04-17 09:07:11.000000000 +0200
@@ -9,5 +9,6 @@
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
-$srcdir/configure --enable-maintainer-mode "$@"
-
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure "$@"
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/compile new/xmodmap-1.0.9/compile
--- old/xmodmap-1.0.8/compile 2013-09-08 19:05:17.000000000 +0200
+++ new/xmodmap-1.0.9/compile 2015-04-17 09:07:16.000000000 +0200
@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/configure.ac new/xmodmap-1.0.9/configure.ac
--- old/xmodmap-1.0.8/configure.ac 2013-09-08 19:05:08.000000000 +0200
+++ new/xmodmap-1.0.9/configure.ac 2015-04-17 09:07:11.000000000 +0200
@@ -24,7 +24,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xmodmap],
- [1.0.8],
+ [1.0.9],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xmodmap])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -34,7 +34,6 @@
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
@@ -45,7 +44,7 @@
AC_CHECK_FUNCS([strncasecmp asprintf])
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XMODMAP, x11 xproto >= 7.0.17)
+PKG_CHECK_MODULES(XMODMAP, [x11 xproto >= 7.0.25])
dnl Allow checking code with lint, sparse, etc.
XORG_WITH_LINT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/handle.c new/xmodmap-1.0.9/handle.c
--- old/xmodmap-1.0.8/handle.c 2013-09-08 19:05:08.000000000 +0200
+++ new/xmodmap-1.0.9/handle.c 2015-04-17 09:07:11.000000000 +0200
@@ -67,10 +67,9 @@
for (j = 0; j < 8; j++) {
if (XKeycodeToKeysym(dpy, (KeyCode) i, j) == keysym) {
if (!kcs)
- kcs = (KeyCode *)malloc(sizeof(KeyCode));
+ kcs = malloc(sizeof(KeyCode));
else
- kcs = (KeyCode *)realloc((char *)kcs,
- sizeof(KeyCode) * (*pnum_kcs + 1));
+ kcs = realloc(kcs, sizeof(KeyCode) * (*pnum_kcs + 1));
kcs[*pnum_kcs] = i;
*pnum_kcs += 1;
break;
@@ -92,7 +91,7 @@
if (len >= buflen) {
if (buf) free (buf);
buflen = (len < 40) ? 80 : (len * 2);
- buf = (char *) malloc (buflen+1);
+ buf = malloc (buflen+1);
if (!buf) {
fprintf (stderr, "attempt to allocate %d byte scratch buffer\n", buflen + 1);
return NULL;
@@ -582,10 +581,10 @@
opam->type = doAddModifier;
opam->modifier = modifier;
opam->count = 1;
- opam->keysyms = (KeySym *) malloc (sizeof (KeySym));
+ opam->keysyms = malloc (sizeof (KeySym));
if (!opam->keysyms) {
badmsg ("attempt to allocate %ld byte KeySym", (long) sizeof (KeySym));
- free ((char *) opam);
+ free (opam);
return;
}
opam->keysyms[0] = keysym;
@@ -657,11 +656,11 @@
* unlike the add command, we have to now evaluate the keysyms
*/
- kclist = (KeyCode *) malloc (n * sizeof (KeyCode));
+ kclist = malloc (n * sizeof (KeyCode));
if (!kclist) {
badmsg ("attempt to allocate %ld byte keycode list",
(long) (n * sizeof (KeyCode)));
- free ((char *) kslist);
+ free (kslist);
return;
}
@@ -688,11 +687,11 @@
}
if (nc + num_kcs > tot) {
tot = nc + num_kcs;
- kclist = (KeyCode *)realloc((char *)kclist, tot * sizeof(KeyCode));
+ kclist = realloc(kclist, tot * sizeof(KeyCode));
if (!kclist) {
badmsg ("attempt to allocate %ld byte keycode list",
(long) (tot * sizeof (KeyCode)));
- free ((char *) kslist);
+ free (kslist);
return;
}
}
@@ -700,7 +699,7 @@
kclist[nc++] = *kcs++; /* okay, add it to list */
}
- free ((char *) kslist); /* all done with it */
+ free (kslist); /* all done with it */
uop = AllocStruct (union op);
if (!uop) {
@@ -739,11 +738,11 @@
oprm->type = doRemoveModifier;
oprm->modifier = modifier;
oprm->count = 1;
- oprm->keycodes = (KeyCode *) malloc (sizeof (KeyCode));
+ oprm->keycodes = malloc (sizeof (KeyCode));
if (!oprm->keycodes) {
badmsg ("attempt to allocate %ld byte KeyCode",
(long) sizeof (KeyCode));
- free ((char *) oprm);
+ free (oprm);
return;
}
oprm->keycodes[0] = keycode;
@@ -873,6 +872,9 @@
return;
}
strval = copy_to_scratch(line, n);
+ if (strval == NULL)
+ /* copy_to_scratch already printed error message */
+ return;
ok = parse_number (strval, &val);
if (!ok || val >= MAXBUTTONCODES) {
badmsg ("value %s given for buttons list", strval);
@@ -931,7 +933,7 @@
havesofar = 0;
maxcanhave = 4; /* most lists are small */
- keysymlist = (KeySym *) malloc (maxcanhave * sizeof (KeySym));
+ keysymlist = malloc (maxcanhave * sizeof (KeySym));
if (!keysymlist) {
badmsg ("attempt to allocate %ld byte initial keysymlist",
(long) (maxcanhave * sizeof (KeySym)));
@@ -971,8 +973,7 @@
if (havesofar >= maxcanhave) {
KeySym *origkeysymlist = keysymlist;
maxcanhave *= 2;
- keysymlist = (KeySym *) realloc (keysymlist,
- maxcanhave * sizeof (KeySym));
+ keysymlist = realloc (keysymlist, maxcanhave * sizeof (KeySym));
if (!keysymlist) {
badmsg ("attempt to grow keysym list to %ld bytes",
(long) (maxcanhave * sizeof (KeySym)));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/man/xmodmap.man new/xmodmap-1.0.9/man/xmodmap.man
--- old/xmodmap-1.0.8/man/xmodmap.man 2013-09-08 19:05:08.000000000 +0200
+++ new/xmodmap-1.0.9/man/xmodmap.man 2015-04-17 09:07:11.000000000 +0200
@@ -86,6 +86,11 @@
This option indicates that a help message describing the expression grammar
used in files and with \-e expressions should be printed on the standard error.
.TP 8
+.B \-version
+This option indicates that
+.I xmodmap
+should print its version information and exit.
+.TP 8
.B \-verbose
This option indicates that
.I xmodmap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/missing new/xmodmap-1.0.9/missing
--- old/xmodmap-1.0.8/missing 2013-09-08 19:05:17.000000000 +0200
+++ new/xmodmap-1.0.9/missing 2015-04-17 09:07:16.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-06-26.16; # UTC
+scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
@@ -160,7 +160,7 @@
;;
autom4te*)
echo "You might have modified some maintainer files that require"
- echo "the 'automa4te' program to be rebuilt."
+ echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/wq.h new/xmodmap-1.0.9/wq.h
--- old/xmodmap-1.0.8/wq.h 2013-09-08 19:05:08.000000000 +0200
+++ new/xmodmap-1.0.9/wq.h 2015-04-17 09:07:11.000000000 +0200
@@ -140,7 +140,7 @@
int value;
} modifier_table[];
-#define AllocStruct(s) ((s *) malloc (sizeof (s)))
+#define AllocStruct(s) (malloc (sizeof (s)))
#define MAXKEYSYMNAMESIZE 80 /* absurdly large */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xmodmap-1.0.8/xmodmap.c new/xmodmap-1.0.9/xmodmap.c
--- old/xmodmap-1.0.8/xmodmap.c 2013-09-08 19:05:08.000000000 +0200
+++ new/xmodmap-1.0.9/xmodmap.c 2015-04-17 09:07:11.000000000 +0200
@@ -116,12 +116,13 @@
" -pp print pointer map\n"
" -help print this usage message\n"
" -grammar print out short help on allowable input\n"
+" -version print program version\n"
" - read standard input\n"
"\n";
-static void
-_X_NORETURN
+static void
+_X_NORETURN _X_COLD
usage(int exitcode)
{
fprintf (stderr, "usage: %s [-options ...] [filename]\n", ProgramName);
@@ -129,6 +130,22 @@
Exit (exitcode);
}
+static void
+_X_NORETURN _X_COLD
+missing_arg(const char *arg)
+{
+ fprintf (stderr, "%s: %s requires an argument\n\n", ProgramName, arg);
+ usage(1);
+}
+
+static void
+_X_NORETURN _X_COLD
+unknown_arg(const char *arg)
+{
+ fprintf (stderr, "%s: unrecognized argument %s\n\n", ProgramName, arg);
+ usage(1);
+}
+
static const char grammar_message[] =
" pointer = default reset pointer buttons to default\n"
" pointer = NUMBER ... set pointer button codes\n"
@@ -186,7 +203,7 @@
if (arg[0] == '-') {
switch (arg[1]) {
case 'd': /* -display host:dpy */
- if (++i >= argc) usage (1);
+ if (++i >= argc) missing_arg(arg);
displayname = argv[i];
break;
case 'g': /* -grammar */
@@ -195,6 +212,11 @@
case 'h': /* -help */
case '?':
usage(0);
+ case 'v':
+ if (strcmp(arg, "-version") == 0) {
+ puts(PACKAGE_STRING);
+ exit(0);
+ }
}
}
}
@@ -234,7 +256,7 @@
continue;
case 'e': /* -e expression */
didAnything = True;
- if (++i >= argc) usage (1);
+ if (++i >= argc) missing_arg(arg);
process_line (argv[i]);
continue;
case 'p': /* -p... */
@@ -252,14 +274,14 @@
printKeyTableExprs = True;
break;
default:
- usage (1);
+ unknown_arg(arg);
}
break;
case 'p': /* -pp */
printPointerMap = True;
break;
default:
- usage (1);
+ unknown_arg(arg);
/* NOTREACHED */
}
didAnything = True;
@@ -302,7 +324,7 @@
case 'c': {
char *cmd;
didAnything = True;
- if (++i >= argc) usage (1);
+ if (++i >= argc) missing_arg(arg);
if (asprintf (&cmd, "remove %s = %s",
((arg[1] == 's') ? "shift" :
((arg[1] == 'l') ? "lock" :
@@ -312,7 +334,7 @@
continue;
}
default:
- usage (1);
+ unknown_arg(arg);
/*NOTREACHED*/
}
} else if (arg[0] == '+') { /* old xmodmap args */
@@ -324,7 +346,7 @@
case '5': {
char *cmd;
didAnything = True;
- if (++i >= argc) usage (1);
+ if (++i >= argc) missing_arg(arg);
if (asprintf (&cmd, "add mod%c = %s", arg[1], argv[i]) == -1)
FatalError("Could not allocate memory for add cmd");
process_line (cmd);
@@ -340,7 +362,7 @@
case 'c': {
char *cmd;
didAnything = True;
- if (++i >= argc) usage (1);
+ if (++i >= argc) missing_arg(arg);
if (asprintf (&cmd, "add %s = %s",
((arg[1] == 's') ? "shift" :
((arg[1] == 'l') ? "lock" :
@@ -350,7 +372,7 @@
continue;
}
default:
- usage (1);
+ unknown_arg(arg);
}
} else {
didAnything = True;