Annotation of embedaddon/iftop/sorted_list.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * sorted_list.h:
                      3:  *
                      4:  */
                      5: 
                      6: #ifndef __SORTED_LIST_H_ /* include guard */
                      7: #define __SORTED_LIST_H_
                      8: 
                      9: typedef struct sorted_list_node_tag {
                     10:     struct sorted_list_node_tag* next;
                     11:     void* data;
                     12: } sorted_list_node;
                     13: 
                     14: typedef struct {
                     15:     sorted_list_node root;
                     16:     int (*compare)(void*, void*);
                     17: } sorted_list_type;
                     18: 
                     19: void sorted_list_initialise(sorted_list_type* list);
                     20: void sorted_list_insert(sorted_list_type* list, void* item);
                     21: sorted_list_node* sorted_list_next_item(sorted_list_type* list, sorted_list_node* prev);
                     22: void sorted_list_destroy(sorted_list_type* list);
                     23: 
                     24: 
                     25: #endif /* __SORTED_LIST_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>