1999-09-03 10:27:29 -04:00
|
|
|
#ifndef __COMMON_H
|
|
|
|
#define __COMMON_H
|
|
|
|
|
2000-02-25 12:03:17 -05:00
|
|
|
#define IRSSI_AUTHOR "Timo Sirainen <tss@iki.fi>"
|
2000-06-01 21:55:03 -04:00
|
|
|
#define IRSSI_WEBSITE "http://irssi.org"
|
1999-09-03 10:27:29 -04:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#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>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_DIRENT_H
|
|
|
|
# include <dirent.h>
|
|
|
|
#endif
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <gmodule.h>
|
|
|
|
|
2000-04-26 04:10:09 -04:00
|
|
|
#include "core/memdebug.h"
|
2000-03-18 14:46:12 -05:00
|
|
|
#include "nls.h"
|
1999-09-03 10:27:29 -04:00
|
|
|
|
2000-04-14 07:27:14 -04: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-07-16 16:18:05 -04:00
|
|
|
typedef enum {
|
2000-03-18 07:52:51 -05:00
|
|
|
G_INPUT_READ = 1 << 0,
|
2000-08-14 20:22:08 -04:00
|
|
|
G_INPUT_WRITE = 1 << 1
|
2000-03-18 07:52:51 -05:00
|
|
|
} GInputCondition;
|
1999-09-03 10:27:29 -04:00
|
|
|
|
2000-07-16 16:18:05 -04:00
|
|
|
typedef void (*GInputFunction) (void *data, int source,
|
2000-03-18 07:52:51 -05:00
|
|
|
GInputCondition condition);
|
1999-09-03 10:27:29 -04:00
|
|
|
|
2000-03-18 07:52:51 -05:00
|
|
|
int g_input_add(int source, GInputCondition condition,
|
2000-07-16 16:18:05 -04:00
|
|
|
GInputFunction function, void *data);
|
1999-09-03 10:27:29 -04:00
|
|
|
|
2000-03-18 07:52:51 -05:00
|
|
|
#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1)
|
1999-09-03 10:27:29 -04:00
|
|
|
|
|
|
|
#endif
|