Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.wizards Subject: Re: Why isn't argv[argc]==(char *)0 ? Summary: it is. Message-ID: <1989Nov16.012439.6405@virtech.uucp> Date: 16 Nov 89 01:24:39 GMT References: <547.nlhp3@oracle.nl> Organization: Virtual Technologies Inc. Lines: 16 In article <547.nlhp3@oracle.nl>, bengsig@oracle.nl (Bjorn Engsig) writes: > The execv family of system calls all have char *argv[] as their second > parameter, and you are required to put an endmarker as (char *)0 in it. > On the other hand, main has int argc and char *argv[] but here, the > endmarker has disappeared. Has it ever been considered to change the defi- argv has always had an endmarker. Older versions had the convention that argv[argc] == -1. Currently under System V argv[argc] = (char *) 0. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+