1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-26 02:30:35 +02:00

Include stdarg.h.

(parse_long_options): Make this function variadic, too.
Call version_etc_va, not version_etc.
This commit is contained in:
Jim Meyering
2003-10-18 08:11:09 +00:00
parent 79b9e74be5
commit cb822ba93f
+11 -5
View File
@@ -23,11 +23,13 @@
# 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. */