[pulseaudio-commits] r1209 - /trunk/src/pulsecore/llist.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Aug 11 19:16:14 PDT 2006


Author: lennart
Date: Sat Aug 12 04:16:12 2006
New Revision: 1209

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1209&root=pulseaudio&view=rev
Log:
add new macro PA_LLIST_INSERT_AFTER

Modified:
    trunk/src/pulsecore/llist.h

Modified: trunk/src/pulsecore/llist.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/llist.h?rev=1209&root=pulseaudio&r1=1208&r2=1209&view=diff
==============================================================================
--- trunk/src/pulsecore/llist.h (original)
+++ trunk/src/pulsecore/llist.h Sat Aug 12 04:16:12 2006
@@ -73,7 +73,24 @@
     assert(_head); \
     while ((*_head)->prev) \
         *_head = (*_head)->prev; \
-} while (0) \
+} while (0) 
 
+#define PA_LLIST_INSERT_AFTER(t,head,a,b) \
+do { \
+    t **_head = &(head), *_a = (a), *_b = (b); \
+    assert(_b); \
+    if (!_a) { \
+        if ((_b->next = *_head)) \
+            _b->next->prev = _b; \
+        _b->prev = NULL; \
+        *_head = _b; \
+    } else { \
+        if ((_b->next = _a->next)) \
+            _b->next->prev = _b; \
+        _b->prev = _a; \
+        _a->next = _b; \
+    } \
+} while (0) 
+    
 
 #endif




More information about the pulseaudio-commits mailing list