Added printtext_string() which works like printtext(), except it prints

text from a string, so that %s, %d, etc. don't work. Changed perl's
Irssi::print() use this instead as well as /HELP printer.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1072 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-05 08:30:01 +00:00 committed by cras
commit 86aa2d514d
6 changed files with 24 additions and 51 deletions

View file

@ -96,14 +96,14 @@ static void help_category(GSList *cmdlist, gint items, gint max)
if (col == cols || tmp->next == NULL)
{
printtext(NULL, NULL, MSGLEVEL_CLIENTCRAP, "%s", str->str);
printtext_string(NULL, NULL, MSGLEVEL_CLIENTCRAP, str->str);
g_string_truncate(str, 0);
col = 0; line++;
tmp = g_slist_nth(cmdlist, line-1); skip = 1;
}
}
if (str->len != 0)
printtext(NULL, NULL, MSGLEVEL_CLIENTCRAP, "%s", str->str);
printtext_string(NULL, NULL, MSGLEVEL_CLIENTCRAP, str->str);
g_string_free(str, TRUE);
g_free(cmdbuf);
}
@ -131,7 +131,7 @@ static int show_help_rec(COMMAND_REC *cmd)
recvlen = read(f, tmpbuf, sizeof(tmpbuf));
ret = line_split(tmpbuf, recvlen, &str, &buffer);
if (ret > 0) printtext(NULL, NULL, MSGLEVEL_CLIENTCRAP, "%s", str);
if (ret > 0) printtext_string(NULL, NULL, MSGLEVEL_CLIENTCRAP, str);
}
while (ret > 0);
line_split_free(buffer);