Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

list.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * $Id: list.h,v 1.3 2003/12/07 18:14:22 gareuselesinge Exp $
00003  * This file is part of liberopops (http://liberopops.sf.net)                 *
00004  * This file is distributed under the terms of GNU GPL license.               *
00005  ******************************************************************************/
00006 
00007 
00008 /******************************************************************************/
00014 /******************************************************************************/
00015 
00016 #ifndef LIST_H_
00017 #define LIST_H_
00018 
00019 #include <stdlib.h>
00020 #include <stdio.h>
00021 
00023 typedef struct list_s
00024     {
00025     struct list_s* next;
00026     void *data;
00027     }list_t;
00028 
00030 extern list_t*  list_add        (list_t* l,void *data);
00032 extern list_t*  list_add_fast   (list_t* l,list_t**tl,void *data);
00034 extern list_t*  list_remove     (list_t* l,list_t* elem);
00036 extern list_t*  list_sort       (list_t* l,
00037                 int (*compare)(void *data1,void* data2));
00039 extern list_t*  list_find       (list_t *l,void* x,
00040                 int (*is_equal)(void *x,void* data2));
00042 extern list_t*  list_duplicate  (list_t *l,void* (*copyer)(void *data1));
00044 extern list_t*  list_free       (list_t *l,void (*destructor)(void *data1));
00046 extern void     list_visit      (list_t* l,void (*action)(void *));
00048 extern int      list_getpos     (list_t *l,void* x,
00049                 int (*compare)(void *data1,void* data2));
00051 extern int      list_len        (list_t *l);
00053 extern list_t*  list_concat     (list_t *l1,list_t *l2);
00054 
00056 extern list_t*  list_pop        (list_t *l);
00058 extern list_t*  list_push       (list_t *l,void* data);
00060 extern void*  list_head (list_t *l);
00061 
00062 #endif

Generated on Wed May 5 15:48:03 2004 for LiberoPOPs by doxygen 1.3.6-20040222