summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-07-18 19:03:07 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-07-18 19:03:07 +0000
commit40ffd87dedacaaf6fdc8a86314ed50e63777063d (patch)
tree5871030136924998639202a2f2680f58c0d0814d /src/fe-common
parent088358ca6166bbd663f7b1e390d09efcd72684fb (diff)
downloadirssi-40ffd87dedacaaf6fdc8a86314ed50e63777063d.zip
Irssi::printformat() called printformat_window() to print the text which
lost server/target information. Added printtext_dest() function which it uses now. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1642 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/printtext.c15
-rw-r--r--src/fe-common/core/printtext.h2
2 files changed, 14 insertions, 3 deletions
diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c
index 93a688f1..a807d52c 100644
--- a/src/fe-common/core/printtext.c
+++ b/src/fe-common/core/printtext.c
@@ -274,7 +274,7 @@ static char *printtext_expand_formats(const char *str, int *flags)
return ret;
}
-void printtext_dest(TEXT_DEST_REC *dest, const char *text, va_list va)
+static void printtext_dest_args(TEXT_DEST_REC *dest, const char *text, va_list va)
{
char *str;
@@ -289,6 +289,15 @@ void printtext_dest(TEXT_DEST_REC *dest, const char *text, va_list va)
g_free(str);
}
+void printtext_dest(TEXT_DEST_REC *dest, const char *text, ...)
+{
+ va_list va;
+
+ va_start(va, text);
+ printtext_dest_args(dest, text, va);
+ va_end(va);
+}
+
/* Write text to target - convert color codes */
void printtext(void *server, const char *target, int level, const char *text, ...)
{
@@ -300,7 +309,7 @@ void printtext(void *server, const char *target, int level, const char *text, ..
format_create_dest(&dest, server, target, level, NULL);
va_start(va, text);
- printtext_dest(&dest, text, va);
+ printtext_dest_args(&dest, text, va);
va_end(va);
}
@@ -336,7 +345,7 @@ void printtext_window(WINDOW_REC *window, int level, const char *text, ...)
window != NULL ? window : active_win);
va_start(va, text);
- printtext_dest(&dest, text, va);
+ printtext_dest_args(&dest, text, va);
va_end(va);
}
diff --git a/src/fe-common/core/printtext.h b/src/fe-common/core/printtext.h
index 14f46564..656ca412 100644
--- a/src/fe-common/core/printtext.h
+++ b/src/fe-common/core/printtext.h
@@ -2,6 +2,7 @@
#define __PRINTTEXT_H
#include "fe-windows.h"
+#include "formats.h"
void printformat_module(const char *module, void *server, const char *target, int level, int formatnum, ...);
void printformat_module_window(const char *module, WINDOW_REC *window, int level, int formatnum, ...);
@@ -13,6 +14,7 @@ void printtext(void *server, const char *target, int level, const char *text, ..
void printtext_string(void *server, const char *target, int level, const char *text);
void printtext_window(WINDOW_REC *window, int level, const char *text, ...);
void printtext_multiline(void *server, const char *target, int level, const char *format, const char *text);
+void printtext_dest(TEXT_DEST_REC *dest, const char *text, ...);
/* only GUI should call these - used for printing text to somewhere else
than windows */