|
|
@ -1,4 +1,4 @@ |
|
|
|
/* $OpenBSD: wmemcmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ |
|
|
|
/* $OpenBSD: wmemcmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $ */ |
|
|
|
/* $NetBSD: wmemcmp.c,v 1.3 2003/04/06 18:33:23 tshiozak Exp $ */ |
|
|
|
|
|
|
|
/*- |
|
|
@ -30,7 +30,7 @@ |
|
|
|
*/ |
|
|
|
|
|
|
|
#if defined(LIBC_SCCS) && !defined(lint) |
|
|
|
static char *rcsid = "$OpenBSD: wmemcmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; |
|
|
|
static char *rcsid = "$OpenBSD: wmemcmp.c,v 1.3 2005/08/08 05:53:01 espie Exp $"; |
|
|
|
#endif /* LIBC_SCCS and not lint */ |
|
|
|
|
|
|
|
#include <wchar.h> |
|
|
@ -44,8 +44,8 @@ wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n) |
|
|
|
for (i = 0; i < n; i++) { |
|
|
|
if (*s1 != *s2) { |
|
|
|
/* wchar might be unsigned */ |
|
|
|
return *(const __nbrune_t *)s1 > |
|
|
|
*(const __nbrune_t *)s2 ? 1 : -1; |
|
|
|
return *(const rune_t *)s1 > |
|
|
|
*(const rune_t *)s2 ? 1 : -1; |
|
|
|
} |
|
|
|
s1++; |
|
|
|
s2++; |
|
|
|