On Thu, May 07, 2015 at 02:15:07PM +0200, Marco van de Voort wrote:
> In our previous episode, Michael Van Canneyt said:
> > >
> > > Since NIL is a termination of an array of pchar in C that is not ok.
> >
> > if that were the case, argc would not have been introduced,
> > which is why I doubt the use of this argument ?
>
> Where is argc on the calling side? In the parameters of ExecVE ? Right.
>
> > C code that regards nil as the last element of the argv array is just
> > wrong.
>
> IMHO *nix is not terribly well designed. Probably the multitude of versions
> and being interwoven with C prohibited doing massive cleanups.
The (redundant) argv[argc] == NULL thing was added because of common
practice, I think. It's pretty common to see while (*argv) {...}.
Henry
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel