X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Firssi%2Fsrc%2Fcommon.h;fp=apps%2Firssi%2Fsrc%2Fcommon.h;h=c79c5d9ba615ebe335a01ddcce5aea2cb2fe98b4;hb=23c5df1c8b0bfe539d3fa65802186e6e09e044aa;hp=0000000000000000000000000000000000000000;hpb=0f9738ce962b8498bbed0a75d5fb6fa127e3577f;p=silc.git diff --git a/apps/irssi/src/common.h b/apps/irssi/src/common.h new file mode 100644 index 00000000..c79c5d9b --- /dev/null +++ b/apps/irssi/src/common.h @@ -0,0 +1,89 @@ +#ifndef __COMMON_H +#define __COMMON_H + +#define IRSSI_AUTHOR "Timo Sirainen " +#define IRSSI_WEBSITE "http://irssi.org/" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +# ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +#include +#include + +#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#include + +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_DIRENT_H +# include +#endif +#include +#ifdef WIN32 +# include +#endif + +#include +#ifdef HAVE_GMODULE +# include +#endif + +#include "core/memdebug.h" + +#define g_free_not_null(a) \ + G_STMT_START { \ + if (a) g_free(a); \ + } G_STMT_END + +#define g_free_and_null(a) \ + G_STMT_START { \ + if (a) { g_free(a); (a) = NULL; } \ + } G_STMT_END + +#define G_INPUT_READ (1 << 0) +#define G_INPUT_WRITE (1 << 1) + +typedef void (*GInputFunction) (void *data, GIOChannel *source, int condition); + +int g_input_add(GIOChannel *source, int condition, + GInputFunction function, void *data); +int g_input_add_full(GIOChannel *source, int priority, int condition, + GInputFunction function, void *data); + +#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1) + +typedef struct _IPADDR IPADDR; +typedef struct _CONFIG_REC CONFIG_REC; +typedef struct _CONFIG_NODE CONFIG_NODE; + +typedef struct _LINEBUF_REC LINEBUF_REC; +typedef struct _NET_SENDBUF_REC NET_SENDBUF_REC; +typedef struct _RAWLOG_REC RAWLOG_REC; + +typedef struct _CHATNET_REC CHATNET_REC; +typedef struct _SERVER_REC SERVER_REC; +typedef struct _WI_ITEM_REC WI_ITEM_REC; +typedef struct _CHANNEL_REC CHANNEL_REC; +typedef struct _QUERY_REC QUERY_REC; +typedef struct _NICK_REC NICK_REC; + +typedef struct _SERVER_CONNECT_REC SERVER_CONNECT_REC; +typedef struct _SERVER_SETUP_REC SERVER_SETUP_REC; +typedef struct _CHANNEL_SETUP_REC CHANNEL_SETUP_REC; + +#endif