OSDN Git Service

hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing...
[uclinux-h8/uClibc.git] / libc / string / strchr.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 Wstrchr wcschr
12 #else
13 # define Wstrchr strchr
14 #endif
15
16 libc_hidden_proto(Wstrchr)
17
18 Wchar *Wstrchr(register const Wchar *s, Wint c)
19 {
20         do {
21                 if (*s == ((Wchar)c)) {
22                         return (Wchar *) s;     /* silence the warning */
23                 }
24         } while (*s++);
25
26         return NULL;
27 }
28 libc_hidden_def(Wstrchr)
29
30 #ifndef WANT_WIDE
31 strong_alias(strchr,index)
32 #endif