tjr
8569d04e14
Add wcstod() as a wrapper around strtod(). It does not handle any characters
...
that strtod() does not (alternate digit characters, etc. are not handled).
2002-09-15 08:38:51 +00:00
tjr
b2a34e6f87
Use the heap instead of the stack to store temporary multibyte string
...
buffers; this is slower but safer for threaded programs where threads
often have relatively low stack size limits.
2002-09-15 08:06:17 +00:00
tjr
4448ddb047
Correct type of second argument: it is wchar_t ** restrict,
...
not wchar_t * restrict.
2002-09-12 09:25:27 +00:00
tjr
5f5cd9d0b8
Add an implementation of wcsftime() (wide character version of strftime()).
2002-09-11 08:57:11 +00:00
tjr
7c848d9cfd
Add wcstol() and wcstoul(), based on strtol() and strtoul().
2002-09-08 13:27:26 +00:00
tjr
cd5ca96599
Style: One space between "restrict" qualifier and "*".
2002-09-06 11:24:06 +00:00
tjr
573a3e8e5e
Set errno to EILSEQ when invalid multibyte sequences are detected
...
(XSI extension to 1003.1-2001).
2002-09-03 01:09:47 +00:00
tjr
3c7d05d837
Typo: refer to MB_LEN_MAX instead of MB_CHAR_MAX (which does not exist).
2002-09-01 07:21:58 +00:00
tjr
2e5584e864
Add restrict qualifiers to the arguments of mbstowcs, mbtowc() and
...
wcstombs().
2002-09-01 07:08:22 +00:00
tjr
ca719015df
Implement the XSI extension which allows the destination string to be
...
NULL, and returns the number of bytes that would be required to store
the result of the conversion without storing anything.
PR: 17694
2002-08-31 14:16:12 +00:00
tjr
4a4fda0f86
Split ansi.c into a separate source file for each function.
2002-08-31 11:26:55 +00:00
ache
323528b137
Use ntohl() to read cnains number in new format
2002-08-31 01:05:39 +00:00
ache
cc37572108
Style fix
2002-08-30 20:39:53 +00:00
ache
1286c989d6
Prepare for switching to unlimited chains format.
...
Optimize chains lookup a bit.
2002-08-30 20:26:02 +00:00
mike
9e6f796b0d
o Merge <machine/ansi.h> and <machine/types.h> into a new header
...
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
macros, which are only MD because of gratuitous differences between
architectures.
o Change all headers to make use of this. This mainly involves
changing:
#ifdef _BSD_FOO_T_
typedef _BSD_FOO_T_ foo_t;
#undef _BSD_FOO_T_
#endif
to:
#ifndef _FOO_T_DECLARED
typedef __foo_t foo_t;
#define _FOO_T_DECLARED
#endif
Concept by: bde
Reviewed by: jake, obrien
2002-08-21 16:20:02 +00:00
tjr
6a5533e938
Add a manual page for wcwidth().
2002-08-20 03:42:21 +00:00
ache
87f08c9cbb
Remove wcswidth.c from here (and move it to "string")
2002-08-20 01:59:26 +00:00
ache
178f85ae98
Remove space at the end of continuation line in prev. commit
2002-08-20 01:16:06 +00:00
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