/[cvs]/eggdrop1.9/src/tclhash.h
ViewVC logotype

Annotation of /eggdrop1.9/src/tclhash.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.34 - (hide annotations) (download) (as text)
Thu Oct 10 04:41:59 2002 UTC (17 years ago) by stdarg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.33: +1 -1 lines
File MIME type: text/x-csrc
FILE REMOVED
* Moved bind tables to libeggdrop

1 guppy 1.8 /*
2 tothwolf 1.29 * tclhash.h --
3 fabian 1.3 */
4 guppy 1.8 /*
5     * Copyright (C) 1997 Robey Pointer
6 wcc 1.27 * Copyright (C) 1999, 2000, 2001, 2002 Eggheads Development Team
7 guppy 1.8 *
8 fabian 1.3 * This program is free software; you can redistribute it and/or
9     * modify it under the terms of the GNU General Public License
10     * as published by the Free Software Foundation; either version 2
11     * of the License, or (at your option) any later version.
12 guppy 1.8 *
13 fabian 1.3 * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17 guppy 1.8 *
18 fabian 1.3 * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21     */
22 tothwolf 1.29 /*
23 stdarg 1.34 * $Id: tclhash.h,v 1.33 2002/08/09 23:44:07 stdarg Exp $
24 tothwolf 1.29 */
25 fabian 1.3
26 stdarg 1.32 #ifndef _TCLHASH_H_
27     #define _TCLHASH_H_
28 wingman 1.28
29     #include "flags.h" /* flag_record */
30 segfault 1.1
31 stdarg 1.31 /* Match type flags for bind tables. */
32     #define MATCH_PARTIAL 1
33     #define MATCH_EXACT 2
34     #define MATCH_MASK 4
35     #define MATCH_CASE 8
36    
37     /* Flags for binds. */
38 stdarg 1.12 /* Does the callback want their client_data inserted as the first argument? */
39     #define BIND_WANTS_CD 1
40 stdarg 1.31 #define BIND_USE_ATTR 2
41     #define BIND_STRICT_ATTR 4
42     #define BIND_BREAKABLE 8
43     #define BIND_STACKABLE 16
44     #define BIND_DELETED 32
45 stdarg 1.33 #define BIND_FAKE 64
46 stdarg 1.16
47     /* Flags for return values from bind callbacks */
48     #define BIND_RET_LOG 1
49     #define BIND_RET_BREAK 2
50    
51 stdarg 1.32 /* This holds the information for a bind entry. */
52 stdarg 1.9 typedef struct bind_entry_b {
53 stdarg 1.31 struct bind_entry_b *next, *prev;
54 stdarg 1.9 struct flag_record user_flags;
55 stdarg 1.31 char *mask;
56 stdarg 1.9 char *function_name;
57     Function callback;
58     void *client_data;
59 stdarg 1.31 int nhits;
60     int flags;
61     int id;
62 stdarg 1.9 } bind_entry_t;
63    
64 stdarg 1.10 /* This is the highest-level structure. It's like the "msg" table
65     or the "pubm" table. */
66 stdarg 1.9 typedef struct bind_table_b {
67 stdarg 1.11 struct bind_table_b *next;
68 stdarg 1.31 bind_entry_t *entries;
69 stdarg 1.9 char *name;
70 stdarg 1.13 char *syntax;
71 stdarg 1.14 int nargs;
72     int match_type;
73 stdarg 1.9 int flags;
74     } bind_table_t;
75 fabian 1.7
76 segfault 1.1 #ifndef MAKING_MODS
77 fabian 1.5
78 stdarg 1.30 void kill_binds(void);
79 fabian 1.7
80 stdarg 1.14 int check_bind(bind_table_t *table, const char *match, struct flag_record *_flags, ...);
81    
82 stdarg 1.30 bind_table_t *bind_table_add(const char *name, int nargs, const char *syntax, int match_type, int flags);
83 stdarg 1.14
84 stdarg 1.30 void bind_table_del(bind_table_t *table);
85 stdarg 1.14
86 stdarg 1.31 bind_table_t *bind_table_lookup(const char *name);
87 stdarg 1.14
88 stdarg 1.30 int bind_entry_add(bind_table_t *table, const char *flags, const char *mask, const char *function_name, int bind_flags, Function callback, void *client_data);
89 stdarg 1.14
90 stdarg 1.31 int bind_entry_del(bind_table_t *table, int id, const char *mask, const char *function_name, void *cdata);
91    
92     int bind_entry_modify(bind_table_t *table, int id, const char *mask, const char *function_name, const char *newflags, const char *newmask);
93 stdarg 1.14
94 stdarg 1.30 void add_builtins(const char *table_name, cmd_t *cmds);
95 stdarg 1.14
96 stdarg 1.30 void rem_builtins(const char *table_name, cmd_t *cmds);
97 segfault 1.1
98 tothwolf 1.29 #endif /* !MAKING_MODS */
99 fabian 1.3
100 stdarg 1.32 #endif /* !_TCLHASH_H_ */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23