mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
Comment some more files
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@309 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
2fb83d13f2
commit
4763ca1376
45 changed files with 428 additions and 81 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#define WHITESPACE " \t\n"
|
||||
#define COMMENTS "#;\n"
|
||||
|
||||
/* Run the user supplied parser for an assignment */
|
||||
static int next_assignment(const char *filename, unsigned line, const struct pa_config_item *t, const char *lvalue, const char *rvalue, void *userdata) {
|
||||
assert(filename && t && lvalue && rvalue);
|
||||
|
||||
|
|
@ -44,6 +45,7 @@ static int next_assignment(const char *filename, unsigned line, const struct pa_
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Returns non-zero when c is contained in s */
|
||||
static int in_string(char c, const char *s) {
|
||||
assert(s);
|
||||
|
||||
|
|
@ -54,6 +56,8 @@ static int in_string(char c, const char *s) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Remove all whitepsapce from the beginning and the end of *s. *s may
|
||||
* be modified. */
|
||||
static char *strip(char *s) {
|
||||
char *b = s+strspn(s, WHITESPACE);
|
||||
char *e, *l = NULL;
|
||||
|
|
@ -68,6 +72,7 @@ static char *strip(char *s) {
|
|||
return b;
|
||||
}
|
||||
|
||||
/* Parse a variable assignment line */
|
||||
static int parse_line(const char *filename, unsigned line, const struct pa_config_item *t, char *l, void *userdata) {
|
||||
char *e, *c, *b = l+strspn(l, WHITESPACE);
|
||||
|
||||
|
|
@ -88,7 +93,7 @@ static int parse_line(const char *filename, unsigned line, const struct pa_confi
|
|||
return next_assignment(filename, line, t, strip(b), strip(e), userdata);
|
||||
}
|
||||
|
||||
|
||||
/* Go through the file and parse each line */
|
||||
int pa_config_parse(const char *filename, FILE *f, const struct pa_config_item *t, void *userdata) {
|
||||
int r = -1;
|
||||
unsigned line = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue