Lots of changes again. Biggest ones:

- window's text buffer should work better
- themes are almost working, you can change the text formats with /format
- automatically try to rejoin the channel after 5 minutes if the join there
failed because it was "temporarily unavailable" (netsplits)
- generally cleaning code..


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@216 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-05-15 08:25:45 +00:00 committed by cras
commit cbdaf7d06d
63 changed files with 2471 additions and 1912 deletions

View file

@ -1,6 +1,8 @@
#ifndef __PRINTTEXT_H
#define __PRINTTEXT_H
#include "windows.h"
enum {
FORMAT_STRING,
FORMAT_INT,
@ -24,9 +26,14 @@ typedef struct {
#define PRINTFLAG_MIRC_COLOR 0x20
#define PRINTFLAG_INDENT 0x40
void printformat_format(FORMAT_REC *formats, void *server, const char *channel, int level, int formatnum, ...);
void printformat_module(const char *module, void *server, const char *channel, int level, int formatnum, ...);
void printformat_module_window(const char *module, WINDOW_REC *window, int level, int formatnum, ...);
void printtext(void *server, const char *channel, int level, const char *str, ...);
void printformat_module_args(const char *module, void *server, const char *channel, 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_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 printbeep(void);
@ -36,4 +43,51 @@ char *strip_codes(const char *input);
void printtext_init(void);
void printtext_deinit(void);
/* 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 */
# define printformat(server, channel, level, formatnum...) \
printformat_module(MODULE_NAME, server, channel, 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_window(window, level, formatnum, ...) \
printformat_module_window(MODULE_NAME, window, level, formatnum, __VA_ARGS__)
#else
/* inline/static */
static
#ifdef G_CAN_INLINE
inline
#endif
void printformat(void *server, const char *channel, int level, int formatnum, ...)
{
va_list va;
va_start(va, formatnum);
printformat_module_args(MODULE_NAME, server, channel, level, formatnum, va);
va_end(va);
}
static
#ifdef G_CAN_INLINE
inline
#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
#endif