[pulseaudio-commits] r1984 - in /trunk/src/pulsecore: strlist.c strlist.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Oct 29 13:30:16 PDT 2007


Author: lennart
Date: Mon Oct 29 21:30:15 2007
New Revision: 1984

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1984&root=pulseaudio&view=rev
Log:
add new API pa_strlist_reverse()

Modified:
    trunk/src/pulsecore/strlist.c
    trunk/src/pulsecore/strlist.h

Modified: trunk/src/pulsecore/strlist.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/strlist.c?rev=1984&root=pulseaudio&r1=1983&r2=1984&view=diff
==============================================================================
--- trunk/src/pulsecore/strlist.c (original)
+++ trunk/src/pulsecore/strlist.c Mon Oct 29 21:30:15 2007
@@ -146,3 +146,18 @@
 
     return head;
 }
+
+pa_strlist *pa_strlist_reverse(pa_strlist *l) {
+    pa_strlist *r = NULL;
+
+    while (l) {
+        pa_strlist *n;
+
+        n = l->next;
+        l->next = r;
+        r = l;
+        l = n;
+    }
+
+    return r;
+}

Modified: trunk/src/pulsecore/strlist.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/strlist.h?rev=1984&root=pulseaudio&r1=1983&r2=1984&view=diff
==============================================================================
--- trunk/src/pulsecore/strlist.h (original)
+++ trunk/src/pulsecore/strlist.h Mon Oct 29 21:30:15 2007
@@ -46,4 +46,7 @@
 /* Parse a whitespace separated server list */
 pa_strlist* pa_strlist_parse(const char *s);
 
+/* Reverse string list */
+pa_strlist *pa_strlist_reverse(pa_strlist *l);
+
 #endif




More information about the pulseaudio-commits mailing list