Andrey A. Chernov
6abda1f093
First byte of GBK-like sequences is 0x81, not 0x80
2003-12-19 12:54:42 +00:00
Tim J. Robbins
40c5c1f8a1
Set __mbrtowc and __wcrtomb correctly when changing to the C/POSIX locale.
...
Save __mbrtowc and __wcrtomb and restore them when changing back to
the cached locale.
Reported by: perky
2003-12-08 23:52:22 +00:00
Tim J. Robbins
bc0b3a1800
Split multibyte(3) into separate manual pages for each function.
...
Instead of just deleting it, turn the original page into a general
overview of the multibyte character conversion functions, somewhat
similar to stdio(3).
2003-12-07 06:33:52 +00:00
Tim J. Robbins
da44487bd7
Split the documentation for localeconv() off into a separate manual page.
2003-12-07 06:00:00 +00:00
Tim J. Robbins
8962b7a518
Update cross references after utf2/euc move.
2003-11-15 02:26:04 +00:00
Tim J. Robbins
f76c65296c
Remove section 4 versions of these manual pages, they have been
...
moved into section 5.
2003-11-15 02:15:25 +00:00
Tim J. Robbins
93584b12e6
Install the section 5 versions of EUC and UTF2 manual pages instead of
...
the section 4 versions.
2003-11-15 02:13:09 +00:00
Tim J. Robbins
ee0694adb9
Update the EUC and UTF2 manual pages for their new home in section 5.
...
These have been repo-copied from euc.4 and utf2.4.
2003-11-15 01:54:46 +00:00
Tim J. Robbins
b1c572ad5b
Fix a typo that caused mbrtowc() to always return 0.
2003-11-11 07:25:05 +00:00
Tim J. Robbins
cc7a3285a5
Add one more cross-reference to gb2312(5).
2003-11-08 03:23:11 +00:00
Tim J. Robbins
16854d3c8f
Add cross-references to new gb2312(5) manual page.
2003-11-08 03:07:56 +00:00
Tim J. Robbins
e31d6d8149
Add a fairly simple manual page for the new GB2312 encoding.
2003-11-08 03:02:45 +00:00
Tim J. Robbins
9e0bd333f0
Remove unused #includes.
2003-11-08 02:58:37 +00:00
Tim J. Robbins
eb402e14d8
Use __inline instead of inline.
2003-11-08 02:56:03 +00:00
Tim J. Robbins
c2f9330393
Refer to wide characters instead of runes. Remove redundant example locale.
...
Catch up with renaming of "Japanese" to "ja_JP.eucJP". Comment out the
statement that EUC is provided for compatibility with UNIX-based systems;
this is not a very good opening paragraph.
2003-11-08 02:52:31 +00:00
Tim J. Robbins
5d9c483db1
Refer to wide characters instead of runes.
2003-11-08 02:46:02 +00:00
David Xu
6d7a04b013
Add gb2312 encoding.
2003-11-05 22:52:51 +00:00
Tim J. Robbins
90c7d99f5b
Implement mbrtowc() and wcrtomb() directly (sync with big5.c).
2003-11-05 07:56:45 +00:00
Tim J. Robbins
02f4f60ad5
Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implement
...
mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left
unconverted; GB18030 will be done eventually, but GBK and UTF2 may just
be removed, as they are subsets of GB18030 and UTF-8 respectively.
2003-11-02 10:09:33 +00:00
Tim J. Robbins
d390e53270
Remove TODO comment about creating a macro version of towctrans().
...
Remove unnecessary inclusion of <ctype.h>.
2003-11-01 08:20:58 +00:00
Tim J. Robbins
d4f6cd06dd
Allow mbrtowc() and wcrtomb() to be implemented directly, instead of
...
as wrappers around the deprecated 4.4BSD rune functions. This paves the
way for state-dependent encodings, which the rune API does not support.
- Add __emulated_sgetrune() and __emulated_sputrune(), which are
implementations of sgetrune() and sputrune() in terms of
mbrtowc() and wcrtomb().
- Rename the old rune-wrapper mbrtowc() and wcrtomb() functions to
__emulated_mbrtowc() and __emulated_wcrtomb().
- Add __mbrtowc and __wcrtomb function pointers, which point to the
current locale's conversion functions, or the __emulated versions.
- Implement mbrtowc() and wcrtomb() as calls to these function pointers.
- Make the "NONE" encoding implement mbrtowc() and wcrtomb() directly.
All of this emulation mess will be removed, together with rune support,
in FreeBSD 6.
2003-11-01 05:13:13 +00:00
Tim J. Robbins
1e8742e9cd
Don't bother passing a freshly-zeroed mbstate to mbsrtowcs() etc.
...
when the current implementation won't use it, anyway. Just pass NULL.
This will need to be changed when state-dependent encodings are
supported, but there's no need to take the performance hit
in the meantime.
2003-10-31 13:29:00 +00:00
Tim J. Robbins
cf651e6b5c
Implement fgetrune(), fungetrune() and fputrune() as wrappers around
...
fgetwc(), ungetwc() and fputwc().
2003-10-31 10:55:19 +00:00
Tim J. Robbins
4539e95a0f
Remove incomplete support for running FreeBSD userland on old NetBSD kernels
...
lacking the issetugid() and utrace() syscalls.
2003-10-29 10:45:01 +00:00
Ruslan Ermilov
fe08efe680
mdoc(7): Use the new feature of the .In macro.
2003-09-08 19:57:22 +00:00
Tim J. Robbins
4ae3aa59ef
Remove an unused and incorrect prototype for _none_init().
2003-09-05 09:01:31 +00:00
Tim J. Robbins
e43ffa4159
Fix the case of the encoding name in the ENCODING line. Names are
...
case-sensitive, and MSKANJI does not work.
2003-08-10 11:41:38 +00:00
Tim J. Robbins
dcb2df4c22
Cross-reference gbk(5).
2003-08-10 11:38:28 +00:00
Tim J. Robbins
dd5e8fdef8
Cross-reference gbk(5) now that it exists. Fix a copy & paste error:
...
one occurrence of GB 18030 should have been 11383.
2003-08-10 11:36:42 +00:00
Tim J. Robbins
f6d8a447d1
Add a fairly minimal manual page for the GBK encoding.
2003-08-10 11:34:35 +00:00
Tim J. Robbins
9e09ac8597
Add a cross reference to Unicode 3.0.
2003-08-10 11:26:18 +00:00
Tim J. Robbins
39e2a81e3f
Add cross references to the new character encoding manual pages,
...
and to mbsinit(3) while I'm at it.
2003-08-10 09:25:52 +00:00
Tim J. Robbins
8ca5fa518c
Add manual pages for the BIG5, GB18030 and MSKanji encodings. These may
...
need to be fleshed out a little, especially big5(5).
2003-08-10 09:23:51 +00:00
Tim J. Robbins
b85aa4e3f7
Implement mblen(s, n) as mbtowc(NULL, s, n) to avoid calling sgetrune()
...
and to simplify things. This is only valid until we start supporting
state-dependent encodings.
2003-08-07 09:34:51 +00:00
Tim J. Robbins
b69a98d6d3
Implement mbstowcs() as a wrapper around mbsrtowcs(), and wcstombs()
...
as a wrapper around wcsrtombs().
2003-08-07 08:04:01 +00:00
Tim J. Robbins
998e124837
Implement mbtowc() in terms of mbrtowc(), and wctomb() in terms of wcrtomb().
2003-08-07 07:59:36 +00:00
Tim J. Robbins
dab4fca49b
Implement btowc() in terms of mbrtowc() instead of sgetrune(), and
...
wctob() in terms of wcrtomb() instead of sputrune(). There should be
no functional differences, but there may be a small performance hit
because we make an extra function call.
The aim here is to have as few functions as possible calling
s{get,put}rune() to make it easier to remove them in the future.
2003-08-07 07:45:35 +00:00
Andrey A. Chernov
a9d25ab17f
Restore including of "collate.h", for its own prototype (mis)match detection
2003-08-03 19:28:23 +00:00
Andrey A. Chernov
8841d0081c
Remove commented out and never used code
2003-08-03 05:20:31 +00:00
Andrey A. Chernov
17f67afe28
Remove __collate_range_cmp() stabilization, it conflicts with ranges
2003-08-03 04:40:40 +00:00
Andrey A. Chernov
a03081087c
Add support for gb18030 encoding
...
PR: 51729
Submitted by: Kang Liu <liukang@bjpu.edu.cn>
2003-07-29 07:52:44 +00:00
Andrey A. Chernov
8b2749e901
Add const to __setrunelocale prototype
2003-07-06 04:01:09 +00:00
Andrey A. Chernov
68d429c3fc
Reorganize wrapper around setrunelocale() to mark it as deprecated
...
in FreeBSD 6
2003-07-06 02:03:37 +00:00
Alexey Zelkin
683fe11379
. style(9)
...
. fix/add comments (to cover changes done thru last 20 months)
. extend monetary testcase to cover int_* values
2003-06-26 10:46:16 +00:00
Alexey Zelkin
fca2738d67
Reduce code duplication by separating _PathLocle detection code into
...
internal helper function.
2003-06-25 22:42:33 +00:00
Alexey Zelkin
93c847344b
Move _PathLocale declaration to more logical place (setlocale.c)
2003-06-25 22:34:13 +00:00
Alexey Zelkin
d8d4841398
Catch up with _PATH_LOCALE move from rune.h to paths.h
2003-06-25 22:31:42 +00:00
Tim J. Robbins
77156cb782
Mark the following interfaces as OBSOLETE_IN_6:
...
fgetrune(), fputrune(), fungetrune(), mbrune(), mbrrune(), mbmb(),
setinvalidrune(), UTF2 encoding method.
These have been marked as being deprecated in their manual pages since 5.0,
and their use causes a linker warning.
2003-06-13 07:13:54 +00:00
Jordan K. Hubbard
3dfdc427f1
Fixes to locale code to properly use indirect pointers in order to prevent
...
memory leaks (fixes bugs earlier purported to be fixed).
Submitted by: Ed Moy <emoy@apple.com>
Obtained from: Apple Computer, Inc.
MFC after: 2 weeks
2003-06-13 00:14:07 +00:00
Andrey A. Chernov
0c7fbc6c40
Remove transition period hack
2003-06-10 01:26:04 +00:00