~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to include/strsep.h

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-05-04 11:15:49 UTC
  • mfrom: (1.3.1 upstream)
  • mto: (20.3.1 squeeze) (21.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100504111549-1apjh2g5sndki4te
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17
17
 * USA.
18
18
 */
19
 
 
20
19
#ifndef GNULIB_STRSEP_H_
21
20
#define GNULIB_STRSEP_H_
22
21
 
 
22
#include "config.h"
 
23
 
23
24
#if HAVE_STRSEP
24
25
 
25
26
/*
26
27
 * Get strsep() declaration.
27
28
 */
 
29
#if HAVE_STRING_H
28
30
#include <string.h>
 
31
#endif
29
32
 
30
33
#else
31
34
 
32
 
/* Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
33
 
   If one is found, it is overwritten with a NUL, and *STRINGP is advanced
34
 
   to point to the next char after it.  Otherwise, *STRINGP is set to NULL.
35
 
   If *STRINGP was already NULL, nothing happens.
36
 
   Returns the old value of *STRINGP.
37
 
 
38
 
   This is a variant of strtok() that is multithread-safe and supports
39
 
   empty fields.
40
 
 
41
 
   Caveat: It modifies the original string.
42
 
   Caveat: These functions cannot be used on constant strings.
43
 
   Caveat: The identity of the delimiting character is lost.
44
 
   Caveat: It doesn't work with multibyte strings unless all of the delimiter
45
 
           characters are ASCII characters < 0x30.
46
 
 
47
 
   See also strtok_r().  */
48
 
 
49
 
SQUIDCEXTERN char *strsep (char **stringp, const char *delim);
50
 
 
51
 
#endif
 
35
/**
 
36
\par
 
37
Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
 
38
If one is found, it is overwritten with a NULL, and *STRINGP is advanced
 
39
to point to the next char after it.  Otherwise, *STRINGP is set to NULL.
 
40
If *STRINGP was already NULL, nothing happens.
 
41
Returns the old value of *STRINGP.
 
42
\par
 
43
This is a variant of strtok() that is multithread-safe and supports
 
44
empty fields.
 
45
 
 
46
\note   Caveat: It modifies the original string.
 
47
\note   Caveat: These functions cannot be used on constant strings.
 
48
\note   Caveat: The identity of the delimiting character is lost.
 
49
\note   Caveat: It doesn't work with multibyte strings unless all of the delimiter
 
50
characters are ASCII characters < 0x30.
 
51
 
 
52
See also strtok_r().
 
53
*/
 
54
SQUIDCEXTERN char *strsep(char **stringp, const char *delim);
 
55
 
 
56
#endif /* HAVE_STRSEP */
52
57
 
53
58
#endif /* GNULIB_STRSEP_H_ */