From e8556eea30c968648f6ccc2185602ef028a824db Mon Sep 17 00:00:00 2001 From: brodsom Date: Wed, 19 Feb 2003 01:56:55 +0000 Subject: [PATCH] Remove W4 warnings (old style declarator) and others W3 appeared when the declarator is updated. --- src/intl/cs_gb2312.c | 2 - src/intl/cs_narrow.c | 10 +--- src/intl/cs_unicode_fss.c | 40 ++++---------- src/intl/cv_big5.c | 43 +++------------ src/intl/cv_gb2312.c | 43 +++------------ src/intl/cv_jis.c | 108 ++++++++----------------------------- src/intl/cv_ksc.c | 43 +++------------ src/intl/cv_narrow.c | 55 ++++--------------- src/intl/lc_ascii.c | 47 +++++----------- src/intl/lc_big5.c | 15 ++---- src/intl/lc_dos.c | 21 ++------ src/intl/lc_iso8859_1.c | 15 ++---- src/intl/lc_iso8859_2.c | 15 ++---- src/intl/lc_jis.c | 15 ++---- src/intl/lc_ksc.c | 24 ++------- src/intl/lc_narrow.c | 48 +++-------------- src/intl/lc_unicode_ucs2.c | 6 +-- 17 files changed, 109 insertions(+), 441 deletions(-) diff --git a/src/intl/cs_gb2312.c b/src/intl/cs_gb2312.c index aade4b4c1b..5d72e3213d 100644 --- a/src/intl/cs_gb2312.c +++ b/src/intl/cs_gb2312.c @@ -27,8 +27,6 @@ extern USHORT CVGB_gb2312_to_unicode(); extern USHORT CVGB_unicode_to_gb2312(); extern USHORT CVGB_check_gb2312(); -extern void CV_convert_init(); - CHARSET_ENTRY(CS_gb_2312) { diff --git a/src/intl/cs_narrow.c b/src/intl/cs_narrow.c index ec821075d8..b0d8a5daf6 100644 --- a/src/intl/cs_narrow.c +++ b/src/intl/cs_narrow.c @@ -29,14 +29,8 @@ extern USHORT CV_unicode_to_nc(); -static void common_8bit_init(csptr, id, name, to_unicode_tbl, - from_unicode_tbl1, from_unicode_tbl2) - CHARSET csptr; - SSHORT id; - ASCII *name; - BYTE *to_unicode_tbl; - BYTE *from_unicode_tbl1; - BYTE *from_unicode_tbl2; +static void common_8bit_init(CHARSET csptr, SSHORT id, const ASCII *name, const USHORT *to_unicode_tbl, + const UCHAR *from_unicode_tbl1, const USHORT *from_unicode_tbl2) { csptr->charset_version = 40; csptr->charset_id = id; diff --git a/src/intl/cs_unicode_fss.c b/src/intl/cs_unicode_fss.c index 1d5ec25651..7fc82f528b 100644 --- a/src/intl/cs_unicode_fss.c +++ b/src/intl/cs_unicode_fss.c @@ -33,7 +33,7 @@ extern USHORT CS_UTFFSS_fss_to_unicode(); typedef USHORT fss_wchar_t; typedef SLONG fss_size_t; -static fss_size_t fss_mbtowc(fss_wchar_t *, char *, fss_size_t); +static fss_size_t fss_mbtowc(fss_wchar_t *, NCHAR *, fss_size_t); @@ -56,11 +56,7 @@ CHARSET_ENTRY(CS_unicode_fss) } -SSHORT CS_UTFFSS_fss_mbtowc(obj, wc, p, n) - TEXTTYPE *obj; - UCS2_CHAR *wc; - NCHAR *p; - USHORT n; +SSHORT CS_UTFFSS_fss_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n) { /************************************** * @@ -231,11 +227,11 @@ static const Tab tab[] = { }; -static fss_size_t fss_mbtowc( fss_wchar_t * p, char *s, fss_size_t n) +static fss_size_t fss_mbtowc( fss_wchar_t * p, NCHAR *s, fss_size_t n) { long l; int c0, c, nc; - Tab *t; + const Tab *t; if (s == 0) return 0; @@ -266,13 +262,11 @@ static fss_size_t fss_mbtowc( fss_wchar_t * p, char *s, fss_size_t n) } -static fss_size_t fss_wctomb(s, wc) - char *s; - fss_wchar_t wc; +static fss_size_t fss_wctomb(MBCHAR *s, fss_wchar_t wc) { long l; int c, nc; - Tab *t; + const Tab *t; if (s == 0) return 0; @@ -296,15 +290,8 @@ static fss_size_t fss_wctomb(s, wc) } -USHORT CS_UTFFSS_fss_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, - err_code, err_position) - CSCONVERT obj; - UNICODE *dest_ptr; - USHORT dest_len; /* BYTE count */ - NCHAR *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CS_UTFFSS_fss_to_unicode(CSCONVERT obj, UNICODE *dest_ptr, USHORT dest_len, NCHAR *src_ptr + , USHORT src_len, SSHORT *err_code, USHORT *err_position) { UNICODE *start; USHORT src_start = src_len; @@ -345,15 +332,8 @@ USHORT CS_UTFFSS_fss_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, } -USHORT CS_UTFFSS_unicode_to_fss(obj, fss_str, fss_len, unicode_str, - unicode_len, err_code, err_position) - CSCONVERT obj; - MBCHAR *fss_str; - USHORT fss_len; - UNICODE *unicode_str; - USHORT unicode_len; /* BYTE count */ - SSHORT *err_code; - USHORT *err_position; +USHORT CS_UTFFSS_unicode_to_fss(CSCONVERT obj, MBCHAR *fss_str, USHORT fss_len, UNICODE *unicode_str, + USHORT unicode_len, SSHORT *err_code, USHORT *err_position) { MBCHAR *start; USHORT src_start = unicode_len; diff --git a/src/intl/cv_big5.c b/src/intl/cv_big5.c index 72383321f5..c29b893f3a 100644 --- a/src/intl/cv_big5.c +++ b/src/intl/cv_big5.c @@ -32,15 +32,8 @@ -USHORT CVBIG5_big5_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, - err_code, err_position) - CSCONVERT obj; - UCS2_CHAR *dest_ptr; - USHORT dest_len; - UCHAR *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVBIG5_big5_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len, UCHAR *src_ptr + , USHORT src_len, SSHORT *err_code, USHORT *err_position) { UCS2_CHAR *start; UCS2_CHAR ch; @@ -114,15 +107,8 @@ USHORT CVBIG5_big5_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, } -USHORT CVBIG5_unicode_to_big5(obj, big5_str, big5_len, unicode_str, - unicode_len, err_code, err_position) - CSCONVERT obj; - UCHAR *big5_str; - USHORT big5_len; - UCS2_CHAR *unicode_str; - USHORT unicode_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVBIG5_unicode_to_big5(CSCONVERT obj, UCHAR *big5_str, USHORT big5_len, UCS2_CHAR *unicode_str, + USHORT unicode_len, SSHORT *err_code, USHORT *err_position) { UCHAR *start; UCS2_CHAR big5_ch; @@ -187,9 +173,7 @@ USHORT CVBIG5_unicode_to_big5(obj, big5_str, big5_len, unicode_str, } -USHORT CVBIG5_check_big5(big5_str, big5_len) - UCHAR *big5_str; - USHORT big5_len; +USHORT CVBIG5_check_big5(UCHAR *big5_str, USHORT big5_len) { /************************************** * Functional description @@ -220,15 +204,8 @@ USHORT CVBIG5_check_big5(big5_str, big5_len) } -USHORT CVBIG5_big5_byte2short(obj, dst, dst_len, src, src_len, err_code, - err_position) - CSCONVERT obj; - UCHAR *dst; - USHORT dst_len; - UCHAR *src; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVBIG5_big5_byte2short(CSCONVERT obj, UCHAR *dst, USHORT dst_len, UCHAR *src, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { /************************************** * Functional description @@ -279,11 +256,7 @@ USHORT CVBIG5_big5_byte2short(obj, dst, dst_len, src, src_len, err_code, } -SSHORT CVBIG5_big5_mbtowc(obj, wc, src, src_len) - CSCONVERT obj; - UCS2_CHAR *wc; - UCHAR *src; - USHORT src_len; +SSHORT CVBIG5_big5_mbtowc(CSCONVERT obj, UCS2_CHAR *wc, UCHAR *src, USHORT src_len) { /************************************** * Functional description diff --git a/src/intl/cv_gb2312.c b/src/intl/cv_gb2312.c index d9332a094d..d3c7a7d0ed 100644 --- a/src/intl/cv_gb2312.c +++ b/src/intl/cv_gb2312.c @@ -32,15 +32,8 @@ -USHORT CVGB_gb2312_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, - err_code, err_position) - CSCONVERT obj; - UCS2_CHAR *dest_ptr; - USHORT dest_len; - UCHAR *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVGB_gb2312_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len, UCHAR *src_ptr, USHORT src_len, + SSHORT *err_code, USHORT *err_position) { UCS2_CHAR *start; UCS2_CHAR ch; @@ -114,15 +107,8 @@ USHORT CVGB_gb2312_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, } -USHORT CVGB_unicode_to_gb2312(obj, gb_str, gb_len, unicode_str, unicode_len, - err_code, err_position) - CSCONVERT obj; - UCHAR *gb_str; - USHORT gb_len; - UCS2_CHAR *unicode_str; - USHORT unicode_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVGB_unicode_to_gb2312(CSCONVERT obj, UCHAR *gb_str, USHORT gb_len, UCS2_CHAR *unicode_str + , USHORT unicode_len, SSHORT *err_code, USHORT *err_position) { UCHAR *start; UCS2_CHAR gb_ch; @@ -187,9 +173,7 @@ USHORT CVGB_unicode_to_gb2312(obj, gb_str, gb_len, unicode_str, unicode_len, } -USHORT CVGB_check_gb2312(gb_str, gb_len) - UCHAR *gb_str; - USHORT gb_len; +USHORT CVGB_check_gb2312(UCHAR *gb_str, USHORT gb_len) { /************************************** * Functional description @@ -220,15 +204,8 @@ USHORT CVGB_check_gb2312(gb_str, gb_len) } -USHORT CVGB_gb2312_byte2short(obj, dst, dst_len, src, src_len, err_code, - err_position) - CSCONVERT obj; - UCHAR *dst; - USHORT dst_len; - UCHAR *src; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVGB_gb2312_byte2short(CSCONVERT obj, UCHAR *dst, USHORT dst_len, UCHAR *src, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { /************************************** * Functional description @@ -279,11 +256,7 @@ USHORT CVGB_gb2312_byte2short(obj, dst, dst_len, src, src_len, err_code, } -SSHORT CVGB_gb2312_mbtowc(obj, wc, src, src_len) - CSCONVERT obj; - UCS2_CHAR *wc; - UCHAR *src; - USHORT src_len; +SSHORT CVGB_gb2312_mbtowc(CSCONVERT obj, UCS2_CHAR *wc, UCHAR *src, USHORT src_len) { /************************************** * Functional description diff --git a/src/intl/cv_jis.c b/src/intl/cv_jis.c index a3a97fbc7b..2e41784e68 100644 --- a/src/intl/cv_jis.c +++ b/src/intl/cv_jis.c @@ -27,15 +27,8 @@ #include "../intl/kanji.h" -USHORT CVJIS_eucj_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, - err_code, err_position) - CSCONVERT obj; - UCS2_CHAR *dest_ptr; - USHORT dest_len; - UCHAR *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVJIS_eucj_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len, UCHAR *src_ptr + , USHORT src_len, SSHORT *err_code, USHORT *err_position) { UCS2_CHAR *start; UCS2_CHAR ch; @@ -120,15 +113,8 @@ USHORT CVJIS_eucj_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, } -USHORT CVJIS_sjis_to_unicode(obj, dest_ptr, dest_len, sjis_str, sjis_len, - err_code, err_position) - CSCONVERT obj; - UCS2_CHAR *dest_ptr; - USHORT dest_len; - UCHAR *sjis_str; - USHORT sjis_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVJIS_sjis_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len, UCHAR *sjis_str + , USHORT sjis_len, SSHORT *err_code, USHORT *err_position) { UCS2_CHAR *start; UCS2_CHAR ch; @@ -272,9 +258,7 @@ C O D E: #define isodd(x) ((x) & 1) -static void seven2eight(p1, p2) - USHORT *p1; - USHORT *p2; +static void seven2eight(USHORT *p1, USHORT *p2) { if (isodd(*p1)) *p2 += 31; @@ -382,15 +366,8 @@ I hope this helps in the discussion. */ -USHORT CVJIS_unicode_to_sjis(obj, sjis_str, sjis_len, unicode_str, - unicode_len, err_code, err_position) - CSCONVERT obj; - UCHAR *sjis_str; - USHORT sjis_len; - UCS2_CHAR *unicode_str; - USHORT unicode_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVJIS_unicode_to_sjis(CSCONVERT obj, UCHAR *sjis_str, USHORT sjis_len, UCS2_CHAR *unicode_str, + USHORT unicode_len, SSHORT *err_code, USHORT *err_position) { UCHAR *start; UCS2_CHAR jis_ch; @@ -470,15 +447,8 @@ USHORT CVJIS_unicode_to_sjis(obj, sjis_str, sjis_len, unicode_str, } -USHORT CVJIS_unicode_to_eucj(obj, eucj_str, eucj_len, unicode_str, - unicode_len, err_code, err_position) - CSCONVERT obj; - UCHAR *eucj_str; - USHORT eucj_len; - UCS2_CHAR *unicode_str; - USHORT unicode_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVJIS_unicode_to_eucj(CSCONVERT obj, UCHAR *eucj_str, USHORT eucj_len, UCS2_CHAR *unicode_str, + USHORT unicode_len, SSHORT *err_code, USHORT *err_position) { UCHAR *start; UCS2_CHAR jis_ch; @@ -549,9 +519,7 @@ USHORT CVJIS_unicode_to_eucj(obj, eucj_str, eucj_len, unicode_str, } -static USHORT CVJIS_check_euc(euc_str, euc_len) - UCHAR *euc_str; - USHORT euc_len; +static USHORT CVJIS_check_euc(UCHAR *euc_str, USHORT euc_len) { /************************************** * @@ -586,9 +554,7 @@ static USHORT CVJIS_check_euc(euc_str, euc_len) -static USHORT CVJIS_check_sjis(sjis_str, sjis_len) - UCHAR *sjis_str; - USHORT sjis_len; +static USHORT CVJIS_check_sjis(UCHAR *sjis_str, USHORT sjis_len) { /************************************** * @@ -633,13 +599,8 @@ static USHORT CVJIS_check_sjis(sjis_str, sjis_len) -static USHORT CVJIS_euc2sjis(obj, sjis_str, sjis_len, euc_str, euc_len, - err_code, err_position) - CSCONVERT obj; - UCHAR *euc_str, *sjis_str; - USHORT euc_len, sjis_len; - SSHORT *err_code; - USHORT *err_position; +static USHORT CVJIS_euc2sjis(CSCONVERT obj, UCHAR *sjis_str, USHORT sjis_len, UCHAR *euc_str, USHORT euc_len, + SSHORT *err_code, USHORT *err_position) { /************************************** * @@ -728,15 +689,8 @@ static USHORT CVJIS_euc2sjis(obj, sjis_str, sjis_len, euc_str, euc_len, -USHORT CVJIS_euc_byte2short(obj, dst, dst_len, src, src_len, err_code, - err_position) - CSCONVERT obj; - UCHAR *dst; - USHORT dst_len; - UCHAR *src; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVJIS_euc_byte2short(CSCONVERT obj, UCHAR *dst, USHORT dst_len, UCHAR *src, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { /************************************** * @@ -792,11 +746,7 @@ USHORT CVJIS_euc_byte2short(obj, dst, dst_len, src, src_len, err_code, } -SSHORT CVJIS_euc_mbtowc(obj, wc, src, src_len) - CSCONVERT obj; - UCS2_CHAR *wc; - UCHAR *src; - USHORT src_len; +SSHORT CVJIS_euc_mbtowc(CSCONVERT obj, UCS2_CHAR *wc, UCHAR *src, USHORT src_len) { /************************************** * @@ -829,13 +779,8 @@ SSHORT CVJIS_euc_mbtowc(obj, wc, src, src_len) }; } -static USHORT CVJIS_sjis2euc(obj, euc_str, euc_len, sjis_str, sjis_len, - err_code, err_position) - CSCONVERT obj; - UCHAR *euc_str, *sjis_str; - USHORT sjis_len, euc_len; - SSHORT *err_code; - USHORT *err_position; +static USHORT CVJIS_sjis2euc(CSCONVERT obj, UCHAR *euc_str, USHORT euc_len, UCHAR *sjis_str, USHORT sjis_len, + SSHORT *err_code, USHORT *err_position) { /************************************** * @@ -916,15 +861,8 @@ static USHORT CVJIS_sjis2euc(obj, euc_str, euc_len, sjis_str, sjis_len, -USHORT CVJIS_sjis_byte2short(obj, dst, dst_len, src, src_len, err_code, - err_position) - CSCONVERT obj; - UCHAR *dst; - USHORT dst_len; /* byte count */ - UCHAR *src; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CVJIS_sjis_byte2short(CSCONVERT obj, UCHAR *dst, USHORT dst_len, UCHAR *src, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { /************************************** * @@ -982,11 +920,7 @@ USHORT CVJIS_sjis_byte2short(obj, dst, dst_len, src, src_len, err_code, } -SSHORT CVJIS_sjis_mbtowc(obj, wc, src, src_len) - CSCONVERT obj; - UCS2_CHAR *wc; - UCHAR *src; - USHORT src_len; +SSHORT CVJIS_sjis_mbtowc(CSCONVERT obj, UCS2_CHAR *wc, UCHAR *src, USHORT src_len) { /************************************** * diff --git a/src/intl/cv_ksc.c b/src/intl/cv_ksc.c index aaf8d7197e..5e0beb412d 100644 --- a/src/intl/cv_ksc.c +++ b/src/intl/cv_ksc.c @@ -38,15 +38,8 @@ #define KSC2(uc) ((uc) >= 0x41) -USHORT CVKSC_ksc_to_unicode(obj, dest_ptr, dest_len, ksc_str, ksc_len, - err_code, err_position) - CSCONVERT obj; - UCS2_CHAR *dest_ptr; - USHORT dest_len; - UCHAR *ksc_str; - USHORT ksc_len; - short *err_code; - USHORT *err_position; +USHORT CVKSC_ksc_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len, UCHAR *ksc_str + , USHORT ksc_len, SSHORT *err_code, USHORT *err_position) { UCS2_CHAR *start; UCS2_CHAR ch; @@ -117,15 +110,8 @@ USHORT CVKSC_ksc_to_unicode(obj, dest_ptr, dest_len, ksc_str, ksc_len, } -USHORT CVKSC_unicode_to_ksc(obj, ksc_str, ksc_len, unicode_str, unicode_len, - err_code, err_position) - CSCONVERT obj; - UCHAR *ksc_str; - USHORT ksc_len; - UCS2_CHAR *unicode_str; - USHORT unicode_len; - short *err_code; - USHORT *err_position; +USHORT CVKSC_unicode_to_ksc(CSCONVERT obj, UCHAR *ksc_str, USHORT ksc_len, UCS2_CHAR *unicode_str + , USHORT unicode_len, SSHORT *err_code, USHORT *err_position) { UCHAR *start; UCS2_CHAR ksc_ch; @@ -186,9 +172,7 @@ USHORT CVKSC_unicode_to_ksc(obj, ksc_str, ksc_len, unicode_str, unicode_len, } -USHORT CVKSC_check_ksc(ksc_str, ksc_len) - UCHAR *ksc_str; - USHORT ksc_len; +USHORT CVKSC_check_ksc(UCHAR *ksc_str, USHORT ksc_len) { UCHAR c1; @@ -211,15 +195,8 @@ USHORT CVKSC_check_ksc(ksc_str, ksc_len) } -USHORT CVKSC_ksc_byte2short(obj, dst, dst_len, src, src_len, err_code, - err_position) - CSCONVERT obj; - USHORT *dst; - USHORT dst_len; - UCHAR *src; - USHORT src_len; - short *err_code; - USHORT *err_position; +USHORT CVKSC_ksc_byte2short(CSCONVERT obj, USHORT *dst, USHORT dst_len, UCHAR *src, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { USHORT x; USHORT *dst_start; @@ -277,11 +254,7 @@ USHORT CVKSC_ksc_byte2short(obj, dst, dst_len, src, src_len, err_code, } -short CVKSC_ksc_mbtowc(obj, wc, src, src_len) - CSCONVERT obj; - UCS2_CHAR *wc; - UCHAR *src; - USHORT src_len; +short CVKSC_ksc_mbtowc(CSCONVERT obj, UCS2_CHAR *wc, UCHAR *src, USHORT src_len) { assert(src != NULL); assert(obj != NULL); diff --git a/src/intl/cv_narrow.c b/src/intl/cv_narrow.c index 6e831fcbf5..af56cd7688 100644 --- a/src/intl/cv_narrow.c +++ b/src/intl/cv_narrow.c @@ -40,15 +40,8 @@ void CV_convert_init(CSCONVERT csptr, SSHORT to_cs, SSHORT from_cs, -USHORT CV_unicode_to_nc(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, - err_position) - CSCONVERT obj; - BYTE *dest_ptr; - USHORT dest_len; - BYTE *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CV_unicode_to_nc(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *src_ptr, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { BYTE *start; USHORT src_start = src_len; @@ -96,15 +89,8 @@ USHORT CV_unicode_to_nc(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, } -USHORT CV_wc_to_wc(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, - err_position) - CSCONVERT obj; - USHORT *dest_ptr; - USHORT dest_len; - USHORT *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CV_wc_to_wc(CSCONVERT obj, USHORT *dest_ptr, USHORT dest_len, USHORT *src_ptr, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { USHORT *start; USHORT ch; @@ -153,15 +139,8 @@ USHORT CV_wc_to_wc(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, } -USHORT CV_nc_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, - err_position) - CSCONVERT obj; - BYTE *dest_ptr; - USHORT dest_len; - BYTE *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +USHORT CV_nc_to_unicode(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *src_ptr, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { BYTE *start; UNICODE ch; @@ -202,15 +181,8 @@ USHORT CV_nc_to_unicode(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, } -USHORT CV_wc_copy(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, - err_position) - CSCONVERT obj; - BYTE *dest_ptr; - USHORT dest_len; /* byte count */ - BYTE *src_ptr; - USHORT src_len; /* byte count */ - SSHORT *err_code; - USHORT *err_position; +USHORT CV_wc_copy(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *src_ptr, USHORT src_len + , SSHORT *err_code, USHORT *err_position) { BYTE *start; USHORT src_start = src_len; @@ -245,15 +217,8 @@ USHORT CV_wc_copy(obj, dest_ptr, dest_len, src_ptr, src_len, err_code, } -static USHORT eight_bit_convert(obj, dest_ptr, dest_len, src_ptr, src_len, - err_code, err_position) - CSCONVERT obj; - BYTE *dest_ptr; - USHORT dest_len; - BYTE *src_ptr; - USHORT src_len; - SSHORT *err_code; - USHORT *err_position; +static USHORT eight_bit_convert(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *src_ptr, USHORT src_len, + SSHORT *err_code, USHORT *err_position) { BYTE *start; UCHAR ch; diff --git a/src/intl/lc_ascii.c b/src/intl/lc_ascii.c index 17296fa933..06bfd01461 100644 --- a/src/intl/lc_ascii.c +++ b/src/intl/lc_ascii.c @@ -497,9 +497,7 @@ TEXTTYPE_ENTRY(NEXT_c0_init) * This is used for index buffer allocation within the * Engine. */ -USHORT famasc_key_length(obj, inLen) - TEXTTYPE obj; - USHORT inLen; +USHORT famasc_key_length(TEXTTYPE obj, USHORT inLen) { /* assert (inLen <= LANGASCII_MAX_KEY); - possible upper logic error if true */ return (MIN(inLen, LANGASCII_MAX_KEY)); @@ -516,13 +514,8 @@ USHORT famasc_key_length(obj, inLen) * RETURN: * Length, in bytes, of returned key */ -USHORT famasc_string_to_key(obj, iInLen, pInChar, iOutLen, pOutChar, partial) - TEXTTYPE obj; - USHORT iInLen; - BYTE *pInChar; - USHORT iOutLen; - BYTE *pOutChar; - USHORT partial; +USHORT famasc_string_to_key(TEXTTYPE obj, USHORT iInLen, BYTE *pInChar, USHORT iOutLen, BYTE *pOutChar + , USHORT partial) { BYTE *outbuff; BYTE *inbuff; @@ -549,9 +542,7 @@ USHORT famasc_string_to_key(obj, iInLen, pInChar, iOutLen, pOutChar, partial) } -static SSHORT all_spaces(s, len) - BYTE *s; - SSHORT len; +static SSHORT all_spaces(BYTE *s, SSHORT len) { assert(s != NULL); @@ -562,12 +553,7 @@ static SSHORT all_spaces(s, len) } -SSHORT famasc_compare(obj, l1, s1, l2, s2) - TEXTTYPE obj; - USHORT l1; - BYTE *s1; - USHORT l2; - BYTE *s2; +SSHORT famasc_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) { USHORT len; USHORT i; @@ -580,9 +566,9 @@ SSHORT famasc_compare(obj, l1, s1, l2, s2) for (i = 0; i < len; i++) { if (s1[i] == s2[i]) continue; - else if (all_spaces(&s1[i], l1 - i)) + else if (all_spaces(&s1[i], (SSHORT) (l1 - i))) return -1; - else if (all_spaces(&s2[i], l2 - i)) + else if (all_spaces(&s2[i], (SSHORT) (l2 - i))) return 1; else if (s1[i] < s2[i]) return -1; @@ -591,12 +577,12 @@ SSHORT famasc_compare(obj, l1, s1, l2, s2) } if (l1 > len) { - if (all_spaces(&s1[len], l1 - len)) + if (all_spaces(&s1[len], (SSHORT) (l1 - len))) return 0; return 1; } if (l2 > len) { - if (all_spaces(&s2[len], l2 - len)) + if (all_spaces(&s2[len], (SSHORT) (l2 - len))) return 0; return -1; } @@ -605,21 +591,14 @@ SSHORT famasc_compare(obj, l1, s1, l2, s2) -USHORT famasc_to_upper(obj, ch) - TEXTTYPE obj; - BYTE ch; +USHORT famasc_to_upper(TEXTTYPE obj, BYTE ch) { return ((USHORT) ASCII7_UPPER(ch)); } -SSHORT famasc_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) - TEXTTYPE obj; - USHORT iLen; - BYTE *pStr; - USHORT iOutLen; - BYTE *pOutStr; +SSHORT famasc_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) { BYTE *p; assert(pStr != NULL); @@ -642,9 +621,7 @@ SSHORT famasc_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) -USHORT famasc_to_lower(obj, ch) - TEXTTYPE obj; - BYTE ch; +USHORT famasc_to_lower(TEXTTYPE obj, BYTE ch) { return (ASCII7_LOWER(ch)); } diff --git a/src/intl/lc_big5.c b/src/intl/lc_big5.c index 5546a1cbe7..9b6787e528 100644 --- a/src/intl/lc_big5.c +++ b/src/intl/lc_big5.c @@ -91,9 +91,7 @@ TEXTTYPE_ENTRY(BIG5_init) * Note: This function expects Wide-Char input, not * Multibyte input */ -STATIC USHORT big5_to_upper(obj, ch) - TEXTTYPE obj; - UCS2_CHAR ch; +STATIC USHORT big5_to_upper(TEXTTYPE obj, UCS2_CHAR ch) { if (ch >= (UCS2_CHAR) ASCII_LOWER_A && ch <= (UCS2_CHAR) ASCII_LOWER_Z) return (ch - (UCS2_CHAR) ASCII_LOWER_A + (UCS2_CHAR) ASCII_UPPER_A); @@ -107,12 +105,7 @@ STATIC USHORT big5_to_upper(obj, ch) /* * Note: This function expects Multibyte input */ -STATIC SSHORT big5_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) - TEXTTYPE obj; - USHORT iLen; - BYTE *pStr; - USHORT iOutLen; - BYTE *pOutStr; +STATIC SSHORT big5_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) { BYTE *p; USHORT waiting_for_big52 = FALSE; @@ -149,9 +142,7 @@ STATIC SSHORT big5_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) * Note: This function expects Wide-Char input, not * Multibyte input */ -STATIC USHORT big5_to_lower(obj, ch) - TEXTTYPE obj; - UCS2_CHAR ch; +STATIC USHORT big5_to_lower(TEXTTYPE obj, UCS2_CHAR ch) { if (ch >= (UCS2_CHAR) ASCII_UPPER_A && ch <= (UCS2_CHAR) ASCII_UPPER_Z) return (ch - (UCS2_CHAR) ASCII_UPPER_A + (UCS2_CHAR) ASCII_LOWER_A); diff --git a/src/intl/lc_dos.c b/src/intl/lc_dos.c index 798f101f0f..fbd04a3efb 100644 --- a/src/intl/lc_dos.c +++ b/src/intl/lc_dos.c @@ -607,9 +607,7 @@ TEXTTYPE_ENTRY(CYRL_c2_init) -STATIC USHORT fam1_to_upper(obj, ch) - TEXTTYPE obj; - BYTE ch; +STATIC USHORT fam1_to_upper(TEXTTYPE obj, BYTE ch) { return (LOCALE_UPPER(ch)); } @@ -620,12 +618,7 @@ STATIC USHORT fam1_to_upper(obj, ch) /* * Returns -1 if output buffer was too small */ -STATIC SSHORT fam1_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) - TEXTTYPE obj; - USHORT iLen; - BYTE *pStr; - USHORT iOutLen; - BYTE *pOutStr; +STATIC SSHORT fam1_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) { BYTE *p; assert(pStr != NULL); @@ -647,19 +640,13 @@ STATIC SSHORT fam1_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) -STATIC USHORT fam1_to_lower(obj, ch) - TEXTTYPE obj; - BYTE ch; +STATIC USHORT fam1_to_lower(TEXTTYPE obj, BYTE ch) { return (LOCALE_LOWER(ch)); } -SSHORT LC_DOS_nc_mbtowc(obj, wc, ptr, count) - TEXTTYPE obj; - UCS2_CHAR *wc; - UCHAR *ptr; - USHORT count; +SSHORT LC_DOS_nc_mbtowc(TEXTTYPE obj, UCS2_CHAR *wc, UCHAR *ptr, USHORT count) { /************************************** * diff --git a/src/intl/lc_iso8859_1.c b/src/intl/lc_iso8859_1.c index 3f1feb73ec..6b96e0cd28 100644 --- a/src/intl/lc_iso8859_1.c +++ b/src/intl/lc_iso8859_1.c @@ -523,9 +523,7 @@ TEXTTYPE_ENTRY(NEXT_c4_init) -STATIC USHORT fam2_to_upper(obj, ch) - TEXTTYPE obj; - BYTE ch; +STATIC USHORT fam2_to_upper(TEXTTYPE obj, BYTE ch) { return (LOCALE_UPPER(ch)); } @@ -534,12 +532,7 @@ STATIC USHORT fam2_to_upper(obj, ch) /* * Returns -1 if output buffer was too small */ -STATIC SSHORT fam2_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) - TEXTTYPE obj; - USHORT iLen; - BYTE *pStr; - USHORT iOutLen; - BYTE *pOutStr; +STATIC SSHORT fam2_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) { BYTE *p; assert(pStr != NULL); @@ -562,9 +555,7 @@ STATIC SSHORT fam2_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) -STATIC USHORT fam2_to_lower(obj, ch) - TEXTTYPE obj; - BYTE ch; +STATIC USHORT fam2_to_lower(TEXTTYPE obj, BYTE ch) { return (LOCALE_LOWER(ch)); } diff --git a/src/intl/lc_iso8859_2.c b/src/intl/lc_iso8859_2.c index 0bc74d1507..4cdf70fd9b 100644 --- a/src/intl/lc_iso8859_2.c +++ b/src/intl/lc_iso8859_2.c @@ -77,9 +77,7 @@ TEXTTYPE_RETURN; #define LOCALE_LOWER(ch) (obj->texttype_tolower_table[ (unsigned) (ch) ]) -STATIC USHORT fam2_to_upper (obj, ch) -TEXTTYPE obj; -BYTE ch; +STATIC USHORT fam2_to_upper (TEXTTYPE obj, BYTE ch) { return (LOCALE_UPPER (ch)); } @@ -88,12 +86,7 @@ BYTE ch; /* * Returns -1 if output buffer was too small */ -STATIC SSHORT fam2_str_to_upper (obj, iLen, pStr, iOutLen, pOutStr) -TEXTTYPE obj; -USHORT iLen; -BYTE *pStr; -USHORT iOutLen; -BYTE *pOutStr; +STATIC SSHORT fam2_str_to_upper (TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) { BYTE *p; assert (pStr != NULL); @@ -114,9 +107,7 @@ BYTE *pOutStr; } -STATIC USHORT fam2_to_lower (obj, ch) -TEXTTYPE obj; -BYTE ch; +STATIC USHORT fam2_to_lower (TEXTTYPE obj, BYTE ch) { return (LOCALE_LOWER (ch)); } diff --git a/src/intl/lc_jis.c b/src/intl/lc_jis.c index 288625c844..fb22686135 100644 --- a/src/intl/lc_jis.c +++ b/src/intl/lc_jis.c @@ -110,9 +110,7 @@ TEXTTYPE_ENTRY(JIS230_init) * Note: This function expects Wide-Char input, not * Multibyte input */ -STATIC USHORT sjis_to_upper(obj, ch) - TEXTTYPE obj; - UCS2_CHAR ch; +STATIC USHORT sjis_to_upper(TEXTTYPE obj, UCS2_CHAR ch) { if (ch >= (UCS2_CHAR) ASCII_LOWER_A && ch <= (UCS2_CHAR) ASCII_LOWER_Z) return (ch - (UCS2_CHAR) ASCII_LOWER_A + (UCS2_CHAR) ASCII_UPPER_A); @@ -126,12 +124,7 @@ STATIC USHORT sjis_to_upper(obj, ch) /* * Note: This function expects Multibyte input */ -STATIC SSHORT sjis_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) - TEXTTYPE obj; - USHORT iLen; - BYTE *pStr; - USHORT iOutLen; - BYTE *pOutStr; +STATIC SSHORT sjis_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) { BYTE *p; USHORT waiting_for_sjis2 = FALSE; @@ -168,9 +161,7 @@ STATIC SSHORT sjis_str_to_upper(obj, iLen, pStr, iOutLen, pOutStr) * Note: This function expects Wide-Char input, not * Multibyte input */ -STATIC USHORT sjis_to_lower(obj, ch) - TEXTTYPE obj; - UCS2_CHAR ch; +STATIC USHORT sjis_to_lower(TEXTTYPE obj, UCS2_CHAR ch) { if (ch >= (UCS2_CHAR) ASCII_UPPER_A && ch <= (UCS2_CHAR) ASCII_UPPER_Z) return (ch - (UCS2_CHAR) ASCII_UPPER_A + (UCS2_CHAR) ASCII_LOWER_A); diff --git a/src/intl/lc_ksc.c b/src/intl/lc_ksc.c index 1e56a4c9ad..992315f841 100644 --- a/src/intl/lc_ksc.c +++ b/src/intl/lc_ksc.c @@ -149,12 +149,7 @@ unsigned char gen_han[18][2] = { -STATIC USHORT LCKSC_string_to_key(obj, iInLen, pInChar, iOutLen, pOutChar) - TEXTTYPE obj; - USHORT iInLen; - BYTE *pInChar; - USHORT iOutLen; - BYTE *pOutChar; +STATIC USHORT LCKSC_string_to_key(TEXTTYPE obj, USHORT iInLen, BYTE *pInChar, USHORT iOutLen, BYTE *pOutChar) { USHORT i; int idx; @@ -233,8 +228,7 @@ STATIC USHORT LCKSC_string_to_key(obj, iInLen, pInChar, iOutLen, pOutChar) * description : in case of gen_han, get the index number from gen_han table */ -static int GetGenHanNdx(b1, b2) - unsigned char b1, b2; +static int GetGenHanNdx(unsigned char b1, unsigned char b2) { int i; @@ -251,8 +245,7 @@ static int GetGenHanNdx(b1, b2) * description : in case of spe_han, get index from spe_han table */ -static int GetSpeHanNdx(b1, b2) - unsigned char b1, b2; +static int GetSpeHanNdx(unsigned char b1, unsigned char b2) { int i; @@ -264,9 +257,7 @@ static int GetSpeHanNdx(b1, b2) } -STATIC USHORT LCKSC_key_length(obj, inLen) - TEXTTYPE obj; - USHORT inLen; +STATIC USHORT LCKSC_key_length(TEXTTYPE obj, USHORT inLen) { USHORT len; @@ -280,12 +271,7 @@ STATIC USHORT LCKSC_key_length(obj, inLen) * function name : LCKSC_compare * description : compare two string */ -STATIC short LCKSC_compare(obj, l1, s1, l2, s2) - TEXTTYPE obj; - USHORT l1; - BYTE *s1; - USHORT l2; - BYTE *s2; +STATIC short LCKSC_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) { BYTE key1[LANGKSC_MAX_KEY]; BYTE key2[LANGKSC_MAX_KEY]; diff --git a/src/intl/lc_narrow.c b/src/intl/lc_narrow.c index d4dade9796..623898cbe6 100644 --- a/src/intl/lc_narrow.c +++ b/src/intl/lc_narrow.c @@ -92,9 +92,7 @@ SSHORT LC_NARROW_compare(); * The degenerate case of short strings is handled by a minimal key * length. */ -USHORT LC_NARROW_key_length(obj, inLen) - TEXTTYPE obj; - USHORT inLen; +USHORT LC_NARROW_key_length(TEXTTYPE obj, USHORT inLen) { USHORT len; /* assert (inLen <= LANGFAM2_MAX_KEY); *//* almost certainly an error */ @@ -116,14 +114,8 @@ static ULONG do_debug = 0; * RETURN: * Length, in bytes, of returned key */ -USHORT LC_NARROW_string_to_key(obj, iInLen, pInChar, iOutLen, pOutChar, - partial) - TEXTTYPE obj; - USHORT iInLen; - BYTE *pInChar; - USHORT iOutLen; - BYTE *pOutChar; - USHORT partial; +USHORT LC_NARROW_string_to_key(TEXTTYPE obj, USHORT iInLen, BYTE *pInChar, USHORT iOutLen, BYTE *pOutChar, + USHORT partial) { USHORT lprimary; BYTE secondary[LANGFAM2_MAX_KEY]; @@ -313,12 +305,7 @@ typedef struct coltab_status { -static SSHORT special_scan(obj, l1, s1, l2, s2) - TEXTTYPE obj; - USHORT l1; - BYTE *s1; - USHORT l2; - BYTE *s2; +static SSHORT special_scan(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) { struct SortOrderTblEntry *col1; struct SortOrderTblEntry *col2; @@ -373,11 +360,7 @@ static SSHORT special_scan(obj, l1, s1, l2, s2) } -struct SortOrderTblEntry *get_coltab_entry(obj, p, l, stat) - TEXTTYPE obj; - UCHAR **p; - USHORT *l; - COLSTAT stat; +struct SortOrderTblEntry *get_coltab_entry(TEXTTYPE obj, UCHAR **p, USHORT *l, COLSTAT stat) { struct SortOrderTblEntry *col; @@ -455,12 +438,7 @@ struct SortOrderTblEntry *get_coltab_entry(obj, p, l, stat) #define XOR ^ /* C bitwise XOR operator - defined for readability */ -SSHORT LC_NARROW_compare(obj, l1, s1, l2, s2) - TEXTTYPE obj; - USHORT l1; - BYTE *s1; - USHORT l2; - BYTE *s2; +SSHORT LC_NARROW_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) { struct SortOrderTblEntry *col1, *col2; struct coltab_status stat1, stat2; @@ -555,12 +533,7 @@ SSHORT LC_NARROW_compare(obj, l1, s1, l2, s2) * Routine used for comparing results from comparision algorithm * to results from key creation algorithm */ -STATIC SSHORT old_fam2_compare(obj, l1, s1, l2, s2) - TEXTTYPE obj; - USHORT l1; - BYTE *s1; - USHORT l2; - BYTE *s2; +STATIC SSHORT old_fam2_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) { BYTE key1[LANGFAM2_MAX_KEY]; BYTE key2[LANGFAM2_MAX_KEY]; @@ -602,12 +575,7 @@ STATIC SSHORT old_fam2_compare(obj, l1, s1, l2, s2) * Routine used for comparing results from comparision algorithm * to results from key creation algorithm */ -STATIC SSHORT fam2_compare(obj, l1, s1, l2, s2) - TEXTTYPE obj; - USHORT l1; - BYTE *s1; - USHORT l2; - BYTE *s2; +STATIC SSHORT fam2_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) { SSHORT res1, res2; diff --git a/src/intl/lc_unicode_ucs2.c b/src/intl/lc_unicode_ucs2.c index bdd4820944..94f5ffb87e 100644 --- a/src/intl/lc_unicode_ucs2.c +++ b/src/intl/lc_unicode_ucs2.c @@ -103,11 +103,7 @@ TEXTTYPE_ENTRY(UNI201_init) #include "../intl/collations/undef.h" -static SSHORT wc_mbtowc(obj, wc, p, n) - TEXTTYPE *obj; - UCS2_CHAR *wc; - NCHAR *p; - USHORT n; +static SSHORT wc_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n) { assert(obj); assert(wc);