# HG changeset patch # User Rob Flynn # Date 960796998 0 # Node ID 5e16d37b48bf821167bb983a3a180ecb3a341167 # Parent 7fb34b73946a5ca3530d098dcd98c62f80c69b1b [gaim-migrate @ 399] Woop. More smileys. committer: Tailor Script diff -r 7fb34b73946a -r 5e16d37b48bf src/conversation.c --- a/src/conversation.c Sun Jun 11 03:13:57 2000 +0000 +++ b/src/conversation.c Mon Jun 12 08:03:18 2000 +0000 @@ -850,7 +850,7 @@ int state; int y; int i; - char *smiley = g_malloc(5); + char *smiley = g_malloc(7); if (flags & WFLAG_SYSTEM) { @@ -914,25 +914,29 @@ buf2[y] = what[i]; y++; - if ((what[i] == ':') || (what[i] == ';')) + if ( (what[i] == ':') || (what[i] == ';') || (what[i] == 'O') ) { - if (state == 0) + if (state < 2) { smiley[state] = what[i]; - state = 1; + state++; } else + { state = 0; + } } - else if ((what[i] == '-')) + else if ( (what[i] == '-') || (what[i] == '^') || (what[i] == 'o') ) { - if (state == 1) + if ((state == 1) || (state==2)) { smiley[state] = what[i]; - state = 2; - } + state++; + } else + { state = 0; + } } else if ((what[i] == ')') || (what[i] == '*') || (what[i] == '(') || (what[i] == 'p') || (what[i] == 'P') || (what[i] == '$') || @@ -949,7 +953,7 @@ gtk_html_add_pixmap(GTK_HTML(c->text), face, 0); state = 0; } - else if (state == 2) + else if ( (state == 2) || (state == 3)) { smiley[state] = what[i]; smiley[state+1] = 0;