/[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.13 - (show annotations) (download) (as text)
Sat Jan 29 12:45:28 2000 UTC (19 years, 6 months ago) by per
Branch: MAIN
CVS Tags: eggdrop104030RC2, eggdrop10403RC1, eggdrop10404, eggdrop10403, eggdrop10402, HEAD
Changes since 1.12: +4 -1 lines
File MIME type: text/x-csrc
bzerofix/strings.h

1 /*
2 * main.h
3 * include file to include most other include files
4 *
5 * $Id: main.h,v 1.12 2000/01/08 21:23:14 per 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 #ifdef HAVE_STRINGS_H
63 # include <strings.h>
64 #endif
65 #include <sys/types.h>
66 #include "lang.h"
67 #include "eggdrop.h"
68 #include "flags.h"
69 #ifndef MAKING_MODS
70 # include "proto.h"
71 #endif
72 #include "cmdt.h"
73 #include "tclegg.h"
74 #include "tclhash.h"
75 #include "chan.h"
76 #include "users.h"
77
78 #ifndef MAKING_MODS
79 extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_SCRIPT, DCC_BOT_NEW,
80 DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
81 DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
82 DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT;
83
84 #endif
85
86 /* from net.h */
87
88 /* my own byte swappers */
89 #ifdef WORDS_BIGENDIAN
90 # define swap_short(sh) (sh)
91 # define swap_long(ln) (ln)
92 #else
93 # define swap_short(sh) ((((sh) & 0xff00) >> 8) | (((sh) & 0x00ff) << 8))
94 # define swap_long(ln) (swap_short(((ln)&0xffff0000)>>16) | (swap_short((ln)&0x0000ffff)<<16))
95 #endif
96 #define iptolong(a) (0xffffffff & (long)(swap_long((unsigned long)a)))
97 #define fixcolon(x) if (x[0]==':') {x++;} else {x=newsplit(&x);}
98
99 /* Stupid Borg Cube crap ;p */
100 #ifdef BORGCUBES
101
102 /* net.h needs this */
103 #define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
104
105 /* mod/filesys.mod/filedb.c needs this */
106 #define _S_IFMT 0170000 /* type of file */
107 #define _S_IFDIR 0040000 /* directory */
108 #define S_ISDIR(m) (((m)&(_S_IFMT)) == (_S_IFDIR))
109
110 #endif /* BORGCUBES */
111
112 #endif /* _EGG_MAIN_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23