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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23