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., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
24 typedef struct List List;
26 /* Create an empty list */
27 List *check_list_create (void);
30 int check_list_at_end (List * lp);
32 /* Position list at front */
33 void check_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 check_list_add_front (List * lp, void *val);
40 /* Add a value to the end of the list,
41 positioning newly added value as current value */
42 void check_list_add_end (List * lp, void *val);
44 /* Give the value of the current node */
45 void *check_list_val (List * lp);
47 /* Position the list at the next node */
48 void check_list_advance (List * lp);
50 /* Free a list, but don't free values */
51 void check_list_free (List * lp);
53 void check_list_apply (List * lp, void (*fp) (void *));
56 #endif /* CHECK_LIST_H */