apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Hudson <ghud...@MIT.EDU>
Subject Re: RFC on interface change to apr_getopt_long()
Date Tue, 21 Nov 2000 07:56:52 GMT
> Keep `val', but add const char *short_equivs, I meant.

Okay, so I think the current proposal, with a little renaming to make
everything simple and consistent, is:

typedef struct apr_option_t {
    /** long option name, or NULL if none */
    const char *long_name;
    /** short option letters, or NULL if none */
    const char *short_names;
    /** nonzero if option takes an argument */
    int has_arg;
    /** result to yield when this option is specified */
    int optval;
} apr_option_t;

APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
                                          const apr_option_t *opts,
                                          int *optval, const char **optarg);

Does this sound right to people?  I might or might not implement this
before Fitz gets back from vacation; if not, I'll leave it on his
plate. :)

Mime
View raw message