u_strFromUTF8(tmp_result, tmp_size + 1, &tmp_size, src, -1, &status);
if (status == U_BUFFER_OVERFLOW_ERROR) {
+ /* LCOV_EXCL_START */
status = U_ZERO_ERROR;
free(tmp_result);
tmp_result = calloc(1, sizeof(UChar) * (tmp_size + 1));
if (NULL == tmp_result) {
- /* LCOV_EXCL_START */
ERR("calloc() Fail");
return CONTACTS_ERROR_OUT_OF_MEMORY;
- /* LCOV_EXCL_STOP */
}
u_strFromUTF8(tmp_result, tmp_size + 1, NULL, src, -1, &status);
if (U_FAILURE(status)) {
- /* LCOV_EXCL_START */
ERR("u_strFromUTF8()Fail(%s)", u_errorName(status));
free(tmp_result);
return CONTACTS_ERROR_SYSTEM;
upper_size = u_strToUpper(tmp_upper, tmp_size+1, tmp_result, -1, NULL, &status);
if (status == U_BUFFER_OVERFLOW_ERROR) {
+ /* LCOV_EXCL_START */
status = U_ZERO_ERROR;
free(tmp_upper);
tmp_upper = calloc(1, sizeof(UChar) * (upper_size + 1));
if (NULL == tmp_upper) {
- /* LCOV_EXCL_START */
ERR("calloc() Fail");
free(tmp_result);
return CONTACTS_ERROR_OUT_OF_MEMORY;
- /* LCOV_EXCL_STOP */
}
u_strFromUTF8(tmp_upper, upper_size + 1, NULL, src, -1, &status);
if (U_FAILURE(status)) {
- /* LCOV_EXCL_START */
ERR("u_strFromUTF8()Fail(%s)", u_errorName(status));
free(tmp_result);
free(tmp_upper);
size = unorm_normalize(tmp_upper, -1, UNORM_NFD, 0, result, size+1, &status);
if (status == U_BUFFER_OVERFLOW_ERROR) {
+ /* LCOV_EXCL_START */
status = U_ZERO_ERROR;
free(result);
result = calloc(1, sizeof(UChar)*(size + 1));
if (NULL == result) {
- /* LCOV_EXCL_START */
ERR("calloc() Fail");
free(tmp_result);
free(tmp_upper);
return CONTACTS_ERROR_OUT_OF_MEMORY;
- /* LCOV_EXCL_STOP */
}
unorm_normalize(tmp_upper, -1, UNORM_NFD, 0, result, size+1, &status);
if (U_FAILURE(status)) {
- /* LCOV_EXCL_START */
ERR("unorm_normalize() Fail(%s)", u_errorName(status));
free(tmp_result);
free(tmp_upper);
}
if (replaced) {
+ /* LCOV_EXCL_START */
temp_result[j] = 0x0;
free(result);
result = temp_result;
+ /* LCOV_EXCL_STOP */
} else {
free(temp_result);
}
for (i = 0; i < size; i++) {
/* FF00 ~ FF60: Fullwidth ASCII variants */
if (CTSVC_COMPARE_BETWEEN((UChar)0xFF00, dest[i], (UChar)0xFF60)) {
+ /* LCOV_EXCL_START */
int unicode_value1 = 0;
int unicode_value2 = 0;
unicode_value1 = 0x0;
unicode_value2 = (0xFF & dest[i]) + 0x20;
dest[i] = unicode_value1 << 8 | unicode_value2;
+ /* LCOV_EXCL_STOP */
} else if (CTSVC_COMPARE_BETWEEN((UChar)0xFFE0, dest[i], (UChar)0xFFE6)) {
/* FFE0~FFE6: Fullwidth symbol variants */
+ /* LCOV_EXCL_START */
if (dest[i] == (UChar)0xFFE0)
dest[i] = (UChar)0x00A2;
else if (dest[i] == (UChar)0xFFE1)
dest[i] = (UChar)0x00A5;
else if (dest[i] == (UChar)0xFFE6)
dest[i] = (UChar)0x20A9;
+ /* LCOV_EXCL_STOP */
/* else */
} /* else */
ret = __ctsvc_normalize_str(temp, dest, false);
return ret;
}
-
+ /* LCOV_EXCL_START */
static void __ctsvc_convert_japanese_group_letter(char *dest)
{
int i, size, dest_len;
RETM_IF(U_FAILURE(status), "u_strToUTF8() Fail(%s)", u_errorName(status));
}
-
+ /* LCOV_EXCL_STOP */
static bool __ctsvc_check_range_out_index(const char src[])
{
if (src[0] == 0xe2 && src[1] == 0x80 && src[2] == 0xa6)
}
if (ret == CTSVC_LANG_JAPANESE)
+ /* LCOV_EXCL_START */
__ctsvc_convert_japanese_group_letter(*dest);
+ /* LCOV_EXCL_STOP */
return ret;
}