projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
lib
/
list.c
diff --git
a/lib/list.c
b/lib/list.c
index
bc8133f
..
e921b20
100644
(file)
--- a/
lib/list.c
+++ b/
lib/list.c
@@
-18,13
+18,13
@@
list2_t* list_new (void) {
return (safe_calloc (1, sizeof (list2_t)));
}
return (safe_calloc (1, sizeof (list2_t)));
}
-void list_del (list2_t** l,
void (*edel) (void**)
) {
+void list_del (list2_t** l,
list_del_t* del
) {
size_t i = 0;
if (!l || !*l)
return;
size_t i = 0;
if (!l || !*l)
return;
- if (
*e
del)
+ if (del)
for (i = 0; i < (*l)->length; i++)
for (i = 0; i < (*l)->length; i++)
-
e
del (&(*l)->data[i]);
+ del (&(*l)->data[i]);
FREE(&(*l)->data);
FREE(l);
}
FREE(&(*l)->data);
FREE(l);
}
@@
-100,7
+100,7
@@
list2_t* list_dup (list2_t* l, void* (*dup) (void*)) {
return (ret);
}
return (ret);
}
-int
_
list_lookup (list2_t* l, int (*cmp) (const void*, const void*), const void* p) {
+int list_lookup (list2_t* l, int (*cmp) (const void*, const void*), const void* p) {
int i = 0;
if (list_empty(l) || !*cmp)
return (-1);
int i = 0;
if (list_empty(l) || !*cmp)
return (-1);