]>
code.delx.au - pulseaudio/blob - src/tests/strlist-test.c
415c94e6afa4d715bc2cfbf35057dbc0b4cb0f5f
3 #include <polyp/xmalloc.h>
4 #include <polypcore/strlist.h>
5 #include <polypcore/gccmacro.h>
7 int main(PA_GCC_UNUSED
int argc
, PA_GCC_UNUSED
char* argv
[]) {
11 l
= pa_strlist_prepend(l
, "e");
12 l
= pa_strlist_prepend(l
, "d");
13 l
= pa_strlist_prepend(l
, "c");
14 l
= pa_strlist_prepend(l
, "b");
15 l
= pa_strlist_prepend(l
, "a");
17 t
= pa_strlist_tostring(l
);
20 fprintf(stderr
, "1: %s\n", t
);
22 l
= pa_strlist_parse(t
);
25 t
= pa_strlist_tostring(l
);
26 fprintf(stderr
, "2: %s\n", t
);
29 l
= pa_strlist_pop(l
, &u
);
30 fprintf(stderr
, "3: %s\n", u
);
33 l
= pa_strlist_remove(l
, "c");
35 t
= pa_strlist_tostring(l
);
36 fprintf(stderr
, "4: %s\n", t
);