/[cvs]/eggdrop1.8/src/modules.h
ViewVC logotype

Annotation of /eggdrop1.8/src/modules.h

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


Revision 1.1.1.1 - (hide annotations) (download) (as text) (vendor branch)
Mon Jul 26 21:11:06 2010 UTC (8 years, 11 months ago) by simple
Branch: eggheads, MAIN
CVS Tags: v1, HEAD
Branch point for: gettext
Changes since 1.1: +0 -0 lines
File MIME type: text/x-csrc
Imported Eggdrop 1.6.20

1 simple 1.1 /*
2     * modules.h
3     * support for modules in eggdrop
4     *
5     * by Darrin Smith (beldin@light.iinet.net.au)
6     *
7     * $Id: modules.h,v 1.21 2010/02/18 09:52:29 pseudo Exp $
8     */
9     /*
10     * Copyright (C) 1997 Robey Pointer
11     * Copyright (C) 1999 - 2010 Eggheads Development Team
12     *
13     * This program is free software; you can redistribute it and/or
14     * modify it under the terms of the GNU General Public License
15     * as published by the Free Software Foundation; either version 2
16     * of the License, or (at your option) any later version.
17     *
18     * This program is distributed in the hope that it will be useful,
19     * but WITHOUT ANY WARRANTY; without even the implied warranty of
20     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21     * GNU General Public License for more details.
22     *
23     * You should have received a copy of the GNU General Public License
24     * along with this program; if not, write to the Free Software
25     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26     */
27    
28     #ifndef _EGG_MODULE_H
29     #define _EGG_MODULE_H
30    
31     /* Module related structures
32     */
33     #include "mod/modvals.h"
34    
35     #ifndef MAKING_NUMMODS
36    
37     /* Modules specific functions and functions called by Eggdrop */
38     void do_module_report(int, int, char *);
39     int module_register(char *, Function *, int, int);
40     const char *module_load(char *);
41     char *module_unload(char *, char *);
42     module_entry *module_find(char *, int, int);
43     Function *module_depend(char *, char *, int, int);
44     int module_undepend(char *);
45     void *mod_malloc(int, const char *, const char *, int);
46     void *mod_realloc(void *, int, const char *, const char *, int);
47     void mod_free(void *, const char *, const char *, int);
48     void add_hook(int, Function);
49     void del_hook(int, Function);
50     void *get_next_hook(int, void *);
51    
52     extern struct hook_entry {
53     struct hook_entry *next;
54     Function func;
55     } *hook_list[REAL_HOOKS];
56    
57     #define call_hook(x) do { \
58     register struct hook_entry *p, *pn; \
59     \
60     for (p = hook_list[x]; p; p = pn) { \
61     pn = p->next; \
62     p->func(); \
63     } \
64     } while (0)
65    
66     int call_hook_cccc(int, char *, char *, char *, char *);
67    
68     #endif
69    
70     typedef struct _dependancy {
71     struct _module_entry *needed;
72     struct _module_entry *needing;
73     struct _dependancy *next;
74     int major;
75     int minor;
76     } dependancy;
77     extern dependancy *dependancy_list;
78    
79     #endif /* _EGG_MODULE_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23