wcsncmp.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
wcsncmp.c (238B)
---
1 #include <wchar.h>
2
3 #undef wcsncmp
4
5 int
6 wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
7 {
8 unsigned long l1, l2;
9
10 for ( ; n > 0 && *s1 == *s2; --n)
11 ++s1, ++s2;
12
13 if (n == 0)
14 return 0;
15 l1 = *s1, l2 = *s2;
16
17 return l1 - l2;
18 }