(parse_long_options): Make this function variadic (authors), too.
Call version_etc_va, not version_etc.
#include "long-options.h"
+#include <stdarg.h>
#include <stdio.h>
-#include <getopt.h>
#include <stdlib.h>
+#include <getopt.h>
#include "version-etc.h"
const char *command_name,
const char *package,
const char *version,
- const char *authors,
- void (*usage_func)())
+ void (*usage_func)(),
+ ...)
{
int c;
int saved_opterr;
(*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. */