Mercurial > pidgin
diff src/util.c @ 4890:89cb14edf8cf
[gaim-migrate @ 5220]
Moved utility function declarations into util.h and documented them.
Constificationized some vars in some functions.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 25 Mar 2003 06:26:24 +0000 |
parents | 912294585edf |
children | 347070472ed6 |
line wrap: on
line diff
--- a/src/util.c Tue Mar 25 05:01:00 2003 +0000 +++ b/src/util.c Tue Mar 25 06:26:24 2003 +0000 @@ -600,7 +600,7 @@ /* Look for %n, %d, or %t in msg, and replace with the sender's name, date, or time */ -char *away_subs(char *msg, char *name) +char *away_subs(const char *msg, const char *name) { char *c; static char cpy[BUF_LONG]; @@ -650,7 +650,7 @@ return (cpy); } -char *stylize(gchar *text, int length) +char *stylize(const gchar *text, int length) { gchar *buf; char *tmp = g_malloc(length); @@ -704,7 +704,7 @@ return buf; } -void show_usage(int mode, char *name) +void show_usage(int mode, const char *name) { switch (mode) { case 0: /* full help text */ @@ -873,38 +873,6 @@ return(dest); } -void away_on_login(char *mesg) -{ - GSList *awy = away_messages; - struct away_message *a, *message = NULL; - struct gaim_gtk_buddy_list *gtkblist; - - gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); - - if (!gtkblist->window) { - return; - } - - if (mesg == NULL) { - /* Use default message */ - do_away_message(NULL, default_away); - } else { - /* Use argument */ - while (awy) { - a = (struct away_message *)awy->data; - if (strcmp(a->name, mesg) == 0) { - message = a; - break; - } - awy = awy->next; - } - if (message == NULL) - message = default_away; - do_away_message(NULL, message); - } - return; -} - void strip_linefeed(gchar *text) { int i, j;