[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: Paul Burba <paulb_at_softlanding.com>
Date: 2006-02-13 14:32:41 CET

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(?)

C) Other?

Paul B.

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
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:34:19 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.