mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
1c9f45b4a4
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@962 dbcabf3a-b0e7-0310-adc4-f8d773084564
66 lines
1.3 KiB
C
66 lines
1.3 KiB
C
#ifndef __COMMON_H
|
|
#define __COMMON_H
|
|
|
|
#define IRSSI_AUTHOR "Timo Sirainen <tss@iki.fi>"
|
|
#define IRSSI_WEBSITE "http://irssi.org"
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include <config.h>
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
#include <stddef.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>
|
|
#ifdef HAVE_SYS_TIME_H
|
|
# include <sys/time.h>
|
|
#endif
|
|
#include <sys/stat.h>
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
# include <unistd.h>
|
|
#endif
|
|
#ifdef HAVE_DIRENT_H
|
|
# include <dirent.h>
|
|
#endif
|
|
#include <fcntl.h>
|
|
#ifdef WIN32
|
|
# include <win32-compat.h>
|
|
#endif
|
|
|
|
#include <glib.h>
|
|
#include <gmodule.h>
|
|
|
|
#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; }
|
|
|
|
#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);
|
|
|
|
#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1)
|
|
|
|
#endif
|