Mercurial > pidgin
changeset 389:5e16d37b48bf
[gaim-migrate @ 399]
Woop. More smileys.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Mon, 12 Jun 2000 08:03:18 +0000 |
parents | 7fb34b73946a |
children | 0890c6250e7e |
files | src/conversation.c |
diffstat | 1 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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;