Mercurial > pidgin
diff console/libgnt/gntutils.c @ 14060:81648c6aa918
[gaim-migrate @ 16678]
Show timestamps (or not) in conversations.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 09 Aug 2006 06:23:18 +0000 |
parents | 2d1b41e3cf0d |
children | fda9dc44807d |
line wrap: on
line diff
--- a/console/libgnt/gntutils.c Wed Aug 09 03:41:45 2006 +0000 +++ b/console/libgnt/gntutils.c Wed Aug 09 06:23:18 2006 +0000 @@ -8,23 +8,26 @@ /* XXX: ew ... everyone look away */ last = s; - while (*s) + if (s) { - if (*s == '\n' || *s == '\r') + while (*s) { - count++; - len = g_utf8_pointer_to_offset(last, s); - if (max < len) - max = len; - last = s + 1; + if (*s == '\n' || *s == '\r') + { + count++; + len = g_utf8_pointer_to_offset(last, s); + if (max < len) + max = len; + last = s + 1; + } + s++; } - s++; + + len = g_utf8_pointer_to_offset(last, s); + if (max < len) + max = len; } - len = g_utf8_pointer_to_offset(last, s); - if (max < len) - max = len; - if (height) *height = count; if (width)