Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!mit-eddie!mintaka!think!samsung!uunet!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.unix.wizards Subject: Re: Why isn't argv[argc]==(char *)0 ? Keywords: X/OS, Olivetti, LSX, coredump Message-ID: <497@mwtech.UUCP> Date: 24 Nov 89 11:02:13 GMT References: <547.nlhp3@oracle.nl> <1989Nov16.012439.6405@virtech.uucp> <1635@ctisbv.cti-software.nl> <1989@uwbull.uwbln.UUCP> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Distribution: comp Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 25 In article <1989@uwbull.uwbln.UUCP> ckl@uwbln.UUCP (Christoph Kuenkel) writes: [some lines deleted] >which is SVID conformant. as mentioned before, the SVID does not say >anything about argv[argc] but states that > > "argc is the argument count, argv is an array of character pointers > to the argument themselves" My personal opinion is, that the SVID just did forget to mention. I conclude this from a) SVID has several weak points (some errors also) b) On the pages you quote from, I also found nothing about how "envp" is terminated. "envp" is by convention (char *)0 too, and I think this is true on *all* systems, because how would you know otherwise, when to terminate stepping thru "envp"? There is no such thing as "envc"! You may argue, that it is not intended stepping thru "envp" rather use "getenv()" and that this function may have a secret way to determine when to stop. But then, why mention "envp" as formal parameter of "main" at all? Last and final: From the very beginning SVID stated, they will strongly consider full conformance to X3J11 - and X3J11 has no doubt about that argv[argc] is a null pointer. MW