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: Alfred M. Szmidt
Subject: Re: [bug-inetutils] Re: Argpifying ping.
Date: Thu, 5 Apr 2007 19:37:30 +0200 (CEST)

   > 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)

If that works, it might be a good idea.  But it should be thought
about carefully before adding it to gnulib, would suck to change it
alot later on.  One could use global variables instead of macros as
well.




reply via email to

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