[Top][All Lists]

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

Re: [bug-inetutils] [PATCH 7/7] argp'fied argument parsing & tiny fixes

From: Arash Yadegarnia
Subject: Re: [bug-inetutils] [PATCH 7/7] argp'fied argument parsing & tiny fixes
Date: Sat, 30 Aug 2008 00:07:58 +0430

On Sat, 2008-08-23 at 05:16 -0400, Alfred M. Szmidt wrote: 
> +const char args_doc[] = "f1 ... fn directory";
> Upper case for the arguments.

>    +#ifdef KERBEROS
>    +  {"kerberos", 'K', NULL, 0, "Turns off all Kerberos authentication", 
> GRP+1},
>    +  {"realm", 'k', "REALM", 0, "Obtain tickets for the remote host in REALM"
>    +    "instead of the remote host's realm", GRP+1},
>    +#ifdef CRYPT
>    +  {"encrypt", 'x', NULL, 0, "Encrypt all data using DES", GRP+1},
>    +#endif
>    +#endif
> As before, thse switches should just warn that they are not supported.


As Sergey commented, I packed those two flag variables into a simple
structure. However, I'm not sure if this was our best bet. :-)

        * rcp/rcp.c: Include <argp.h> and <libinetutils/libinetutils.h>.
        Remove include for <getopt.h>.
        (ctrl_flag): New data structure.
        (ARGP_PROGRAM_DATA): Call macro.
        (argp, args_doc, doc, argp_options): New variables.
        (parse_opt): New function.
        (help, usage): Functions removed.
        (short_options, long_options): Variables removed.
        (main): Added new variable INDEX. Use argp to parse program

Attachment: rcp.patch
Description: Text Data

reply via email to

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