/[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.3 - (show annotations) (download) (as text)
Thu Oct 7 23:12:02 1999 UTC (19 years, 10 months ago) by guppy
Branch: MAIN
Changes since 1.2: +0 -1 lines
File MIME type: text/x-csrc
more patches for today

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
43 #ifndef MAKING_MODS
44 extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_SCRIPT, DCC_BOT_NEW,
45 DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
46 DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
47 DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT;
48
49 #endif
50
51 /* from net.h */
52
53 /* my own byte swappers */
54 #ifdef WORDS_BIGENDIAN
55 #define swap_short(sh) (sh)
56 #define swap_long(ln) (ln)
57 #else
58 #define swap_short(sh) ((((sh) & 0xff00) >> 8) | (((sh) & 0x00ff) << 8))
59 #define swap_long(ln) (swap_short(((ln)&0xffff0000)>>16) | (swap_short((ln)&0x0000ffff)<<16))
60 #endif
61 #define iptolong(a) (0xffffffff & (long)(swap_long((unsigned long)a)))
62 #define fixcolon(x) if (x[0]==':') {x++;} else {x=newsplit(&x);}
63
64 /* Stupid Borg Cube crap ;p */
65 #ifdef BORGCUBES
66
67 /* net.h needs this */
68 #define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
69
70 /* mod/filesys.mod/filedb.c needs this */
71 #define _S_IFMT 0170000 /* type of file */
72 #define _S_IFDIR 0040000 /* directory */
73 #define S_ISDIR(m) (((m)&(_S_IFMT)) == (_S_IFDIR))
74
75 #endif

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23