0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

macro replacement

This commit is contained in:
William Pitcock 2008-04-01 15:43:10 -05:00
parent 330fc5c10c
commit 5cefa1d6c8
22 changed files with 151 additions and 151 deletions

View file

@ -144,7 +144,7 @@ find_channel_membership(struct Channel *chptr, struct Client *client_p)
*/ */
if(rb_dlink_list_length(&chptr->members) < rb_dlink_list_length(&client_p->user->channel)) if(rb_dlink_list_length(&chptr->members) < rb_dlink_list_length(&client_p->user->channel))
{ {
DLINK_FOREACH(ptr, chptr->members.head) RB_DLINK_FOREACH(ptr, chptr->members.head)
{ {
msptr = ptr->data; msptr = ptr->data;
@ -154,7 +154,7 @@ find_channel_membership(struct Channel *chptr, struct Client *client_p)
} }
else else
{ {
DLINK_FOREACH(ptr, client_p->user->channel.head) RB_DLINK_FOREACH(ptr, client_p->user->channel.head)
{ {
msptr = ptr->data; msptr = ptr->data;
@ -273,7 +273,7 @@ remove_user_from_channels(struct Client *client_p)
if(client_p == NULL) if(client_p == NULL)
return; return;
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->user->channel.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->user->channel.head)
{ {
msptr = ptr->data; msptr = ptr->data;
chptr = msptr->chptr; chptr = msptr->chptr;
@ -311,7 +311,7 @@ invalidate_bancache_user(struct Client *client_p)
if(client_p == NULL) if(client_p == NULL)
return; return;
DLINK_FOREACH(ptr, client_p->user->channel.head) RB_DLINK_FOREACH(ptr, client_p->user->channel.head)
{ {
msptr = ptr->data; msptr = ptr->data;
msptr->bants = 0; msptr->bants = 0;
@ -354,7 +354,7 @@ free_channel_list(rb_dlink_list * list)
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
struct Ban *actualBan; struct Ban *actualBan;
DLINK_FOREACH_SAFE(ptr, next_ptr, list->head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
{ {
actualBan = ptr->data; actualBan = ptr->data;
free_ban(actualBan); free_ban(actualBan);
@ -375,7 +375,7 @@ destroy_channel(struct Channel *chptr)
{ {
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->invites.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->invites.head)
{ {
del_invite(chptr, ptr->data); del_invite(chptr, ptr->data);
} }
@ -440,7 +440,7 @@ channel_member_names(struct Channel *chptr, struct Client *client_p, int show_eo
t = lbuf + cur_len; t = lbuf + cur_len;
DLINK_FOREACH(ptr, chptr->members.head) RB_DLINK_FOREACH(ptr, chptr->members.head)
{ {
msptr = ptr->data; msptr = ptr->data;
target_p = msptr->client_p; target_p = msptr->client_p;
@ -544,7 +544,7 @@ is_banned(struct Channel *chptr, struct Client *who, struct membership *msptr,
} }
} }
DLINK_FOREACH(ptr, chptr->banlist.head) RB_DLINK_FOREACH(ptr, chptr->banlist.head)
{ {
actualBan = ptr->data; actualBan = ptr->data;
if(match(actualBan->banstr, s) || if(match(actualBan->banstr, s) ||
@ -559,7 +559,7 @@ is_banned(struct Channel *chptr, struct Client *who, struct membership *msptr,
if((actualBan != NULL) && ConfigChannel.use_except) if((actualBan != NULL) && ConfigChannel.use_except)
{ {
DLINK_FOREACH(ptr, chptr->exceptlist.head) RB_DLINK_FOREACH(ptr, chptr->exceptlist.head)
{ {
actualExcept = ptr->data; actualExcept = ptr->data;
@ -650,7 +650,7 @@ is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
} }
} }
DLINK_FOREACH(ptr, chptr->quietlist.head) RB_DLINK_FOREACH(ptr, chptr->quietlist.head)
{ {
actualBan = ptr->data; actualBan = ptr->data;
if(match(actualBan->banstr, s) || if(match(actualBan->banstr, s) ||
@ -665,7 +665,7 @@ is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
if((actualBan != NULL) && ConfigChannel.use_except) if((actualBan != NULL) && ConfigChannel.use_except)
{ {
DLINK_FOREACH(ptr, chptr->exceptlist.head) RB_DLINK_FOREACH(ptr, chptr->exceptlist.head)
{ {
actualExcept = ptr->data; actualExcept = ptr->data;
@ -753,7 +753,7 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
if(chptr->mode.mode & MODE_INVITEONLY) if(chptr->mode.mode & MODE_INVITEONLY)
{ {
DLINK_FOREACH(invite, source_p->user->invited.head) RB_DLINK_FOREACH(invite, source_p->user->invited.head)
{ {
if(invite->data == chptr) if(invite->data == chptr)
break; break;
@ -762,7 +762,7 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
{ {
if(!ConfigChannel.use_invex) if(!ConfigChannel.use_invex)
return (ERR_INVITEONLYCHAN); return (ERR_INVITEONLYCHAN);
DLINK_FOREACH(ptr, chptr->invexlist.head) RB_DLINK_FOREACH(ptr, chptr->invexlist.head)
{ {
invex = ptr->data; invex = ptr->data;
if(match(invex->banstr, src_host) if(match(invex->banstr, src_host)
@ -797,7 +797,7 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
/* allow /invite to override +l/+r/+j also -- jilles */ /* allow /invite to override +l/+r/+j also -- jilles */
if (i != 0 && invite == NULL) if (i != 0 && invite == NULL)
{ {
DLINK_FOREACH(invite, source_p->user->invited.head) RB_DLINK_FOREACH(invite, source_p->user->invited.head)
{ {
if(invite->data == chptr) if(invite->data == chptr)
break; break;
@ -889,7 +889,7 @@ find_bannickchange_channel(struct Client *client_p)
rb_sprintf(src_host, "%s!%s@%s", client_p->name, client_p->username, client_p->host); rb_sprintf(src_host, "%s!%s@%s", client_p->name, client_p->username, client_p->host);
rb_sprintf(src_iphost, "%s!%s@%s", client_p->name, client_p->username, client_p->sockhost); rb_sprintf(src_iphost, "%s!%s@%s", client_p->name, client_p->username, client_p->sockhost);
DLINK_FOREACH(ptr, client_p->user->channel.head) RB_DLINK_FOREACH(ptr, client_p->user->channel.head)
{ {
msptr = ptr->data; msptr = ptr->data;
chptr = msptr->chptr; chptr = msptr->chptr;

View file

@ -108,7 +108,7 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
return 0; return 0;
} }
DLINK_FOREACH(ptr, list->head) RB_DLINK_FOREACH(ptr, list->head)
{ {
actualBan = ptr->data; actualBan = ptr->data;
if(mask_match(actualBan->banstr, realban)) if(mask_match(actualBan->banstr, realban))
@ -118,7 +118,7 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
/* dont let remotes set duplicates */ /* dont let remotes set duplicates */
else else
{ {
DLINK_FOREACH(ptr, list->head) RB_DLINK_FOREACH(ptr, list->head)
{ {
actualBan = ptr->data; actualBan = ptr->data;
if(!irccmp(actualBan->banstr, realban)) if(!irccmp(actualBan->banstr, realban))
@ -159,7 +159,7 @@ del_id(struct Channel *chptr, const char *banid, rb_dlink_list * list, long mode
if(EmptyString(banid)) if(EmptyString(banid))
return 0; return 0;
DLINK_FOREACH(ptr, list->head) RB_DLINK_FOREACH(ptr, list->head)
{ {
banptr = ptr->data; banptr = ptr->data;
@ -580,7 +580,7 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
return; return;
} }
DLINK_FOREACH(ptr, list->head) RB_DLINK_FOREACH(ptr, list->head)
{ {
banptr = ptr->data; banptr = ptr->data;
sendto_one(source_p, form_str(rpl_list), sendto_one(source_p, form_str(rpl_list),

View file

@ -226,7 +226,7 @@ find_class(const char *classname)
if(classname == NULL) if(classname == NULL)
return default_class; return default_class;
DLINK_FOREACH(ptr, class_list.head) RB_DLINK_FOREACH(ptr, class_list.head)
{ {
cltmp = ptr->data; cltmp = ptr->data;
@ -251,7 +251,7 @@ check_class()
rb_dlink_node *ptr; rb_dlink_node *ptr;
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, class_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, class_list.head)
{ {
cltmp = ptr->data; cltmp = ptr->data;
@ -291,7 +291,7 @@ report_classes(struct Client *source_p)
struct Class *cltmp; struct Class *cltmp;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, class_list.head) RB_DLINK_FOREACH(ptr, class_list.head)
{ {
cltmp = ptr->data; cltmp = ptr->data;

View file

@ -300,7 +300,7 @@ check_pings_list(rb_dlink_list * list)
int ping = 0; /* ping time value from client */ int ping = 0; /* ping time value from client */
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, list->head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -366,7 +366,7 @@ check_unknowns_list(rb_dlink_list * list)
struct Client *client_p; struct Client *client_p;
int timeout; int timeout;
DLINK_FOREACH_SAFE(ptr, next_ptr, list->head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -451,7 +451,7 @@ check_banned_lines(void)
struct ConfItem *aconf = NULL; struct ConfItem *aconf = NULL;
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -539,7 +539,7 @@ check_banned_lines(void)
} }
/* also check the unknowns list for new dlines */ /* also check the unknowns list for new dlines */
DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -581,7 +581,7 @@ check_klines(void)
rb_dlink_node *ptr; rb_dlink_node *ptr;
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -622,7 +622,7 @@ check_glines(void)
rb_dlink_node *ptr; rb_dlink_node *ptr;
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -671,7 +671,7 @@ check_dlines(void)
rb_dlink_node *ptr; rb_dlink_node *ptr;
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -693,7 +693,7 @@ check_dlines(void)
} }
/* dlines need to be checked against unknowns too */ /* dlines need to be checked against unknowns too */
DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -721,7 +721,7 @@ check_xlines(void)
rb_dlink_node *ptr; rb_dlink_node *ptr;
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -1064,7 +1064,7 @@ free_exited_clients(void *unused)
rb_dlink_node *ptr, *next; rb_dlink_node *ptr, *next;
struct Client *target_p; struct Client *target_p;
DLINK_FOREACH_SAFE(ptr, next, dead_list.head) RB_DLINK_FOREACH_SAFE(ptr, next, dead_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -1074,7 +1074,7 @@ free_exited_clients(void *unused)
rb_dlink_node *aptr; rb_dlink_node *aptr;
int found = 0; int found = 0;
DLINK_FOREACH(aptr, abort_list.head) RB_DLINK_FOREACH(aptr, abort_list.head)
{ {
abt = aptr->data; abt = aptr->data;
if(abt->client == target_p) if(abt->client == target_p)
@ -1111,7 +1111,7 @@ free_exited_clients(void *unused)
} }
#ifdef DEBUG_EXITED_CLIENTS #ifdef DEBUG_EXITED_CLIENTS
DLINK_FOREACH_SAFE(ptr, next, dead_remote_list.head) RB_DLINK_FOREACH_SAFE(ptr, next, dead_remote_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -1156,12 +1156,12 @@ recurse_send_quits(struct Client *client_p, struct Client *source_p,
} }
else else
{ {
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->users.head) RB_DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->users.head)
{ {
target_p = ptr->data; target_p = ptr->data;
sendto_one(to, ":%s QUIT :%s", target_p->name, comment1); sendto_one(to, ":%s QUIT :%s", target_p->name, comment1);
} }
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->servers.head) RB_DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->servers.head)
{ {
target_p = ptr->data; target_p = ptr->data;
recurse_send_quits(client_p, target_p, to, comment1, comment); recurse_send_quits(client_p, target_p, to, comment1, comment);
@ -1194,7 +1194,7 @@ recurse_remove_clients(struct Client *source_p, const char *comment)
/* this is very ugly, but it saves cpu :P */ /* this is very ugly, but it saves cpu :P */
if(ConfigFileEntry.nick_delay > 0) if(ConfigFileEntry.nick_delay > 0)
{ {
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->users.head) RB_DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->users.head)
{ {
target_p = ptr->data; target_p = ptr->data;
target_p->flags |= FLAGS_KILLED; target_p->flags |= FLAGS_KILLED;
@ -1206,7 +1206,7 @@ recurse_remove_clients(struct Client *source_p, const char *comment)
} }
else else
{ {
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->users.head) RB_DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->users.head)
{ {
target_p = ptr->data; target_p = ptr->data;
target_p->flags |= FLAGS_KILLED; target_p->flags |= FLAGS_KILLED;
@ -1216,7 +1216,7 @@ recurse_remove_clients(struct Client *source_p, const char *comment)
} }
} }
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->servers.head) RB_DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->servers.head)
{ {
target_p = ptr->data; target_p = ptr->data;
recurse_remove_clients(target_p, comment); recurse_remove_clients(target_p, comment);
@ -1237,7 +1237,7 @@ remove_dependents(struct Client *client_p,
struct Client *to; struct Client *to;
rb_dlink_node *ptr, *next; rb_dlink_node *ptr, *next;
DLINK_FOREACH_SAFE(ptr, next, serv_list.head) RB_DLINK_FOREACH_SAFE(ptr, next, serv_list.head)
{ {
to = ptr->data; to = ptr->data;
@ -1256,7 +1256,7 @@ exit_aborted_clients(void *unused)
{ {
struct abort_client *abt; struct abort_client *abt;
rb_dlink_node *ptr, *next; rb_dlink_node *ptr, *next;
DLINK_FOREACH_SAFE(ptr, next, abort_list.head) RB_DLINK_FOREACH_SAFE(ptr, next, abort_list.head)
{ {
abt = ptr->data; abt = ptr->data;
@ -1342,7 +1342,7 @@ exit_generic_client(struct Client *client_p, struct Client *source_p, struct Cli
s_assert(source_p->user->channel.head == NULL); s_assert(source_p->user->channel.head == NULL);
/* Clean up invitefield */ /* Clean up invitefield */
DLINK_FOREACH_SAFE(ptr, next_ptr, source_p->user->invited.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, source_p->user->invited.head)
{ {
del_invite(ptr->data, source_p); del_invite(ptr->data, source_p);
} }
@ -1772,7 +1772,7 @@ del_all_accepts(struct Client *client_p)
/* clear this clients accept list, and remove them from /* clear this clients accept list, and remove them from
* everyones on_accept_list * everyones on_accept_list
*/ */
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->allow_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->allow_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
rb_dlinkFindDestroy(client_p, &target_p->on_allow_list); rb_dlinkFindDestroy(client_p, &target_p->on_allow_list);
@ -1781,7 +1781,7 @@ del_all_accepts(struct Client *client_p)
} }
/* remove this client from everyones accept list */ /* remove this client from everyones accept list */
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->on_allow_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->on_allow_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
rb_dlinkFindDestroy(client_p, &target_p->localClient->allow_list); rb_dlinkFindDestroy(client_p, &target_p->localClient->allow_list);

View file

@ -389,7 +389,7 @@ find_id(const char *name)
hashv = hash_id(name); hashv = hash_id(name);
DLINK_FOREACH(ptr, idTable[hashv].head) RB_DLINK_FOREACH(ptr, idTable[hashv].head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -421,7 +421,7 @@ find_client(const char *name)
hashv = hash_nick(name); hashv = hash_nick(name);
DLINK_FOREACH(ptr, clientTable[hashv].head) RB_DLINK_FOREACH(ptr, clientTable[hashv].head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -449,7 +449,7 @@ find_named_client(const char *name)
hashv = hash_nick(name); hashv = hash_nick(name);
DLINK_FOREACH(ptr, clientTable[hashv].head) RB_DLINK_FOREACH(ptr, clientTable[hashv].head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -483,7 +483,7 @@ find_server(struct Client *source_p, const char *name)
hashv = hash_nick(name); hashv = hash_nick(name);
DLINK_FOREACH(ptr, clientTable[hashv].head) RB_DLINK_FOREACH(ptr, clientTable[hashv].head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -531,7 +531,7 @@ find_channel(const char *name)
hashv = hash_channel(name); hashv = hash_channel(name);
DLINK_FOREACH(ptr, channelTable[hashv].head) RB_DLINK_FOREACH(ptr, channelTable[hashv].head)
{ {
chptr = ptr->data; chptr = ptr->data;
@ -583,7 +583,7 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
hashv = hash_channel(s); hashv = hash_channel(s);
DLINK_FOREACH(ptr, channelTable[hashv].head) RB_DLINK_FOREACH(ptr, channelTable[hashv].head)
{ {
chptr = ptr->data; chptr = ptr->data;
@ -626,7 +626,7 @@ hash_find_resv(const char *name)
hashv = hash_resv(name); hashv = hash_resv(name);
DLINK_FOREACH(ptr, resvTable[hashv].head) RB_DLINK_FOREACH(ptr, resvTable[hashv].head)
{ {
aconf = ptr->data; aconf = ptr->data;

View file

@ -205,7 +205,7 @@ call_hook(int id, void *arg)
/* The ID we were passed is the position in the hook table of this /* The ID we were passed is the position in the hook table of this
* hook * hook
*/ */
DLINK_FOREACH(ptr, hooks[id].hooks.head) RB_DLINK_FOREACH(ptr, hooks[id].hooks.head)
{ {
fn = ptr->data; fn = ptr->data;
fn(arg); fn(arg);

View file

@ -471,7 +471,7 @@ void irc_dictionary_destroy(struct Dictionary *dtree,
s_assert(dtree != NULL); s_assert(dtree != NULL);
DLINK_FOREACH_SAFE(n, tn, dtree->head) RB_DLINK_FOREACH_SAFE(n, tn, dtree->head)
{ {
if (destroy_cb != NULL) if (destroy_cb != NULL)
(*destroy_cb)(n, privdata); (*destroy_cb)(n, privdata);
@ -508,7 +508,7 @@ void irc_dictionary_foreach(struct Dictionary *dtree,
s_assert(dtree != NULL); s_assert(dtree != NULL);
DLINK_FOREACH_SAFE(n, tn, dtree->head) RB_DLINK_FOREACH_SAFE(n, tn, dtree->head)
{ {
/* delem_t is a subclass of node_t. */ /* delem_t is a subclass of node_t. */
struct DictionaryElement *delem = (struct DictionaryElement *) n; struct DictionaryElement *delem = (struct DictionaryElement *) n;
@ -546,7 +546,7 @@ void *irc_dictionary_search(struct Dictionary *dtree,
s_assert(dtree != NULL); s_assert(dtree != NULL);
DLINK_FOREACH_SAFE(n, tn, dtree->head) RB_DLINK_FOREACH_SAFE(n, tn, dtree->head)
{ {
/* delem_t is a subclass of node_t. */ /* delem_t is a subclass of node_t. */
struct DictionaryElement *delem = (struct DictionaryElement *) n; struct DictionaryElement *delem = (struct DictionaryElement *) n;

View file

@ -141,7 +141,7 @@ mod_find_path(const char *path)
rb_dlink_node *ptr; rb_dlink_node *ptr;
struct module_path *mpath; struct module_path *mpath;
DLINK_FOREACH(ptr, mod_paths.head) RB_DLINK_FOREACH(ptr, mod_paths.head)
{ {
mpath = ptr->data; mpath = ptr->data;
@ -183,7 +183,7 @@ mod_clear_paths(void)
{ {
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head)
{ {
MyFree(ptr->data); MyFree(ptr->data);
free_rb_dlink_node(ptr); free_rb_dlink_node(ptr);
@ -321,7 +321,7 @@ load_one_module(const char *path, int coremodule)
if (server_state_foreground == 1) if (server_state_foreground == 1)
inotice("loading module %s ...", path); inotice("loading module %s ...", path);
DLINK_FOREACH(pathst, mod_paths.head) RB_DLINK_FOREACH(pathst, mod_paths.head)
{ {
mpath = pathst->data; mpath = pathst->data;

View file

@ -135,7 +135,7 @@ clear_monitor(struct Client *client_p)
struct monitor *monptr; struct monitor *monptr;
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->monitor_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->monitor_list.head)
{ {
monptr = ptr->data; monptr = ptr->data;

View file

@ -100,7 +100,7 @@ find_top_conf(const char *name)
rb_dlink_node *d; rb_dlink_node *d;
struct TopConf *tc; struct TopConf *tc;
DLINK_FOREACH(d, conf_items.head) RB_DLINK_FOREACH(d, conf_items.head)
{ {
tc = d->data; tc = d->data;
if(strcasecmp(tc->tc_name, name) == 0) if(strcasecmp(tc->tc_name, name) == 0)
@ -130,7 +130,7 @@ find_conf_item(const struct TopConf *top, const char *name)
} }
} }
DLINK_FOREACH(d, top->tc_items.head) RB_DLINK_FOREACH(d, top->tc_items.head)
{ {
cf = d->data; cf = d->data;
if(strcasecmp(cf->cf_name, name) == 0) if(strcasecmp(cf->cf_name, name) == 0)
@ -460,7 +460,7 @@ conf_begin_oper(struct TopConf *tc)
yy_oper = NULL; yy_oper = NULL;
} }
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head)
{ {
free_oper_conf(ptr->data); free_oper_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_oper_list); rb_dlinkDestroy(ptr, &yy_oper_list);
@ -508,7 +508,7 @@ conf_end_oper(struct TopConf *tc)
* and host in, yy_oper contains the rest of the information which * and host in, yy_oper contains the rest of the information which
* we need to copy into each element in yy_oper_list * we need to copy into each element in yy_oper_list
*/ */
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head)
{ {
yy_tmpoper = ptr->data; yy_tmpoper = ptr->data;
@ -799,7 +799,7 @@ conf_begin_auth(struct TopConf *tc)
if(yy_aconf) if(yy_aconf)
free_conf(yy_aconf); free_conf(yy_aconf);
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head)
{ {
free_conf(ptr->data); free_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_aconf_list); rb_dlinkDestroy(ptr, &yy_aconf_list);
@ -834,7 +834,7 @@ conf_end_auth(struct TopConf *tc)
conf_add_class_to_conf(yy_aconf); conf_add_class_to_conf(yy_aconf);
add_conf_by_address(yy_aconf->host, CONF_CLIENT, yy_aconf->user, yy_aconf); add_conf_by_address(yy_aconf->host, CONF_CLIENT, yy_aconf->user, yy_aconf);
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head)
{ {
yy_tmp = ptr->data; yy_tmp = ptr->data;
@ -1006,7 +1006,7 @@ conf_cleanup_shared(struct TopConf *tc)
{ {
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head)
{ {
free_remote_conf(ptr->data); free_remote_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_shared_list); rb_dlinkDestroy(ptr, &yy_shared_list);
@ -1088,7 +1088,7 @@ conf_set_shared_flags(void *data)
set_modes_from_table(&flags, "flag", shared_table, args); set_modes_from_table(&flags, "flag", shared_table, args);
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head)
{ {
yy_shared = ptr->data; yy_shared = ptr->data;
@ -1305,7 +1305,7 @@ conf_cleanup_cluster(struct TopConf *tc)
{ {
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head)
{ {
free_remote_conf(ptr->data); free_remote_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_cluster_list); rb_dlinkDestroy(ptr, &yy_cluster_list);
@ -1345,7 +1345,7 @@ conf_set_cluster_flags(void *data)
set_modes_from_table(&flags, "flag", cluster_table, args); set_modes_from_table(&flags, "flag", cluster_table, args);
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head)
{ {
yy_shared = ptr->data; yy_shared = ptr->data;
yy_shared->flags = flags; yy_shared->flags = flags;
@ -1539,7 +1539,7 @@ conf_begin_service(struct TopConf *tc)
struct Client *target_p; struct Client *target_p;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, global_serv_list.head) RB_DLINK_FOREACH(ptr, global_serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;

View file

@ -57,7 +57,7 @@ reject_exit(void *unused)
struct Client *client_p; struct Client *client_p;
rb_dlink_node *ptr, *ptr_next; rb_dlink_node *ptr, *ptr_next;
DLINK_FOREACH_SAFE(ptr, ptr_next, delay_exit.head) RB_DLINK_FOREACH_SAFE(ptr, ptr_next, delay_exit.head)
{ {
client_p = ptr->data; client_p = ptr->data;
if(IsDead(client_p)) if(IsDead(client_p))
@ -95,7 +95,7 @@ reject_expires(void *unused)
patricia_node_t *pnode; patricia_node_t *pnode;
struct reject_data *rdata; struct reject_data *rdata;
DLINK_FOREACH_SAFE(ptr, next, reject_list.head) RB_DLINK_FOREACH_SAFE(ptr, next, reject_list.head)
{ {
pnode = ptr->data; pnode = ptr->data;
rdata = pnode->data; rdata = pnode->data;
@ -196,7 +196,7 @@ flush_reject(void)
patricia_node_t *pnode; patricia_node_t *pnode;
struct reject_data *rdata; struct reject_data *rdata;
DLINK_FOREACH_SAFE(ptr, next, reject_list.head) RB_DLINK_FOREACH_SAFE(ptr, next, reject_list.head)
{ {
pnode = ptr->data; pnode = ptr->data;
rdata = pnode->data; rdata = pnode->data;
@ -241,7 +241,7 @@ remove_reject_mask(const char *mask1, const char *mask2)
hashv ^= fnv_hash_upper(mask1, 32); hashv ^= fnv_hash_upper(mask1, 32);
if (mask2 != NULL) if (mask2 != NULL)
hashv ^= fnv_hash_upper(mask2, 32); hashv ^= fnv_hash_upper(mask2, 32);
DLINK_FOREACH_SAFE(ptr, next, reject_list.head) RB_DLINK_FOREACH_SAFE(ptr, next, reject_list.head)
{ {
pnode = ptr->data; pnode = ptr->data;
rdata = pnode->data; rdata = pnode->data;

View file

@ -180,7 +180,7 @@ static time_t timeout_query_list(time_t now)
time_t next_time = 0; time_t next_time = 0;
time_t timeout = 0; time_t timeout = 0;
DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head)
{ {
request = ptr->data; request = ptr->data;
timeout = request->sentat + request->timeout; timeout = request->sentat + request->timeout;
@ -323,7 +323,7 @@ void delete_resolver_queries(const struct DNSQuery *query)
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
struct reslist *request; struct reslist *request;
DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head)
{ {
if ((request = ptr->data) != NULL) if ((request = ptr->data) != NULL)
{ {
@ -371,7 +371,7 @@ static struct reslist *find_id(int id)
rb_dlink_node *ptr; rb_dlink_node *ptr;
struct reslist *request; struct reslist *request;
DLINK_FOREACH(ptr, request_list.head) RB_DLINK_FOREACH(ptr, request_list.head)
{ {
request = ptr->data; request = ptr->data;

View file

@ -433,7 +433,7 @@ timeout_auth_queries_event(void *notused)
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
struct AuthRequest *auth; struct AuthRequest *auth;
DLINK_FOREACH_SAFE(ptr, next_ptr, auth_poll_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, auth_poll_list.head)
{ {
auth = ptr->data; auth = ptr->data;

View file

@ -491,7 +491,7 @@ attach_iline(struct Client *client_p, struct ConfItem *aconf)
/* find_hostname() returns the head of the list to search */ /* find_hostname() returns the head of the list to search */
DLINK_FOREACH(ptr, find_hostname(client_p->host)) RB_DLINK_FOREACH(ptr, find_hostname(client_p->host))
{ {
target_p = ptr->data; target_p = ptr->data;
@ -1013,7 +1013,7 @@ expire_temp_kd(void *list)
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
struct ConfItem *aconf; struct ConfItem *aconf;
DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -1038,7 +1038,7 @@ reorganise_temp_kd(void *list)
struct ConfItem *aconf; struct ConfItem *aconf;
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -1221,7 +1221,7 @@ clear_out_old_conf(void)
* don't delete the class table, rather mark all entries * don't delete the class table, rather mark all entries
* for deletion. The table is cleaned up by check_class. - avalon * for deletion. The table is cleaned up by check_class. - avalon
*/ */
DLINK_FOREACH(ptr, class_list.head) RB_DLINK_FOREACH(ptr, class_list.head)
{ {
cltmp = ptr->data; cltmp = ptr->data;
MaxUsers(cltmp) = -1; MaxUsers(cltmp) = -1;
@ -1265,7 +1265,7 @@ clear_out_old_conf(void)
MyFree(ConfigFileEntry.servlink_path); MyFree(ConfigFileEntry.servlink_path);
ConfigFileEntry.servlink_path = NULL; ConfigFileEntry.servlink_path = NULL;
DLINK_FOREACH_SAFE(ptr, next_ptr, service_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, service_list.head)
{ {
MyFree(ptr->data); MyFree(ptr->data);
rb_dlinkDestroy(ptr, &service_list); rb_dlinkDestroy(ptr, &service_list);

View file

@ -76,7 +76,7 @@ find_is_glined(const char *host, const char *user)
rb_dlink_node *gline_node; rb_dlink_node *gline_node;
struct ConfItem *kill_ptr; struct ConfItem *kill_ptr;
DLINK_FOREACH(gline_node, glines.head) RB_DLINK_FOREACH(gline_node, glines.head)
{ {
kill_ptr = gline_node->data; kill_ptr = gline_node->data;
if((kill_ptr->user && (!user || match(kill_ptr->user, user))) if((kill_ptr->user && (!user || match(kill_ptr->user, user)))
@ -120,7 +120,7 @@ expire_glines()
rb_dlink_node *next_node; rb_dlink_node *next_node;
struct ConfItem *kill_ptr; struct ConfItem *kill_ptr;
DLINK_FOREACH_SAFE(gline_node, next_node, glines.head) RB_DLINK_FOREACH_SAFE(gline_node, next_node, glines.head)
{ {
kill_ptr = gline_node->data; kill_ptr = gline_node->data;
@ -150,7 +150,7 @@ expire_pending_glines()
rb_dlink_node *next_node; rb_dlink_node *next_node;
struct gline_pending *glp_ptr; struct gline_pending *glp_ptr;
DLINK_FOREACH_SAFE(pending_node, next_node, pending_glines.head) RB_DLINK_FOREACH_SAFE(pending_node, next_node, pending_glines.head)
{ {
glp_ptr = pending_node->data; glp_ptr = pending_node->data;

View file

@ -83,32 +83,32 @@ clear_s_newconf(void)
rb_dlink_node *ptr; rb_dlink_node *ptr;
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, shared_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, shared_conf_list.head)
{ {
/* ptr here is ptr->data->node */ /* ptr here is ptr->data->node */
rb_dlinkDelete(ptr, &shared_conf_list); rb_dlinkDelete(ptr, &shared_conf_list);
free_remote_conf(ptr->data); free_remote_conf(ptr->data);
} }
DLINK_FOREACH_SAFE(ptr, next_ptr, cluster_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, cluster_conf_list.head)
{ {
rb_dlinkDelete(ptr, &cluster_conf_list); rb_dlinkDelete(ptr, &cluster_conf_list);
free_remote_conf(ptr->data); free_remote_conf(ptr->data);
} }
DLINK_FOREACH_SAFE(ptr, next_ptr, hubleaf_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, hubleaf_conf_list.head)
{ {
rb_dlinkDelete(ptr, &hubleaf_conf_list); rb_dlinkDelete(ptr, &hubleaf_conf_list);
free_remote_conf(ptr->data); free_remote_conf(ptr->data);
} }
DLINK_FOREACH_SAFE(ptr, next_ptr, oper_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, oper_conf_list.head)
{ {
free_oper_conf(ptr->data); free_oper_conf(ptr->data);
rb_dlinkDestroy(ptr, &oper_conf_list); rb_dlinkDestroy(ptr, &oper_conf_list);
} }
DLINK_FOREACH_SAFE(ptr, next_ptr, server_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, server_conf_list.head)
{ {
server_p = ptr->data; server_p = ptr->data;
@ -128,7 +128,7 @@ clear_s_newconf_bans(void)
struct ConfItem *aconf; struct ConfItem *aconf;
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -139,7 +139,7 @@ clear_s_newconf_bans(void)
rb_dlinkDestroy(ptr, &xline_conf_list); rb_dlinkDestroy(ptr, &xline_conf_list);
} }
DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -181,7 +181,7 @@ find_shared_conf(const char *username, const char *host,
struct remote_conf *shared_p; struct remote_conf *shared_p;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, shared_conf_list.head) RB_DLINK_FOREACH(ptr, shared_conf_list.head)
{ {
shared_p = ptr->data; shared_p = ptr->data;
@ -231,7 +231,7 @@ cluster_generic(struct Client *source_p, const char *command,
ircvsnprintf(buffer, sizeof(buffer), format, args); ircvsnprintf(buffer, sizeof(buffer), format, args);
va_end(args); va_end(args);
DLINK_FOREACH(ptr, cluster_conf_list.head) RB_DLINK_FOREACH(ptr, cluster_conf_list.head)
{ {
shared_p = ptr->data; shared_p = ptr->data;
@ -292,7 +292,7 @@ find_oper_conf(const char *username, const char *host, const char *locip, const
parse_netmask(locip, (struct sockaddr *)&cip, &cbits); parse_netmask(locip, (struct sockaddr *)&cip, &cbits);
DLINK_FOREACH(ptr, oper_conf_list.head) RB_DLINK_FOREACH(ptr, oper_conf_list.head)
{ {
oper_p = ptr->data; oper_p = ptr->data;
@ -434,7 +434,7 @@ find_server_conf(const char *name)
struct server_conf *server_p; struct server_conf *server_p;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, server_conf_list.head) RB_DLINK_FOREACH(ptr, server_conf_list.head)
{ {
server_p = ptr->data; server_p = ptr->data;
@ -516,7 +516,7 @@ find_xline(const char *gecos, int counter)
struct ConfItem *aconf; struct ConfItem *aconf;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, xline_conf_list.head) RB_DLINK_FOREACH(ptr, xline_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -537,7 +537,7 @@ find_xline_mask(const char *gecos)
struct ConfItem *aconf; struct ConfItem *aconf;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, xline_conf_list.head) RB_DLINK_FOREACH(ptr, xline_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -554,7 +554,7 @@ find_nick_resv(const char *name)
struct ConfItem *aconf; struct ConfItem *aconf;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, resv_conf_list.head) RB_DLINK_FOREACH(ptr, resv_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -574,7 +574,7 @@ find_nick_resv_mask(const char *name)
struct ConfItem *aconf; struct ConfItem *aconf;
rb_dlink_node *ptr; rb_dlink_node *ptr;
DLINK_FOREACH(ptr, resv_conf_list.head) RB_DLINK_FOREACH(ptr, resv_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -710,7 +710,7 @@ expire_temp_rxlines(void *unused)
} }
HASH_WALK_END HASH_WALK_END
DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -725,7 +725,7 @@ expire_temp_rxlines(void *unused)
} }
} }
DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head)
{ {
aconf = ptr->data; aconf = ptr->data;
@ -782,7 +782,7 @@ expire_nd_entries(void *unused)
rb_dlink_node *ptr; rb_dlink_node *ptr;
rb_dlink_node *next_ptr; rb_dlink_node *next_ptr;
DLINK_FOREACH_SAFE(ptr, next_ptr, nd_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, nd_list.head)
{ {
nd = ptr->data; nd = ptr->data;

View file

@ -210,7 +210,7 @@ collect_zipstats(void *unused)
rb_dlink_node *ptr; rb_dlink_node *ptr;
struct Client *target_p; struct Client *target_p;
DLINK_FOREACH(ptr, serv_list.head) RB_DLINK_FOREACH(ptr, serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
if(IsCapable(target_p, CAP_ZIP)) if(IsCapable(target_p, CAP_ZIP))
@ -301,7 +301,7 @@ hunt_server(struct Client *client_p, struct Client *source_p,
{ {
target_p = NULL; target_p = NULL;
DLINK_FOREACH(ptr, global_client_list.head) RB_DLINK_FOREACH(ptr, global_client_list.head)
{ {
if(match(new, ((struct Client *) (ptr->data))->name)) if(match(new, ((struct Client *) (ptr->data))->name))
{ {
@ -358,7 +358,7 @@ try_connections(void *unused)
int confrq = 0; int confrq = 0;
time_t next = 0; time_t next = 0;
DLINK_FOREACH(ptr, server_conf_list.head) RB_DLINK_FOREACH(ptr, server_conf_list.head)
{ {
tmp_p = ptr->data; tmp_p = ptr->data;
@ -453,7 +453,7 @@ check_server(const char *name, struct Client *client_p)
if(strlen(name) > HOSTLEN) if(strlen(name) > HOSTLEN)
return -4; return -4;
DLINK_FOREACH(ptr, server_conf_list.head) RB_DLINK_FOREACH(ptr, server_conf_list.head)
{ {
tmp_p = ptr->data; tmp_p = ptr->data;
@ -566,7 +566,7 @@ burst_modes_TS5(struct Client *client_p, char *chname, rb_dlink_list *list, char
mp = mbuf; mp = mbuf;
pp = pbuf; pp = pbuf;
DLINK_FOREACH(ptr, list->head) RB_DLINK_FOREACH(ptr, list->head)
{ {
banptr = ptr->data; banptr = ptr->data;
tlen = strlen(banptr->banstr) + 3; tlen = strlen(banptr->banstr) + 3;
@ -617,7 +617,7 @@ burst_modes_TS6(struct Client *client_p, struct Channel *chptr,
me.id, (long) chptr->channelts, chptr->chname, flag); me.id, (long) chptr->channelts, chptr->chname, flag);
t = buf + mlen; t = buf + mlen;
DLINK_FOREACH(ptr, list->head) RB_DLINK_FOREACH(ptr, list->head)
{ {
banptr = ptr->data; banptr = ptr->data;
@ -677,7 +677,7 @@ burst_TS5(struct Client *client_p)
hclientinfo.client = hchaninfo.client = client_p; hclientinfo.client = hchaninfo.client = client_p;
DLINK_FOREACH(ptr, global_client_list.head) RB_DLINK_FOREACH(ptr, global_client_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -712,7 +712,7 @@ burst_TS5(struct Client *client_p)
call_hook(h_burst_client, &hclientinfo); call_hook(h_burst_client, &hclientinfo);
} }
DLINK_FOREACH(ptr, global_channel_list.head) RB_DLINK_FOREACH(ptr, global_channel_list.head)
{ {
chptr = ptr->data; chptr = ptr->data;
@ -725,7 +725,7 @@ burst_TS5(struct Client *client_p)
t = buf + mlen; t = buf + mlen;
DLINK_FOREACH(uptr, chptr->members.head) RB_DLINK_FOREACH(uptr, chptr->members.head)
{ {
msptr = uptr->data; msptr = uptr->data;
@ -809,7 +809,7 @@ burst_TS6(struct Client *client_p)
hclientinfo.client = hchaninfo.client = client_p; hclientinfo.client = hchaninfo.client = client_p;
DLINK_FOREACH(ptr, global_client_list.head) RB_DLINK_FOREACH(ptr, global_client_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -870,7 +870,7 @@ burst_TS6(struct Client *client_p)
call_hook(h_burst_client, &hclientinfo); call_hook(h_burst_client, &hclientinfo);
} }
DLINK_FOREACH(ptr, global_channel_list.head) RB_DLINK_FOREACH(ptr, global_channel_list.head)
{ {
chptr = ptr->data; chptr = ptr->data;
@ -883,7 +883,7 @@ burst_TS6(struct Client *client_p)
t = buf + mlen; t = buf + mlen;
DLINK_FOREACH(uptr, chptr->members.head) RB_DLINK_FOREACH(uptr, chptr->members.head)
{ {
msptr = uptr->data; msptr = uptr->data;
@ -1154,7 +1154,7 @@ server_estab(struct Client *client_p)
** need to send different names to different servers ** need to send different names to different servers
** (domain name matching) Send new server to other servers. ** (domain name matching) Send new server to other servers.
*/ */
DLINK_FOREACH(ptr, serv_list.head) RB_DLINK_FOREACH(ptr, serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -1203,7 +1203,7 @@ server_estab(struct Client *client_p)
** see previous *WARNING*!!! (Also, original inpath ** see previous *WARNING*!!! (Also, original inpath
** is destroyed...) ** is destroyed...)
*/ */
DLINK_FOREACH(ptr, global_serv_list.head) RB_DLINK_FOREACH(ptr, global_serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;

View file

@ -70,7 +70,7 @@ tstats(struct Client *source_p)
sp = &tmp; sp = &tmp;
memcpy(sp, ServerStats, sizeof(struct ServerStatistics)); memcpy(sp, ServerStats, sizeof(struct ServerStatistics));
DLINK_FOREACH(ptr, serv_list.head) RB_DLINK_FOREACH(ptr, serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -92,7 +92,7 @@ tstats(struct Client *source_p)
} }
} }
DLINK_FOREACH(ptr, lclient_list.head) RB_DLINK_FOREACH(ptr, lclient_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -115,7 +115,7 @@ tstats(struct Client *source_p)
} }
DLINK_FOREACH(ptr, unknown_list.head) RB_DLINK_FOREACH(ptr, unknown_list.head)
{ {
sp->is_ni++; sp->is_ni++;
} }
@ -218,7 +218,7 @@ count_memory(struct Client *source_p)
count_whowas_memory(&ww, &wwm); count_whowas_memory(&ww, &wwm);
DLINK_FOREACH(ptr, global_client_list.head) RB_DLINK_FOREACH(ptr, global_client_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
if(MyConnect(target_p)) if(MyConnect(target_p))
@ -240,7 +240,7 @@ count_memory(struct Client *source_p)
} }
/* Count up all channels, ban lists, except lists, Invex lists */ /* Count up all channels, ban lists, except lists, Invex lists */
DLINK_FOREACH(ptr, global_channel_list.head) RB_DLINK_FOREACH(ptr, global_channel_list.head)
{ {
chptr = ptr->data; chptr = ptr->data;
channel_count++; channel_count++;
@ -249,7 +249,7 @@ count_memory(struct Client *source_p)
channel_users += rb_dlink_list_length(&chptr->members); channel_users += rb_dlink_list_length(&chptr->members);
channel_invites += rb_dlink_list_length(&chptr->invites); channel_invites += rb_dlink_list_length(&chptr->invites);
DLINK_FOREACH(rb_dlink, chptr->banlist.head) RB_DLINK_FOREACH(rb_dlink, chptr->banlist.head)
{ {
actualBan = rb_dlink->data; actualBan = rb_dlink->data;
channel_bans++; channel_bans++;
@ -257,7 +257,7 @@ count_memory(struct Client *source_p)
channel_ban_memory += sizeof(rb_dlink_node) + sizeof(struct Ban); channel_ban_memory += sizeof(rb_dlink_node) + sizeof(struct Ban);
} }
DLINK_FOREACH(rb_dlink, chptr->exceptlist.head) RB_DLINK_FOREACH(rb_dlink, chptr->exceptlist.head)
{ {
actualBan = rb_dlink->data; actualBan = rb_dlink->data;
channel_except++; channel_except++;
@ -265,7 +265,7 @@ count_memory(struct Client *source_p)
channel_except_memory += (sizeof(rb_dlink_node) + sizeof(struct Ban)); channel_except_memory += (sizeof(rb_dlink_node) + sizeof(struct Ban));
} }
DLINK_FOREACH(rb_dlink, chptr->invexlist.head) RB_DLINK_FOREACH(rb_dlink, chptr->invexlist.head)
{ {
actualBan = rb_dlink->data; actualBan = rb_dlink->data;
channel_invex++; channel_invex++;
@ -273,7 +273,7 @@ count_memory(struct Client *source_p)
channel_invex_memory += (sizeof(rb_dlink_node) + sizeof(struct Ban)); channel_invex_memory += (sizeof(rb_dlink_node) + sizeof(struct Ban));
} }
DLINK_FOREACH(rb_dlink, chptr->quietlist.head) RB_DLINK_FOREACH(rb_dlink, chptr->quietlist.head)
{ {
actualBan = rb_dlink->data; actualBan = rb_dlink->data;
channel_quiets++; channel_quiets++;

View file

@ -1183,7 +1183,7 @@ send_umode_out(struct Client *client_p, struct Client *source_p, int old)
send_umode(NULL, source_p, old, 0, buf); send_umode(NULL, source_p, old, 0, buf);
DLINK_FOREACH(ptr, serv_list.head) RB_DLINK_FOREACH(ptr, serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -1398,7 +1398,7 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use
target_p->name, target_p->username, target_p->host, target_p->name, target_p->username, target_p->host,
reason); reason);
DLINK_FOREACH(ptr, target_p->user->channel.head) RB_DLINK_FOREACH(ptr, target_p->user->channel.head)
{ {
mscptr = ptr->data; mscptr = ptr->data;
chptr = mscptr->chptr; chptr = mscptr->chptr;

View file

@ -462,7 +462,7 @@ sendto_server(struct Client *one, struct Channel *chptr, unsigned long caps,
linebuf_putmsg(&linebuf, format, &args, NULL); linebuf_putmsg(&linebuf, format, &args, NULL);
va_end(args); va_end(args);
DLINK_FOREACH_SAFE(ptr, next_ptr, serv_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -527,7 +527,7 @@ sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
linebuf_putmsg(&linebuf_name, NULL, NULL, ":%s %s", source_p->name, buf); linebuf_putmsg(&linebuf_name, NULL, NULL, ":%s %s", source_p->name, buf);
linebuf_putmsg(&linebuf_id, NULL, NULL, ":%s %s", use_id(source_p), buf); linebuf_putmsg(&linebuf_id, NULL, NULL, ":%s %s", use_id(source_p), buf);
DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->members.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->members.head)
{ {
msptr = ptr->data; msptr = ptr->data;
target_p = msptr->client_p; target_p = msptr->client_p;
@ -591,7 +591,7 @@ sendto_channel_local(int type, struct Channel *chptr, const char *pattern, ...)
linebuf_putmsg(&linebuf, pattern, &args, NULL); linebuf_putmsg(&linebuf, pattern, &args, NULL);
va_end(args); va_end(args);
DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->locmembers.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->locmembers.head)
{ {
msptr = ptr->data; msptr = ptr->data;
target_p = msptr->client_p; target_p = msptr->client_p;
@ -631,7 +631,7 @@ sendto_channel_local_butone(struct Client *one, int type, struct Channel *chptr,
linebuf_putmsg(&linebuf, pattern, &args, NULL); linebuf_putmsg(&linebuf, pattern, &args, NULL);
va_end(args); va_end(args);
DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->locmembers.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->locmembers.head)
{ {
msptr = ptr->data; msptr = ptr->data;
target_p = msptr->client_p; target_p = msptr->client_p;
@ -682,12 +682,12 @@ sendto_common_channels_local(struct Client *user, const char *pattern, ...)
++current_serial; ++current_serial;
DLINK_FOREACH_SAFE(ptr, next_ptr, user->user->channel.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, user->user->channel.head)
{ {
mscptr = ptr->data; mscptr = ptr->data;
chptr = mscptr->chptr; chptr = mscptr->chptr;
DLINK_FOREACH_SAFE(uptr, next_uptr, chptr->locmembers.head) RB_DLINK_FOREACH_SAFE(uptr, next_uptr, chptr->locmembers.head)
{ {
msptr = uptr->data; msptr = uptr->data;
target_p = msptr->client_p; target_p = msptr->client_p;
@ -742,12 +742,12 @@ sendto_common_channels_local_butone(struct Client *user, const char *pattern, ..
/* Skip them -- jilles */ /* Skip them -- jilles */
user->serial = current_serial; user->serial = current_serial;
DLINK_FOREACH_SAFE(ptr, next_ptr, user->user->channel.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, user->user->channel.head)
{ {
mscptr = ptr->data; mscptr = ptr->data;
chptr = mscptr->chptr; chptr = mscptr->chptr;
DLINK_FOREACH_SAFE(uptr, next_uptr, chptr->locmembers.head) RB_DLINK_FOREACH_SAFE(uptr, next_uptr, chptr->locmembers.head)
{ {
msptr = uptr->data; msptr = uptr->data;
target_p = msptr->client_p; target_p = msptr->client_p;
@ -805,7 +805,7 @@ sendto_match_butone(struct Client *one, struct Client *source_p,
if(what == MATCH_HOST) if(what == MATCH_HOST)
{ {
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -816,14 +816,14 @@ sendto_match_butone(struct Client *one, struct Client *source_p,
/* what = MATCH_SERVER, if it doesnt match us, just send remote */ /* what = MATCH_SERVER, if it doesnt match us, just send remote */
else if(match(mask, me.name)) else if(match(mask, me.name))
{ {
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
_send_linebuf(target_p, &linebuf_local); _send_linebuf(target_p, &linebuf_local);
} }
} }
DLINK_FOREACH(ptr, serv_list.head) RB_DLINK_FOREACH(ptr, serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -875,7 +875,7 @@ sendto_match_servs(struct Client *source_p, const char *mask, int cap,
current_serial++; current_serial++;
DLINK_FOREACH(ptr, global_serv_list.head) RB_DLINK_FOREACH(ptr, global_serv_list.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -931,7 +931,7 @@ sendto_monitor(struct monitor *monptr, const char *pattern, ...)
linebuf_putmsg(&linebuf, pattern, &args, NULL); linebuf_putmsg(&linebuf, pattern, &args, NULL);
va_end(args); va_end(args);
DLINK_FOREACH_SAFE(ptr, next_ptr, monptr->users.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, monptr->users.head)
{ {
target_p = ptr->data; target_p = ptr->data;
@ -1010,7 +1010,7 @@ sendto_realops_flags(int flags, int level, const char *pattern, ...)
":%s NOTICE * :*** Notice -- ", me.name); ":%s NOTICE * :*** Notice -- ", me.name);
va_end(args); va_end(args);
DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -1077,7 +1077,7 @@ sendto_realops_snomask(int flags, int level, const char *pattern, ...)
} }
level &= ~L_NETWIDE; level &= ~L_NETWIDE;
DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -1117,7 +1117,7 @@ sendto_realops_snomask_from(int flags, int level, struct Client *source_p,
":%s NOTICE * :*** Notice -- ", source_p->name); ":%s NOTICE * :*** Notice -- ", source_p->name);
va_end(args); va_end(args);
DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -1166,7 +1166,7 @@ sendto_wallops_flags(int flags, struct Client *source_p, const char *pattern, ..
va_end(args); va_end(args);
DLINK_FOREACH_SAFE(ptr, next_ptr, IsPerson(source_p) && flags == UMODE_WALLOP ? lclient_list.head : local_oper_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, IsPerson(source_p) && flags == UMODE_WALLOP ? lclient_list.head : local_oper_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;
@ -1235,7 +1235,7 @@ kill_client_serv_butone(struct Client *one, struct Client *target_p, const char
linebuf_putmsg(&linebuf_id, NULL, NULL, ":%s KILL %s :%s", linebuf_putmsg(&linebuf_id, NULL, NULL, ":%s KILL %s :%s",
use_id(&me), use_id(target_p), buf); use_id(&me), use_id(target_p), buf);
DLINK_FOREACH_SAFE(ptr, next_ptr, serv_list.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, serv_list.head)
{ {
client_p = ptr->data; client_p = ptr->data;

View file

@ -78,7 +78,7 @@ void substitution_free(rb_dlink_list *varlist)
{ {
rb_dlink_node *nptr, *nptr2; rb_dlink_node *nptr, *nptr2;
DLINK_FOREACH_SAFE(nptr, nptr2, varlist->head) RB_DLINK_FOREACH_SAFE(nptr, nptr2, varlist->head)
{ {
struct substitution_variable *tmp = (struct substitution_variable *) nptr->data; struct substitution_variable *tmp = (struct substitution_variable *) nptr->data;
@ -132,7 +132,7 @@ char *substitution_parse(const char *fmt, rb_dlink_list *varlist)
/* advance ptr by length of variable */ /* advance ptr by length of variable */
ptr += (pptr - ptr); ptr += (pptr - ptr);
DLINK_FOREACH(nptr, varlist->head) RB_DLINK_FOREACH(nptr, varlist->head)
{ {
struct substitution_variable *val = (struct substitution_variable *) nptr->data; struct substitution_variable *val = (struct substitution_variable *) nptr->data;

View file

@ -117,7 +117,7 @@ delete_isupport(const char *name)
rb_dlink_node *ptr, *next_ptr; rb_dlink_node *ptr, *next_ptr;
struct isupportitem *item; struct isupportitem *item;
DLINK_FOREACH_SAFE(ptr, next_ptr, isupportlist.head) RB_DLINK_FOREACH_SAFE(ptr, next_ptr, isupportlist.head)
{ {
item = ptr->data; item = ptr->data;
@ -150,7 +150,7 @@ show_isupport(struct Client *client_p)
extra_space += strlen(me.name) + 1 + strlen(form_str(RPL_ISUPPORT)); extra_space += strlen(me.name) + 1 + strlen(form_str(RPL_ISUPPORT));
nchars = extra_space, nparams = 0, buf[0] = '\0'; nchars = extra_space, nparams = 0, buf[0] = '\0';
DLINK_FOREACH(ptr, isupportlist.head) RB_DLINK_FOREACH(ptr, isupportlist.head)
{ {
item = ptr->data; item = ptr->data;
value = (*item->func)(item->param); value = (*item->func)(item->param);