martin@mwtech.UUCP (Martin Weitzel) (11/22/89)
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)
wescott@Columbia.NCR.COM (Mike Wescott) (11/24/89)
In article <477@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes: > 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++). Not fixed in V.3.2, probably fixed in V.4 by restricting to one input file. A patch to fix this and several other lex bugs was posted about a year ago to comp.bugs.sys5, I'll mail it to anyone that needs it. I guess that I'm not a wizard since my answer didn't begin with "It depends ..." -- -Mike Wescott mike.wescott@ncrcae.Columbia.NCR.COM