mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 00:03:03 +01:00
Synchronize intlcpp with intl
This commit is contained in:
parent
e05ca6ffd9
commit
b522639130
@ -39,7 +39,7 @@ USHORT CVBIG5_big5_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_le
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVBIG5_big5_to_unicode);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVBIG5_big5_to_unicode);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -113,7 +113,7 @@ USHORT CVBIG5_unicode_to_big5(CSCONVERT obj, UCHAR *big5_str, USHORT big5_len, U
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVBIG5_unicode_to_big5);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVBIG5_unicode_to_big5);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
|
@ -39,7 +39,7 @@ USHORT CVGB_gb2312_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_le
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVGB_gb2312_to_unicode);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVGB_gb2312_to_unicode);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -113,7 +113,7 @@ USHORT CVGB_unicode_to_gb2312(CSCONVERT obj, UCHAR *gb_str, USHORT gb_len, UCS2_
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVGB_unicode_to_gb2312);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVGB_unicode_to_gb2312);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
|
@ -42,7 +42,7 @@ USHORT CVJIS_eucj_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVJIS_eucj_to_unicode);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVJIS_eucj_to_unicode);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -130,7 +130,7 @@ USHORT CVJIS_sjis_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVJIS_sjis_to_unicode);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVJIS_sjis_to_unicode);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -380,7 +380,7 @@ USHORT CVJIS_unicode_to_sjis(CSCONVERT obj, UCHAR *sjis_str, USHORT sjis_len, UC
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVJIS_unicode_to_sjis);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVJIS_unicode_to_sjis);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -461,7 +461,7 @@ USHORT CVJIS_unicode_to_eucj(CSCONVERT obj, UCHAR *eucj_str, USHORT eucj_len, UC
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVJIS_unicode_to_eucj);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVJIS_unicode_to_eucj);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
|
@ -45,7 +45,7 @@ USHORT CVKSC_ksc_to_unicode(CSCONVERT obj, UCS2_CHAR *dest_ptr, USHORT dest_len,
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVKSC_ksc_to_unicode);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVKSC_ksc_to_unicode);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -116,7 +116,7 @@ USHORT CVKSC_unicode_to_ksc(CSCONVERT obj, UCHAR *ksc_str, USHORT ksc_len, UCS2_
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CVKSC_unicode_to_ksc);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CVKSC_unicode_to_ksc);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
|
@ -51,7 +51,7 @@ USHORT CV_unicode_to_nc(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *sr
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CV_unicode_to_nc);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CV_unicode_to_nc);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -100,7 +100,7 @@ USHORT CV_wc_to_wc(CSCONVERT obj, USHORT *dest_ptr, USHORT dest_len, USHORT *src
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CV_wc_to_wc);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CV_wc_to_wc);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(obj->csconvert_misc != NULL);
|
||||
|
||||
@ -149,7 +149,7 @@ USHORT CV_nc_to_unicode(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *sr
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CV_nc_to_unicode);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CV_nc_to_unicode);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
assert(sizeof(UNICODE) == 2);
|
||||
|
||||
@ -190,7 +190,7 @@ USHORT CV_wc_copy(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *src_ptr,
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CV_wc_copy);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CV_wc_copy);
|
||||
|
||||
*err_code = 0;
|
||||
|
||||
@ -216,7 +216,7 @@ USHORT CV_wc_copy(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *src_ptr,
|
||||
}
|
||||
|
||||
|
||||
static USHORT eight_bit_convert(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len, BYTE *src_ptr
|
||||
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;
|
||||
@ -227,7 +227,7 @@ static USHORT eight_bit_convert(CSCONVERT obj, BYTE *dest_ptr, USHORT dest_len,
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == eight_bit_convert);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) eight_bit_convert);
|
||||
assert(obj->csconvert_datatable != NULL);
|
||||
|
||||
*err_code = 0;
|
||||
|
@ -27,7 +27,11 @@
|
||||
#include "../intlcpp/ldcommon.h"
|
||||
#include "cv_unicode_fss.h"
|
||||
|
||||
typedef USHORT fss_wchar_t;
|
||||
typedef SLONG fss_size_t;
|
||||
|
||||
static fss_size_t fss_mbtowc( fss_wchar_t * p, NCHAR *s, fss_size_t n);
|
||||
static fss_size_t fss_wctomb(MBCHAR *s, fss_wchar_t wc);
|
||||
|
||||
SSHORT CS_UTFFSS_fss_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n)
|
||||
{
|
||||
@ -183,7 +187,7 @@ SSHORT CS_UTFFSS_fss_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n)
|
||||
|
||||
|
||||
|
||||
static fss_size_t fss_mbtowc( fss_wchar_t * p, UCHAR *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;
|
||||
@ -257,7 +261,7 @@ USHORT CS_UTFFSS_fss_to_unicode(CSCONVERT obj, UNICODE *dest_ptr, USHORT dest_le
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CS_UTFFSS_fss_to_unicode ||
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CS_UTFFSS_fss_to_unicode ||
|
||||
((TEXTTYPE) obj)->texttype_fn_to_wc == CS_UTFFSS_fss_to_unicode);
|
||||
|
||||
*err_code = 0;
|
||||
@ -301,7 +305,7 @@ USHORT CS_UTFFSS_unicode_to_fss(CSCONVERT obj, MBCHAR *fss_str, USHORT fss_len,
|
||||
assert(err_code != NULL);
|
||||
assert(err_position != NULL);
|
||||
assert(obj != NULL);
|
||||
assert(obj->csconvert_convert == CS_UTFFSS_unicode_to_fss);
|
||||
assert(obj->csconvert_convert == (FPTR_SHORT) CS_UTFFSS_unicode_to_fss);
|
||||
|
||||
*err_code = 0;
|
||||
|
||||
|
@ -23,9 +23,6 @@
|
||||
|
||||
/* Note: all routines have cousins in jrd/intl.c */
|
||||
|
||||
typedef USHORT fss_wchar_t;
|
||||
typedef SLONG fss_size_t;
|
||||
|
||||
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);
|
||||
|
||||
@ -51,7 +48,3 @@ static const Tab tab[] = {
|
||||
{ 0xFE, 0xFC, 5 * 6, 0x7FFFFFFF, 0x4000000 }, /* 6 byte sequence */
|
||||
{ 0, 0, 0, 0, 0} /* end of table */
|
||||
};
|
||||
|
||||
static fss_size_t fss_mbtowc( fss_wchar_t * p, UCHAR *s, fss_size_t n);
|
||||
|
||||
static fss_size_t fss_wctomb(MBCHAR *s, fss_wchar_t wc);
|
||||
|
@ -601,7 +601,7 @@ TEXTTYPE_ENTRY(CYRL_c2_init)
|
||||
|
||||
|
||||
|
||||
STATIC USHORT fam1_to_upper(TEXTTYPE obj, BYTE ch)
|
||||
USHORT fam1_to_upper(TEXTTYPE obj, BYTE ch)
|
||||
{
|
||||
return (LOCALE_UPPER(ch));
|
||||
}
|
||||
@ -612,7 +612,7 @@ STATIC USHORT fam1_to_upper(TEXTTYPE obj, BYTE ch)
|
||||
/*
|
||||
* Returns -1 if output buffer was too small
|
||||
*/
|
||||
STATIC SSHORT fam1_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr)
|
||||
SSHORT fam1_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr)
|
||||
{
|
||||
BYTE *p;
|
||||
assert(pStr != NULL);
|
||||
@ -634,7 +634,7 @@ STATIC SSHORT fam1_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iO
|
||||
|
||||
|
||||
|
||||
STATIC USHORT fam1_to_lower(TEXTTYPE obj, BYTE ch)
|
||||
USHORT fam1_to_lower(TEXTTYPE obj, BYTE ch)
|
||||
{
|
||||
return (LOCALE_LOWER(ch));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user