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

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

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


Revision 1.7 - (hide annotations) (download) (as text)
Sat Jul 1 06:28:03 2000 UTC (19 years, 4 months ago) by guppy
Branch: MAIN
CVS Tags: eggdrop10404, HEAD
Changes since 1.6: +3 -3 lines
File MIME type: text/x-csrc
added patches, 1.4.4?

1 guppy 1.3 /*
2     * modules.h
3     * support for modules in eggdrop
4     *
5 segfault 1.1 * by Darrin Smith (beldin@light.iinet.net.au)
6 guppy 1.3 *
7 guppy 1.7 * $Id: modules.h,v 1.6 2000/01/08 21:23:14 per Exp $
8 segfault 1.1 */
9 guppy 1.3 /*
10     * Copyright (C) 1997 Robey Pointer
11 per 1.6 * Copyright (C) 1999, 2000 Eggheads
12 guppy 1.3 *
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 segfault 1.1 */
27 guppy 1.4
28 guppy 1.3 #ifndef _EGG_MODULE_H
29     #define _EGG_MODULE_H
30 segfault 1.1
31 guppy 1.4 /*
32 segfault 1.1 * module related structures
33     */
34    
35     #include "mod/modvals.h"
36    
37     #ifndef MAKING_NUMMODS
38     /* modules specific functions */
39     /* functions called by eggdrop */
40     void do_module_report(int, int, char *);
41    
42     int module_register(char *name, Function * funcs,
43     int major, int minor);
44     const char *module_load(char *module_name);
45     char *module_unload(char *module_name, char *nick);
46     module_entry *module_find(char *name, int, int);
47     Function *module_depend(char *, char *, int major, int minor);
48     int module_undepend(char *);
49 poptix 1.2 void *mod_malloc(int, char *, char *, int);
50     void *mod_realloc(void *, int, char *, char *, int);
51 segfault 1.1 void mod_free(void *ptr, char *modname, char *filename, int line);
52 guppy 1.5 void add_hook(int hook_num, Function func);
53     void del_hook(int hook_num, Function func);
54 segfault 1.1 void *get_next_hook(int hook_num, void *func);
55     extern struct hook_entry {
56     struct hook_entry *next;
57     int (*func) ();
58     } *hook_list[REAL_HOOKS];
59    
60 guppy 1.7 #define call_hook(x) do { struct hook_entry *p, *pn; \
61     for (p = hook_list[x]; p; p = pn) { pn = p->next; p->func(); } } while (0)
62 segfault 1.1 int call_hook_cccc(int, char *, char *, char *, char *);
63    
64     #endif
65    
66     typedef struct _dependancy {
67     struct _module_entry *needed;
68     struct _module_entry *needing;
69     struct _dependancy *next;
70     int major;
71     int minor;
72     } dependancy;
73     extern dependancy *dependancy_list;
74    
75 guppy 1.3 #endif /* _EGG_MODULE_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23