master
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7#define __CRT__NO_INLINE
8#include <wchar.h>
9
10#if 0
11wchar_t *wmemchr(s, c, n)
12 register const wchar_t *s;
13 register wchar_t c;
14 register size_t n;
15{
16 if ( s != NULL )
17 for ( ; n > 0; ++s, --n )
18 if ( *s == c )
19 return (wchar_t *)s;
20
21 return NULL;
22}
23#endif
24
25_CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *_S,wchar_t _C,size_t _N)
26{
27 if (_S != NULL)
28 {
29 for ( ; 0 < _N; ++_S, --_N)
30 if (*_S == _C)
31 return (_CONST_RETURN wchar_t *)(_S);
32 }
33 return NULL;
34}
35