blob: 282bc5f0230145f47c1a2a41a53a892477f6bf5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#ifndef __COMMON_H
#define __COMMON_H
#define IRSSI_AUTHOR "Timo Sirainen <tss@iki.fi>"
#define IRSSI_WEBSITE "http://xlife.dhs.org/irssi/"
#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>
#include <sys/wait.h>
#include <sys/utsname.h>
#ifdef HAVE_POPT_H
# include <popt.h>
#else
# include "lib-popt/popt.h"
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_DIRENT_H
# include <dirent.h>
#endif
#include <fcntl.h>
#ifdef HAVE_SOCKS_H
#include <socks.h>
#endif
#include <netdb.h>
#include <sys/socket.h>
#include <signal.h>
#include <sys/signal.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <glib.h>
#include <gmodule.h>
typedef struct
{
gushort family;
#ifdef HAVE_IPV6
struct in6_addr addr;
#else
struct in_addr addr;
#endif
}
IPADDR;
#include "irc-base/memdebug.h"
#include "lib-config/irssi-config.h"
#include "common-setup.h"
typedef enum
{
G_INPUT_READ = 1 << 0,
G_INPUT_WRITE = 1 << 1,
G_INPUT_EXCEPTION = 1 << 2
} GInputCondition;
typedef void (*GInputFunction) (gpointer data, int source,
GInputCondition condition);
int g_input_add(int source, GInputCondition condition,
GInputFunction function, gpointer data);
#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1)
#endif
|