summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/setrunelocale.c
diff options
context:
space:
mode:
authorphantom <phantom@FreeBSD.org>2005-02-27 15:11:09 +0000
committerphantom <phantom@FreeBSD.org>2005-02-27 15:11:09 +0000
commit23d961a13f47abb00dde86ee46e2e766a478aca4 (patch)
tree69f481163c9449c668aa58cf3fa5dbc37df51899 /lib/libc/locale/setrunelocale.c
parent31651f25d817b24f6d2b1ef090ac6120d90ed86a (diff)
downloadFreeBSD-src-23d961a13f47abb00dde86ee46e2e766a478aca4.zip
FreeBSD-src-23d961a13f47abb00dde86ee46e2e766a478aca4.tar.gz
. Static'ize functions exported via function reference variables only.
. Replace inclusion of sys/param.h to sys/cdefs.h and sys/types.h where appropriate. . move _*_init() prototypes to mblocal.h, and remove these prototypes from .c files . use _none_init() in __setrunelocale() instead of duplicating code . move __mb* variables from table.c to none.c allowing us to not to export _none_*() externs, and appropriately remove them from mblocal.h Ok'ed by: tjr
Diffstat (limited to 'lib/libc/locale/setrunelocale.c')
-rw-r--r--lib/libc/locale/setrunelocale.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index 53699e7..398bfc5 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -49,14 +49,6 @@ __FBSDID("$FreeBSD$");
#include "mblocal.h"
#include "setlocale.h"
-extern int _none_init(_RuneLocale *);
-extern int _UTF8_init(_RuneLocale *);
-extern int _EUC_init(_RuneLocale *);
-extern int _GB18030_init(_RuneLocale *);
-extern int _GB2312_init(_RuneLocale *);
-extern int _GBK_init(_RuneLocale *);
-extern int _BIG5_init(_RuneLocale *);
-extern int _MSKanji_init(_RuneLocale *);
extern _RuneLocale *_Read_RuneMagi(FILE *);
static int __setrunelocale(const char *);
@@ -86,13 +78,7 @@ __setrunelocale(const char *encoding)
* The "C" and "POSIX" locale are always here.
*/
if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
- _CurrentRuneLocale = &_DefaultRuneLocale;
- __mb_cur_max = 1;
- __mbrtowc = _none_mbrtowc;
- __mbsinit = _none_mbsinit;
- __mbsnrtowcs = _none_mbsnrtowcs;
- __wcrtomb = _none_wcrtomb;
- __wcsnrtombs = _none_wcsnrtombs;
+ _none_init(&_DefaultRuneLocale);
return (0);
}
OpenPOWER on IntegriCloud