1999-09-03 14:27:29 +00:00
|
|
|
#ifndef __COMMON_H
|
|
|
|
#define __COMMON_H
|
|
|
|
|
2000-02-25 17:03:17 +00:00
|
|
|
#define IRSSI_AUTHOR "Timo Sirainen <tss@iki.fi>"
|
2000-06-02 01:55:03 +00:00
|
|
|
#define IRSSI_WEBSITE "http://irssi.org"
|
1999-09-03 14:27:29 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2000-08-30 22:29:55 +00:00
|
|
|
#include <stddef.h>
|
1999-09-03 14:27:29 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
# ifdef HAVE_STRING_H
|
|
|
|
#include <string.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_STDLIB_H
|
|
|
|
# include <stdlib.h>
|
|
|
|
#endif
|
|
|
|
#include <errno.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
2000-10-26 18:12:20 +00:00
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
# include <sys/time.h>
|
|
|
|
#endif
|
1999-09-03 14:27:29 +00:00
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_DIRENT_H
|
|
|
|
# include <dirent.h>
|
|
|
|
#endif
|
|
|
|
#include <fcntl.h>
|
2000-10-26 18:12:20 +00:00
|
|
|
#ifdef WIN32
|
|
|
|
# include <win32-compat.h>
|
|
|
|
#endif
|
1999-09-03 14:27:29 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <gmodule.h>
|
|
|
|
|
2000-04-26 08:10:09 +00:00
|
|
|
#include "core/memdebug.h"
|
2000-03-18 19:46:12 +00:00
|
|
|
#include "nls.h"
|
1999-09-03 14:27:29 +00:00
|
|
|
|
2000-04-14 11:27:14 +00:00
|
|
|
#define g_free_not_null(a) \
|
|
|
|
if (a) g_free(a);
|
|
|
|
|
|
|
|
#define g_free_and_null(a) \
|
|
|
|
if (a) { g_free(a); (a) = NULL; }
|
|
|
|
|
2000-11-23 23:29:32 +00:00
|
|
|
#define G_INPUT_READ (1 << 0)
|
|
|
|
#define G_INPUT_WRITE (1 << 1)
|
1999-09-03 14:27:29 +00:00
|
|
|
|
2000-12-04 22:57:18 +00:00
|
|
|
typedef void (*GInputFunction) (void *data, GIOChannel *source, int condition);
|
1999-09-03 14:27:29 +00:00
|
|
|
|
2000-12-04 22:57:18 +00:00
|
|
|
int g_input_add(GIOChannel *source, int condition,
|
2000-07-16 20:18:05 +00:00
|
|
|
GInputFunction function, void *data);
|
2000-12-04 22:57:18 +00:00
|
|
|
int g_input_add_full(GIOChannel *source, int priority, int condition,
|
2000-10-01 22:12:01 +00:00
|
|
|
GInputFunction function, void *data);
|
1999-09-03 14:27:29 +00:00
|
|
|
|
2000-03-18 12:52:51 +00:00
|
|
|
#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1)
|
1999-09-03 14:27:29 +00:00
|
|
|
|
|
|
|
#endif
|