diff options
Diffstat (limited to 'lib/libc/locale/wctype.c')
-rw-r--r-- | lib/libc/locale/wctype.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/libc/locale/wctype.c b/lib/libc/locale/wctype.c index f94a735..5ffbb79 100644 --- a/lib/libc/locale/wctype.c +++ b/lib/libc/locale/wctype.c @@ -2,6 +2,11 @@ * Copyright (c) 2002 Tim J. Robbins. * All rights reserved. * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,17 +35,27 @@ __FBSDID("$FreeBSD$"); #include <ctype.h> #include <string.h> #include <wctype.h> +#include <xlocale.h> #undef iswctype int iswctype(wint_t wc, wctype_t charclass) { - return (__istype(wc, charclass)); } +int +iswctype_l(wint_t wc, wctype_t charclass, locale_t locale) +{ + return __istype_l(wc, charclass, locale); +} +/* + * IMPORTANT: The 0 in the call to this function in wctype() must be changed to + * __get_locale() if wctype_l() is ever modified to actually use the locale + * parameter. + */ wctype_t -wctype(const char *property) +wctype_l(const char *property, locale_t locale) { static const struct { const char *name; @@ -72,3 +87,8 @@ wctype(const char *property) return (props[i].mask); } + +wctype_t wctype(const char *property) +{ + return wctype_l(property, 0); +} |