> As far as I understand, the traditional ifconfig invocation was
   > being handled by this snippet of code after the while loop
   > involving getopt

   OK, here is the fixed patch, than. Notice `#define program_name
   program_invocation_short_name' in ifconfig.h and removal of the
   program_name global.  The initialization of
   program_invocation_short_name is done by argp automatically, so
   there's no use assigning it explicitely.

Why not just use program_invocation_short_name instead of "redefining"
(in the sense that program_name already has a meaning in programs)?

   --- options.c        21 Oct 2006 15:24:20 -0000      1.11
   +++ options.c        4 Apr 2007 18:37:46 -0000
   @@ -164,7 +204,8 @@ usage (int err)
    {
      if (err != EXIT_SUCCESS)
        {
   -      fprintf (stderr, "Usage: %s [OPTION]...%s\n", program_name,
   +      fprintf (stderr, "Usage: %s [OPTION]...%s\n",
   +           program_name,
                  system_help ? " [SYSTEM OPTION]..." : "");
          fprintf (stderr, "Try `%s --help' for more information.\n",
                  program_name);

This (and other such places) should use argp_error().  

Also, it might be a good idea to skip the `system_help ? " [SYSTEM
OPTION]..." : ""'; it is a optional argument, so it doesn't hurt
mentioning even if there are no system options.


_______________________________________________
bug-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-inetutils

Reply via email to