X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flong-options.c;h=7c9972a19805bcb05cea0cb6caa800dcab417ba2;hb=21fc432fb0f8fa8c373cd37c81fb6c7271615522;hp=ada070eb00ddb3ad9f1cc96ba87489faf0c70677;hpb=1bd3e749e2f001b333f49fd6d8b358714f2ef09f;p=gnulib.git diff --git a/lib/long-options.c b/lib/long-options.c index ada070eb0..7c9972a19 100644 --- a/lib/long-options.c +++ b/lib/long-options.c @@ -1,6 +1,6 @@ /* Utility to accept --help and --version options as unobtrusively as possible. - Copyright (C) 1993, 1994, 1998, 1999, 2000, 2002, 2003 Free + Copyright (C) 1993, 1994, 1998, 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Jim Meyering. */ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include #endif @@ -35,9 +35,9 @@ static struct option const long_options[] = { - {"help", no_argument, 0, 'h'}, - {"version", no_argument, 0, 'v'}, - {0, 0, 0, 0} + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, 0, NULL, 0} }; /* Process long options --help and --version, but only if argc == 2. @@ -49,7 +49,7 @@ parse_long_options (int argc, const char *command_name, const char *package, const char *version, - void (*usage_func)(), + void (*usage_func) (int), /* const char *author1, ...*/ ...) { int c; @@ -66,7 +66,7 @@ parse_long_options (int argc, switch (c) { case 'h': - (*usage_func) (0); + (*usage_func) (EXIT_SUCCESS); case 'v': {