diff options
author | ache <ache@FreeBSD.org> | 1995-02-16 04:24:39 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-02-16 04:24:39 +0000 |
commit | 472ef98cfb41668dee3c9f21484591b5eae44679 (patch) | |
tree | e465d799627f4d138821a4405f3d5255f0a64df0 /lib/libc/locale/setlocale.c | |
parent | a29b82d0e3e1b9a6ff39663d3c59a6673b39a1ba (diff) | |
download | FreeBSD-src-472ef98cfb41668dee3c9f21484591b5eae44679.zip FreeBSD-src-472ef98cfb41668dee3c9f21484591b5eae44679.tar.gz |
Add 8-bit collate stuff
Submitted by: alex@elvisti.kiev.ua
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 0f4a77b..20bcb6a 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -158,6 +158,14 @@ loadlocale(category) return (current_categories[LC_CTYPE]); } + if (category == LC_COLLATE) { + if (__collate_load_tables(new_categories[LC_COLLATE]) < 0) + return (NULL); + (void)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")) { @@ -178,7 +186,6 @@ loadlocale(category) PathLocale, new_categories[category], categories[category]); #endif switch (category) { - case LC_COLLATE: case LC_MONETARY: case LC_NUMERIC: case LC_TIME: |