Main Page | Data Structures | File List | Globals

list.h

Go to the documentation of this file.
00001 /* 00002 Copyright 2004 John Tsiombikas <nuclear@siggraph.org> 00003 00004 This file is part of my common code collection (ccc). 00005 00006 ccc is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 ccc is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with ccc; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00026 #ifndef _LIST_H_ 00027 #define _LIST_H_ 00028 00030 struct list_node { 00031 void *data; 00032 struct list_node *next, *prev; 00033 }; 00034 00035 void delete_list(struct list_node *list, void (*delete_data)(void*)); 00036 00037 void add_list_node(struct list_node **list, void *data); 00038 void *remove_list_node(struct list_node *node, void (*delete_data)(void*)); 00039 00040 struct list_node *find_list_node(struct list_node *list, void *data, int (*cmp_func)(void*, void*)); 00041 00042 unsigned int count_list_nodes(struct list_node *list); 00043 00044 #endif /* _LIST_H_ */

Generated on Thu Sep 9 00:52:33 2004 for MUD by doxygen 1.3.8