Commit Graph

76 Commits

Author SHA1 Message Date
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
itojun
64d2443254 safer realloc, some KNF. noted by deraadt@openbsd 2004-01-02 12:19:25 +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
556685e5a3 _citrus_NONE_stdenc_cstomb: return E2BIG correctly. 2003-12-29 17:49:22 +00:00
jmc
782579c57a SUSE3 says htonl and friends come in via arpa/inet.h. This will actually not
hurt on NetBSD and makes hosting on non-native for tools/ work correctly
2003-10-28 04:00:51 +00:00
lukem
171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +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
thorpej
31ede4a9e3 Pull in host-tool config.h, if necessary. 2003-07-21 07:10:28 +00:00
tshiozak
5e3e3850e3 correct boundary check in _citrus_db_lookup_string_by_string(). 2003-07-16 08:13:51 +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
888aa165a5 add forgotten _CITRUS_HASH_REMOVE() at release_shared().
This hopefully fixes the PR pkg/22113.
2003-07-10 09:08:57 +00:00
tshiozak
8adfd9b778 make _DIAGNOSTIC happy. 2003-07-10 08:50:43 +00:00
tshiozak
918c07021f separate "close" process into two parts (with and without handling hash).
This change makes the code symmetrical and ensures the lock not to be
aquired recursively.
The problem that the lock is tried to be aquired recursively was
pointed out by Matthias Drochner.
2003-07-02 17:48:57 +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
christos
6363afb646 use __attribute__((__packed__)) instead of __packed. 2003-06-30 17:54:13 +00:00
tshiozak
a8076e0474 add #include "config.h" when these files are built as parts of host tools. 2003-06-30 12:32:21 +00:00
tshiozak
cba952da4e u_int*_t -> uint*_t.
I would like to use stdint.h, but it is too modern for the host tools.
u_int*_t are more popular under UNIX-like systems, although they are
not backed up with any standards.
(src/tools/compat/stdint.h is maybe necessary.)
2003-06-29 17:30:07 +00:00
tshiozak
82d5554eda sync with the last change for citrus_hash.h. 2003-06-27 17:53:31 +00:00
tshiozak
2aa99730ce make sure to use LIST_* macros defined in sys/queue.h.
pointed out by yamt@netbsd.
2003-06-27 17:43:15 +00:00
yamt
d71154b0e4 in _citrus_ctype_btowc_fallback() and _citrus_ctype_wctob_fallback(),
use enough size byte arrays, instead of abusing mbstate_t.
just pedantic.  no functional change is involved.
2003-06-27 14:52:25 +00:00
yamt
8822a3e83e $NetBSD $ -> $NetBSD$ 2003-06-27 12:55:13 +00:00
itojun
c7ca01fc7d i guess the original intent was this... 2003-06-27 08:58:18 +00:00
itojun
877654378b memset() after null check 2003-06-27 08:56:07 +00:00
itojun
29aff1f984 clear memory after malloc() 2003-06-27 08:50:47 +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
f77c39f209 make sure that key is case-insensitive. 2003-06-26 12:05:04 +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
tshiozak
326ed36874 changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
  - add wcstok(3),
  - move btowc() and wctob() into each ctype modules,
  - bump ctype interface ABI version,
  - bump i18n modules' minor and
  - update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.
2003-03-05 20:18:14 +00:00
yamt
a7e4d902d4 - handle s==NULL case of wcrtomb.
- add a comment about it.

fix rest of PR 18269 by wurlitzer.
2003-01-01 15:57:12 +00:00
yamt
6a7521b053 - add missing _CEI_TO_EI/_TO_CEI.
- don't use 'cl' before assert it's non NULL.
2003-01-01 15:25:54 +00:00
yamt
13820b1f52 - add missing _CEI_TO_EI/_TO_CEI.
- add missing _STATE_NEEDS_EXPLICIT_INIT checks.
- more comment.
2003-01-01 15:04:01 +00:00