Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!agate!saab.stanford.edu!portia.stanford.edu!keith From: keith@portia.Stanford.EDU (keith farrar) Newsgroups: comp.sys.mac.programmer Subject: strtok() bug in MPW C 3.1 Summary: it returns EOF for null string!!! Keywords: MPW strtok Message-ID: <1990Sep28.003431.4027@portia.Stanford.EDU> Date: 28 Sep 90 00:34:31 GMT Reply-To: keith@markets.UUCP (Keith Farrar) Followup-To: keith@markets.amix.com Distribution: usa Organization: AMIX Corp., Palo Alto, CA Lines: 18 Last night, I had a text parser I wrote run amok, because strtok() was returning EOF when it reached the end of the string (i.e. it was fed a null string). I suspect that it also has broken some serial comm code we are porting to the mac. The documented convention is for it then to return a NULL pointer - according to my ansi guides and my MPW C manual. Has this been brought up before? Is there a fix available? ______________________________________________________________________ | Keith Farrar | | AMIX Corporation | | Palo Alto, CA "The Iron Curtain is the | | (415) 856-1234 x217 Maginot Line of technology" | | -Ronald Reagan | | DOMAIN: keith@markets.amix.com | | UUCP: {uunet|sun|xanadu!}markets!keith | ----------------------------------------------------------------------