X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Firssi%2Fsrc%2Fcommon.h;fp=apps%2Firssi%2Fsrc%2Fcommon.h;h=0000000000000000000000000000000000000000;hb=72c2de619079457f7a68100eb13385275a424a23;hp=f3cc8e60962f05b0d0e9b27b910b81e2206466fa;hpb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;p=runtime.git diff --git a/apps/irssi/src/common.h b/apps/irssi/src/common.h deleted file mode 100644 index f3cc8e60..00000000 --- a/apps/irssi/src/common.h +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef __COMMON_H -#define __COMMON_H - -#define IRSSI_WEBSITE "http://irssi.org/" -#define IRSSI_AUTHOR_EMAIL "cras@irssi.org" -#define IRSSI_AUTHOR "Timo Sirainen <"IRSSI_AUTHOR_EMAIL">" - -#define IRSSI_DIR_SHORT "~/.silc" -#define IRSSI_DIR_FULL "%s/.silc" /* %s == g_get_home_dir() */ - -#define IRSSI_GLOBAL_CONFIG "silc.conf" /* config file name in /etc/ */ -#define IRSSI_HOME_CONFIG "silc.conf" /* config file name in ~/.irssi/ */ - -#define DEFAULT_SERVER_ADD_PORT 706 - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifndef PACKAGE -#define PACKAGE "SILC Client" -#endif /* PACKAGE */ - -#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 - -#ifdef USE_GC -# define g_free(x) G_STMT_START { (x) = NULL; } G_STMT_END -#endif - -#if defined (UOFF_T_INT) -typedef unsigned int uoff_t; -#elif defined (UOFF_T_LONG) -typedef unsigned long uoff_t; -#elif defined (UOFF_T_LONG_LONG) -typedef unsigned long long uoff_t; -#else -# error uoff_t size not set -#endif - -/* input functions */ -#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); - -/* return full path for ~/.irssi */ -const char *get_irssi_dir(void); -/* return full path for ~/.irssi/config */ -const char *get_irssi_config(void); - -/* max. size for %d */ -#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1) - -#define g_free_not_null(a) g_free(a) - -#define g_free_and_null(a) \ - G_STMT_START { \ - if (a) { g_free(a); (a) = NULL; } \ - } G_STMT_END - -/* ctype.h isn't safe with chars, use our own instead */ -#define i_toupper(x) toupper((int) (unsigned char) (x)) -#define i_tolower(x) tolower((int) (unsigned char) (x)) -#define i_isalnum(x) isalnum((int) (unsigned char) (x)) -#define i_isalpha(x) isalpha((int) (unsigned char) (x)) -#define i_isascii(x) isascii((int) (unsigned char) (x)) -#define i_isblank(x) isblank((int) (unsigned char) (x)) -#define i_iscntrl(x) iscntrl((int) (unsigned char) (x)) -#define i_isdigit(x) isdigit((int) (unsigned char) (x)) -#define i_isgraph(x) isgraph((int) (unsigned char) (x)) -#define i_islower(x) islower((int) (unsigned char) (x)) -#define i_isprint(x) isprint((int) (unsigned char) (x)) -#define i_ispunct(x) ispunct((int) (unsigned char) (x)) -#define i_isspace(x) isspace((int) (unsigned char) (x)) -#define i_isupper(x) isupper((int) (unsigned char) (x)) -#define i_isxdigit(x) isxdigit((int) (unsigned char) (x)) - -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 _CHAT_PROTOCOL_REC CHAT_PROTOCOL_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; - -typedef struct _WINDOW_REC WINDOW_REC; - -#endif