# HG changeset patch # User Mikael Berthe # Date 1141582157 -3600 # Node ID 51be2bc1a820a45b930991e731240cbd703c7e10 # Parent 1aff92625bdbfb2f5ce42d25fd5a24684f1850e3 Better tab expansion diff -r 1aff92625bdb -r 51be2bc1a820 mcabber/src/screen.c --- a/mcabber/src/screen.c Sun Mar 05 18:48:43 2006 +0100 +++ b/mcabber/src/screen.c Sun Mar 05 19:09:17 2006 +0100 @@ -978,20 +978,10 @@ inline void scr_WriteMessage(const char *jid, const char *text, time_t timestamp, guint prefix_flags) { - if (!timestamp) timestamp = time(NULL); - - scr_WriteInWindow(jid, text, timestamp, prefix_flags, FALSE); -} - -// If prefix is NULL, HBB_PREFIX_IN is supposed. -void scr_WriteIncomingMessage(const char *jidfrom, const char *text, - time_t timestamp, guint prefix) -{ char *p, *xtext; guint8 n =0; - if (!(prefix & ~HBB_PREFIX_NOFLAG)) - prefix |= HBB_PREFIX_IN; + if (!timestamp) timestamp = time(NULL); xtext = (char*)text; @@ -1012,15 +1002,26 @@ } while (*p++); } - // FIXME Filter out special chars... - scr_WriteMessage(jidfrom, xtext, timestamp, prefix); - update_panels(); - doupdate(); + // XXX Are there other special chars we should filter out? + + scr_WriteInWindow(jid, xtext, timestamp, prefix_flags, FALSE); if (xtext != (char*)text) g_free(xtext); } +// If prefix is NULL, HBB_PREFIX_IN is supposed. +void scr_WriteIncomingMessage(const char *jidfrom, const char *text, + time_t timestamp, guint prefix) +{ + if (!(prefix & ~HBB_PREFIX_NOFLAG)) + prefix |= HBB_PREFIX_IN; + + scr_WriteMessage(jidfrom, text, timestamp, prefix); + update_panels(); + doupdate(); +} + void scr_WriteOutgoingMessage(const char *jidto, const char *text) { scr_WriteMessage(jidto, text, 0, HBB_PREFIX_OUT);