From 3e7ac03ca71c9b93c73fa58fd1de9a2042ec13d7 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 22 Apr 2004 17:47:28 +0000 Subject: bk_text and bk_info both need to know the on-screen width of characters in order to wrap and align them properly. Therefore, they should be using wcwidth(). So here are a couple of wrappers on wcwidth(), one which filters out the Unicode characters not representable in the target charset, and one which converts _from_ a charset to Unicode before calling wcwidth(). bk_text and bk_info should now align correctly even in the face of unsupported characters and Japanese. [originally from svn r4116] --- halibut.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'halibut.h') diff --git a/halibut.h b/halibut.h index 69953b6..26f2e4f 100644 --- a/halibut.h +++ b/halibut.h @@ -293,6 +293,12 @@ wchar_t *ustrftime(wchar_t *fmt, struct tm *timespec); int cvt_ok(int charset, const wchar_t *s); /* + * wcwidth.c + */ +int strwid(char const *s, int charset); +int ustrwid(wchar_t const *s, int charset); + +/* * help.c */ void help(void); -- cgit v1.1