/[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.9 - (show annotations) (download) (as text)
Thu Nov 4 20:20:53 1999 UTC (19 years, 9 months ago) by guppy
Branch: MAIN
Changes since 1.8: +3 -3 lines
File MIME type: text/x-csrc
blah

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_PRE7_5_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 EGG_VARARGS(type, name) (type name, ...)
22 # define EGG_VARARGS_DEF(type, name) (type name, ...)
23 # define EGG_VARARGS_START(type, name, list) (va_start(list, name), name)
24 #else
25 # include <varargs.h>
26 # define EGG_VARARGS(type, name) ()
27 # define EGG_VARARGS_DEF(type, name) (va_alist) va_dcl
28 # define EGG_VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
29 #endif
30
31 /* For pre Tcl7.5p1 versions */
32 #ifndef HAVE_TCL_FREE
33 # define Tcl_Free(x) n_free(x, "", 0)
34 #endif
35
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <string.h>
39 #include <sys/types.h>
40 #include "lang.h"
41 #include "eggdrop.h"
42 #include "flags.h"
43 #ifndef MAKING_MODS
44 #include "proto.h"
45 #endif
46 #include "cmdt.h"
47 #include "tclegg.h"
48 #include "tclhash.h"
49 #include "chan.h"
50 #include "users.h"
51
52 #ifndef MAKING_MODS
53 extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_SCRIPT, DCC_BOT_NEW,
54 DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
55 DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
56 DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT;
57
58 #endif
59
60 /* from net.h */
61
62 /* my own byte swappers */
63 #ifdef WORDS_BIGENDIAN
64 #define swap_short(sh) (sh)
65 #define swap_long(ln) (ln)
66 #else
67 #define swap_short(sh) ((((sh) & 0xff00) >> 8) | (((sh) & 0x00ff) << 8))
68 #define swap_long(ln) (swap_short(((ln)&0xffff0000)>>16) | (swap_short((ln)&0x0000ffff)<<16))
69 #endif
70 #define iptolong(a) (0xffffffff & (long)(swap_long((unsigned long)a)))
71 #define fixcolon(x) if (x[0]==':') {x++;} else {x=newsplit(&x);}
72
73 /* Stupid Borg Cube crap ;p */
74 #ifdef BORGCUBES
75
76 /* net.h needs this */
77 #define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
78
79 /* mod/filesys.mod/filedb.c needs this */
80 #define _S_IFMT 0170000 /* type of file */
81 #define _S_IFDIR 0040000 /* directory */
82 #define S_ISDIR(m) (((m)&(_S_IFMT)) == (_S_IFDIR))
83
84 #endif

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23