mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
new configuration subsystem
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@210 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
07d563d6c3
commit
63b35d002a
23 changed files with 626 additions and 231 deletions
17
polyp/util.c
17
polyp/util.c
|
|
@ -390,6 +390,23 @@ char *pa_split(const char *c, const char *delimiter, const char**state) {
|
|||
return pa_xstrndup(current, l);
|
||||
}
|
||||
|
||||
#define WHITESPACE " \t\n"
|
||||
|
||||
char *pa_split_spaces(const char *c, const char **state) {
|
||||
const char *current = *state ? *state : c;
|
||||
size_t l;
|
||||
|
||||
if (*current)
|
||||
return NULL;
|
||||
|
||||
current += strspn(current, WHITESPACE);
|
||||
l = strcspn(current, WHITESPACE);
|
||||
|
||||
*state = current+l;
|
||||
|
||||
return pa_xstrndup(current, l);
|
||||
}
|
||||
|
||||
const char *pa_strsignal(int sig) {
|
||||
switch(sig) {
|
||||
case SIGINT: return "SIGINT";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue