Line | |
---|
1 | /*
|
---|
2 | * setlocale - set the programs locale
|
---|
3 | */
|
---|
4 | /* $Header: /cvsup/minix/src/lib/ansi/setlocale.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
|
---|
5 |
|
---|
6 | #include <locale.h>
|
---|
7 | #include <string.h>
|
---|
8 |
|
---|
9 | struct lconv _lc;
|
---|
10 |
|
---|
11 | char *
|
---|
12 | setlocale(int category, const char *locale)
|
---|
13 | {
|
---|
14 | if (!locale) return "C";
|
---|
15 | if (*locale && strcmp(locale, "C")) return (char *)NULL;
|
---|
16 |
|
---|
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;
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.