/[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.6 - (show annotations) (download) (as text)
Sun Oct 17 00:13:14 1999 UTC (19 years, 10 months ago) by guppy
Branch: MAIN
Changes since 1.5: +1 -2 lines
File MIME type: text/x-csrc
Tothwolf's latest patches, more-make-fixes and va-fixes.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__)
14 # ifdef HAVE_STDARG_H
15 # include <stdarg.h>
16 # else
17 # ifdef HAVE_STD_ARGS_H
18 # include <std_args.h>
19 # endif
20 # endif
21 # define VARARGS(type, name) (type name, ...)
22 # define VARARGS_DEF(type, name) (type name, ...)
23 # define VARARGS_START(type, name, list) (va_start(list, name), name)
24 #else
25 # include <varargs.h>
26 # ifdef VARARGS
27 # undef VARARGS
28 # endif
29 # define VARARGS(type, name) ()
30 # define VARARGS_DEF(type, name) (va_alist) va_dcl
31 # define VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
32 #endif
33
34 #include <stdio.h>
35 #include <stdlib.h>
36 #include <string.h>
37 #include <sys/types.h>
38 #include "lang.h"
39 #include "eggdrop.h"
40 #include "flags.h"
41 #ifndef MAKING_MODS
42 #include "proto.h"
43 #endif
44 #include "cmdt.h"
45 #include "tclegg.h"
46 #include "tclhash.h"
47 #include "chan.h"
48 #include "users.h"
49
50 #ifndef MAKING_MODS
51 extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_SCRIPT, DCC_BOT_NEW,
52 DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
53 DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
54 DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT;
55
56 #endif
57
58 /* from net.h */
59
60 /* my own byte swappers */
61 #ifdef WORDS_BIGENDIAN
62 #define swap_short(sh) (sh)
63 #define swap_long(ln) (ln)
64 #else
65 #define swap_short(sh) ((((sh) & 0xff00) >> 8) | (((sh) & 0x00ff) << 8))
66 #define swap_long(ln) (swap_short(((ln)&0xffff0000)>>16) | (swap_short((ln)&0x0000ffff)<<16))
67 #endif
68 #define iptolong(a) (0xffffffff & (long)(swap_long((unsigned long)a)))
69 #define fixcolon(x) if (x[0]==':') {x++;} else {x=newsplit(&x);}
70
71 /* Stupid Borg Cube crap ;p */
72 #ifdef BORGCUBES
73
74 /* net.h needs this */
75 #define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
76
77 /* mod/filesys.mod/filedb.c needs this */
78 #define _S_IFMT 0170000 /* type of file */
79 #define _S_IFDIR 0040000 /* directory */
80 #define S_ISDIR(m) (((m)&(_S_IFMT)) == (_S_IFDIR))
81
82 #endif

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23