summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-18 18:13:18 +0000
committerJim Meyering <jim@meyering.net>2003-09-18 18:13:18 +0000
commit6e1f55d40fc360c6cebb80710f56497fa7f7b900 (patch)
tree710a36fb07dafd66ef0e9a4f111b3071d2d6261e
parent0ed744a035771785651d7ce08880ea8ed54860d3 (diff)
downloadcoreutils-6e1f55d40fc360c6cebb80710f56497fa7f7b900.tar.xz
Include stdarg.h.
(parse_long_options): Make this function variadic (authors), too. Call version_etc_va, not version_etc.
-rw-r--r--lib/long-options.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/long-options.c b/lib/long-options.c
index 58bc93c1d..94fea1587 100644
--- a/lib/long-options.c
+++ b/lib/long-options.c
@@ -25,9 +25,10 @@
#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 +48,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)(),
+ ...)
{
int c;
int saved_opterr;
@@ -67,8 +68,12 @@ parse_long_options (int argc,
(*usage_func) (0);
case 'v':
- version_etc (stdout, command_name, package, version, authors);
- exit (0);
+ {
+ va_list args;
+ va_start (args, usage_func);
+ version_etc_va (stdout, command_name, package, version, args);
+ exit (0);
+ }
default:
/* Don't process any other long-named options. */