/[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.12 - (show annotations) (download) (as text)
Sat Jan 8 21:23:14 2000 UTC (19 years, 7 months ago) by per
Branch: MAIN
CVS Tags: eggdrop10402RC1
Changes since 1.11: +2 -2 lines
File MIME type: text/x-csrc
copyright

1 /*
2 * main.h
3 * include file to include most other include files
4 *
5 * $Id: main.h,v 1.11 1999/12/22 20:30:03 guppy Exp $
6 */
7 /*
8 * Copyright (C) 1997 Robey Pointer
9 * Copyright (C) 1999, 2000 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
26 #ifndef _EGG_MAIN_H
27 #define _EGG_MAIN_H
28
29 #ifndef MAKING_MODS
30 # ifdef HAVE_CONFIG_H
31 # include "../config.h"
32 # endif
33 #endif
34
35 /* UGH! Why couldn't Tcl pick a standard? */
36 #if !defined(HAVE_PRE7_5_TCL) && defined(__STDC__)
37 # ifdef HAVE_STDARG_H
38 # include <stdarg.h>
39 # else
40 # ifdef HAVE_STD_ARGS_H
41 # include <std_args.h>
42 # endif
43 # endif
44 # define EGG_VARARGS(type, name) (type name, ...)
45 # define EGG_VARARGS_DEF(type, name) (type name, ...)
46 # define EGG_VARARGS_START(type, name, list) (va_start(list, name), name)
47 #else
48 # include <varargs.h>
49 # define EGG_VARARGS(type, name) ()
50 # define EGG_VARARGS_DEF(type, name) (va_alist) va_dcl
51 # define EGG_VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
52 #endif
53
54 /* For pre Tcl7.5p1 versions */
55 #ifndef HAVE_TCL_FREE
56 # define Tcl_Free(x) n_free(x, "", 0)
57 #endif
58
59 #include <stdio.h>
60 #include <stdlib.h>
61 #include <string.h>
62 #include <sys/types.h>
63 #include "lang.h"
64 #include "eggdrop.h"
65 #include "flags.h"
66 #ifndef MAKING_MODS
67 # include "proto.h"
68 #endif
69 #include "cmdt.h"
70 #include "tclegg.h"
71 #include "tclhash.h"
72 #include "chan.h"
73 #include "users.h"
74
75 #ifndef MAKING_MODS
76 extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_SCRIPT, DCC_BOT_NEW,
77 DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
78 DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
79 DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT;
80
81 #endif
82
83 /* from net.h */
84
85 /* my own byte swappers */
86 #ifdef WORDS_BIGENDIAN
87 # define swap_short(sh) (sh)
88 # define swap_long(ln) (ln)
89 #else
90 # define swap_short(sh) ((((sh) & 0xff00) >> 8) | (((sh) & 0x00ff) << 8))
91 # define swap_long(ln) (swap_short(((ln)&0xffff0000)>>16) | (swap_short((ln)&0x0000ffff)<<16))
92 #endif
93 #define iptolong(a) (0xffffffff & (long)(swap_long((unsigned long)a)))
94 #define fixcolon(x) if (x[0]==':') {x++;} else {x=newsplit(&x);}
95
96 /* Stupid Borg Cube crap ;p */
97 #ifdef BORGCUBES
98
99 /* net.h needs this */
100 #define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
101
102 /* mod/filesys.mod/filedb.c needs this */
103 #define _S_IFMT 0170000 /* type of file */
104 #define _S_IFDIR 0040000 /* directory */
105 #define S_ISDIR(m) (((m)&(_S_IFMT)) == (_S_IFDIR))
106
107 #endif /* BORGCUBES */
108
109 #endif /* _EGG_MAIN_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23