/[cvs]/eggdrop1.4/src/main.h
ViewVC logotype

Contents of /eggdrop1.4/src/main.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Jun 23 19:51:29 1999 UTC (20 years, 2 months ago) by segfault
Branch: MAIN
Branch point for: eggdev
File MIME type: text/x-csrc
Initial revision

1 /*
2 * main.h - include file to include most other include files
3 *
4 */
5 #ifndef MAKING_MODS
6 #ifdef HAVE_CONFIG_H
7 #include "../config.h"
8 #endif
9 #endif
10
11 #ifdef HAVE_STDARG_H /* do we have stdarg.h ? */
12 #ifndef _STDARG_H /* is stdarg.h already included ? */
13 #include <stdarg.h>
14 #endif /* _STDARG_H */
15 #define VARARGS(type, name) (type name, ...)
16 #define VARARGS_DEF(type, name) (type name, ...)
17 #define VARARGS_START(type, name, list) (va_start(list, name), name)
18 #else /* guess not, fall back on varargs.h */
19 #ifndef _VARARGS_H /* is varargs.h already included ? */
20 #include <varargs.h>
21 #endif /* _VARARGS_H */
22 #define VARARGS(type, name) ()
23 #define VARARGS_DEF(type, name) (va_alist) va_dcl
24 #define VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
25 #endif /* HAVE_STDARG_H */
26
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <string.h>
30 #include <sys/types.h>
31 #include "lang.h"
32 #include "eggdrop.h"
33 #include "flags.h"
34 #ifndef MAKING_MODS
35 #include "proto.h"
36 #endif
37 #include "cmdt.h"
38 #include "tclegg.h"
39 #include "tclhash.h"
40 #include "chan.h"
41 #include "users.h"
42 #include "rfc1459.h"
43
44 #ifndef MAKING_MODS
45 extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_SCRIPT, DCC_BOT_NEW,
46 DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
47 DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
48 DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT;
49
50 #endif
51
52 /* from net.h */
53
54 /* my own byte swappers */
55 #ifdef WORDS_BIGENDIAN
56 #define swap_short(sh) (sh)
57 #define swap_long(ln) (ln)
58 #else
59 #define swap_short(sh) ((((sh) & 0xff00) >> 8) | (((sh) & 0x00ff) << 8))
60 #define swap_long(ln) (swap_short(((ln)&0xffff0000)>>16) | \
61 (swap_short((ln)&0x0000ffff)<<16))
62 #endif
63 #define iptolong(a) swap_long((unsigned long)a)
64 #define fixcolon(x) if (x[0]==':') {x++;} else {x=newsplit(&x);}
65
66 /* Stupid Borg Cube crap ;p */
67 #ifdef BORGCUBES
68
69 /* net.h needs this */
70 #define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
71
72 /* mod/filesys.mod/filedb.c needs this */
73 #define _S_IFMT 0170000 /* type of file */
74 #define _S_IFDIR 0040000 /* directory */
75 #define S_ISDIR(m) (((m)&(_S_IFMT)) == (_S_IFDIR))
76
77 #endif

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23