diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-02 16:22:57 +0200 | 
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-02 16:22:57 +0200 | 
| commit | 85d7b857fb8ca8e3c03d4abb3368a0966760630c (patch) | |
| tree | a16163e557bcae3af41bde7d2d771d64ca248a97 /bitlbee.h | |
| parent | 875ad4201402b1a8f80ba22a6cdcdb152c6e5510 (diff) | |
| parent | dd345753c1742905c9f81aa71d8b09109fbc5456 (diff) | |
Merge trunk.
Diffstat (limited to 'bitlbee.h')
| -rw-r--r-- | bitlbee.h | 65 | 
1 files changed, 47 insertions, 18 deletions
| @@ -29,10 +29,10 @@  #define _GNU_SOURCE /* Stupid GNU :-P */  #define PACKAGE "BitlBee" -#define BITLBEE_VERSION "BZR" +#define BITLBEE_VERSION "1.2"  #define VERSION BITLBEE_VERSION -#define MAX_STRING 128 +#define MAX_STRING 511  #if HAVE_CONFIG_H  #include "config.h" @@ -58,23 +58,52 @@  /* The following functions should not be used if we want to maintain Windows compatibility... */  #undef free -#define free		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM_INSTEAD__ +#define free		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM__  #undef malloc -#define malloc		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM_INSTEAD__ +#define malloc		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM__  #undef calloc -#define calloc		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM_INSTEAD__ +#define calloc		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM__  #undef realloc -#define realloc		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM_INSTEAD__ +#define realloc		__PLEASE_USE_THE_GLIB_MEMORY_ALLOCATION_SYSTEM__  #undef strdup -#define strdup		__PLEASE_USE_THE_GLIB_STRDUP_FUNCTIONS_SYSTEM_INSTEAD__ +#define strdup		__PLEASE_USE_THE_GLIB_STRDUP_FUNCTIONS_SYSTEM__  #undef strndup -#define strndup		__PLEASE_USE_THE_GLIB_STRDUP_FUNCTIONS_SYSTEM_INSTEAD__ +#define strndup		__PLEASE_USE_THE_GLIB_STRDUP_FUNCTIONS_SYSTEM__  #undef snprintf -#define snprintf	__PLEASE_USE_G_SNPRINTF_INSTEAD__ +#define snprintf	__PLEASE_USE_G_SNPRINTF__  #undef strcasecmp -#define strcasecmp	__PLEASE_USE_G_STRCASECMP_INSTEAD__ +#define strcasecmp	__PLEASE_USE_G_STRCASECMP__  #undef strncasecmp -#define strncasecmp	__PLEASE_USE_G_STRNCASECMP_INSTEAD__ +#define strncasecmp	__PLEASE_USE_G_STRNCASECMP__ + +/* And the following functions shouldn't be used anymore to keep compatibility +   with other event handling libs than GLib. */ +#undef g_timeout_add +#define g_timeout_add		__PLEASE_USE_B_TIMEOUT_ADD__ +#undef g_timeout_add_full +#define g_timeout_add_full	__PLEASE_USE_B_TIMEOUT_ADD__ +#undef g_io_add_watch +#define g_io_add_watch		__PLEASE_USE_B_INPUT_ADD__ +#undef g_io_add_watch_full +#define g_io_add_watch_full	__PLEASE_USE_B_INPUT_ADD__ +#undef g_source_remove +#define g_source_remove		__PLEASE_USE_B_EVENT_REMOVE__ +#undef g_source_remove_by_user_data +#define g_source_remove_by_user_data	__PLEASE_USE_B_SOURCE_REMOVE_BY_USER_DATA__ +#undef g_main_run +#define g_main_run		__PLEASE_USE_B_MAIN_RUN__ +#undef g_main_quit +#define g_main_quit		__PLEASE_USE_B_MAIN_QUIT__ + +#ifndef F_OK +#define F_OK 0 +#endif + +#ifndef G_GNUC_MALLOC +/* Doesn't exist in GLib <=2.4 while everything else in BitlBee should +   work with it, so let's fake this one. */ +#define G_GNUC_MALLOC +#endif  #define _( x ) x @@ -93,43 +122,43 @@  #define HELP_FILE VARDIR "help.txt"  #define CONF_FILE_DEF ETCDIR "bitlbee.conf" -extern char *CONF_FILE; -  #include "irc.h"  #include "storage.h"  #include "set.h"  #include "nogaim.h"  #include "commands.h"  #include "account.h" +#include "nick.h"  #include "conf.h"  #include "log.h"  #include "ini.h"  #include "help.h"  #include "query.h"  #include "sock.h" -#include "util.h" +#include "misc.h" +#include "proxy.h"  typedef struct global {  	/* In forked mode, child processes store the fd of the IPC socket here. */  	int listen_socket;  	gint listen_watch_source_id;  	help_t *help; +	char *conf_file;  	conf_t *conf;  	GList *storage; /* The first backend in the list will be used for saving */  	char *helpfile; -	GMainLoop *loop;  	int restart;  } global_t;  int bitlbee_daemon_init( void );  int bitlbee_inetd_init( void ); -gboolean bitlbee_io_current_client_read( GIOChannel *source, GIOCondition condition, gpointer data ); -gboolean bitlbee_io_current_client_write( GIOChannel *source, GIOCondition condition, gpointer data ); +gboolean bitlbee_io_current_client_read( gpointer data, gint source, b_input_condition cond ); +gboolean bitlbee_io_current_client_write( gpointer data, gint source, b_input_condition cond );  void root_command_string( irc_t *irc, user_t *u, char *command, int flags );  void root_command( irc_t *irc, char *command[] ); -void bitlbee_shutdown( gpointer data ); +gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond );  extern global_t global; | 
