Mercurial > hg > octave-nkf > gnulib-hg
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 |
rev | line source |
---|---|
3964 | 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 | 3 |
4 This program is free software; you can redistribute it and/or modify | |
5 it under the terms of the GNU General Public License as published by | |
6 the Free Software Foundation; either version 2, or (at your option) | |
7 any later version. | |
8 | |
9 This program 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 | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
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 | 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 | 23 #ifdef __cplusplus |
24 extern "C" { | |
25 #endif | |
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 | 32 /* Find the first occurrence of NEEDLE in HAYSTACK. */ |
3974 | 33 extern char *strstr (const char *haystack, const char *needle); |
3964 | 34 |
5105 | 35 #ifdef __cplusplus |
36 } | |
3964 | 37 #endif |