146 |
#ifdef MBS_SUPPORT |
#ifdef MBS_SUPPORT |
147 |
/* This function allocate the array which correspond to "buf". |
/* This function allocate the array which correspond to "buf". |
148 |
Then this check multibyte string and mark on the positions which |
Then this check multibyte string and mark on the positions which |
149 |
are not singlebyte character nor the first byte of a multibyte |
are not single byte character nor the first byte of a multibyte |
150 |
character. Caller must free the array. */ |
character. Caller must free the array. */ |
151 |
static char* |
static char* |
152 |
check_multibyte_string(char const *buf, size_t size) |
check_multibyte_string(char const *buf, size_t size) |
167 |
if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) |
if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) |
168 |
{ |
{ |
169 |
/* An invalid sequence, or a truncated multibyte character. |
/* An invalid sequence, or a truncated multibyte character. |
170 |
We treat it as a singlebyte character. */ |
We treat it as a single byte character. */ |
171 |
mbclen = 1; |
mbclen = 1; |
172 |
} |
} |
173 |
else if (match_icase) |
else if (match_icase) |