/[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.4 - (show annotations) (download) (as text)
Fri Oct 15 11:35:28 1999 UTC (19 years, 10 months ago) by arthur2
Branch: MAIN
Changes since 1.3: +20 -15 lines
File MIME type: text/x-csrc
too-many-fixes.diff too-many-changes+1.diff too-many-fixes+2-part1.diff too-many-fixes+2-part2.diff

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23