Mercurial > pidgin.yaz
comparison src/util.c @ 831:97f1ae636ed7
[gaim-migrate @ 841]
the away message page is about to get a major overhaul
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 02 Sep 2000 09:02:47 +0000 |
parents | 17def2bb9720 |
children | 647b110f7a1a |
comparison
equal
deleted
inserted
replaced
830:60284aef22f0 | 831:97f1ae636ed7 |
---|---|
1113 char tmp[length]; | 1113 char tmp[length]; |
1114 | 1114 |
1115 buf = g_malloc(length); | 1115 buf = g_malloc(length); |
1116 g_snprintf(buf, length, "%s", text); | 1116 g_snprintf(buf, length, "%s", text); |
1117 | 1117 |
1118 if (font_options & OPT_FONT_FACE) | 1118 if (font_options & OPT_FONT_BOLD) { |
1119 { | 1119 g_snprintf(tmp, length, "<B>%s</B>", buf); |
1120 strcpy(buf, tmp); | |
1121 } | |
1122 | |
1123 if (font_options & OPT_FONT_ITALIC) { | |
1124 g_snprintf(tmp, length, "<I>%s</I>", buf); | |
1125 strcpy(buf, tmp); | |
1126 } | |
1127 | |
1128 if (font_options & OPT_FONT_UNDERLINE) { | |
1129 g_snprintf(tmp, length, "<U>%s</U>", buf); | |
1130 strcpy(buf, tmp); | |
1131 } | |
1132 | |
1133 if (font_options & OPT_FONT_STRIKE) { | |
1134 g_snprintf(tmp, length, "<S>%s</S>", buf); | |
1135 strcpy(buf, tmp); | |
1136 } | |
1137 | |
1138 if (font_options & OPT_FONT_FACE) { | |
1120 g_snprintf(tmp, length, "<FONT FACE=\"%s\">%s</FONT>", fontface, buf); | 1139 g_snprintf(tmp, length, "<FONT FACE=\"%s\">%s</FONT>", fontface, buf); |
1121 strcpy(buf, tmp); | 1140 strcpy(buf, tmp); |
1122 } | 1141 } |
1123 | 1142 |
1124 if (font_options & OPT_FONT_FGCOL) | 1143 if (font_options & OPT_FONT_FGCOL) { |
1125 { | |
1126 g_snprintf(tmp, length, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", fgcolor.red, fgcolor.green, fgcolor.blue, buf); | 1144 g_snprintf(tmp, length, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", fgcolor.red, fgcolor.green, fgcolor.blue, buf); |
1127 strcpy(buf, tmp); | 1145 strcpy(buf, tmp); |
1128 } | 1146 } |
1129 | 1147 |
1130 if (font_options & OPT_FONT_BGCOL) | 1148 if (font_options & OPT_FONT_BGCOL) { |
1131 { | |
1132 g_snprintf(tmp, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red, bgcolor.green, bgcolor.blue, buf); | 1149 g_snprintf(tmp, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red, bgcolor.green, bgcolor.blue, buf); |
1133 strcpy(buf, tmp); | 1150 strcpy(buf, tmp); |
1134 } | 1151 } |
1135 | 1152 |
1136 return buf; | 1153 return buf; |