X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/075423b0569d2a4d0a48b562c951e458dccc8bc9..e8c4b8b2904e0c9241aa8538654837ed6fa619d6:/src/irc_dictionary.c diff --git a/src/irc_dictionary.c b/src/irc_dictionary.c index a99dede..0de08b6 100644 --- a/src/irc_dictionary.c +++ b/src/irc_dictionary.c @@ -23,8 +23,7 @@ */ #include "stdinc.h" -#include "sprintf_irc.h" -#include "irc_string.h" +#include "match.h" #include "client.h" #include "setup.h" #include "irc_dictionary.h" @@ -204,7 +203,7 @@ irc_dictionary_get_linear_index(struct Dictionary *dict, const char *key) * Side Effects: * - a new root node is nominated. */ -void +static void irc_dictionary_retune(struct Dictionary *dict, const char *key) { struct DictionaryElement n, *tn, *left, *right, *node; @@ -303,7 +302,7 @@ irc_dictionary_retune(struct Dictionary *dict, const char *key) * Side Effects: * - a node is linked to the dictionary tree */ -void +static void irc_dictionary_link(struct Dictionary *dict, struct DictionaryElement *delem) { @@ -383,7 +382,7 @@ irc_dictionary_link(struct Dictionary *dict, * Side Effects: * - the root node is unlinked from the dictionary tree */ -void +static void irc_dictionary_unlink_root(struct Dictionary *dict) { struct DictionaryElement *delem, *nextnode, *parentofnext; @@ -645,7 +644,7 @@ void irc_dictionary_foreach_next(struct Dictionary *dtree, if (state->cur == NULL) { - ilog(L_MAIN, "irc_dictionary_foreach_next(): called again after iteration finished on dtree<%p>", dtree); + ilog(L_MAIN, "irc_dictionary_foreach_next(): called again after iteration finished on dtree<%p>", (void *)dtree); return; } @@ -704,7 +703,7 @@ struct DictionaryElement *irc_dictionary_find(struct Dictionary *dict, const cha * Side Effects: * - data is inserted into the DTree. */ -struct DictionaryElement *irc_dictionary_add(struct Dictionary *dict, char *key, void *data) +struct DictionaryElement *irc_dictionary_add(struct Dictionary *dict, const char *key, void *data) { struct DictionaryElement *delem; @@ -855,7 +854,7 @@ void irc_dictionary_stats(struct Dictionary *dict, void (*cb)(const char *line, dict->id, dict->count); else snprintf(str, sizeof str, "Dictionary stats for <%p> (%d)", - dict, dict->count); + (void *)dict, dict->count); cb(str, privdata); maxdepth = 0; sum = stats_recurse(dict->root, 0, &maxdepth);