Re: [Patch] subcommand-specific option descriptors
From: Max Bowsher <maxb1_at_ukf.net>
Date: 2006-02-18 20:13:19 CET
-----BEGIN PGP SIGNED MESSAGE-----
Christian Stork wrote:
Thanks for the patch (and sorry for taking so long to get back to this
I've committed (r18522) changes that accomplish this.
Here are my comments on your patch, to explain why I didn't use it directly.
> * trunk/subversion/include/svn_opt.h (svn_opt_option_desc_t):
Message garbled a bit, you've got svn_opt_option_desc_t and
In any case, I think we can use an anonymous struct definition here.
> * trunk/subversion/libsvn_subr/opt.c (print_command_info,
I feel it is better to make svn_opt_get_option_from_code return the
> * trunk/subversion/clients/cmdline/main.c (svn_cl__cmd_table): Fill
We can use the C compiler's 'static initializer zero-fill' behaviour to
> I know that changing the public type svn_opt_subcommand_desc_t needs a
Indeed. It's the bulk of the changes, even.
> + apr_getopt_option_t *option;
This is broken - I suspect it would have printed uninitialized data. To
Also, to assign to a struct, it's a lot clearer to just do a direct
*option = *svn_opt_get_option_from_code(code, options_table);
Max.
iD8DBQFD93HPfFNSmcDyxYARAjHQAJ4w8UdjkDYf2BPKTRA9xGkQskKvqQCeOFHu
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.