1 /* $NetBSD: setlocale.c,v 1.3 2000/08/11 19:58:34 tshiozak Exp $ */
4 * Written by Gordon W. Ross <gwr@NetBSD.org>
8 #include <sys/localedef.h>
10 #define __SETLOCALE_SOURCE__
14 * Cheap and dirty setlocale() that is just good enough to
15 * satisfy references in programs like cat that do:
16 * setlocale(LC_ALL, "");
17 * Offered with apologies to all non-english speakers...
20 static char current_locale
[32] = { "C" };
22 size_t __mb_cur_max
= 1;
25 __setlocale_mb_len_max_32(category
, locale
)
29 if (category
< 0 || category
>= _LC_LAST
)
32 /* No change of locale is allowed. */
33 if (locale
&& locale
[0])
36 return (current_locale
);