slist.h
/*
* slist.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__SLIST_H
#define DEBIAN_INSTALLER__SLIST_H
#include <debian-installer/mem_chunk.h>
typedef struct di_slist di_slist;
typedef struct di_slist_node di_slist_node;
struct di_slist
{
di_slist_node *head;
di_slist_node *bottom;
};
struct di_slist_node
{
di_slist_node *next;
void *data;
};
di_slist *di_slist_alloc (void);
void di_slist_destroy (di_slist *slist, di_destroy_notify destroy_func) __attribute__ ((nonnull(1)));
void di_slist_free (di_slist *slist);
void di_slist_append (di_slist *slist, void *data) __attribute__ ((nonnull(1)));
void di_slist_append_chunk (di_slist *slist, void *data, di_mem_chunk *mem_chunk) __attribute__ ((nonnull(1,3)));
void di_slist_prepend (di_slist *slist, void *data) __attribute__ ((nonnull(1)));
void di_slist_prepend_chunk (di_slist *slist, void *data, di_mem_chunk *mem_chunk) __attribute__ ((nonnull(1,3)));
#endif
di_slist_prepend
void void di_slist_prepend(di_slist *slist, void *data) __attribute__((nonnull(1)))
Definition: slist.c:89
di_slist_prepend_chunk
void di_slist_prepend_chunk(di_slist *slist, void *data, di_mem_chunk *mem_chunk) __attribute__((nonnull(1
di_slist_free
void di_slist_free(di_slist *slist)
Definition: slist.c:50
di_slist_append_chunk
void di_slist_append_chunk(di_slist *slist, void *data, di_mem_chunk *mem_chunk) __attribute__((nonnull(1
di_slist_append
void di_slist_append(di_slist *slist, void *data) __attribute__((nonnull(1)))
Definition: slist.c:68
di_slist_alloc
di_slist * di_slist_alloc(void)
Definition: slist.c:26
di_slist_destroy
void di_slist_destroy(di_slist *slist, di_destroy_notify destroy_func) __attribute__((nonnull(1)))
Definition: slist.c:35
di_destroy_notify
void di_destroy_notify(void *data)
Definition: types.h:50
di_mem_chunk
a mem chunk
Definition: mem_chunk.c:47
di_slist_node
Node of a single-linked list.
Definition: slist.h:46
di_slist_node::next
di_slist_node * next
Definition: slist.h:47
di_slist_node::data
void * data
Definition: slist.h:48
di_slist
Single-linked list.
Definition: slist.h:37
di_slist::head
di_slist_node * head
Definition: slist.h:38
di_slist::bottom
di_slist_node * bottom
Definition: slist.h:39