comparison console/libgnt/gntutils.h @ 14423:cfd5bcc06a7e

[gaim-migrate @ 17131] Try to make sure the strings are not too long to get out of the range of the screen. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 02 Sep 2006 23:06:25 +0000
parents c4a32405af68
children 8a0cfee11af8
comparison
equal deleted inserted replaced
14422:84a480acb6ad 14423:cfd5bcc06a7e
7 7
8 /* excluding *end */ 8 /* excluding *end */
9 int gnt_util_onscreen_width(const char *start, const char *end); 9 int gnt_util_onscreen_width(const char *start, const char *end);
10 10
11 const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w); 11 const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w);
12
13 /* Inserts newlines in 'string' where necessary so that its onscreen width is
14 * no more than 'maxw'.
15 * 'maxw' can be <= 0, in which case the maximum screen width is considered.
16 *
17 * Returns a newly allocated string.
18 */
19 char *gnt_util_onscreen_fit_string(const char *string, int maxw);