1 --- none.c.orig Fri Feb 18 15:34:30 2005
2 +++ none.c Fri Feb 18 15:37:15 2005
5 __FBSDID("$FreeBSD: src/lib/libc/locale/none.c,v 1.12 2004/07/21 10:54:57 tjr Exp $");
7 +#include "xlocale_private.h"
16 -int _none_init(_RuneLocale *);
17 -size_t _none_mbrtowc(wchar_t * __restrict, const char * __restrict, size_t,
18 - mbstate_t * __restrict);
19 -int _none_mbsinit(const mbstate_t *);
20 -size_t _none_mbsnrtowcs(wchar_t * __restrict dst,
21 +__private_extern__ int _none_init(struct __xlocale_st_runelocale *);
22 +__private_extern__ size_t _none_mbrtowc(wchar_t * __restrict, const char * __restrict, size_t,
23 + mbstate_t * __restrict, locale_t);
24 +__private_extern__ int _none_mbsinit(const mbstate_t *, locale_t);
25 +__private_extern__ size_t _none_mbsnrtowcs(wchar_t * __restrict dst,
26 const char ** __restrict src, size_t nms, size_t len,
27 - mbstate_t * __restrict ps __unused);
28 -size_t _none_wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
29 -size_t _none_wcsnrtombs(char * __restrict, const wchar_t ** __restrict,
30 - size_t, size_t, mbstate_t * __restrict);
31 + mbstate_t * __restrict ps __unused, locale_t);
32 +__private_extern__ size_t _none_wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t);
33 +__private_extern__ size_t _none_wcsnrtombs(char * __restrict, const wchar_t ** __restrict,
34 + size_t, size_t, mbstate_t * __restrict, locale_t);
37 -_none_init(_RuneLocale *rl)
38 +__private_extern__ int
39 +_none_init(struct __xlocale_st_runelocale *xrl)
42 - __mbrtowc = _none_mbrtowc;
43 - __mbsinit = _none_mbsinit;
44 - __mbsnrtowcs = _none_mbsnrtowcs;
45 - __wcrtomb = _none_wcrtomb;
46 - __wcsnrtombs = _none_wcsnrtombs;
47 - _CurrentRuneLocale = rl;
49 + xrl->__mbrtowc = _none_mbrtowc;
50 + xrl->__mbsinit = _none_mbsinit;
51 + xrl->__mbsnrtowcs = _none_mbsnrtowcs;
52 + xrl->__wcrtomb = _none_wcrtomb;
53 + xrl->__wcsnrtombs = _none_wcsnrtombs;
54 + xrl->__mb_cur_max = 1;
59 -_none_mbsinit(const mbstate_t *ps __unused)
60 +__private_extern__ int
61 +_none_mbsinit(const mbstate_t *ps __unused, locale_t loc)
70 +__private_extern__ size_t
71 _none_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n,
72 - mbstate_t * __restrict ps __unused)
73 + mbstate_t * __restrict ps __unused, locale_t loc)
78 return (*s == '\0' ? 0 : 1);
82 +__private_extern__ size_t
83 _none_wcrtomb(char * __restrict s, wchar_t wc,
84 - mbstate_t * __restrict ps __unused)
85 + mbstate_t * __restrict ps __unused, locale_t loc)
94 +__private_extern__ size_t
95 _none_mbsnrtowcs(wchar_t * __restrict dst, const char ** __restrict src,
96 - size_t nms, size_t len, mbstate_t * __restrict ps __unused)
97 + size_t nms, size_t len, mbstate_t * __restrict ps __unused, locale_t loc)
106 +__private_extern__ size_t
107 _none_wcsnrtombs(char * __restrict dst, const wchar_t ** __restrict src,
108 - size_t nwc, size_t len, mbstate_t * __restrict ps __unused)
109 + size_t nwc, size_t len, mbstate_t * __restrict ps __unused, locale_t loc)