Mercurial > pidgin
diff src/util.c @ 8700:ddd2bf87fe8d
[gaim-migrate @ 9453]
I'm adding some of the oscar tooltip info to the oscar
get info dialog. I don't think I'm finished yet, but
I want to try something that might not work,
and it's easier to "cvs -z3 diff -u | patch -p0 -R"
than it is to un-do it.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 18 Apr 2004 17:10:14 +0000 |
parents | 140b0d020c43 |
children | 92cbf9713795 |
line wrap: on
line diff
--- a/src/util.c Sun Apr 18 15:44:52 2004 +0000 +++ b/src/util.c Sun Apr 18 17:10:14 2004 +0000 @@ -1771,26 +1771,26 @@ return ret; } -/* Look for %n, %d, or %t in msg, and replace with the sender's name, date, - or time */ -const char * -gaim_str_sub_away_formatters(const char *msg, const char *name) +gchar * +gaim_str_sub_away_formatters(const char *str, const char *name) { char *c; - static char cpy[BUF_LONG]; + gchar *cpy; int cnt = 0; time_t t; struct tm *tme; char tmp[20]; - g_return_val_if_fail(msg != NULL, NULL); + g_return_val_if_fail(str != NULL, NULL); g_return_val_if_fail(name != NULL, NULL); + cpy = g_malloc(BUF_LONG); + t = time(NULL); tme = localtime(&t); cpy[0] = '\0'; - c = (char *)msg; + c = (char *)str; while (*c) { switch (*c) { case '%': @@ -1827,7 +1827,8 @@ c++; } cpy[cnt] = '\0'; - return (cpy); + + return cpy; } gchar *