Revert "3rdparty: use a newer wcwidch implementation"

Unwanted change

This reverts commit 28ea765f19.
This commit is contained in:
李通洲
2024-01-23 14:42:00 +08:00
parent 0b98a14977
commit 9d7cbb0fe3
8 changed files with 334 additions and 573 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ static inline uint32_t getWcsWidth(const FFstrbuf* mbstr, wchar_t* wstr, mbstate
{
const char* str = mbstr->chars;
uint32_t wstrLength = (uint32_t) mbsrtowcs(wstr, &str, mbstr->length, state);
int result = wcswidth(wstr, wstrLength);
int result = mk_wcswidth(wstr, wstrLength);
return result > 0 ? (uint32_t) result : mbstr->length;
}
@@ -61,7 +61,7 @@ void ffPrintSeparator(FFSeparatorOptions* options)
#else
putwchar(wstr[i]);
#endif
int width = wcwidth(wstr[i]);
int width = mk_wcwidth(wstr[i]);
remaining -= width < 0 ? 0 : width;
}
}