]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/modules.c
MyFree -> rb_free
[irc/rqf/shadowircd.git] / src / modules.c
index 2838487a792cafc0e924417c5e3127a963098718..02bbd575c14b0e02a4ffc9496b1974e022c1fc20 100644 (file)
@@ -38,8 +38,6 @@
 #include "parse.h"
 #include "ircd_defs.h"
 #include "irc_string.h"
-#include "memory.h"
-#include "tools.h"
 #include "sprintf_irc.h"
 
 
@@ -80,7 +78,7 @@ static const char *core_module_table[] = {
 int num_mods = 0;
 int max_mods = MODS_INCREMENT;
 
-static dlink_list mod_paths;
+static rb_dlink_list mod_paths;
 
 static int mo_modload(struct Client *, struct Client *, int, const char **);
 static int mo_modlist(struct Client *, struct Client *, int, const char **);
@@ -138,10 +136,10 @@ modules_init(void)
 static struct module_path *
 mod_find_path(const char *path)
 {
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        struct module_path *mpath;
 
-       DLINK_FOREACH(ptr, mod_paths.head)
+       RB_DLINK_FOREACH(ptr, mod_paths.head)
        {
                mpath = ptr->data;
 
@@ -169,7 +167,7 @@ mod_add_path(const char *path)
        pathst = MyMalloc(sizeof(struct module_path));
 
        strcpy(pathst->path, path);
-       dlinkAddAlloc(pathst, &mod_paths);
+       rb_dlinkAddAlloc(pathst, &mod_paths);
 }
 
 /* mod_clear_paths()
@@ -181,12 +179,12 @@ mod_add_path(const char *path)
 void
 mod_clear_paths(void)
 {
-       dlink_node *ptr, *next_ptr;
+       rb_dlink_node *ptr, *rb_free(;
 
-       DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head)
+       RB_DLINK_FOREACH_SAFE(ptr, rb_free(, mod_paths.head)
        {
                MyFree(ptr->data);
-               free_dlink_node(ptr);
+               free_rb_dlink_node(ptr);
        }
 
        mod_paths.head = mod_paths.tail = NULL;
@@ -313,7 +311,7 @@ int
 load_one_module(const char *path, int coremodule)
 {
        char modpath[MAXPATHLEN];
-       dlink_node *pathst;
+       rb_dlink_node *pathst;
        struct module_path *mpath;
 
        struct stat statbuf;
@@ -321,7 +319,7 @@ load_one_module(const char *path, int coremodule)
        if (server_state_foreground == 1)
                inotice("loading module %s ...", path); 
 
-       DLINK_FOREACH(pathst, mod_paths.head)
+       RB_DLINK_FOREACH(pathst, mod_paths.head)
        {
                mpath = pathst->data;