mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
..adding new files..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@171 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d01b094151
commit
c95034c6de
206 changed files with 31247 additions and 0 deletions
61
src/fe-common/core/printtext.h
Normal file
61
src/fe-common/core/printtext.h
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
#ifndef __PRINTTEXT_H
|
||||
#define __PRINTTEXT_H
|
||||
|
||||
enum {
|
||||
FORMAT_STRING,
|
||||
FORMAT_INT,
|
||||
FORMAT_LONG,
|
||||
FORMAT_FLOAT
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
char *tag;
|
||||
char *def;
|
||||
|
||||
int params;
|
||||
int paramtypes[10];
|
||||
} FORMAT_REC;
|
||||
|
||||
#define PRINTFLAG_BOLD 0x01
|
||||
#define PRINTFLAG_REVERSE 0x02
|
||||
#define PRINTFLAG_UNDERLINE 0x04
|
||||
#define PRINTFLAG_BEEP 0x08
|
||||
#define PRINTFLAG_BLINK 0x10
|
||||
#define PRINTFLAG_MIRC_COLOR 0x20
|
||||
#define PRINTFLAG_INDENT 0x40
|
||||
|
||||
/* printformat(...) = printformat_format(module_formats, ...)
|
||||
|
||||
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..
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
/* GCC */
|
||||
# define printformat(server, channel, level, formatnum...) \
|
||||
printformat_format(MODULE_FORMATS, server, channel, level, ##formatnum)
|
||||
#elif defined (_ISOC99_SOURCE)
|
||||
/* C99 */
|
||||
# define printformat(server, channel, level, formatnum, ...) \
|
||||
printformat_format(MODULE_FORMATS, server, channel, level, formatnum, __VA_ARGS__)
|
||||
#else
|
||||
/* inline/static */
|
||||
#ifdef G_CAN_INLINE
|
||||
inline
|
||||
#else
|
||||
static
|
||||
#endif
|
||||
void printformat(void *server, const char *channel, int level, int formatnum, ...)
|
||||
{
|
||||
printformat_format(MODULE_FORMATS, server, channel, level, ##formatnum);
|
||||
}
|
||||
#endif
|
||||
void printformat_format(FORMAT_REC *formats, void *server, const char *channel, int level, int formatnum, ...);
|
||||
|
||||
void printtext(void *server, const char *channel, int level, const char *str, ...);
|
||||
void printbeep(void);
|
||||
|
||||
void printtext_init(void);
|
||||
void printtext_deinit(void);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue