Commit Graph

19 Commits

Author SHA1 Message Date
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 0f59b7f0ae fix comments.
(_TO_INTERNAL_STATE -> _CEI_TO_STATE)
2002-03-28 10:38:52 +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 097394b63d fix state backup.
XXX this should be move into wcrtomb_priv.
2002-03-27 17:18:41 +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 9e8142572a fix wcsrtombs to restart correctly. 2002-03-26 07:53:38 +00:00
yamt c89607bec7 wcsrtombs: handle dst == 0 case correctly. 2002-03-25 20:47:02 +00:00
yamt e274c8a885 - handle the case that buffer size == 0 for wcsrtombs.
- add a XXX comment.
2002-03-25 20:29:30 +00:00
yamt c5c3bb4159 fix mbtowc to return if the encoding's state-dependent or not
correctly.
2002-03-25 19:40:35 +00:00
yamt ede3d88aad calculate the return value of wcsrtombs correctly
for stateful encodings.
2002-03-25 19:10:45 +00:00
yamt c87321b3bf remove unneeded ARGSUSED. 2002-03-18 10:52:55 +00:00
yamt a8bb4f07ee don't set errno here. caller will set it. 2002-03-18 10:01:12 +00:00
yamt d9660875a9 move definition of _citrus_ctype_default out of #ifdef _I18N_DYNAMIC
as it's used by static binaries.
2002-03-18 09:02:50 +00:00
yamt 4ac8cfbb1d don't check variable s0 before assign. 2002-03-18 08:56:32 +00:00
yamt 1d869db224 make mbsrtowcs work.(fix a typo) 2002-03-18 08:09:28 +00:00
tshiozak d1902c2111 fix a bug; calling mbtowc(0, 0, 0) causes the programs to crash under
single byte locales.
2002-03-18 05:50:25 +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