Why isn't argv[argc]==(char *)0 ?

Christoph Kuenkel ckl at uwbln.UUCP
Fri Nov 24 00:08:12 AEST 1989


In article <1635 at ctisbv.cti-software.nl>, pim at cti-software.nl (Pim Zandbergen) writes:
> guy at auspex.auspex.com (Guy Harris) writes:
> >(I.e., unless you have to deal with an archaic UNIX or a Mutant UNIX
> >From Hell, you can count on argv[argc] == 0.)
> 
> In X/OS, a SYSV/BSD hybrid operating system for the Olivetti LSX
> minicomputers, a reference to argv[argc] will make your program dump core.
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"

thus *(argv[argc]) may legally dump core.
-- 
# include <std/disclaimer.h>
Christoph Kuenkel/UniWare GmbH       Kantstr. 152, 1000 Berlin 12, West Germany
ck at tub.BITNET                ckl at uwbln             {unido,tmpmbx,tub}!uwbln!ckl



More information about the Comp.unix.wizards mailing list