gaim/gaim

Parents 8ef2f55be671
Children a120a5e17620
Apparently at some point I wrote italic support for IRC and never committed it
--- a/src/protocols/irc/parse.c Fri Aug 26 11:58:51 2005 -0400
+++ b/src/protocols/irc/parse.c Fri Aug 26 12:00:00 2005 -0400
@@ -279,7 +279,7 @@
const char *cur, *end;
char fg[3] = "\0\0", bg[3] = "\0\0";
int fgnum, bgnum;
- int font = 0, bold = 0, underline = 0;
+ int font = 0, bold = 0, underline = 0, italic = 0;
GString *decoded = g_string_sized_new(strlen(string));
cur = string;
@@ -333,6 +333,16 @@
decoded = g_string_append_c(decoded, '>');
}
break;
+ case '\011':
+ cur++;
+ if (!italic) {
+ decoded = g_string_append(decoded, "<I>");
+ italic = TRUE;
+ } else {
+ decoded = g_string_append(decoded, "</I>");
+ italic = FALSE;
+ }
+ break;
case '\037':
cur++;
if (!underline) {
@@ -353,6 +363,8 @@
case '\000':
if (bold)
decoded = g_string_append(decoded, "</B>");
+ if (italic)
+ decoded = g_string_append(decoded, "</I>");
if (underline)
decoded = g_string_append(decoded, "</U>");
if (font)