diff options
author | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
commit | ab124e78b0271ddb904b761b31e5c9a0cf24e070 (patch) | |
tree | 0cf1447720c45721ed3d214a4eaaa6834bda155d /lib/libc/locale/common_setlocale.c | |
parent | 15748830d0fcd29294a1969a1012655e74908c1e (diff) | |
download | FreeBSD-src-ab124e78b0271ddb904b761b31e5c9a0cf24e070.zip FreeBSD-src-ab124e78b0271ddb904b761b31e5c9a0cf24e070.tar.gz |
recording cvs-1.6 file death
Diffstat (limited to 'lib/libc/locale/common_setlocale.c')
-rw-r--r-- | lib/libc/locale/common_setlocale.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/lib/libc/locale/common_setlocale.c b/lib/libc/locale/common_setlocale.c deleted file mode 100644 index 2dd549f..0000000 --- a/lib/libc/locale/common_setlocale.c +++ /dev/null @@ -1,64 +0,0 @@ -#include <locale.h> -#include <string.h> - -/* - * Category names for getenv() - */ -char *_categories[_LC_LAST] = { - "LC_ALL", - "LC_COLLATE", - "LC_CTYPE", - "LC_MONETARY", - "LC_NUMERIC", - "LC_TIME", -}; - -/* - * Current locales for each category - */ -char _current_categories[_LC_LAST][32] = { - "C", - "C", - "C", - "C", - "C", - "C", -}; - -/* - * The locales we are going to try and load - */ -char _new_categories[_LC_LAST][32]; - -char _current_locale_string[_LC_LAST * 33]; - -char * -_currentlocale() -{ - int i, len; - - (void)strcpy(_current_locale_string, _current_categories[1]); - - for (i = 2; i < _LC_LAST; ++i) - if (strcmp(_current_categories[1], _current_categories[i])) { - len = strlen(_current_categories[1]) + 1 + - strlen(_current_categories[2]) + 1 + - strlen(_current_categories[3]) + 1 + - strlen(_current_categories[4]) + 1 + - strlen(_current_categories[5]) + 1; - if (len > sizeof(_current_locale_string)) - return NULL; - (void) strcpy(_current_locale_string, _current_categories[1]); - (void) strcat(_current_locale_string, "/"); - (void) strcat(_current_locale_string, _current_categories[2]); - (void) strcat(_current_locale_string, "/"); - (void) strcat(_current_locale_string, _current_categories[3]); - (void) strcat(_current_locale_string, "/"); - (void) strcat(_current_locale_string, _current_categories[4]); - (void) strcat(_current_locale_string, "/"); - (void) strcat(_current_locale_string, _current_categories[5]); - break; - } - return (_current_locale_string); -} - |