Blame src/check_list.h

Packit 0b5880
/*
Packit 0b5880
 * Check: a unit test framework for C
Packit 0b5880
 * Copyright (C) 2001, 2002 Arien Malec
Packit 0b5880
 *
Packit 0b5880
 * This library is free software; you can redistribute it and/or
Packit 0b5880
 * modify it under the terms of the GNU Lesser General Public
Packit 0b5880
 * License as published by the Free Software Foundation; either
Packit 0b5880
 * version 2.1 of the License, or (at your option) any later version.
Packit 0b5880
 *
Packit 0b5880
 * This library is distributed in the hope that it will be useful,
Packit 0b5880
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 0b5880
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 0b5880
 * Lesser General Public License for more details.
Packit 0b5880
 *
Packit 0b5880
 * You should have received a copy of the GNU Lesser General Public
Packit 0b5880
 * License along with this library; if not, write to the
Packit 0b5880
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
Packit 0b5880
 * MA 02110-1301, USA.
Packit 0b5880
 */
Packit 0b5880
Packit 0b5880
#ifndef CHECK_LIST_H
Packit 0b5880
#define CHECK_LIST_H
Packit 0b5880
Packit 0b5880
typedef struct List List;
Packit 0b5880
Packit 0b5880
/* Create an empty list */
Packit 0b5880
List *check_list_create(void);
Packit 0b5880
Packit 0b5880
/* Is list at end? */
Packit 0b5880
int check_list_at_end(List * lp);
Packit 0b5880
Packit 0b5880
/* Position list at front */
Packit 0b5880
void check_list_front(List * lp);
Packit 0b5880
Packit 0b5880
/* Add a value to the front of the list,
Packit 0b5880
   positioning newly added value as current value.
Packit 0b5880
   More expensive than list_add_end, as it uses memmove. */
Packit 0b5880
void check_list_add_front(List * lp, void *val);
Packit 0b5880
Packit 0b5880
/* Add a value to the end of the list,
Packit 0b5880
   positioning newly added value as current value */
Packit 0b5880
void check_list_add_end(List * lp, void *val);
Packit 0b5880
Packit 0b5880
/* Give the value of the current node */
Packit 0b5880
void *check_list_val(List * lp);
Packit 0b5880
Packit 0b5880
/* Position the list at the next node */
Packit 0b5880
void check_list_advance(List * lp);
Packit 0b5880
Packit 0b5880
/* Free a list, but don't free values */
Packit 0b5880
void check_list_free(List * lp);
Packit 0b5880
Packit 0b5880
void check_list_apply(List * lp, void (*fp) (void *));
Packit 0b5880
Packit 0b5880
/* Return true if the list contains the value, false otherwise */
Packit 0b5880
int check_list_contains(List * lp, void *val);
Packit 0b5880
Packit 0b5880
Packit 0b5880
#endif /* CHECK_LIST_H */