[Top][All Lists]
[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
- Re: [bug-inetutils] Re: Argpifying ping., Debarshi 'Rishi' Ray, 2007/04/04
- Re: [bug-inetutils] Re: Argpifying ping., Debarshi 'Rishi' Ray, 2007/04/04
- [bug-inetutils] Re: Argpifying ping., Simon Josefsson, 2007/04/05
- [bug-inetutils] Re: Argpifying ping., Debarshi 'Rishi' Ray, 2007/04/05
- Re: [bug-inetutils] Re: Argpifying ping., Alfred M. Szmidt, 2007/04/05
- Re: [bug-inetutils] Re: Argpifying ping.,
Debarshi 'Rishi' Ray <=
- Re: [bug-inetutils] Re: Argpifying ping., Alfred M. Szmidt, 2007/04/05
- Re: [bug-inetutils] Re: Argpifying ping., Debarshi 'Rishi' Ray, 2007/04/08
- Re: [bug-inetutils] Re: Argpifying ping., Alfred M. Szmidt, 2007/04/09
- Re: [bug-inetutils] Re: Argpifying ping., Debarshi 'Rishi' Ray, 2007/04/11
- Re: [bug-inetutils] Re: Argpifying ping., Alfred M. Szmidt, 2007/04/12
- Re: [bug-inetutils] Re: Argpifying ping., Debarshi 'Rishi' Ray, 2007/04/12
- [bug-inetutils] Re: Argpifying ping., Simon Josefsson, 2007/04/12
- [bug-inetutils] Re: Argpifying ping., Alfred M. Szmidt, 2007/04/12
- [bug-inetutils] Re: Argpifying ping., Debarshi 'Rishi' Ray, 2007/04/12
- [bug-inetutils] Re: Argpifying ping., Alfred M. Szmidt, 2007/04/13