annotate lib/strstr.h @ 7292:17785d5bede0

Fix docstrings
author Sergey Poznyakoff <gray@gnu.org.ua>
date Sun, 10 Sep 2006 11:52:44 +0000
parents 8938a14f38c1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3964
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Searching in a string.
6057
a878a8d58823 Make strstr() work in multibyte locales.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
2 Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
3964
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 2, or (at your option)
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 any later version.
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 along with this program; if not, write to the Free Software Foundation,
5848
a48fb0e98c8c *** empty log message ***
Paul Eggert <eggert@cs.ucla.edu>
parents: 5105
diff changeset
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
3964
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
6234
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
18
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
19 /* Include string.h: on glibc systems, it contains a macro definition of
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
20 strstr() that would collide with our definition if included afterwards. */
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
21 #include <string.h>
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
22
5105
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 3974
diff changeset
23 #ifdef __cplusplus
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 3974
diff changeset
24 extern "C" {
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 3974
diff changeset
25 #endif
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 3974
diff changeset
26
6234
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
27 /* No known system has a strstr() function that works correctly in
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
28 multibyte locales. Therefore we use our version always. */
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
29 #undef strstr
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
30 #define strstr rpl_strstr
8938a14f38c1 Fix redefinition problem: strstr may be defined as a macro in string.h.
Bruno Haible <bruno@clisp.org>
parents: 6057
diff changeset
31
3964
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 /* Find the first occurrence of NEEDLE in HAYSTACK. */
3974
374be83da43b Assume ANSI C.
Bruno Haible <bruno@clisp.org>
parents: 3964
diff changeset
33 extern char *strstr (const char *haystack, const char *needle);
3964
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34
5105
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 3974
diff changeset
35 #ifdef __cplusplus
d088e155d8f6 Add extern "C" for C++.
Bruno Haible <bruno@clisp.org>
parents: 3974
diff changeset
36 }
3964
b48eab35ae58 New header files.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 #endif