tweaks: normalize the indentation after the previous change

master
Benno Schulenberg 2020-07-20 19:46:27 +02:00
parent dd1b16cd54
commit 8249f3560f
1 changed files with 7 additions and 7 deletions

View File

@ -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;
}