diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-08-05 15:16:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-08-05 15:16:33 +0000 |
commit | 8651222619310fad01ae84fa049769e8b5e2e636 (patch) | |
tree | 3f5625096fc9b6787c3b7278d213f299361e5ba8 /lib/libc/locale | |
parent | b4913cc92648492fb0b11ce20fe7529fc112ee39 (diff) |
We only support ASCII and UTF-8, so we never need to
change _ctype_, _tolower_tab_, and _toupper_tab_.
No functional change.
Suggested by and OK kettenis@
Diffstat (limited to 'lib/libc/locale')
-rw-r--r-- | lib/libc/locale/rune_local.h | 3 | ||||
-rw-r--r-- | lib/libc/locale/runeglue.c | 16 | ||||
-rw-r--r-- | lib/libc/locale/setlocale.c | 4 |
3 files changed, 3 insertions, 20 deletions
diff --git a/lib/libc/locale/rune_local.h b/lib/libc/locale/rune_local.h index 7f2d5d90a5b..43428a0b888 100644 --- a/lib/libc/locale/rune_local.h +++ b/lib/libc/locale/rune_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rune_local.h,v 1.5 2016/09/05 09:47:03 schwarze Exp $ */ +/* $OpenBSD: rune_local.h,v 1.6 2017/08/05 15:16:32 schwarze Exp $ */ /* $NetBSD: rune_local.h,v 1.7 2003/03/02 22:18:15 tshiozak Exp $ */ /*- @@ -42,7 +42,6 @@ extern int _newrunelocale(const char *); /* runeglue.c */ extern int __make_ctype_tabs(_RuneLocale *); -extern void __install_currentrunelocale_ctype(void); /* ___runetype_mb.c */ extern _RuneType ___runetype_mb(wint_t); diff --git a/lib/libc/locale/runeglue.c b/lib/libc/locale/runeglue.c index 33e3a2bc523..058e9f1bf0a 100644 --- a/lib/libc/locale/runeglue.c +++ b/lib/libc/locale/runeglue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: runeglue.c,v 1.4 2015/10/01 02:32:07 guenther Exp $ */ +/* $OpenBSD: runeglue.c,v 1.5 2017/08/05 15:16:32 schwarze Exp $ */ /* $NetBSD: runeglue.c,v 1.10 2003/03/10 21:18:49 tshiozak Exp $ */ /*- @@ -112,17 +112,3 @@ __make_ctype_tabs(_RuneLocale *rl) return 0; } - -void -__install_currentrunelocale_ctype() -{ - if (_CurrentRuneLocale->rl_tabs != NULL) { - _ctype_ = _CurrentRuneLocale->rl_tabs->ctype_tab; - _toupper_tab_ = _CurrentRuneLocale->rl_tabs->toupper_tab; - _tolower_tab_ = _CurrentRuneLocale->rl_tabs->tolower_tab; - } else { - _ctype_ = _C_ctype_; - _toupper_tab_ = _C_toupper_; - _tolower_tab_ = _C_tolower_; - } -} diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index 04224da8fee..33578a9815c 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setlocale.c,v 1.25 2016/05/23 00:05:15 guenther Exp $ */ +/* $OpenBSD: setlocale.c,v 1.26 2017/08/05 15:16:32 schwarze Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -194,7 +194,6 @@ revert_to_default(int category) switch (category) { case LC_CTYPE: (void)_xpg4_setrunelocale("C"); - __install_currentrunelocale_ctype(); break; case LC_MESSAGES: case LC_COLLATE: @@ -236,7 +235,6 @@ load_locale_sub(int category, const char *locname) case LC_CTYPE: if (_xpg4_setrunelocale(locname)) return -1; - __install_currentrunelocale_ctype(); break; case LC_MESSAGES: |