home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / alt / hackers / 1155 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  1.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ocf.berkeley.edu!alanc
  2. From: alanc@ocf.berkeley.edu (Alan Coopersmith)
  3. Newsgroups: alt.hackers
  4. Subject: Re: not a test
  5. Date: 24 Jul 1992 05:01:01 GMT
  6. Organization: U.C. Bezerkeley Overloaded Computing Facility
  7. Lines: 22
  8. Approved: Apollos 4ever!
  9. Message-ID: <14o2qdINN6c0@agate.berkeley.edu>
  10. References: <1992Jul23.075512.21400@cbfsb.cb.att.com> <1992Jul23.101031.27724@jarvis.csri.toronto.edu> <0JNHGMG@taronga.com>
  11. NNTP-Posting-Host: ocf.berkeley.edu
  12.  
  13. In article <0JNHGMG@taronga.com> peter@taronga.com (Peter da Silva) writes:
  14. )In article <1992Jul23.101031.27724@jarvis.csri.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes:
  15. )>good god, please just use strtok().  Get to know your friendly neighbourhood C
  16. )>library.  This is EXACTLY what strtok() is for.
  17. )
  18. )Good god, please don't use strtok. It's inherently non-reentrant and it's not
  19. )even usable in cooperative threads. Define a new function that operates on a
  20. )string handle or a string file, but let strtok die a well deserved death.
  21.  
  22. From the strings.h man page of Apollo Domain O/S 10.4: (which has a threads
  23. interface based on Mach's)
  24.      The strtok_r function is the reentrant version of strtok.  Upon
  25.      successful completion, the first character of the next token is stored
  26.      in **last_string, and a value of 0 (zero) is returned.
  27.  
  28. This from the dying O/S that is supplying many of its features to OSF/1...
  29.  
  30.  
  31. -- 
  32. ------------------------------------------------------------------------
  33. Alan Coopersmith            Internet: alanc@ocf.berkeley.edu
  34. University of California, Berkeley    Bitnet:   alanc@UCBOCF.BITNET
  35.