summaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorlecoanet1998-12-11 17:24:48 +0000
committerlecoanet1998-12-11 17:24:48 +0000
commit25c512868d7948bc02ba91e9f06d398c31b0bedf (patch)
treedef6b2544cf3c81068bac6788f4ab9465de236b7 /src/list.h
parent34ace791502635f9bc725192bc609994e9f9b730 (diff)
downloadivy-c-25c512868d7948bc02ba91e9f06d398c31b0bedf.zip
ivy-c-25c512868d7948bc02ba91e9f06d398c31b0bedf.tar.gz
ivy-c-25c512868d7948bc02ba91e9f06d398c31b0bedf.tar.bz2
ivy-c-25c512868d7948bc02ba91e9f06d398c31b0bedf.tar.xz
Modification pour debianisation
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/list.h b/src/list.h
deleted file mode 100644
index 4a6fe26..0000000
--- a/src/list.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#define LIST_ITER( list, p, cond ) \
- p = list; \
- while ( p && (cond) ) p = p->next
-
-#define LIST_REMOVE( list, p ) \
- { \
- void *toRemove; \
- if ( list == p ) \
- { \
- list = p->next; \
- free(p);\
- } \
- else \
- {\
- toRemove = p;\
- LIST_ITER( list, p, ( p->next != toRemove ));\
- if ( p )\
- {\
- /* somme tricky swapping to use a untyped variable */\
- void *suiv; \
- void *prec = p;\
- p = toRemove;\
- suiv = p->next;\
- p = prec;\
- p->next = suiv;\
- free(toRemove);\
- }\
- } \
- }
-
-#define LIST_ADD(list, p ) \
- if ((p = malloc( sizeof( *p ))))\
- { \
- memset( p, 0 , sizeof( *p ));\
- p->next = list; \
- list = p; \
- }
-
-#define LIST_EACH( list, p ) \
- for ( p = list ; p ; p = p -> next )
-
-#define LIST_EACH_SAFE( list, p, next )\
-for ( p = list ; (next = p ? p->next: p ),p ; p = next )
-
-
-#define LIST_EMPTY( list ) \
- { \
- void *p; \
- while( list ) \
- { \
- p = list;\
- list = list->next; \
- free(p);\
- } \
- }