pulseaudio/src/tests/strlist-test.c
Pierre Ossman 521daf6f0a Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
mmmkay?


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00

42 lines
870 B
C

#include <stdio.h>
#include <pulse/xmalloc.h>
#include <pulsecore/strlist.h>
#include <pulsecore/gccmacro.h>
int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char* argv[]) {
char *t, *u;
pa_strlist *l = NULL;
l = pa_strlist_prepend(l, "e");
l = pa_strlist_prepend(l, "d");
l = pa_strlist_prepend(l, "c");
l = pa_strlist_prepend(l, "b");
l = pa_strlist_prepend(l, "a");
t = pa_strlist_tostring(l);
pa_strlist_free(l);
fprintf(stderr, "1: %s\n", t);
l = pa_strlist_parse(t);
pa_xfree(t);
t = pa_strlist_tostring(l);
fprintf(stderr, "2: %s\n", t);
pa_xfree(t);
l = pa_strlist_pop(l, &u);
fprintf(stderr, "3: %s\n", u);
pa_xfree(u);
l = pa_strlist_remove(l, "c");
t = pa_strlist_tostring(l);
fprintf(stderr, "4: %s\n", t);
pa_xfree(t);
pa_strlist_free(l);
return 0;
}