server/src/common/util/lists.h
Enno Rehling 0bc401ba8f XML Reader
- alle xml dateien sind echtes XML
- alle alten XML Leseroutinen sind raus
- Daten werden mit dem libxml DOM parser gelesen
- der alte XML Parser ist weg
- libraries required: libxml2, iconv
2004-03-28 20:53:47 +00:00

60 lines
1.6 KiB
C

/* vi: set ts=2:
*
*
* Eressea PB(E)M host Copyright (C) 1998-2003
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
* Henning Peters (faroul@beyond.kn-bremen.de)
* Enno Rehling (enno@eressea-pbem.de)
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
*
* based on:
*
* Atlantis v1.0 13 September 1993 Copyright 1993 by Russell Wallace
* Atlantis v1.7 Copyright 1996 by Alex Schröder
*
* This program may not be used, modified or distributed without
* prior permission by the authors of Eressea.
* This program may not be sold or used commercially without prior written
* permission from the authors.
*/
#ifndef LISTS_H
#define LISTS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
typedef struct void_list {
struct void_list * next;
void * data;
} void_list;
#define list_foreach(type, list, item) item=list; while (item!=NULL) { type* __next__=item->next;
#define list_continue(item) { item=__next__; continue; }
#define list_next(item) item=__next__; }
void addlist(void *l1, void *p1);
void choplist(void * l, void * p);
void translist(void *l1, void *l2, void *p);
void promotelist(void *l, void *p);
#ifndef MALLOCDBG
void freelist(void *p1);
void removelist(void *l, void *p);
#else
#define freelist(p) { while (p) { void * p2 = p->next; free(p); p = p2; } }
#define removelist(l,p) { choplist(l, p); free(p); }
#endif
size_t listlen(void *l);
void invert_list(void * heap);
#define addlist2(l, p) (*l = p, l = &p->next)
void *listelem(void *l, int n);
#ifdef __cplusplus
}
#endif
#endif