Mercurial > pidgin
comparison console/libgnt/gntutils.c @ 14477:ca36763497d9
[gaim-migrate @ 17195]
Build libgnt with ncurses if ncursesw is not found. I uninstalled ncursesw
and it's still working for me .. of course, with no wide-character support.
Improve the mouse support a bit.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 09 Sep 2006 02:19:16 +0000 |
parents | c374f45f4c94 |
children | 1d084d1ee6fa |
comparison
equal
deleted
inserted
replaced
14476:218a36c1c9e2 | 14477:ca36763497d9 |
---|---|
40 } | 40 } |
41 | 41 |
42 int gnt_util_onscreen_width(const char *start, const char *end) | 42 int gnt_util_onscreen_width(const char *start, const char *end) |
43 { | 43 { |
44 int width = 0; | 44 int width = 0; |
45 | |
46 if (end == NULL) | |
47 end = start + strlen(start); | |
45 | 48 |
46 while (start < end) { | 49 while (start < end) { |
47 width += g_unichar_iswide(g_utf8_get_char(start)) ? 2 : 1; | 50 width += g_unichar_iswide(g_utf8_get_char(start)) ? 2 : 1; |
48 start = g_utf8_next_char(start); | 51 start = g_utf8_next_char(start); |
49 } | 52 } |