list.h
/*
* list.h
*
* Copyright (C) 2003 Bastian Blank <waldi@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEBIAN_INSTALLER__LIST_H
#define DEBIAN_INSTALLER__LIST_H
#include <debian-installer/mem_chunk.h>
typedef struct di_list di_list;
typedef struct di_list_node di_list_node;
struct di_list
{
di_list_node *head;
di_list_node *bottom;
};
struct di_list_node
{
di_list_node *next;
di_list_node *prev;
void *data;
};
di_list *di_list_alloc (void);
void di_list_destroy (di_list *list, di_destroy_notify destroy_func) __attribute__ ((nonnull(1)));
void di_list_free (di_list *list);
void di_list_append (di_list *list, void *data) __attribute__ ((nonnull(1)));
void di_list_append_chunk (di_list *list, void *data, di_mem_chunk *mem_chunk) __attribute__ ((nonnull(1,3)));
void di_list_prepend (di_list *list, void *data) __attribute__ ((nonnull(1)));
void di_list_prepend_chunk (di_list *list, void *data, di_mem_chunk *mem_chunk) __attribute__ ((nonnull(1,3)));
#endif
di_list_append
void di_list_append(di_list *list, void *data) __attribute__((nonnull(1)))
Definition list.c:69
di_list_append_chunk
void di_list_append_chunk(di_list *list, void *data, di_mem_chunk *mem_chunk) __attribute__((nonnull(1
di_list_prepend_chunk
void di_list_prepend_chunk(di_list *list, void *data, di_mem_chunk *mem_chunk) __attribute__((nonnull(1
di_list_alloc
di_list * di_list_alloc(void)
Definition list.c:26
di_list_prepend
void void di_list_prepend(di_list *list, void *data) __attribute__((nonnull(1)))
Definition list.c:93
di_list_free
void di_list_free(di_list *list)
Definition list.c:50
di_list_destroy
void di_list_destroy(di_list *list, di_destroy_notify destroy_func) __attribute__((nonnull(1)))
Definition list.c:35
di_destroy_notify
void di_destroy_notify(void *data)
Definition types.h:50
di_list_node
Node of a double-linked list.
Definition list.h:46
di_list_node::prev
di_list_node * prev
Definition list.h:48
di_list_node::data
void * data
Definition list.h:49
di_list_node::next
di_list_node * next
Definition list.h:47
di_list
Double-linked list.
Definition list.h:37
di_list::bottom
di_list_node * bottom
Definition list.h:39
di_list::head
di_list_node * head
Definition list.h:38
di_mem_chunk
a mem chunk
Definition mem_chunk.c:47