ISO/ IEC JTC1/SC22/WG14 N687

                          Document Number:  WG14 N687/X3J11 __-___
       
       
                               C9X Revision Proposal
                               =====================
       
       Title: Replacement for strtok_______________________________
       Author: Keith Bostic________________________________________
       Author Affiliation: University of California, Berkeley______
       Postal Address: 394 East Riding Dr., Carlisle MA 01741______
       E-mail Address: [email protected]______________________
       Telephone Number: +1 508-287-4781___________________________
       Fax Number: ________________________________________________
       Sponsor: Peter Seebach______________________________________
       Date: 1997-05-17____________________________________________
       Proposal Category:
          __ Editorial change/non-normative contribution
          __ Correction
          Y_ New feature
          __ Addition to obsolescent feature list
          __ Addition to Future Directions
          __ Other (please specify)  ______________________________
       Area of Standard Affected:
          __ Environment
          __ Language
          __ Preprocessor
          Y_ Library
             Y_ Macro/typedef/tag name
             __ Function
             __ Header
          __ Other (please specify)  ______________________________
       Prior Art: Unknown__________________________________________
       Target Audience: Vendors, programmers needing integer types.
       ____________________________________________________________
       ____________________________________________________________
       Related Documents (if any): <inttypes.h> proposal___________
       ____________________________________________________________
       ____________________________________________________________
       Proposal Attached: Y_ Yes __ No, but what's your interest?
       Abstract:

       1: Strtok cannot handle empty fields.
       2: Strtok cannot handle more than a single string at a time.
       
       Proposal:

       Provide strsep as a replacement.

       char * strsep(char **stringp, char *delim);

       The strsep() function locates, in the string referenced
       by *stringp, the first occurrence of any character in
       the string delim (or the terminating `\0' character) and
       replaces it with a `\0'.  The location of the next
       character after the delimiter character (or NULL, if the
       end of the string was reached) is stored in *stringp.
       The original value of *stringp is returned.