diff options
Diffstat (limited to 'converter/other/fiasco/lib/list.h')
-rw-r--r-- | converter/other/fiasco/lib/list.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/converter/other/fiasco/lib/list.h b/converter/other/fiasco/lib/list.h index 68577dfd..3ba860c0 100644 --- a/converter/other/fiasco/lib/list.h +++ b/converter/other/fiasco/lib/list.h @@ -1,8 +1,8 @@ /* * list.h * - * Written by: Ullrich Hafner - * + * Written by: Ullrich Hafner + * * This file is part of FIASCO (Fractal Image And Sequence COdec) * Copyright (C) 1994-2000 Ullrich Hafner */ @@ -22,16 +22,16 @@ typedef struct node { - struct node *prev; /* pointer to prev list element */ - struct node *next; /* pointer to next list element */ - void *value; /* pointer to value of node */ + struct node *prev; /* pointer to prev list element */ + struct node *next; /* pointer to next list element */ + void *value; /* pointer to value of node */ } node_t; typedef struct list { node_t *head; node_t *tail; - size_t size_of_element; /* number of bytes to store value */ + size_t size_of_element; /* number of bytes to store value */ } list_t; typedef enum {TAIL, HEAD} pos_e; @@ -41,26 +41,26 @@ typedef enum {TAIL, HEAD} pos_e; */ typedef list_t lqueue_t ; -#define alloc_queue alloc_list -#define free_queue free_list -#define queue_append(q, d) (list_insert ((q), TAIL, (d))) -#define queue_remove(q, d) (list_remove ((q), HEAD, (d))) +#define alloc_queue alloc_list +#define free_queue free_list +#define queue_append(q, d) (list_insert ((q), TAIL, (d))) +#define queue_remove(q, d) (list_remove ((q), HEAD, (d))) typedef list_t lstack_t ; -#define alloc_stack alloc_list -#define free_stack free_list -#define stack_push(q, d) (list_insert ((q), TAIL, (d))) -#define stack_pop(q, d) (list_remove ((q), TAIL, (d))) +#define alloc_stack alloc_list +#define free_stack free_list +#define stack_push(q, d) (list_insert ((q), TAIL, (d))) +#define stack_pop(q, d) (list_remove ((q), TAIL, (d))) list_t * alloc_list (size_t size_of_element); -void +void free_list (list_t *list); bool_t list_element_n (const list_t *list, pos_e pos, unsigned n, void *data); void list_foreach (const list_t *list, void (*function)(void *, void *), - void *data); + void *data); void list_insert (list_t *list, pos_e pos, const void *data); bool_t |