]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include stdarg.h.
authorJim Meyering <jim@meyering.net>
Sat, 18 Oct 2003 08:11:09 +0000 (08:11 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 18 Oct 2003 08:11:09 +0000 (08:11 +0000)
(parse_long_options): Make this function variadic, too.
Call version_etc_va, not version_etc.

lib/long-options.c

index 58bc93c1d18a992d5f0c3044b7178ffc303aec2a..ada070eb00ddb3ad9f1cc96ba87489faf0c70677 100644 (file)
 # include <config.h>
 #endif
 
+/* Specification.  */
 #include "long-options.h"
 
+#include <stdarg.h>
 #include <stdio.h>
-#include <getopt.h>
 #include <stdlib.h>
+#include <getopt.h>
 
 #include "version-etc.h"
 
@@ -47,8 +49,8 @@ parse_long_options (int argc,
                    const char *command_name,
                    const char *package,
                    const char *version,
-                   const char *authors,
-                   void (*usage_func)())
+                   void (*usage_func)(),
+                   /* const char *author1, ...*/ ...)
 {
   int c;
   int saved_opterr;
@@ -67,8 +69,12 @@ parse_long_options (int argc,
          (*usage_func) (0);
 
        case 'v':
-         version_etc (stdout, command_name, package, version, authors);
-         exit (0);
+         {
+           va_list authors;
+           va_start (authors, usage_func);
+           version_etc_va (stdout, command_name, package, version, authors);
+           exit (0);
+         }
 
        default:
          /* Don't process any other long-named options.  */