Hello community, here is the log from the commit of package iceauth for openSUSE:Factory checked in at 2015-02-01 12:28:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iceauth (Old) and /work/SRC/openSUSE:Factory/.iceauth.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iceauth" Changes: -------- --- /work/SRC/openSUSE:Factory/iceauth/iceauth.changes 2013-08-04 16:49:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.iceauth.new/iceauth.changes 2015-02-01 12:28:11.000000000 +0100 @@ -1,0 +2,14 @@ +Fri Jan 30 13:51:31 UTC 2015 - [email protected] + +- Update to version 1.0.7: + + autogen.sh: Honor NOCONFIGURE=1. + + configure: Drop AM_MAINTAINER_MODE. + + config: Add missing AC_CONFIG_SRCDIR. + + More constification cleanup. + + Free old argv array if realloc fails to enlarge it. + + Print which option was in error along with usage message. + + Add -V flag to print version. + + Fix "noexistent" typo in error message. + + Actually print command list in usage message. + +------------------------------------------------------------------- Old: ---- iceauth-1.0.6.tar.bz2 New: ---- iceauth-1.0.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iceauth.spec ++++++ --- /var/tmp/diff_new_pack.DYnuK9/_old 2015-02-01 12:28:12.000000000 +0100 +++ /var/tmp/diff_new_pack.DYnuK9/_new 2015-02-01 12:28:12.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package iceauth # -# 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: iceauth -Version: 1.0.6 +Version: 1.0.7 Release: 0 Summary: Utility to edit and display the ICE authorization information License: MIT ++++++ iceauth-1.0.6.tar.bz2 -> iceauth-1.0.7.tar.bz2 ++++++ ++++ 4180 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/iceauth-1.0.6/ChangeLog new/iceauth-1.0.7/ChangeLog --- old/iceauth-1.0.6/ChangeLog 2013-07-24 08:28:46.000000000 +0200 +++ new/iceauth-1.0.7/ChangeLog 2015-01-17 07:12:42.000000000 +0100 @@ -1,3 +1,124 @@ +commit fba114e03845a4cfab966f0545e809fdba9e9365 +Author: Alan Coopersmith <[email protected]> +Date: Fri Jan 16 22:12:11 2015 -0800 + + iceauth 1.0.7 + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 04c0fe624bf0140e0f938942e48a01ce5c01b7be +Author: Alan Coopersmith <[email protected]> +Date: Sun Jun 1 23:38:45 2014 -0700 + + autogen.sh: Honor NOCONFIGURE=1 + + See http://people.gnome.org/~walters/docs/build-api.txt + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 6e38d6b6598f3beb36a5526f482a6356e85c4fd5 +Author: Alan Coopersmith <[email protected]> +Date: Sun Jun 1 23:38:45 2014 -0700 + + configure: Drop AM_MAINTAINER_MODE + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit b0c12dd905053b38d81d44c222dbef999e992193 +Author: Alan Coopersmith <[email protected]> +Date: Sun Jun 1 23:38:40 2014 -0700 + + config: Add missing AC_CONFIG_SRCDIR + + Regroup AC statements under the Autoconf initialization section. + Regroup AM statements under the Automake initialization section. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 2222cab2a3cc2615e7a3f2ec8665fdfcabc0436c +Author: Alan Coopersmith <[email protected]> +Date: Sat May 31 16:15:19 2014 -0700 + + More constification cleanup + + Started by fixing gcc warning: + iceauth.c:47:1: warning: initialization discards ‘const’ qualifier from + pointer target type [enabled by default] + static char *defcmds[] = { "source", "-", NULL }; /* default command */ + ^ + + and chasing down the rabbit hole of the functions the command line + arguments can be passed through, until we came out the other side + const clean. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 2e692217544b8712d7bb41776cfd7f1bcca1070b +Author: Alan Coopersmith <[email protected]> +Date: Sun Dec 8 12:54:10 2013 -0800 + + Free old argv array if realloc fails to enlarge it + + Found by cppcheck: + [app/iceauth/process.c:302]: (error) Common realloc mistake: + 'argv' nulled but not freed upon failure + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Peter Hutterer <[email protected]> + +commit f6316d16b2239220dd9f043bcc628a503f89ab5c +Author: Alan Coopersmith <[email protected]> +Date: Tue Nov 5 23:48:50 2013 -0800 + + Print which option was in error along with usage message + + Special case -u, since it's documented as printing the usage message + (sort of like an ancient --help), so shouldn't be called unrecognized. + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Gaetan Nadon <[email protected]> + +commit acee3b71b38ba4bcdd0b46557546e22dcdc320cb +Author: Alan Coopersmith <[email protected]> +Date: Tue Nov 5 23:34:20 2013 -0800 + + Add -V flag to print version + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Gaetan Nadon <[email protected]> + +commit ad85d2eb4e44f21e8e38aa3bdec4acb139989218 +Author: Alan Coopersmith <[email protected]> +Date: Tue Nov 5 23:26:24 2013 -0800 + + Fix "noexistent" typo in error message + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Gaetan Nadon <[email protected]> + +commit e371fa337f256306fb93eaca7fbbe8ee5283dcfa +Author: Alan Coopersmith <[email protected]> +Date: Tue Nov 5 23:20:34 2013 -0800 + + Actually print command list in usage message + + The xauth routine this was based on took three arguments: + a file pointer, a command name, and a prefix. + + If a command name is given, prints help on that command, + else if it's null, prints help on all commands. + + The iceauth version has only two arguments: file pointer & command name. + It was being called with file pointer & prefix, and since the prefix + matched no command names, no help was printed. + + Since the way iceauth's help list is structured doesn't make it easy + to add a prefix to every line, skip indentation for now and just pass + NULL for the command argument. + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Gaetan Nadon <[email protected]> + commit c07d443d43e53cfe21b53a9a0eafcd6189432867 Author: Alan Coopersmith <[email protected]> Date: Tue Jul 23 23:15:01 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/iceauth-1.0.6/INSTALL new/iceauth-1.0.7/INSTALL --- old/iceauth-1.0.6/INSTALL 2013-07-24 08:28:46.000000000 +0200 +++ new/iceauth-1.0.7/INSTALL 2015-01-17 07:12:42.000000000 +0100 @@ -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 `<wchar.h>' 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/iceauth-1.0.6/compile new/iceauth-1.0.7/compile --- old/iceauth-1.0.6/compile 2013-07-24 08:15:26.000000000 +0200 +++ new/iceauth-1.0.7/compile 2015-01-17 07:12:26.000000000 +0100 @@ -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 <[email protected]>. # # 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/iceauth-1.0.6/configure.ac new/iceauth-1.0.7/configure.ac --- old/iceauth-1.0.6/configure.ac 2013-07-24 08:15:21.000000000 +0200 +++ new/iceauth-1.0.7/configure.ac 2015-01-17 07:12:21.000000000 +0100 @@ -21,14 +21,16 @@ dnl dnl Process this file with autoconf to create configure. +# Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([iceauth], [1.0.6], +AC_INIT([iceauth], [1.0.7], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [iceauth]) -AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE - +AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) +# Initialize Automake +AM_INIT_AUTOMAKE([foreign dist-bzip2]) + # Require 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.8 or later before running autoconf/autogen])]) 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/iceauth-1.0.6/iceauth.c new/iceauth-1.0.7/iceauth.c --- old/iceauth-1.0.6/iceauth.c 2013-07-24 08:15:21.000000000 +0200 +++ new/iceauth-1.0.7/iceauth.c 2015-01-17 07:12:21.000000000 +0100 @@ -44,7 +44,7 @@ */ static char *authfilename = NULL; /* filename of cookie file */ -static char *defcmds[] = { "source", "-", NULL }; /* default command */ +static const char *defcmds[] = { "source", "-", NULL }; /* default command */ static int ndefcmds = 2; static const char *defsource = "(stdin)"; @@ -53,7 +53,7 @@ * utility routines */ static void _X_NORETURN -usage (void) +usage (int exitcode) { static const char prefixmsg[] = "\n" @@ -63,6 +63,7 @@ " -q turn off extra messages\n" " -i ignore locks on authority file\n" " -b break locks on authority file\n" +" -V print version and exit\n" "\n" "and commands have the following syntax:\n"; static const char suffixmsg[] = @@ -71,10 +72,10 @@ fprintf (stderr, "usage: %s [-options ...] [command arg ...]\n", ProgramName); - fprintf (stderr, "%s\n", prefixmsg); - print_help (stderr, " "); /* match prefix indentation */ + fprintf (stderr, "%s", prefixmsg); + print_help (stderr, NULL); fprintf (stderr, "\n%s\n", suffixmsg); - exit (1); + exit (exitcode); } @@ -86,7 +87,7 @@ { int i; const char *sourcename = defsource; - char **arglist = defcmds; + const char **arglist = defcmds; int nargs = ndefcmds; int status; @@ -101,9 +102,16 @@ for (flag = (arg + 1); *flag; flag++) { switch (*flag) { case 'f': /* -f authfilename */ - if (++i >= argc) usage (); + if (++i >= argc) { + fprintf(stderr, "%s: -f requires an argument\n", + ProgramName); + usage (1); + } authfilename = argv[i]; continue; + case 'V': /* -V */ + printf("%s\n", PACKAGE_STRING); + exit(0); case 'v': /* -v */ verbose = 1; continue; @@ -116,14 +124,18 @@ case 'i': /* -i */ ignore_locks = True; continue; + case 'u': /* -u */ + usage (0); default: - usage (); + fprintf(stderr, "%s: unrecognized option '%s'\n", + ProgramName, flag); + usage (1); } } } else { sourcename = "(argv)"; nargs = argc - i; - arglist = argv + i; + arglist = (const char **) argv + i; if (verbose == -1) verbose = 0; break; } 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/iceauth-1.0.6/iceauth.h new/iceauth-1.0.7/iceauth.h --- old/iceauth-1.0.6/iceauth.h 2013-07-24 08:15:21.000000000 +0200 +++ new/iceauth-1.0.7/iceauth.h 2015-01-17 07:12:21.000000000 +0100 @@ -47,7 +47,7 @@ extern int auth_initialize ( char *authfilename ); extern int auth_finalize ( void ); -extern int process_command ( const char *inputfilename, int lineno, int argc, char **argv ); +extern int process_command ( const char *inputfilename, int lineno, int argc, const char **argv ); extern int print_help ( FILE *fp, const char *cmd ); extern int verbose; 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/iceauth-1.0.6/man/iceauth.man new/iceauth-1.0.7/man/iceauth.man --- old/iceauth-1.0.6/man/iceauth.man 2013-07-24 08:15:21.000000000 +0200 +++ new/iceauth-1.0.7/man/iceauth.man 2015-01-17 07:12:21.000000000 +0100 @@ -51,6 +51,8 @@ .PP \fB\-u\fP Print basic usage instructions .PP +\fB\-V\fP Print version and exit +.PP .SH USAGE .PP When \fIiceauth\fP is run it will allow the following set of commands 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/iceauth-1.0.6/missing new/iceauth-1.0.7/missing --- old/iceauth-1.0.6/missing 2013-07-24 08:15:26.000000000 +0200 +++ new/iceauth-1.0.7/missing 2015-01-17 07:12:26.000000000 +0100 @@ -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 <[email protected]>, 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/iceauth-1.0.6/process.c new/iceauth-1.0.7/process.c --- old/iceauth-1.0.6/process.c 2013-07-24 08:15:21.000000000 +0200 +++ new/iceauth-1.0.7/process.c 2015-01-17 07:12:21.000000000 +0100 @@ -47,7 +47,7 @@ #define add_to_list(h,t,e) {if (t) (t)->next = (e); else (h) = (e); (t) = (e);} -typedef int (*ProcessFunc)(const char *, int, int, char **); +typedef int (*ProcessFunc)(const char *, int, int, const char **); typedef int (*DoFunc)(const char *, int, IceAuthFileEntry *, void *); typedef struct _CommandTable { /* commands that are understood */ @@ -88,7 +88,7 @@ static FILE *open_file ( const char **filenamep, const char *mode, Bool *usedstdp, const char *srcfn, int srcln, const char *cmd ); static int read_auth_entries ( FILE *fp, AuthList **headp, AuthList **tailp ); static int cvthexkey ( const char *hexstr, char **ptrp ); -static int dispatch_command ( const char *inputfilename, int lineno, int argc, char **argv, const CommandTable *tab, int *statusp ); +static int dispatch_command ( const char *inputfilename, int lineno, int argc, const char **argv, const CommandTable *tab, int *statusp ); static void die ( int sig ) _X_NORETURN; static void catchsig ( int sig ) _X_NORETURN; static void register_signals ( void ); @@ -98,19 +98,19 @@ static int extract_entry ( const char *inputfilename, int lineno, IceAuthFileEntry *auth, void *data ); static int match_auth ( IceAuthFileEntry *a, IceAuthFileEntry *b, int *authDataSame ); static int merge_entries ( AuthList **firstp, AuthList *second, int *nnewp, int *nreplp, int *ndupp ); -static int search_and_do ( const char *inputfilename, int lineno, int start, int argc, char *argv[], DoFunc do_func, void *data ); +static int search_and_do ( const char *inputfilename, int lineno, int start, int argc, const char *argv[], DoFunc do_func, void *data ); static int remove_entry ( const char *inputfilename, int lineno, IceAuthFileEntry *auth, void *data ); -static int do_help ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_questionmark ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_list ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_merge ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_extract ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_add ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_remove ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_info ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_exit ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_quit ( const char *inputfilename, int lineno, int argc, char **argv ); -static int do_source ( const char *inputfilename, int lineno, int argc, char **argv ); +static int do_help ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_questionmark ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_list ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_merge ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_extract ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_add ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_remove ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_info ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_exit ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_quit ( const char *inputfilename, int lineno, int argc, const char **argv ); +static int do_source ( const char *inputfilename, int lineno, int argc, const char **argv ); static const CommandTable command_table[] = { /* table of known commands */ { "add", 2, 3, do_add, @@ -298,9 +298,13 @@ savec = *src; *src = '\0'; if (cur == total) { + char **prevargv = argv; total += WORDSTOALLOC; argv = (char **) realloc (argv, total * sizeof (char *)); - if (!argv) return NULL; + if (!argv) { + free (prevargv); + return NULL; + } } argv[cur++] = jword; if (savec) src++; /* if not last on line advance */ @@ -439,7 +443,7 @@ const char *inputfilename, int lineno, int argc, - char **argv, + const char **argv, const CommandTable *tab, int *statusp) { @@ -710,7 +714,7 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { int status; @@ -920,7 +924,7 @@ int lineno, int start, int argc, - char *argv[], + const char *argv[], DoFunc do_func, void *data) { @@ -928,7 +932,7 @@ int status = 0; int errors = 0; AuthList *l, *next; - char *protoname, *protodata, *netid, *authname; + const char *protoname, *protodata, *netid, *authname; for (l = iceauth_head; l; l = next) { @@ -1040,9 +1044,9 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { - char *cmd = (argc > 1 ? argv[1] : NULL); + const char *cmd = (argc > 1 ? argv[1] : NULL); int n; n = print_help (stdout, cmd); @@ -1060,7 +1064,7 @@ if (n == 0) { prefix (inputfilename, lineno); /* already know that cmd is set in this case */ - fprintf (stderr, "no help for noexistent command \"%s\"\n", cmd); + fprintf (stderr, "no help for nonexistent command \"%s\"\n", cmd); } return 0; @@ -1074,7 +1078,7 @@ const char *inputfilename _X_UNUSED, int lineno _X_UNUSED, int argc _X_UNUSED, - char **argv _X_UNUSED) + const char **argv _X_UNUSED) { const CommandTable *ct; unsigned int i; @@ -1112,7 +1116,7 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { struct _list_data ld; @@ -1142,7 +1146,7 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { int i; int errors = 0; @@ -1206,7 +1210,7 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { int errors; struct _extract_data ed; @@ -1250,15 +1254,15 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { int n, nnew, nrepl, ndup; - char *protoname; - char *protodata_hex; + const char *protoname; + const char *protodata_hex; char *protodata = NULL; /* not required */ - char *netid; - char *authname; - char *authdata_hex; + const char *netid; + const char *authname; + const char *authdata_hex; char *authdata = NULL; int protodata_len, authdata_len; IceAuthFileEntry *auth = NULL; @@ -1432,7 +1436,7 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { int nremoved = 0; int errors; @@ -1456,7 +1460,7 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { int n; AuthList *l; @@ -1491,7 +1495,7 @@ const char *inputfilename _X_UNUSED, int lineno _X_UNUSED, int argc _X_UNUSED, - char **argv _X_UNUSED) + const char **argv _X_UNUSED) { /* allow bogus stuff */ alldone = True; @@ -1506,7 +1510,7 @@ const char *inputfilename _X_UNUSED, int lineno _X_UNUSED, int argc _X_UNUSED, - char **argv _X_UNUSED) + const char **argv _X_UNUSED) { /* allow bogus stuff */ die (0); @@ -1522,7 +1526,7 @@ const char *inputfilename, int lineno, int argc, - char **argv) + const char **argv) { const char *script; char buf[BUFSIZ]; @@ -1569,7 +1573,8 @@ buf[--len] = '\0'; /* remove new line */ subargv = split_into_words (buf, &subargc); if (subargv) { - status = process_command (script, sublineno, subargc, subargv); + status = process_command (script, sublineno, subargc, + (const char **) subargv); free ((char *) subargv); errors += status; } else { -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
