diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-10-29 20:30:15 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-10-29 20:30:15 +0000 |
commit | cc883852bc3c71e2c5c04177a6e4d29af18e2045 (patch) | |
tree | 5df8f4bf51ebdd6fb9b905bd779312e6778eb078 /src/pulsecore/strlist.c | |
parent | 87be85618ce0bca05a4776bf7154c34b010fb6e9 (diff) |
add new API pa_strlist_reverse()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1984 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/strlist.c')
-rw-r--r-- | src/pulsecore/strlist.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pulsecore/strlist.c b/src/pulsecore/strlist.c index 792af0ff..ac83f6b1 100644 --- a/src/pulsecore/strlist.c +++ b/src/pulsecore/strlist.c @@ -146,3 +146,18 @@ pa_strlist* pa_strlist_parse(const char *s) { 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; +} |