comparison src/protocols/oscar/ssi.c @ 4308:b3a14484fc2f

[gaim-migrate @ 4562] Fix the "Remove" permit buddy button in le privacy dialogueueue. I also screwed around with a bit 'o syntax in ssi.c, and hopefully make the uin@pager.icq.com receiving thing nice. I _still_ don't know why I can't send an email through that reliably. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 12 Jan 2003 23:13:51 +0000
parents 22ebfa41525a
children 7c9f3d0fe8b2
comparison
equal deleted inserted replaced
4307:545d153a5341 4308:b3a14484fc2f
152 if ((new->gid < (*list)->gid) || ((new->gid == (*list)->gid) && (new->bid < (*list)->bid))) { 152 if ((new->gid < (*list)->gid) || ((new->gid == (*list)->gid) && (new->bid < (*list)->bid))) {
153 new->next = *list; 153 new->next = *list;
154 *list = new; 154 *list = new;
155 } else { 155 } else {
156 struct aim_ssi_item *prev; 156 struct aim_ssi_item *prev;
157 for ((prev=*list, cur=(*list)->next); (cur && (new->gid > cur->gid || ((new->gid == cur->gid) && (new->bid > cur->bid)))); prev=cur, cur=cur->next); 157 for ((prev=*list, cur=(*list)->next); (cur && ((new->gid > cur->gid) || ((new->gid == cur->gid) && (new->bid > cur->bid)))); prev=cur, cur=cur->next);
158 new->next = prev->next; 158 new->next = prev->next;
159 prev->next = new; 159 prev->next = new;
160 } 160 }
161 } else { 161 } else {
162 new->next = *list; 162 new->next = *list;
178 if (!list || !(*list) || !del) 178 if (!list || !(*list) || !del)
179 return -EINVAL; 179 return -EINVAL;
180 180
181 /* Remove the item from the list */ 181 /* Remove the item from the list */
182 if (*list == del) { 182 if (*list == del) {
183 *list = del->next; 183 *list = (*list)->next;
184 } else { 184 } else {
185 struct aim_ssi_item *cur; 185 struct aim_ssi_item *cur;
186 for (cur=*list; (cur->next && (cur->next!=del)); cur=cur->next); 186 for (cur=*list; (cur->next && (cur->next!=del)); cur=cur->next);
187 if (cur->next) 187 if (cur->next)
188 cur->next = cur->next->next; 188 cur->next = cur->next->next;