Commit Graph

116 Commits

Author SHA1 Message Date
christos 7dc4aac2d8 Fix memory leak. 2006-03-27 01:09:11 +00:00
christos c8780d3168 Coverity CID 1440: off by one in array count. 2006-03-22 00:08:09 +00:00
christos 15cc8e46f6 Coverity CID 1439: Prevent array index out of bounds access. 2006-03-19 01:55:48 +00:00
christos 95f6be8b1a Coverity CID 2461: Bail out quickly instead of accessing uninitialized variables 2006-03-19 01:25:44 +00:00
christos 68259ab10a Coverity 2462: Bail out quickly instead of accessing uninitialized variables. 2006-03-19 01:24:09 +00:00
christos f2194f03cc Coverity CID 2463: Bail out instead of accessing uninitialized variables. 2006-03-19 01:21:28 +00:00
christos 5bd7f658fe Coverity CID 2464: Don't use uninitialized variables; exit with error quickly. 2006-03-19 01:19:32 +00:00
christos adcc2139d9 Coveriry CID 2472: If the number of bits is invalid, return immediately
instead of accessing uninitialized variables.
2006-03-19 01:17:30 +00:00
christos f174420e75 Coverity CID 2473: Fix uninitialized variable reference. 2006-03-19 01:15:06 +00:00
tnozaki 1b24b76f6b MB_CUR_MAX should be 2 when MODE_2BYTE flag set. 2006-02-15 19:50:27 +00:00
dogcow 86811edb37 change #include <sys/endian.h> => #include <machine/endian.h> so that
it's (more) consistent in the tree; this, along with changing tools/compat's
autoconf detection from AC_CHECK_FUNCS to AC_CHECK_DECLS makes the vast
majority of htobe16 and friends' redefinition errors bite the dust.
Tested with -current and FreeBSD.
2006-02-09 22:03:15 +00:00
tshiozak bb345c8a27 add missing _citrus_MSKanji_stdenc_get_state_desc_generic() function.
pointed out by Patrick Welche <prlw1 _at_ newn _dot_ cam _dot_ ac _dot_ uk>
2005-12-07 06:20:20 +00:00
yamt 307c0260b8 remove unnecessary __UNCONST. 2005-12-02 11:14:20 +00:00
christos 03256c6e55 WARNS=4 2005-11-29 03:11:58 +00:00
martin c66ae167ce Initialize error return value. 2005-10-29 19:19:38 +00:00
tshiozak 1beef8fe93 fix lib/31874.
- add _citrus_stdenc_get_state_desc() interface to get
  encoding-scheme-independent encoder/decoder state descriptions.
- make sure that iconv_std module uses it to judge whether the last
  sequences forms complete shift sequences.
- bump minor of i18n_module because of get_state_desc().
2005-10-29 18:02:04 +00:00
tshiozak c8a7d58fe9 make sure that this module can handle all private/vendor-defined
character area.
This is reported by MORIYAMA Masayuki <msyk _at_ mtg.biglobe.ne.jp> and
"NARUSE, Yui" <naruse _at_ airemix.com>, and fixed by MORIYAMA-san.
2005-10-18 06:44:28 +00:00
tshiozak eda4f3c630 fix a problem on wc->mb conversion for G2 plane.
This is reported by MORIYAMA Masayuki <msyk _at_ mtg.biglobe.ne.jp> and
"NARUSE, Yui" <naruse _at_ airemix.com>, and fixed by MORIYAMA-san.
2005-10-18 06:42:12 +00:00
tshiozak a023aa0fb7 * add some comments.
* add some functions:
   _citrus_memory_stream_bind_ptr()
   _citrus_memory_stream_tell()
   _citrus_memory_stream_ungetc()
   _citrus_region_get_subregion()
* fix a bug in _citrus_memory_stream_seek().
2005-05-14 17:55:42 +00:00
tnozaki a3b248100e add csmapper:CNS11643-1,2 and esdb:ISO-2022-CN,
integrate esdb:EUC-TW, locale:zh_TW.eucTW.
2005-03-27 22:30:05 +00:00
christos bc0c808b3b Don't sign extend characters when they get converted to wide characters in
mbtowc. Otherwise you are not going to be able to wctomb them. Added
regression test. From kim, many thanks.
2005-03-27 18:51:19 +00:00
tnozaki 6e2609d649 anonymous union between chlen and _UTF7StatePrive has
compilation problem with gcc295.
this union attempt to make mbsinit(3) handle multibyte state correctly,
but it's useless as far as we use utf-7 only iconv interface.
so i eliminate ctype feature.

patch contributed by Joerg Sonnenberg(who porting Citrus to DragonFlyBSD).
and yamt-san gave me advice, thanks a lot.
2005-03-14 03:43:10 +00:00
christos 068081ef36 Fix another _DIAGASSERT issue (Joerg Sonnenberger) 2005-03-12 04:20:30 +00:00
christos 61e7a23268 UTF8EncodingInfo is an empty struct; remove noop code and DIAGASSERT.
From Joerg Sonnenberger
2005-03-11 23:32:03 +00:00
tnozaki fe05f588fb add new citrus iconv module UTF-7.
thanks advice, yamt-san.
2005-03-05 18:05:14 +00:00
tnozaki 97264db5f1 correct uninitialized value `err'. 2005-03-05 17:31:03 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
tnozaki 476f0d92a1 fix typo in _DIAGASSERT 2005-02-10 19:03:51 +00:00
mycroft ffcb3c5a45 Use FD_CLOEXEC. 2005-01-19 00:52:37 +00:00
christos 3fd676b16c cast to size_t 2004-12-30 05:01:50 +00:00
christos 1f3a2bf23d sz should be size_t 2004-12-30 05:01:19 +00:00
christos 70c807f499 - cast to size_t
- sz should be size_t
2004-12-30 05:00:42 +00:00
yamt 5b3d234201 constify. 2004-12-21 11:25:43 +00:00
yamt acdc3d1e0f constify. 2004-12-21 09:29:04 +00:00
yamt 824b77d67e _citrus_find_getops: use _C_LABEL_STRING. 2004-12-21 09:00:01 +00:00
yamt 8a0e62d02d open_shared: correct a buffer size. 2004-12-21 08:07:41 +00:00
christos 366176888a PR/27283: Onno van der Linden: incorrect check for mmap return value
While I am here, clean up the error path, KNF and use the proper stat
macro.
2004-10-17 22:21:43 +00:00
yamt d94faebdc7 wctomb isn't supposed to set errno. 2004-09-26 00:51:39 +00:00
soda 89d5b6ffb2 forgot to replace #else with #endif, thanks yamt again. 2004-09-26 00:35:51 +00:00
yamt 8eaa138d56 _FUNCNAME(ctype_wcrtomb):
set *nresult on error rather than using stack garbage.
2004-09-26 00:17:15 +00:00
soda 63504487d1 oops, forgot to add "else" 2004-09-25 23:56:44 +00:00
soda 879ba02666 corrent an error in previous commit:
don't corrupt return value on error case, pointed out by yamt
2004-09-25 23:51:31 +00:00
soda bb8f03e106 correct the return values of wcrtomb(3) and wctomb(3).
These return values should include the length of shift sequence
to restore the initial shift state.
2004-09-25 22:53:46 +00:00
tshiozak 09e09c2c2c make sure CITRUS=no to work. 2004-07-21 20:27:46 +00:00
tshiozak 23affd3c41 make sure that _citrus_lookup family functions can be specified their case
sensitivity.
2004-07-21 14:16:34 +00:00
yamt c5bbd9dca0 _citrus_NONE_stdenc_wctomb: return E2BIG correctly. 2004-01-18 03:57:30 +00:00
christos 7d6187a689 PR/24023: Min Sik Kim: Don't deadlock while closing mappers. The module
uninit function can call close again, which will try to obtain a held
lock. Unlock the lock before calling the actual close function, since
we already disassociated cm from the rest of the data structures.
2004-01-08 19:23:19 +00:00
itojun 35f883b08a KNF 2004-01-02 21:49:35 +00:00
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