OSDN Git Service

hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing...
[uclinux-h8/uClibc.git] / libc / string / strpbrk.c
1 /*
2  * Copyright (C) 2002     Manuel Novoa III
3  * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
4  *
5  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6  */
7
8 #include "_string.h"
9
10 #ifdef WANT_WIDE
11 # define Wstrpbrk wcspbrk
12 #else
13 # define Wstrpbrk strpbrk
14 #endif
15
16 libc_hidden_proto(Wstrpbrk)
17
18 Wchar *Wstrpbrk(const Wchar *s1, const Wchar *s2)
19 {
20         register const Wchar *s;
21         register const Wchar *p;
22
23         for ( s=s1 ; *s ; s++ ) {
24                 for ( p=s2 ; *p ; p++ ) {
25                         if (*p == *s) return (Wchar *) s; /* silence the warning */
26                 }
27         }
28         return NULL;
29 }
30 libc_hidden_def(Wstrpbrk)