diff options
author | phantom <phantom@FreeBSD.org> | 2005-02-27 15:11:09 +0000 |
---|---|---|
committer | phantom <phantom@FreeBSD.org> | 2005-02-27 15:11:09 +0000 |
commit | 23d961a13f47abb00dde86ee46e2e766a478aca4 (patch) | |
tree | 69f481163c9449c668aa58cf3fa5dbc37df51899 /lib/libc/locale/gb2312.c | |
parent | 31651f25d817b24f6d2b1ef090ac6120d90ed86a (diff) | |
download | FreeBSD-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/gb2312.c')
-rw-r--r-- | lib/libc/locale/gb2312.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/locale/gb2312.c b/lib/libc/locale/gb2312.c index e30755b..232daba 100644 --- a/lib/libc/locale/gb2312.c +++ b/lib/libc/locale/gb2312.c @@ -35,11 +35,11 @@ __FBSDID("$FreeBSD$"); #include <wchar.h> #include "mblocal.h" -int _GB2312_init(_RuneLocale *); -size_t _GB2312_mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, - mbstate_t * __restrict); -int _GB2312_mbsinit(const mbstate_t *); -size_t _GB2312_wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); +static size_t _GB2312_mbrtowc(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +static int _GB2312_mbsinit(const mbstate_t *); +static size_t _GB2312_wcrtomb(char * __restrict, wchar_t, + mbstate_t * __restrict); typedef struct { int count; @@ -58,7 +58,7 @@ _GB2312_init(_RuneLocale *rl) return (0); } -int +static int _GB2312_mbsinit(const mbstate_t *ps) { @@ -88,7 +88,7 @@ _GB2312_check(const char *str, size_t n) return (1); } -size_t +static size_t _GB2312_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, mbstate_t * __restrict ps) { @@ -129,7 +129,7 @@ _GB2312_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, return (wc == L'\0' ? 0 : len - ocount); } -size_t +static size_t _GB2312_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) { _GB2312State *gs; |