/[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.7 - (show annotations) (download) (as text)
Mon Oct 18 19:59:50 1999 UTC (20 years ago) by guppy
Branch: MAIN
Changes since 1.6: +6 -9 lines
File MIME type: text/x-csrc
dang coredumps

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23