diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 1995-08-04 18:43:01 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 1995-08-04 18:43:01 +0000 |
| commit | c28fbb7baac0373cbcdc4b29c393eb0be9c9d859 (patch) | |
| tree | 8641f513c554873ed1c7b7aaa44b82a99dd1fe16 /lib/libc/locale/setlocale.c | |
| parent | 84be91cbafa92e6852ef8fb5a143d42a8543432e (diff) | |
Notes
Diffstat (limited to 'lib/libc/locale/setlocale.c')
| -rw-r--r-- | lib/libc/locale/setlocale.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index 20bcb6a77aee..80669430d70a 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -166,6 +166,14 @@ loadlocale(category) return (current_categories[LC_COLLATE]); } + if (category == LC_TIME) { + if (__time_load_locale(new_categories[LC_TIME]) < 0) + return (NULL); + strcpy(current_categories[LC_COLLATE], + new_categories[LC_COLLATE]); + return (current_categories[LC_COLLATE]); + } + if (!strcmp(new_categories[category], "C") || !strcmp(new_categories[category], "POSIX")) { @@ -188,7 +196,6 @@ loadlocale(category) switch (category) { case LC_MONETARY: case LC_NUMERIC: - case LC_TIME: return (NULL); } } |
