-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
#include <endian.h>
#include <string.h>
#include <wctype.h>
-#include "../locale/localeinfo.h"
+#include <locale/localeinfo.h>
wctype_t
-wctype (const char *property)
+__wctype (const char *property)
{
const char *names;
wctype_t result;
+ size_t proplen = strlen (property);
names = _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS_NAMES);
for (result = 1; result != 0; result <<= 1)
{
- if (strcmp (property, names) == 0)
+ size_t nameslen = strlen (names);
+
+ if (proplen == nameslen && memcmp (property, names, proplen) == 0)
break;
- names = strchr (names, '\0') + 1;
+ names += nameslen + 1;
if (names[0] == '\0')
return 0;
}
return SWAPU32 (result);
#endif
}
+weak_alias (__wctype, wctype)