diff options
author | ache <ache@FreeBSD.org> | 2003-06-10 01:26:04 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-06-10 01:26:04 +0000 |
commit | 4b34a4e4b4c58c062143c006de63eabb25dec94d (patch) | |
tree | 0bb6d63c915277126de51d40adaab8fa4cbc1faf /lib/libc | |
parent | 7cae476f790ed194589c975565f6465edc79d14d (diff) | |
download | FreeBSD-src-4b34a4e4b4c58c062143c006de63eabb25dec94d.zip FreeBSD-src-4b34a4e4b4c58c062143c006de63eabb25dec94d.tar.gz |
Remove transition period hack
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/locale/nl_langinfo.c | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/lib/libc/locale/nl_langinfo.c b/lib/libc/locale/nl_langinfo.c index 7672e41..d279d1a 100644 --- a/lib/libc/locale/nl_langinfo.c +++ b/lib/libc/locale/nl_langinfo.c @@ -38,8 +38,6 @@ __FBSDID("$FreeBSD$"); #include "lmonetary.h" #include "lmessages.h" -#define TRANSITION_PERIOD_HACK - #define _REL(BASE) ((int)item-BASE) char * @@ -47,42 +45,15 @@ nl_langinfo(nl_item item) { char *ret, *s, *cs; static char *csym = NULL; -#ifdef TRANSITION_PERIOD_HACK - static char *cset = NULL; -#endif /* TRANSITION_PERIOD_HACK */ switch (item) { case CODESET: ret = ""; if ((s = setlocale(LC_CTYPE, NULL)) != NULL) { - if ((cs = strchr(s, '.')) != NULL) { + if ((cs = strchr(s, '.')) != NULL) ret = cs + 1; -#ifdef TRANSITION_PERIOD_HACK - if (strncmp(ret, "ISO_", 4) == 0) { - int slen = strlen(ret); - - if ((cset = reallocf(cset, slen)) != NULL) { - strcpy(cset, "ISO"); - strcat(cset, ret + 4); - ret = cset; - } else - ret = ""; - } else if (strcmp(ret, "EUC") == 0) { - if (strncmp(s, "ja_JP", 5) == 0) - ret = "eucJP"; - else if (strncmp(s, "ko_KR", 5) == 0) - ret = "eucKR"; - else if (strncmp(s, "zh_CN", 5) == 0) - ret = "eucCN"; - } else if (strcmp(ret, "ASCII") == 0) - ret = "US-ASCII"; -#endif /* TRANSITION_PERIOD_HACK */ - } else if (strcmp(s, "C") == 0 || - strcmp(s, "POSIX") == 0 -#ifdef TRANSITION_PERIOD_HACK - || strstr(s, "ASCII") != NULL -#endif /* TRANSITION_PERIOD_HACK */ - ) + else if (strcmp(s, "C") == 0 || + strcmp(s, "POSIX") == 0) ret = "US-ASCII"; } break; |