Commit Graph

3794 Commits

Author SHA1 Message Date
itojun
d888b02030 overhaul.
(1) alloate two mbstate_t, for input/output, per a file stream.
(2) correct inbound escape sequence processing.
cope with incomplete string better.  keep intermediate state for single shifts.
let C0/C1 go through.

XXX for (1), we should expand FILE structure, but is possible only with
libc major # bump.
2000-12-23 12:37:18 +00:00
itojun
7448c8b5b4 avoid duplicated free() on initialization failure 2000-12-23 11:53:46 +00:00
itojun
bbbc605b71 change _INVALID_RUNE value - the old value (0xfffd) was selected when
rune_t was 16bit.

XXX PLEASE REBUILD YOUR LOCALE DEFINITION FILES BY:
# cd share/mklocale; make clean depend; make; make install
2000-12-23 10:52:34 +00:00
itojun
48fa1b17ab error code check mistake in LC_CTYPE handling 2000-12-23 08:22:40 +00:00
itojun
ce0a5e58ed cope with runeglue.c failure better 2000-12-22 22:51:22 +00:00
itojun
85339e75d6 for setlocale(LC_CTYPE) failure, make sure to return NULL. 2000-12-22 22:28:09 +00:00
jdolecek
b5590faec8 previous change was not complete enough, so finish and make more correct:
for LC_ALL, return success if at least on of categories was loaded
successfully, error if no category was loaded; in the latter case, we don't
need to back off locale changes, since none happened
2000-12-22 16:50:08 +00:00
jdolecek
675dc9d35b __setlocale(): ignore errors in locale category load for LC_ALL - doing so
is not useful. This is same change as in rev 1.17.
2000-12-22 15:25:11 +00:00
itojun
6d24d8c968 set errno on wcrtomb() encoding error, on EILSEQ. 2000-12-22 06:29:40 +00:00
itojun
4d799da3d4 mbrlen is equivalent to mbrtowc with 1st arg NULL (mentioned in spec). 2000-12-22 06:24:15 +00:00
itojun
ab9a937270 add wcsl{cat,cpy} 2000-12-22 05:23:27 +00:00
itojun
2c828fd4c7 add wcsl{cat,cpy} - outside of ISO/IEC 9899:1999,
but i believe it should be there.
2000-12-22 05:21:40 +00:00
itojun
f4f13f67be ad manpage for wide character string manipulation (wmem*/wcs*) 2000-12-22 04:59:41 +00:00
itojun
d74cd8caeb manpage for tow*. 2000-12-22 02:18:58 +00:00
itojun
a7365f619e place return value 2000-12-22 02:13:26 +00:00
itojun
2ea45fbc0e manpage for isw*. 2000-12-22 02:03:32 +00:00
itojun
00d1211195 remove bogus comment 2000-12-21 18:24:57 +00:00
itojun
d3617fe94e copyright notice for ld.aout_so/shlib.c 2000-12-21 18:22:56 +00:00
itojun
6376847fbd find shlib/func by findshlib() and findfunc(). this nukes DLRUNE_AOUT,
and removes conditionals for library naming.
XXX if we mix a.out library and elf library in /usr/lib/runemodule...
2000-12-21 18:20:03 +00:00
itojun
1bb02cee54 __RCSID 2000-12-21 17:25:32 +00:00
itojun
c2cb892f34 handle $LANG and $LC_xx consistently (slash is forbidden). 2000-12-21 17:16:20 +00:00
itojun
0b16e56b29 correct utf8 encoding error 2000-12-21 12:21:38 +00:00
itojun
2cc37d241b abort() is too much 2000-12-21 12:19:44 +00:00
itojun
6bfa292b5d add multibyte locale converters (just for use by testers at this moment,
to be built as dynamically loadable binary)
2000-12-21 12:17:35 +00:00
itojun
b7a136db6b support multibytes in isw*/tow*. 2000-12-21 12:13:28 +00:00
itojun
408f4697a6 first import of citrus LC_CTYPE locale. singlebyte only at this moment.
shot-term TODO:
- enable multibyte locales.  this includes loadable locale modules
  (#ifdef DLRUNE).
- populate LC_CTYPE definition files.
- other functions such as iconv()
- make libc functions more friendly with multibyte.
- multilingualize other LC_xx
- torture tests

XXX don't forget to "make depend" when you rebuild libc, multibyte.c is
moved from lib/libc/stdlib to lib/libc/locale.
2000-12-21 11:29:47 +00:00
itojun
4c56e769f6 add dummy wcwidth() and wcswidth(). wcwidth() will be updated later. 2000-12-21 08:30:52 +00:00
itojun
b80578d677 correct return type for tow*. 2000-12-21 06:46:07 +00:00
itojun
a25075d36a have dummy wctype.h and isw*/tow*. part of libc minor 68 -> 69 crank.
equivalent to is*/to* at this moment.  we'll put wchar_t code in the
near future.
2000-12-21 05:40:56 +00:00
itojun
b6ad76f487 add wcs* functions. consier it as part of libc minor crank 68 -> 69.
add decl of WEOF into wchar.h.  ISO/IEC 9899:1999(E)..
2000-12-21 05:12:18 +00:00
itojun
8f5f80ebfe document net.inet6.icmp6.mtudisc_{lo,hi}wat. 2000-12-21 01:10:52 +00:00
christos
128bd71ffc oops fix previous typos. 2000-12-20 23:08:51 +00:00
christos
0c0e139779 Ignore empty translation unit errors. 2000-12-20 21:13:56 +00:00
christos
6f034c1640 fix const castaway. 2000-12-20 20:57:20 +00:00
christos
52b46a0f13 fix u_char -> char and char -> u_char casts. 2000-12-20 20:56:34 +00:00
christos
bebeeecd5b fix sbrk casts 2000-12-20 20:56:01 +00:00
christos
d9ce410183 fix nested extern
fix sbrk casts
2000-12-20 20:55:23 +00:00
christos
c9f588eab4 fix nested extern 2000-12-20 20:54:30 +00:00
christos
f0c45fdbc9 protect against multiple inclusions. 2000-12-20 20:54:01 +00:00
christos
f9b8c27ae8 appease lint casts 2000-12-20 20:52:50 +00:00
christos
663f790f35 remove redundant declarations. 2000-12-20 20:51:08 +00:00
christos
d76f22c50c add _nsyylineno declaration 2000-12-20 20:50:46 +00:00
christos
413f6305c4 remove unnecessary prototypes
lint casting.
2000-12-20 20:44:14 +00:00
christos
02db12eb31 appease lint casting. 2000-12-20 18:47:11 +00:00
christos
6bae1e9ae7 avoid nested extern declaration 2000-12-20 18:38:30 +00:00
christos
b8e7598d98 fix nested extern 2000-12-20 15:59:51 +00:00
itojun
97e0963d33 add wmem* functions, from citrus. bump libc shlib minor. 2000-12-20 14:53:23 +00:00
itojun
eb0bc4a58e use strlcpy to guarantee string termination 2000-12-20 11:48:58 +00:00
itojun
1545be872f on setlocale() failure, back out changes made to current_locale[],
and return NULL.  from: From: Shingo WATANABE <nabe@nabechan.org>
2000-12-20 11:44:36 +00:00
cgd
b2b63ed4f4 Newer GCCs give warnings when the result of preprocessor token pasting
is not itself a valid (single) preprocessor token.  In other words, don't
use __CONCAT() to add a structure member name to a pointer dereference.
2000-12-19 22:20:48 +00:00