tweaks: normalize the indentation after the previous change
parent
dd1b16cd54
commit
8249f3560f
14
src/chars.c
14
src/chars.c
|
@ -197,20 +197,20 @@ int mbwidth(const char *c)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Convert the Unicode value in code to a multibyte character, if possible.
|
||||
/* Convert the given Unicode value to a multibyte character, if possible.
|
||||
* If the conversion succeeds, return the (dynamically allocated) multibyte
|
||||
* character and its length. Otherwise, return a length of zero. */
|
||||
char *make_mbchar(long code, int *length)
|
||||
{
|
||||
char *mb_char = charalloc(MAXCHARLEN);
|
||||
|
||||
*length = wctomb(mb_char, (wchar_t)code);
|
||||
*length = wctomb(mb_char, (wchar_t)code);
|
||||
|
||||
/* Reject invalid Unicode characters. */
|
||||
if (*length < 0 || !is_valid_unicode((wchar_t)code)) {
|
||||
IGNORE_CALL_RESULT(wctomb(NULL, 0));
|
||||
*length = 0;
|
||||
}
|
||||
/* Reject invalid Unicode characters. */
|
||||
if (*length < 0 || !is_valid_unicode((wchar_t)code)) {
|
||||
IGNORE_CALL_RESULT(wctomb(NULL, 0));
|
||||
*length = 0;
|
||||
}
|
||||
|
||||
return mb_char;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue