ache
d3fa9cb263
Implement wcswidth()
2002-08-19 20:46:10 +00:00
ache
0923ef5388
Use modern-style arguments declaration
2002-08-19 20:32:27 +00:00
ache
53166ba7d8
Write null wide-character as L'\0' like in other places
2002-08-19 20:12:38 +00:00
ache
34e5c81b71
According to SUSv2, always return 0 for null wide-character code
2002-08-19 18:06:18 +00:00
ache
2094c32437
Move internal defines from ctype.h here
2002-08-19 09:02:49 +00:00
tjr
a87152b560
Implement the ISO C90 Amd.1 restartable wide and multibyte character
...
manipulation functions mbrlen(), mbrtowc(), mbsinit(), mbsrtowcs(),
wcrtomb(), wcsrtombs().
2002-08-18 06:30:10 +00:00
ache
31acbd553d
Move wcwidth() to separate file, it doesn't belong to iswctype.c at all
2002-08-17 20:30:34 +00:00
ache
75de318dfb
According to SUSv2, wcwidth() should return -1 for non-printing characters
2002-08-17 20:11:31 +00:00
ache
3737348a03
Cosmetic - remove unneded brackets and #undef
2002-08-17 20:03:44 +00:00
ache
1a00890ca4
wcwidth: fix espression to work correctly with SWIDTH0
2002-08-17 14:16:14 +00:00
keichii
99fd6cbd41
Add iswctype wcwidth function code
...
Submitted by: clkao@clkao.org
Reviewed by: keichii
Obtained from: NetBSD
MFC after: 1 month
2002-08-16 13:45:23 +00:00
ache
eb76ea8d87
Reduce BSS size for programs which not load collate by eliminating
...
static buffer.
2002-08-13 14:55:17 +00:00
ache
5e3f4acbd9
Now malloc() is fixed, remove errno hardcoding to ENOMEM
2002-08-12 17:14:04 +00:00
ache
9d73d0dd12
Add safeguards to never use errno == 0 as setrunelocale() error return code
2002-08-09 08:22:29 +00:00
ache
3b0ddae36e
Rewrite locale loading procedures, so any load failure will not affect
...
currently cached data. It allows a number of nice things, like: removing
fallback code from single locale loading, remove memory leak when LC_CTYPE
data loaded again and again, efficient cache use, not only for
setlocale(locale1); setlocale(locale1), but for setlocale(locale1);
setlocale("C"); setlocale(locale1) too (i.e. data file loaded only once).
2002-08-08 05:51:54 +00:00
ache
f158c10436
Reset __mb_cur_max to 1 when "C" or "POSIX" locales loaded after multibyte one
2002-08-07 20:49:25 +00:00
ache
1994aec49d
Fix wrong address when EucInfo > "variable" size
2002-08-07 20:20:56 +00:00
ache
2a67a29f21
Style fixes in preparation for rewritting
2002-08-07 18:02:45 +00:00
ache
5695ea6363
Style fixes in preparation of code rewritting
2002-08-07 16:45:23 +00:00
tjr
af54199404
Build iswctype.c and manual pages for the functions it defines.
2002-08-06 00:49:59 +00:00
tjr
37b8722dac
Add missing prototypes for extension functions to the SYNOPSIS.
2002-08-05 11:02:04 +00:00
tjr
d1b9f84ace
Use In macro instead of Fd. Add crossref to wctype(3). Refer to 1003.1-2001
...
in STANDARDS section. Document functions which are extensions to the standard.
2002-08-05 10:50:39 +00:00
tjr
780474c4a7
Use the In macro instead of Fd. Add crossref to wctrans(3). Refer to
...
1003.1-2001 in STANDARDS section.
2002-08-05 10:48:05 +00:00
tjr
5b91013415
Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),
...
towlower() and towupper() required by ISO C90 Amd. 1.
iswascii(), iswhexnumber(), iswideogram(), iswnumber(), iswphonogram(),
iswrune() and iswspecial() have also been implemented for consistency
with the BSD extensions in <ctype.h>.
2002-08-05 10:45:23 +00:00
ache
bb7a785bc8
Reject encoding > ENCODING_LEN at early stage instead of truncating it.
...
Use ptr == NULL instead of !ptr in few places.
Move saverr declaration to global section.
2002-08-05 09:58:45 +00:00
tjr
cd51ebdaaf
Manual pages for wide character classification (isw*) and case conversion
...
(tow*) functions from NetBSD, unmodified except for the addition of $FreeBSD$.
Obtained from: NetBSD
2002-08-05 08:04:58 +00:00
tjr
2e02b2970d
Change wctype_t to an unsigned type to avoid warnings.
2002-08-04 12:43:53 +00:00
tjr
c7dfca65ec
Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions.
2002-08-04 12:09:08 +00:00
tjr
fd6d1078a9
Add btowc(3) to SEE ALSO section.
2002-08-04 11:02:21 +00:00
ache
a03ca02ee9
Use errno to indicate failure reason.
...
Remove incomplete checks for 'name' and 'PatchLocale', they must be
already checked at this point.
2002-08-04 09:37:28 +00:00
bde
d22ac4de6c
Fixed some style bugs (unsorting of MLINKS, and more than 1 assignment to
...
MAN per section).
2002-08-04 07:54:41 +00:00
ache
c41f494e5b
Rewrite loadlocale() to eliminate LOAD_CATEGORY macro to save space.
2002-08-04 04:29:54 +00:00
ache
abb8c5771b
Add ERRORS section according to POSIX (no errors)
2002-08-03 17:20:45 +00:00
ache
8212322c62
Catch empty encoding name too
2002-08-03 17:09:21 +00:00
ache
b5b73d0ae1
Fix return codes to match what setrunelocale() returns
2002-08-03 16:26:47 +00:00
ache
3b6651b983
Preserve errno in fallback code
2002-08-03 15:56:25 +00:00
tjr
eefed45007
Add ISO C90 Amd. 1 btowc(3) and wctob(3) functions.
2002-08-03 13:49:55 +00:00
tjr
dc1c7f3152
Correct use of Nm macro in NAME section and a broken cross reference.
2002-08-03 12:39:41 +00:00
ache
c7371a8702
Return errno provided by fopen, not always ENOENT.
...
Return EFTYPE instead of EINVAL for wrong locale file format.
Whitespaces.
2002-08-03 11:55:19 +00:00
ache
5e42992e96
Check encoding for ".", ".." and / inside
2002-08-03 10:23:06 +00:00
ache
b6a6d004ff
Return EINVAL for NULL or too long encoding, not EFAULT
2002-08-03 09:10:31 +00:00
ache
3b1f16ca2d
Return ENAMETOOLONG for long PATH_LOCALE, not EFAULT
2002-08-03 09:07:27 +00:00
ache
a585ff9d4b
1) Use errno to indicate faulure reason.
...
2) Move incomplete check for / in locale name from env section to
loadlocale(), add check for "." and ".." too.
It allows to check any argument, not env only.
3) Redesing LOAD_CATEGORY macro to eliminate code duplication.
4) Try harder in fallback code: if old locale can't be restored,
load "C" locale
5) White space formatting, long lines, etc.
2002-08-03 09:04:44 +00:00
tjr
2ddf585cad
Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions.
2002-08-03 04:18:40 +00:00
ache
59ee93ea1e
Sligtly modify previous out-of-bounds fix: just break instead of
...
return(NULL) for upward compatibility with more LC_* categories may be
implemented in future.
2002-08-02 13:36:54 +00:00
ache
fcd05421a1
Prevent out of bounds writting for too many slashes case.
...
Replace strnpy + ='\0' with strlcpy
MFC after: 1 day
2002-08-02 01:04:49 +00:00
asmodai
3b69e0094c
Remove the hard-coded limit of 3 bytes for EUC encodings.
...
Satoshi NIIMI-san kindly explained that EUC does not limit the byte length to
any arbitrary number.
We now set the limit to the maximum octet length of the codeset and it is
locale-specific.
Submitted by: Yong-Jhen Hong <winard@ms11.url.com.tw>
2002-04-14 10:55:42 +00:00
des
e824bdd8fb
Install digittoint.3 (forgotten in rev 1.21)
...
PR: docs/26451
Submitted by: Adrian Filipi-Martin <adrian@ubergeeks.com>
2002-04-13 22:32:33 +00:00
dd
c574a3c922
This was recently MFC'd, so it will appear in 4.6.
...
PR: 37018
2002-04-13 04:25:56 +00:00
asmodai
58d9ddfc7d
Fix EUC encoding conversion for codeset 3 and 4 to comply to the specification.
...
PR: 28552
Submitted by: NIIMI Satoshi <sa2c@and.or.jp>
2002-04-07 16:37:15 +00:00