diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2014-04-27 08:13:43 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2014-04-27 08:13:43 +0000 |
commit | 9d2ab4a62d6733c45958627ac113bdbd818d1e2a (patch) | |
tree | b92e741b68057a24e381faa9809f32030d65574c /lib/libiconv_modules/BIG5 | |
parent | 1991e07af89dbccabfb71af86738da2a979b3d20 (diff) | |
parent | 8be1b6d975fae2513af1b0e5ad6923c3c2428ddd (diff) | |
download | src-9d2ab4a62d6733c45958627ac113bdbd818d1e2a.tar.gz src-9d2ab4a62d6733c45958627ac113bdbd818d1e2a.zip |
Notes
Diffstat (limited to 'lib/libiconv_modules/BIG5')
-rw-r--r-- | lib/libiconv_modules/BIG5/Makefile | 2 | ||||
-rw-r--r-- | lib/libiconv_modules/BIG5/citrus_big5.c | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/lib/libiconv_modules/BIG5/Makefile b/lib/libiconv_modules/BIG5/Makefile index 0f755fcd582e..cdaf9ddf1889 100644 --- a/lib/libiconv_modules/BIG5/Makefile +++ b/lib/libiconv_modules/BIG5/Makefile @@ -2,6 +2,6 @@ SHLIB= BIG5 SRCS+= citrus_big5.c -CFLAGS+= --param max-inline-insns-single=32 +CFLAGS.gcc+= --param max-inline-insns-single=32 .include <bsd.lib.mk> diff --git a/lib/libiconv_modules/BIG5/citrus_big5.c b/lib/libiconv_modules/BIG5/citrus_big5.c index 1d7d8f8235b7..a8376eb628c9 100644 --- a/lib/libiconv_modules/BIG5/citrus_big5.c +++ b/lib/libiconv_modules/BIG5/citrus_big5.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: citrus_big5.c,v 1.12 2008/06/14 16:01:07 tnozaki Exp $ */ +/* $NetBSD: citrus_big5.c,v 1.13 2011/05/23 14:53:46 joerg Exp $ */ /*- * Copyright (c)2002, 2006 Citrus Project, @@ -92,8 +92,8 @@ typedef struct { typedef struct _BIG5Exclude { TAILQ_ENTRY(_BIG5Exclude) entry; - wint_t end; wint_t start; + wint_t end; } _BIG5Exclude; typedef TAILQ_HEAD(_BIG5ExcludeList, _BIG5Exclude) _BIG5ExcludeList; @@ -123,6 +123,7 @@ _citrus_BIG5_init_state(_BIG5EncodingInfo * __restrict ei __unused, memset(s, 0, sizeof(*s)); } +#if 0 static __inline void /*ARGSUSED*/ _citrus_BIG5_pack_state(_BIG5EncodingInfo * __restrict ei __unused, @@ -142,6 +143,7 @@ _citrus_BIG5_unpack_state(_BIG5EncodingInfo * __restrict ei __unused, memcpy((void *)s, pspriv, sizeof(*s)); } +#endif static __inline int _citrus_BIG5_check(_BIG5EncodingInfo *ei, unsigned int c) @@ -170,7 +172,7 @@ _citrus_BIG5_check_excludes(_BIG5EncodingInfo *ei, wint_t c) } static int -_citrus_BIG5_fill_rowcol(void ** __restrict ctx, const char * __restrict s, +_citrus_BIG5_fill_rowcol(void * __restrict ctx, const char * __restrict s, uint64_t start, uint64_t end) { _BIG5EncodingInfo *ei; @@ -189,7 +191,7 @@ _citrus_BIG5_fill_rowcol(void ** __restrict ctx, const char * __restrict s, static int /*ARGSUSED*/ -_citrus_BIG5_fill_excludes(void ** __restrict ctx, +_citrus_BIG5_fill_excludes(void * __restrict ctx, const char * __restrict s __unused, uint64_t start, uint64_t end) { _BIG5EncodingInfo *ei; @@ -235,7 +237,6 @@ static int _citrus_BIG5_encoding_module_init(_BIG5EncodingInfo * __restrict ei, const void * __restrict var, size_t lenvar) { - void *ctx = (void *)ei; const char *s; int err; @@ -257,9 +258,9 @@ _citrus_BIG5_encoding_module_init(_BIG5EncodingInfo * __restrict ei, } /* fallback Big5-1984, for backward compatibility. */ - _citrus_BIG5_fill_rowcol((void **)&ctx, "row", 0xA1, 0xFE); - _citrus_BIG5_fill_rowcol((void **)&ctx, "col", 0x40, 0x7E); - _citrus_BIG5_fill_rowcol((void **)&ctx, "col", 0xA1, 0xFE); + _citrus_BIG5_fill_rowcol(ei, "row", 0xA1, 0xFE); + _citrus_BIG5_fill_rowcol(ei, "col", 0x40, 0x7E); + _citrus_BIG5_fill_rowcol(ei, "col", 0xA1, 0xFE); return (0); } @@ -357,7 +358,7 @@ _citrus_BIG5_wcrtomb_priv(_BIG5EncodingInfo * __restrict ei, size_t n, wchar_t wc, _BIG5State * __restrict psenc __unused, size_t * __restrict nresult) { - unsigned char l; + size_t l; int ret; /* check invalid sequence */ |