Uninitialized vector entry?
[minix3.git] / lib / ansi / setlocale.c
blob87bb74a551e27bfe5aca889aa701edb26126c3f2
1 /*
2 * setlocale - set the programs locale
3 */
4 /* $Header$ */
6 #include <locale.h>
7 #include <string.h>
9 struct lconv _lc;
11 char *
12 setlocale(int category, const char *locale)
14 if (!locale) return "C";
15 if (*locale && strcmp(locale, "C")) return (char *)NULL;
17 switch(category) {
18 case LC_ALL:
19 case LC_CTYPE:
20 case LC_COLLATE:
21 case LC_TIME:
22 case LC_NUMERIC:
23 case LC_MONETARY:
24 return *locale ? (char *)locale : "C";
25 default:
26 return (char *)NULL;