bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] Re: Argpifying ping.


From: Debarshi 'Rishi' Ray
Subject: Re: [bug-inetutils] Re: Argpifying ping.
Date: Thu, 5 Apr 2007 22:50:02 +0530

have a couple of macros that the user can define for the program name
etc, or have the hook call another function that sets some global
variables to the correct values (if one dislikes using macros).

You want something like this in gnulib?

#define ARGP_PROGRAM_DATA (command, authors) \
void argp_program_version (FILE *stream, struct argp_state *state) \
{ \
 version_etc (stream, command, PACKAGE_NAME, PACKAGE_VERSION, authors, \
                   (char *) NULL); \
} \
void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) = \
      argp_program_version; \
const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; \

So the user program does:
#define AUTHORS "Foo", "Bar"
ARGP_PROGRAM_DATA ("myprogram", AUTHORS)

Happy hacking,
Debarshi
--
GPG key ID: 63D4A5A7
Key server: pgp.mit.edu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]