12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #include <wchar.h>
- #include "locale/runetype.h"
- int
- wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
- {
- if (n == 0)
- return (0);
- do {
- if (*s1 != *s2++) {
-
- return (*(const rune_t *)s1 -
- *(const rune_t *)--s2);
- }
- if (*s1++ == 0)
- break;
- } while (--n != 0);
- return (0);
- }
|