Commit f29cebcc authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(ADNS_LIST_INIT, ADNS_LINK_INIT) (ADNS_LIST_UNLINK_PART)

(ADNS_LIST_LINK_TAIL_PART, ADNS_LIST_UNLINK, ADNS_LIST_LINK_TAIL):
	Appended the "ADNS_" prefix to make the macro names more unique.
	LIST_INIT is already defined in /usr/include/sys/queue.h:291 on
	FreeBSD 4.8.  All users updated.
parent 7c401ac4
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
#ifndef ADNS_DLIST_H_INCLUDED #ifndef ADNS_DLIST_H_INCLUDED
#define ADNS_DLIST_H_INCLUDED #define ADNS_DLIST_H_INCLUDED
#define LIST_INIT(list) ((list).head= (list).tail= 0) #define ADNS_LIST_INIT(list) ((list).head= (list).tail= 0)
#define LINK_INIT(link) ((link).next= (link).back= 0) #define ADNS_LINK_INIT(link) ((link).next= (link).back= 0)
#define LIST_UNLINK_PART(list,node,part) \ #define ADNS_LIST_UNLINK_PART(list,node,part) \
do { \ do { \
if ((node)->part back) (node)->part back->part next= (node)->part next; \ if ((node)->part back) (node)->part back->part next= (node)->part next; \
else (list).head= (node)->part next; \ else (list).head= (node)->part next; \
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
else (list).tail= (node)->part back; \ else (list).tail= (node)->part back; \
} while(0) } while(0)
#define LIST_LINK_TAIL_PART(list,node,part) \ #define ADNS_LIST_LINK_TAIL_PART(list,node,part) \
do { \ do { \
(node)->part next= 0; \ (node)->part next= 0; \
(node)->part back= (list).tail; \ (node)->part back= (list).tail; \
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
(list).tail= (node); \ (list).tail= (node); \
} while(0) } while(0)
#define LIST_UNLINK(list,node) LIST_UNLINK_PART(list,node,) #define ADNS_LIST_UNLINK(list,node) ADNS_LIST_UNLINK_PART(list,node,)
#define LIST_LINK_TAIL(list,node) LIST_LINK_TAIL_PART(list,node,) #define ADNS_LIST_LINK_TAIL(list,node) ADNS_LIST_LINK_TAIL_PART(list,node,)
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment