Insere rendimentos de forma ordenada.
[cascardo/declara.git] / list.h
diff --git a/list.h b/list.h
index 43fc8e2..bf09f6f 100644 (file)
--- a/list.h
+++ b/list.h
 #define _LIST_H
 
 typedef void (free_function_t)(void *);
+typedef int (sort_function_t)(void *, void *);
 struct list;
 
 struct list * list_new(void);
 int list_add(struct list **list, void *val);
+int list_insert(struct list **list, int pos, void *val);
+int list_insert_ordered(struct list **list, void *val, sort_function_t *fn);
 void * list_get(struct list *list, int pos);
 void list_free(struct list *list, free_function_t *ifree);