summaryrefslogtreecommitdiff
path: root/src/fe-common/core/printtext.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-10-28 03:01:11 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-10-28 03:01:11 +0000
commit8653c6ea36c29067a358ed59782b71ffd1401fc3 (patch)
treef17c582280ae923387e50528405c9ad3e189e67d /src/fe-common/core/printtext.h
parent80dd793c60bd58190c42e8fe76ae6e8825975373 (diff)
downloadirssi-8653c6ea36c29067a358ed59782b71ffd1401fc3.zip
/SET log_theme - you can now write to log files with different theme
than to screen. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@795 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/printtext.h')
-rw-r--r--src/fe-common/core/printtext.h36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/fe-common/core/printtext.h b/src/fe-common/core/printtext.h
index 1d5c2151..e75a105a 100644
--- a/src/fe-common/core/printtext.h
+++ b/src/fe-common/core/printtext.h
@@ -27,18 +27,18 @@ typedef struct {
#define PRINTFLAG_INDENT 0x40
char *output_format_get_text(const char *module, WINDOW_REC *window,
- void *server, const char *channel,
+ void *server, const char *target,
int formatnum, ...);
-void printformat_module(const char *module, void *server, const char *channel, int level, int formatnum, ...);
+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, ...);
-void printformat_module_args(const char *module, void *server, const char *channel, int level, int formatnum, va_list va);
+void printformat_module_args(const char *module, void *server, const char *target, int level, int formatnum, va_list va);
void printformat_module_window_args(const char *module, WINDOW_REC *window, int level, int formatnum, va_list va);
-void printtext(void *server, const char *channel, int level, const char *text, ...);
+void printtext(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 *channel, int level, const char *format, const char *text);
+void printtext_multiline(void *server, const char *target, int level, const char *format, const char *text);
void printbeep(void);
/* strip all color (etc.) codes from `input'. returns newly allocated string. */
@@ -55,14 +55,14 @@ void printtext_deinit(void);
*/
#if defined (__GNUC__) && !defined (__STRICT_ANSI__)
/* GCC */
-# define printformat(server, channel, level, formatnum...) \
- printformat_module(MODULE_NAME, server, channel, level, ##formatnum)
+# define printformat(server, target, level, formatnum...) \
+ printformat_module(MODULE_NAME, server, target, level, ##formatnum)
# define printformat_window(window, level, formatnum...) \
printformat_module_window(MODULE_NAME, window, level, ##formatnum)
#elif defined (_ISOC99_SOURCE)
/* C99 */
-# define printformat(server, channel, level, formatnum, ...) \
- printformat_module(MODULE_NAME, server, channel, level, formatnum, __VA_ARGS__)
+# define printformat(server, target, level, formatnum, ...) \
+ printformat_module(MODULE_NAME, server, target, level, formatnum, __VA_ARGS__)
# define printformat_window(window, level, formatnum, ...) \
printformat_module_window(MODULE_NAME, window, level, formatnum, __VA_ARGS__)
#else
@@ -71,12 +71,12 @@ static
#ifdef G_CAN_INLINE
inline
#endif
-void printformat(void *server, const char *channel, int level, int formatnum, ...)
+void printformat(void *server, const char *target, int level, int formatnum, ...)
{
va_list va;
va_start(va, formatnum);
- printformat_module_args(MODULE_NAME, server, channel, level, formatnum, va);
+ printformat_module_args(MODULE_NAME, server, target, level, formatnum, va);
va_end(va);
}
@@ -94,4 +94,18 @@ void printformat_window(WINDOW_REC *window, int level, int formatnum, ...)
}
#endif
+/* semi-private functions.. */
+typedef struct {
+ WINDOW_REC *window;
+ void *server;
+ const char *target;
+ int level;
+} TEXT_DEST_REC;
+
+char *output_format_text_args(TEXT_DEST_REC *dest, FORMAT_REC *format,
+ const char *text, va_list va);
+
+/* return the "-!- " text at the start of the line */
+char *get_line_start_text(TEXT_DEST_REC *dest);
+
#endif