comparison src/util.c @ 2016:9a2e3902658c

[gaim-migrate @ 2026] i hate cc committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 14 Jun 2001 17:33:25 +0000
parents 008a4cc4a82c
children 859e9c2c5813
comparison
equal deleted inserted replaced
2015:0d11fd498068 2016:9a2e3902658c
1071 } 1071 }
1072 1072
1073 char *stylize(gchar *text, int length) 1073 char *stylize(gchar *text, int length)
1074 { 1074 {
1075 gchar *buf; 1075 gchar *buf;
1076 char tmp[length]; 1076 char *tmp = g_malloc(length);
1077 1077
1078 buf = g_malloc(length); 1078 buf = g_malloc(length);
1079 g_snprintf(buf, length, "%s", text); 1079 g_snprintf(buf, length, "%s", text);
1080 1080
1081 if (font_options & OPT_FONT_BOLD) { 1081 if (font_options & OPT_FONT_BOLD) {
1118 g_snprintf(tmp, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red, 1118 g_snprintf(tmp, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red,
1119 bgcolor.green, bgcolor.blue, buf); 1119 bgcolor.green, bgcolor.blue, buf);
1120 strcpy(buf, tmp); 1120 strcpy(buf, tmp);
1121 } 1121 }
1122 1122
1123 g_free(tmp);
1123 return buf; 1124 return buf;
1124 } 1125 }
1125 1126
1126 int set_dispstyle(int chat) 1127 int set_dispstyle(int chat)
1127 { 1128 {