Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!uunet!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.unix.wizards Subject: 'lex' with argc > 2 (was Re: Why isn't argv[argc]==(char *)0 ?) Message-ID: <477@mwtech.UUCP> Date: 21 Nov 89 20:09:37 GMT References: <547.nlhp3@oracle.nl> <11606@smoke.BRL.MIL> <1979@uwbull.uwbln.UUCP> <3053@cello.UUCP> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Distribution: comp Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 23 In article <3053@cello.UUCP> dcm@toysrus.UUCP (dcm) writes: [lines deleted] >Argc should always be correct. Who cares about argv[argc]? Many many existing programs do! Now my question to all *real* wizards: The man page for 'lex' states, that there may be more than one file argument. Besides, that this doesn't seem to be of much worth (a rather crude include mechanism?), it doesn't work on most system (core dump or worse++). The interesting part is, that this bug must be very old, because you can find it in very different ports of SysVs (680*0 as well as 80*86) but also in different flavours of XENIXs. Does anyone know, how and when this bug went into 'lex' and if some port of UNIX has allready fixed it. (Maybe, the problem is related to the change from argv[argc] == -1 to argv[argc] == 0 with the transition from V6 to V7, I just learned about from the discussion here.) [++ I've used even a XENIX-Implementation for an 80186 - a CPU with insufficient memory protection - where this particular bug causes crashes the systems completly ...] Please E-Mail, I'll post a summary ... Martin Weitzel (martin@mwtech.UUCP)