2000-04-26 04:03:38 -04:00
|
|
|
#ifndef __PRINTTEXT_H
|
|
|
|
#define __PRINTTEXT_H
|
|
|
|
|
2000-11-17 11:27:14 -05:00
|
|
|
#include "fe-windows.h"
|
2000-05-15 04:25:45 -04:00
|
|
|
|
2000-10-27 23:01:11 -04:00
|
|
|
void printformat_module(const char *module, void *server, const char *target, int level, int formatnum, ...);
|
2000-05-15 04:25:45 -04:00
|
|
|
void printformat_module_window(const char *module, WINDOW_REC *window, int level, int formatnum, ...);
|
|
|
|
|
2000-10-27 23:01:11 -04:00
|
|
|
void printformat_module_args(const char *module, void *server, const char *target, int level, int formatnum, va_list va);
|
2000-05-15 04:25:45 -04:00
|
|
|
void printformat_module_window_args(const char *module, WINDOW_REC *window, int level, int formatnum, va_list va);
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2000-10-27 23:01:11 -04:00
|
|
|
void printtext(void *server, const char *target, int level, const char *text, ...);
|
2001-01-05 03:30:01 -05:00
|
|
|
void printtext_string(void *server, const char *target, int level, const char *text);
|
2000-05-15 04:25:45 -04:00
|
|
|
void printtext_window(WINDOW_REC *window, int level, const char *text, ...);
|
2000-10-27 23:01:11 -04:00
|
|
|
void printtext_multiline(void *server, const char *target, int level, const char *format, const char *text);
|
2000-04-26 04:03:38 -04:00
|
|
|
void printbeep(void);
|
|
|
|
|
|
|
|
void printtext_init(void);
|
|
|
|
void printtext_deinit(void);
|
|
|
|
|
2000-05-15 04:25:45 -04:00
|
|
|
/* printformat(...) = printformat_format(MODULE_NAME, ...)
|
|
|
|
|
|
|
|
Could this be any harder? :) With GNU C compiler and C99 compilers,
|
|
|
|
use #define. With others use either inline functions if they are
|
|
|
|
supported or static functions if they are not..
|
|
|
|
*/
|
|
|
|
#if defined (__GNUC__) && !defined (__STRICT_ANSI__)
|
|
|
|
/* GCC */
|
2000-10-27 23:01:11 -04:00
|
|
|
# define printformat(server, target, level, formatnum...) \
|
|
|
|
printformat_module(MODULE_NAME, server, target, level, ##formatnum)
|
2000-05-15 04:25:45 -04:00
|
|
|
# define printformat_window(window, level, formatnum...) \
|
|
|
|
printformat_module_window(MODULE_NAME, window, level, ##formatnum)
|
|
|
|
#elif defined (_ISOC99_SOURCE)
|
|
|
|
/* C99 */
|
2000-10-27 23:01:11 -04:00
|
|
|
# define printformat(server, target, level, formatnum, ...) \
|
|
|
|
printformat_module(MODULE_NAME, server, target, level, formatnum, __VA_ARGS__)
|
2000-05-15 04:25:45 -04:00
|
|
|
# define printformat_window(window, level, formatnum, ...) \
|
|
|
|
printformat_module_window(MODULE_NAME, window, level, formatnum, __VA_ARGS__)
|
|
|
|
#else
|
|
|
|
/* inline/static */
|
|
|
|
#ifdef G_CAN_INLINE
|
2000-10-28 16:14:19 -04:00
|
|
|
G_INLINE_FUNC
|
|
|
|
#else
|
|
|
|
static
|
2000-05-15 04:25:45 -04:00
|
|
|
#endif
|
2000-10-27 23:01:11 -04:00
|
|
|
void printformat(void *server, const char *target, int level, int formatnum, ...)
|
2000-05-15 04:25:45 -04:00
|
|
|
{
|
|
|
|
va_list va;
|
|
|
|
|
|
|
|
va_start(va, formatnum);
|
2000-10-27 23:01:11 -04:00
|
|
|
printformat_module_args(MODULE_NAME, server, target, level, formatnum, va);
|
2000-05-15 04:25:45 -04:00
|
|
|
va_end(va);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef G_CAN_INLINE
|
2000-10-28 16:14:19 -04:00
|
|
|
G_INLINE_FUNC
|
|
|
|
#else
|
|
|
|
static
|
2000-05-15 04:25:45 -04:00
|
|
|
#endif
|
|
|
|
void printformat_window(WINDOW_REC *window, int level, int formatnum, ...)
|
|
|
|
{
|
|
|
|
va_list va;
|
|
|
|
|
|
|
|
va_start(va, formatnum);
|
|
|
|
printformat_module_window_args(MODULE_NAME, window, level, formatnum, va);
|
|
|
|
va_end(va);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-04-26 04:03:38 -04:00
|
|
|
#endif
|