#ifndef __COMMON_H #define __COMMON_H #define IRSSI_AUTHOR "Timo Sirainen " #define IRSSI_WEBSITE "http://irssi.org" #ifdef HAVE_CONFIG_H #include #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 #include #include "core/memdebug.h" #include "nls.h" #define g_free_not_null(a) \ if (a) g_free(a); #define g_free_and_null(a) \ if (a) { g_free(a); (a) = NULL; } typedef enum { G_INPUT_READ = 1 << 0, G_INPUT_WRITE = 1 << 1 } GInputCondition; typedef void (*GInputFunction) (void *data, int source, GInputCondition condition); int g_input_add(int source, GInputCondition condition, GInputFunction function, void *data); int g_input_add_full(int source, int priority, GInputCondition condition, GInputFunction function, void *data); #define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1) #endif