renamed some encoding functions for consistency
This commit is contained in:
		| @ -777,13 +777,13 @@ hcl_oop_process_t hcl_makeproc ( | |||||||
| /* ========================================================================= */ | /* ========================================================================= */ | ||||||
| /* utf8.c                                                                    */ | /* utf8.c                                                                    */ | ||||||
| /* ========================================================================= */ | /* ========================================================================= */ | ||||||
| hcl_oow_t hcl_uctoutf8 ( | hcl_oow_t hcl_uc_to_utf8 ( | ||||||
| 	hcl_uch_t    uc, | 	hcl_uch_t    uc, | ||||||
| 	hcl_bch_t*   utf8, | 	hcl_bch_t*   utf8, | ||||||
| 	hcl_oow_t    size | 	hcl_oow_t    size | ||||||
| ); | ); | ||||||
|  |  | ||||||
| hcl_oow_t hcl_utf8touc ( | hcl_oow_t hcl_utf8_to_uc ( | ||||||
| 	const hcl_bch_t* utf8, | 	const hcl_bch_t* utf8, | ||||||
| 	hcl_oow_t        size, | 	hcl_oow_t        size, | ||||||
| 	hcl_uch_t*       uc | 	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. |  * 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 ucslen = HCL_COUNTOF(buf), n; | ||||||
|  *  hcl_oow_t bcslen = 11; |  *  hcl_oow_t bcslen = 11; | ||||||
|  *  int n; |  *  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 } |  *  if (n <= -1) { invalid/incomplenete sequence or buffer to small } | ||||||
|  * \endcode |  * \endcode | ||||||
|  * |  * | ||||||
| @ -824,7 +824,7 @@ int hcl_ucstoutf8 ( | |||||||
|  *         -2 if the wide-character string buffer is too small. |  *         -2 if the wide-character string buffer is too small. | ||||||
|  *         -3 if \a bcs is not a complete sequence. |  *         -3 if \a bcs is not a complete sequence. | ||||||
|  */ |  */ | ||||||
| int hcl_utf8toucs ( | int hcl_utf8_to_ucs ( | ||||||
| 	const hcl_bch_t*   bcs, | 	const hcl_bch_t*   bcs, | ||||||
| 	hcl_oow_t*         bcslen, | 	hcl_oow_t*         bcslen, | ||||||
| 	hcl_uch_t*         ucs, | 	hcl_uch_t*         ucs, | ||||||
|  | |||||||
| @ -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_uch_t    uc, | ||||||
| 	hcl_bch_t*   utf8, | 	hcl_bch_t*   utf8, | ||||||
| 	hcl_oow_t    size | 	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, | 	const hcl_bch_t* utf8, | ||||||
| 	hcl_oow_t        size, | 	hcl_oow_t        size, | ||||||
| 	hcl_uch_t*       uc | 	hcl_uch_t*       uc | ||||||
|  | |||||||
| @ -79,7 +79,7 @@ static HCL_INLINE __utf8_t* get_utf8_slot (hcl_uch_t uc) | |||||||
| 	return HCL_NULL; /* invalid character */ | 	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); | 	__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; | 	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; | 	__utf8_t* cur, * end; | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user