src/server/ucx/list.h

Sat, 06 Oct 2012 13:00:07 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 06 Oct 2012 13:00:07 +0200
changeset 36
450d2d5f4735
parent 16
a9bbd82d2dce
child 71
069c152f6272
permissions
-rw-r--r--

server can reload configuration

/*
 * 
 */

#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