Debian Codegraph @

src/arch/wcslen.c

raw
1 /*
2 Replacement wcslen for systems lacking such.
3 */
4
5 /* need config.h for HAVE_WCHAR_H */
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif
9
10 #ifdef HAVE_WCHAR_H
11 #include <wchar.h>
12 #endif
13 #include <stdlib.h>
14 #include "arch.h"
15
16 size_t wcslen (const wchar_t *s)
17 {
18 const wchar_t *p;
19 for (p=s; *p; ++p)
20 ;
21 return p-s;
22 }
23