Commit Graph

27 Commits

Author SHA1 Message Date
itojun 855852a04b comment on values from 0x80000000 to 0xffffffff 2004-01-02 12:27:41 +00:00
itojun 5d489a8a2a safer realloc 2004-01-02 12:25:46 +00:00
yamt 9a4bbff85d _citrus_iconv_std_iconv_convert:
- allow 0 byte input.  PR/23889 (Valeriy E. Ushakov)
- remove redundant E2BIG check, which should be done by
  each encoding modules anyway.
2003-12-29 18:05:01 +00:00
yamt 95a5e260a9 _citrus_MSKanji_wcrtomb_priv: return E2BIG correctly. 2003-12-29 17:59:03 +00:00
yamt faf00d99a2 don't use uninitialized variable ('chlenbak').
the problem reported by Markus Illenseer on tech-userlevel@
and analyzed by enami tsugutomo.
2003-10-14 12:50:03 +00:00
tshiozak cf33db0f3a fix the problem about resetting the state of iconv().
iconv() was not conforming to the SUSv3 at this point.
reported by Bruno Haible.
2003-09-01 06:16:13 +00:00
agc eb7c1594f1 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
itojun 2ec4a5905e use bounded string op 2003-07-16 08:05:27 +00:00
tshiozak 0e0aa0868c use NONIDENTICAL instead of ILSEQ if the reverse conversion of ISO646.
(fix for lib/22135)
2003-07-14 11:37:49 +00:00
tshiozak c1e771ab90 separate "nonidentical conversion" and "ilseq" under csmapper.
"nonidentical" means "the input character index is valid, but not
corresponding to the output codeset."
"ilseq" means "the input character index is invalid for the input codeset."
2003-07-12 15:39:19 +00:00
tshiozak 58db2e99e2 add iconv_t cache.
- separate shared part and context part from iconv_t.
  - add cache of shared part.
and, bump shlib_version minor of i18n modules because iconv i/f is changed.
2003-07-01 09:42:15 +00:00
tshiozak 290f7cdee9 cosmetic change. 2003-07-01 08:34:03 +00:00
tshiozak b50ac1a74f fix lib/22023 - there were references to uninitialized variables. 2003-07-01 08:33:06 +00:00
tshiozak 82d5554eda sync with the last change for citrus_hash.h. 2003-06-27 17:53:31 +00:00
yamt 8822a3e83e $NetBSD $ -> $NetBSD$ 2003-06-27 12:55:13 +00:00
tshiozak f3995f1ad3 correct wcrtomb(3) - it is not conforming to standard on handling L'\0'.
This change also affects Citrus iconv engine.
2003-06-26 12:09:56 +00:00
tshiozak 04e58308a3 Citrus iconv support (1)
add core engine of Citrus iconv and some support routines.
  - iconv core (citrus_iconv)
  - coded character set mapper (csmapper)
  - encoding scheme database (esdb)
  - standard encoding scheme handler (stdenc)
  - basic character set manipulation utilities (bcs)
  - mmap based infrastructure (citrus_lookup/_mmap/_memstream/_db)
  - some source codes of new plugins (not built yet)
2003-06-25 09:51:26 +00:00
petrov cc36666171 No need in default label if default case is not processed. 2003-05-08 20:42:39 +00:00
tshiozak c2cadb8a46 add support for zh_CN.GB18030 locale.
(lib/20835 by sigsegv at s25 dot xrea dot com)
XXX: charclass for GBK compatible area is not supported.
2003-03-25 18:26:51 +00:00
tshiozak d0db871d32 fix the problem if EILSEQ is caused in mbrtowc(3) under *.UTF-8 locales.
(lib/20873 by khym at azeotrope dot org)
2003-03-25 17:35:36 +00:00
yamt 27563a14f1 - move _TO_CEI to template from each module/*.c.
- nuke _TO_EI and _TO_STATE.
- convert _TO_EI(cl) to _CEI_TO_EI(_TO_CEI(cl)).
- wrap long lines.
2002-03-28 10:53:48 +00:00
yamt 3daba72ae9 introduce new macro _STATE_NEEDS_EXPLICIT_INIT.
and use it for encodings that needs explicit
init_state in addition to zero-fill.
2002-03-28 10:29:11 +00:00
yamt 6854a8c8c8 drop __packed__ attribute from _ISO2022State. 2002-03-28 01:59:50 +00:00
yamt 7b15929c54 fix wcstombs: convertion should always begin with
an initial shift state. and nuke s_wcstombs.
2002-03-27 17:54:40 +00:00
yamt f0ab6c6443 - change _ENCODING_MB_CUR_MAX to take a pointer to encoding info.
- don't use MB_CUR_MAX here since it's depend on current locale.
  use _ENCODING_MB_CUR_MAX instead.
2002-03-27 15:01:16 +00:00
yamt 4ac8cfbb1d don't check variable s0 before assign. 2002-03-18 08:56:32 +00:00
tshiozak dc7d18ff88 refine i18n stuffs.
- add libc/citrus directory.
    this directory contains the common stuffs not only for locale
    but also other facilities relating to i18n (e.g. iconv).
  - To keep the binary compatibility for the ctype modules easily,
    the interface between libc and the modules is simplified.
  - For the future integrated extension, module pool is renamed
    from "/usr/lib/runemodule" to "/usr/lib/i18n".
    In the future, this directory will contain the modules for "iconv",
    "collation", etc.
  - some cosmetic changes.
  - Bug fix for runetype.h; __attribute__((__packed__)) is placed at
    the wrong position and it is invalid unintentionally.
    But, the all members of the structures seem well-aligned.  Thus,
    this bug causes no problem, hopefully.

HEADS UP:
  - /usr/lib/rumemodule is obsoleted.  If you use the multibyte locales,
    you need to install /usr/lib/i18n/* from sys/lib/i18n_module .
  - The binary compatibility of /usr/share/locale/*/LC_CTYPE is probably kept.
    Perhaps, the bug fix about __packed__ mentioned above breaks the
    compatibility...  Be careful especially on 64bit platforms.
2002-03-17 22:14:05 +00:00