diff --git a/lib/hcl-prv.h b/lib/hcl-prv.h index 3cabab2..91021c5 100644 --- a/lib/hcl-prv.h +++ b/lib/hcl-prv.h @@ -777,13 +777,13 @@ hcl_oop_process_t hcl_makeproc ( /* ========================================================================= */ /* utf8.c */ /* ========================================================================= */ -hcl_oow_t hcl_uctoutf8 ( +hcl_oow_t hcl_uc_to_utf8 ( hcl_uch_t uc, hcl_bch_t* utf8, hcl_oow_t size ); -hcl_oow_t hcl_utf8touc ( +hcl_oow_t hcl_utf8_to_uc ( const hcl_bch_t* utf8, hcl_oow_t size, hcl_uch_t* uc @@ -797,7 +797,7 @@ int hcl_ucstoutf8 ( ); /** - * The hcl_utf8toucs() function converts a UTF8 string to a uncide string. + * The hcl_utf8_to_ucs() function converts a UTF8 string to a uncide string. * * It never returns -2 if \a ucs is #HCL_NULL. * @@ -807,7 +807,7 @@ int hcl_ucstoutf8 ( * hcl_oow_t ucslen = HCL_COUNTOF(buf), n; * hcl_oow_t bcslen = 11; * int n; - * n = hcl_utf8toucs (bcs, &bcslen, ucs, &ucslen); + * n = hcl_utf8_to_ucs (bcs, &bcslen, ucs, &ucslen); * if (n <= -1) { invalid/incomplenete sequence or buffer to small } * \endcode * @@ -824,7 +824,7 @@ int hcl_ucstoutf8 ( * -2 if the wide-character string buffer is too small. * -3 if \a bcs is not a complete sequence. */ -int hcl_utf8toucs ( +int hcl_utf8_to_ucs ( const hcl_bch_t* bcs, hcl_oow_t* bcslen, hcl_uch_t* ucs, diff --git a/lib/hcl-utl.h b/lib/hcl-utl.h index 85eec67..4edf74d 100644 --- a/lib/hcl-utl.h +++ b/lib/hcl-utl.h @@ -538,13 +538,13 @@ HCL_EXPORT int hcl_conv_utf8_to_ucstr ( ); -HCL_EXPORT hcl_oow_t hcl_uctoutf8 ( +HCL_EXPORT hcl_oow_t hcl_uc_to_utf8 ( hcl_uch_t uc, hcl_bch_t* utf8, hcl_oow_t size ); -HCL_EXPORT hcl_oow_t hcl_utf8touc ( +HCL_EXPORT hcl_oow_t hcl_utf8_to_uc ( const hcl_bch_t* utf8, hcl_oow_t size, hcl_uch_t* uc diff --git a/lib/utf8.c b/lib/utf8.c index 5f56597..73a2eae 100644 --- a/lib/utf8.c +++ b/lib/utf8.c @@ -79,7 +79,7 @@ static HCL_INLINE __utf8_t* get_utf8_slot (hcl_uch_t uc) return HCL_NULL; /* invalid character */ } -hcl_oow_t hcl_uctoutf8 (hcl_uch_t uc, hcl_bch_t* utf8, hcl_oow_t size) +hcl_oow_t hcl_uc_to_utf8 (hcl_uch_t uc, hcl_bch_t* utf8, hcl_oow_t size) { __utf8_t* cur = get_utf8_slot (uc); @@ -106,7 +106,7 @@ hcl_oow_t hcl_uctoutf8 (hcl_uch_t uc, hcl_bch_t* utf8, hcl_oow_t size) return (hcl_oow_t)cur->length; } -hcl_oow_t hcl_utf8touc (const hcl_bch_t* utf8, hcl_oow_t size, hcl_uch_t* uc) +hcl_oow_t hcl_utf8_to_uc (const hcl_bch_t* utf8, hcl_oow_t size, hcl_uch_t* uc) { __utf8_t* cur, * end; diff --git a/lib/utl.c b/lib/utl.c index 9750a51..d4810ab 100644 --- a/lib/utl.c +++ b/lib/utl.c @@ -687,8 +687,8 @@ HCL_INLINE int hcl_conv_ucs_to_bcs_with_cmgr ( static hcl_cmgr_t utf8_cmgr = { - hcl_utf8touc, - hcl_uctoutf8 + hcl_utf8_to_uc, + hcl_uc_to_utf8 }; hcl_cmgr_t* hcl_get_utf8_cmgr (void)