/[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.10 - (show annotations) (download) (as text)
Wed Dec 15 02:32:58 1999 UTC (19 years, 8 months ago) by guppy
Branch: MAIN
Changes since 1.9: +32 -8 lines
File MIME type: text/x-csrc
id-header patch, finally, we have id tags for each file

1 /*
2 * main.h
3 * include file to include most other include files
4 *
5 * $Id$
6 */
7 /*
8 * Copyright (C) 1997 Robey Pointer
9 * Copyright (C) 1999 Eggheads
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 */
25 #ifndef _EGG_MAIN_H
26 #define _EGG_MAIN_H
27
28 #ifndef MAKING_MODS
29 # ifdef HAVE_CONFIG_H
30 # include "../config.h"
31 # endif
32 #endif
33
34 /* UGH! Why couldn't Tcl pick a standard? */
35 #if !defined(HAVE_PRE7_5_TCL) && defined(__STDC__)
36 # ifdef HAVE_STDARG_H
37 # include <stdarg.h>
38 # else
39 # ifdef HAVE_STD_ARGS_H
40 # include <std_args.h>
41 # endif
42 # endif
43 # define EGG_VARARGS(type, name) (type name, ...)
44 # define EGG_VARARGS_DEF(type, name) (type name, ...)
45 # define EGG_VARARGS_START(type, name, list) (va_start(list, name), name)
46 #else
47 # include <varargs.h>
48 # define EGG_VARARGS(type, name) ()
49 # define EGG_VARARGS_DEF(type, name) (va_alist) va_dcl
50 # define EGG_VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
51 #endif
52
53 /* For pre Tcl7.5p1 versions */
54 #ifndef HAVE_TCL_FREE
55 # define Tcl_Free(x) n_free(x, "", 0)
56 #endif
57
58 #include <stdio.h>
59 #include <stdlib.h>
60 #include <string.h>
61 #include <sys/types.h>
62 #include "lang.h"
63 #include "eggdrop.h"
64 #include "flags.h"
65 #ifndef MAKING_MODS
66 # include "proto.h"
67 #endif
68 #include "cmdt.h"
69 #include "tclegg.h"
70 #include "tclhash.h"
71 #include "chan.h"
72 #include "users.h"
73
74 #ifndef MAKING_MODS
75 extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_SCRIPT, DCC_BOT_NEW,
76 DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
77 DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
78 DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT;
79
80 #endif
81
82 /* from net.h */
83
84 /* my own byte swappers */
85 #ifdef WORDS_BIGENDIAN
86 # define swap_short(sh) (sh)
87 # define swap_long(ln) (ln)
88 #else
89 # define swap_short(sh) ((((sh) & 0xff00) >> 8) | (((sh) & 0x00ff) << 8))
90 # define swap_long(ln) (swap_short(((ln)&0xffff0000)>>16) | (swap_short((ln)&0x0000ffff)<<16))
91 #endif
92 #define iptolong(a) (0xffffffff & (long)(swap_long((unsigned long)a)))
93 #define fixcolon(x) if (x[0]==':') {x++;} else {x=newsplit(&x);}
94
95 /* Stupid Borg Cube crap ;p */
96 #ifdef BORGCUBES
97
98 /* net.h needs this */
99 #define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
100
101 /* mod/filesys.mod/filedb.c needs this */
102 #define _S_IFMT 0170000 /* type of file */
103 #define _S_IFDIR 0040000 /* directory */
104 #define S_ISDIR(m) (((m)&(_S_IFMT)) == (_S_IFDIR))
105
106 #endif /* BORGCUBES */
107
108 #endif /* _EGG_MAIN_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23