[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] #1 Update on port to OS400/EBCDIC

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-02-11 02:18:42 CET

Branko Čibej wrote:
>
> 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.

Oh, OK.

> The correct way to modify the argv array is to replace the pointers in
> place; like this:

That's _a_ correct way to do it, but providing a whole new array is also a
correct way and has the advantage that a caller might want to keep the old
array around to reference the unconverted strings, e.g. in the scenario of one
of the arguments being passed in a different encoding from the rest, like
possibly in an implementation that supports Mike Pilato's idea of "svn commit
-m <Shift-JIS log message> --encoding Shift-JIS ...".

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 11 02:19:11 2006

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.