ucx/list.h

Thu, 04 Oct 2012 18:23:32 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 04 Oct 2012 18:23:32 +0200
changeset 43
02f38adea013
parent 36
a9d656e4f7ce
child 67
27e67e725d35
permissions
-rw-r--r--

fixed crash fails by completing the implementation of the tested function....

/*
 * 
 */

#ifndef LIST_H
#define	LIST_H

#include "ucx.h"
#include <stddef.h>

#ifdef	__cplusplus
extern "C" {
#endif
    
typedef struct UcxList UcxList;
struct UcxList {
    void    *data;
    UcxList *next;
};

UcxList *ucx_list_clone(UcxList *l, copy_func fnc, void *data);
int ucx_list_equals(UcxList *l1, UcxList *l2, cmp_func fnc, void *data);

void ucx_list_free(UcxList *l);
UcxList *ucx_list_append(UcxList *l, void *data);
UcxList *ucx_list_prepend(UcxList *l, void *data);
UcxList *ucx_list_concat(UcxList *l1, UcxList *l2);
UcxList *ucx_list_last(UcxList *l);
UcxList *ucx_list_get(UcxList *l, int index);
size_t ucx_list_size(UcxList *l);

UcxList *ucx_list_sort(UcxList *l, cmp_func fnc, void *data);

/* list specific functions */
UcxList *ucx_list_remove(UcxList *l, UcxList *e);

#ifdef	__cplusplus
}
#endif

#endif	/* LIST_H */

mercurial