File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / iftop / sorted_list.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 16:57:34 2012 UTC (12 years, 3 months ago) by misho
Branches: iftop, MAIN
CVS tags: v1_0rc4, v0_17p0, v0_17, HEAD
iftop

    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>