[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: Branko Čibej <brane_at_xbc.nu>
Date: 2006-02-13 14:48:09 CET

Paul Burba wrote:
> Julian Foad <julianfoad@btopenworld.com> wrote on 02/10/2006 08:56:56 PM:
>
>
>> Julian Foad wrote:
>>
>>> Branko Čibej wrote:
>>>
>>>
>>>> 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 [...]
>>>
>> Nevertheless, I'm keen on minimalism and agree with you that replacing
>>
> the
>
>> pointers in place is better from that point of view; if our roles had
>>
> been
>
>> reversed I would probably have pointed it out. :-)
>>
>> - Julian
>>
>
> Hi All,
>
> Sorry, I just missed this discussion Friday evening. At least I can now
> use Brane's suggestion. Just one problem, the only main() function that
> will currently allow us to change the argv pointers in place is
> svnversion:
>
> svnversion: int main (int argc, const char *argv[])
>
> The other command line programs declare the pointers as const:
>
> svnlook: int main (int argc, const char * const *argv)
> svn: int main (int argc, const char * const *argv)
> svnadmin: int main (int argc, const char * const *argv)
> svndumpfilter: int main (int argc, const char * const *argv)
> svnserve: int main (int argc, const char * const *argv)
> svnsync: int main (int argc, const char * const argv[])
>
> So, should I:
>
> A) Use the previous approach and create a new array?
>
> B) Modify the signatures of the offending main()s to
>
> int main(int argc, char *argv[])
>
> Brane, I'm not sure if your suggestion implied I should do this(?)
>
I think doing this should be O.K. After all, main() isn't a public API,
so we can change the signature as long as the change compiles with C rules.

I would take into account Mike's point about log messages being in a
non-default encoding, though.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 13 14:49:56 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.