~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: 2006-11-11 10:32:06 UTC
  • Revision ID: james.westby@ubuntu.com-20061111103206-f3p0r9g0vq44rp3r
Tags: upstream-3.0.PRE5
ImportĀ upstreamĀ versionĀ 3.0.PRE5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2004 Free Software Foundation, Inc.
 
2
 * Written by Yoann Vandoorselaere <yoann@prelude-ids.org>
 
3
 *
 
4
 * The file is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Lesser General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2.1 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This file is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Lesser General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this file; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 
17
 * USA.
 
18
 */
 
19
 
 
20
#ifndef GNULIB_STRSEP_H_
 
21
#define GNULIB_STRSEP_H_
 
22
 
 
23
#if HAVE_STRSEP
 
24
 
 
25
/*
 
26
 * Get strsep() declaration.
 
27
 */
 
28
#include <string.h>
 
29
 
 
30
#else
 
31
 
 
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
 
52
 
 
53
#endif /* GNULIB_STRSEP_H_ */