diff options
author | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-11 11:17:23 +0000 |
---|---|---|
committer | Bo Yang <struggleyb.nku@gmail.com> | 2009-08-11 11:17:23 +0000 |
commit | 399da01ae4eb5c5e3e9349bacc2063c946c3d4a1 (patch) | |
tree | 433c8bcde94fc7a6e6f2e5cbf23842a84db98146 /test/lib/list.h | |
parent | eec057c7437e19b59ca1e698ce548cb56ce37240 (diff) | |
download | libdom-399da01ae4eb5c5e3e9349bacc2063c946c3d4a1.tar.gz libdom-399da01ae4eb5c5e3e9349bacc2063c946c3d4a1.tar.bz2 |
Merge the branches/struggleyb/libdom-remain back to trunk.
svn path=/trunk/dom/; revision=9191
Diffstat (limited to 'test/lib/list.h')
-rw-r--r-- | test/lib/list.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/test/lib/list.h b/test/lib/list.h deleted file mode 100644 index 7c27796..0000000 --- a/test/lib/list.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of libdom test suite. - * Licensed under the MIT License, - * http://www.opensource.org/licenses/mit-license.php - * Copyright 2007 James Shaw <jshaw@netsurf-browser.org> - */ - -#ifndef list_h_ -#define list_h_ - -#include <stdbool.h> - -#include "comparators.h" - -struct list_elt { - void* data; - struct list_elt* next; -}; - -struct list { - unsigned int size; - struct list_elt* head; - struct list_elt* tail; -}; - -struct list* list_new(void); -void list_destroy(struct list* list); - -/** - * Add data to the tail of the list. - */ -void list_add(struct list* list, void* data); - -/** - * Remove element containing data from list. - * The list element is freed, but the caller must free the data itself - * if necessary. - * - * Returns true if data was found in the list. - */ -bool list_remove(struct list* list, void* data); - -struct list* list_clone(struct list* list); - -/** - * Tests if data is equal to any element in the list. - */ -bool list_contains(struct list* list, void* data, - comparator comparator); - -/** - * Tests if superlist contains all elements in sublist. Order is not important. - */ -bool list_contains_all(struct list* superList, struct list* subList, - comparator comparator); - -#endif |