2 * Check: a unit test framework for C
3 * Copyright (C) 2001, 2002 Arien Malec
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
24 typedef struct List List;
26 /* Create an empty list */
27 List * check_list_create (void);
30 int list_at_end (List * lp);
32 /* Position list at front */
33 void list_front(List *lp);
35 /* Add a value to the front of the list,
36 positioning newly added value as current value.
37 More expensive than list_add_end, as it uses memmove. */
38 void list_add_front (List *lp, const void *val);
40 /* Add a value to the end of the list,
41 positioning newly added value as current value */
42 void list_add_end (List *lp, const void *val);
44 /* Give the value of the current node */
45 void *list_val (List * lp);
47 /* Position the list at the next node */
48 void list_advance (List * lp);
50 /* Free a list, but don't free values */
51 void list_free (List * lp);
53 void list_apply (List *lp, void (*fp) (void *));
56 #endif /* CHECK_LIST_H */