Branko Čibej wrote:
> Paul Burba wrote:
>> But I confess I'm a bit uneasy about how I modify argv. I pass &argv
>> to svn_cmdline_args_from_ebcdic(), convert the args to utf-8 in a
>> separately allocated char ** and then cast away argv's "constness" so
>> I can point it at the converted char **. Is avoiding const like this
>> legit? (Somewhere in the back of my head the ghostly voice of a CS
>> TA is saying "Woooo...don't cast away a const!" :-)
> The canonical prototype for main() is:
>
> int main (int argc, const char *argv[]);
>
> So, argv is an array of pointers to const char, but the argv array
> itself is _not_ unmodifiable.
Interestingly enough, we have the same kind of wrong-headed code in
find_tunnel_agent() in libsvn_ra_svn/client.c ...
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 11 00:25:33 2006