[fpc-devel] TProcess empty parameter

Henry Vermaak henry.vermaak at gmail.com
Thu May 7 14:22:42 CEST 2015

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) {...}.


More information about the fpc-devel mailing list