mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-14 06:59:53 -05:00
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
This commit is contained in:
parent
1a460ee40a
commit
521daf6f0a
283 changed files with 3742 additions and 3742 deletions
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
/***
|
||||
This file is part of PulseAudio.
|
||||
|
||||
|
||||
PulseAudio is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
|
||||
PulseAudio is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with PulseAudio; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
|
|
@ -59,14 +59,14 @@ static int is_valid_name(const char *name) {
|
|||
|
||||
if (*name == 0)
|
||||
return 0;
|
||||
|
||||
|
||||
for (c = name; *c && (c-name < PA_NAME_MAX); c++)
|
||||
if (!is_valid_char(*c))
|
||||
return 0;
|
||||
|
||||
if (*c)
|
||||
return 0;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ static char* cleanup_name(const char *name) {
|
|||
return NULL;
|
||||
|
||||
n = pa_xnew(char, strlen(name)+1);
|
||||
|
||||
|
||||
for (a = name, b = n; *a && (a-name < PA_NAME_MAX); a++, b++)
|
||||
*b = is_valid_char(*a) ? *a : '_';
|
||||
|
||||
|
|
@ -89,10 +89,10 @@ static char* cleanup_name(const char *name) {
|
|||
|
||||
void pa_namereg_free(pa_core *c) {
|
||||
assert(c);
|
||||
|
||||
|
||||
if (!c->namereg)
|
||||
return;
|
||||
|
||||
|
||||
assert(pa_hashmap_size(c->namereg) == 0);
|
||||
pa_hashmap_free(c->namereg, NULL, NULL);
|
||||
}
|
||||
|
|
@ -101,17 +101,17 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
|
|||
struct namereg_entry *e;
|
||||
char *n = NULL;
|
||||
int r;
|
||||
|
||||
|
||||
assert(c);
|
||||
assert(name);
|
||||
assert(data);
|
||||
|
||||
if (!*name)
|
||||
return NULL;
|
||||
|
||||
|
||||
if ((type == PA_NAMEREG_SINK || type == PA_NAMEREG_SOURCE) &&
|
||||
!is_valid_name(name) ) {
|
||||
|
||||
|
||||
if (fail)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -136,9 +136,9 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
|
|||
pa_xfree(n);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
k = pa_xnew(char, l+4);
|
||||
|
||||
|
||||
for (i = 2; i <= 99; i++) {
|
||||
snprintf(k, l+4, "%s.%u", name, i);
|
||||
|
||||
|
|
@ -151,11 +151,11 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
|
|||
pa_xfree(k);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
pa_xfree(n);
|
||||
n = k;
|
||||
}
|
||||
|
||||
|
||||
e = pa_xnew(struct namereg_entry, 1);
|
||||
e->type = type;
|
||||
e->name = n ? n : pa_xstrdup(name);
|
||||
|
|
@ -169,7 +169,7 @@ const char *pa_namereg_register(pa_core *c, const char *name, pa_namereg_type_t
|
|||
|
||||
void pa_namereg_unregister(pa_core *c, const char *name) {
|
||||
struct namereg_entry *e;
|
||||
|
||||
|
||||
assert(c);
|
||||
assert(name);
|
||||
|
||||
|
|
@ -184,26 +184,26 @@ void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, int a
|
|||
struct namereg_entry *e;
|
||||
uint32_t idx;
|
||||
assert(c);
|
||||
|
||||
|
||||
if (!name) {
|
||||
|
||||
|
||||
if (type == PA_NAMEREG_SOURCE)
|
||||
name = pa_namereg_get_default_source_name(c);
|
||||
else if (type == PA_NAMEREG_SINK)
|
||||
name = pa_namereg_get_default_sink_name(c);
|
||||
|
||||
|
||||
} else if (strcmp(name, "@DEFAULT_SINK@") == 0) {
|
||||
if (type == PA_NAMEREG_SINK)
|
||||
name = pa_namereg_get_default_sink_name(c);
|
||||
|
||||
|
||||
} else if (strcmp(name, "@DEFAULT_SOURCE@") == 0) {
|
||||
if (type == PA_NAMEREG_SOURCE)
|
||||
name = pa_namereg_get_default_source_name(c);
|
||||
|
||||
|
||||
} else if (strcmp(name, "@DEFAULT_MONITOR@") == 0) {
|
||||
if (type == PA_NAMEREG_SOURCE) {
|
||||
pa_sink *k;
|
||||
|
||||
|
||||
if ((k = pa_namereg_get(c, NULL, PA_NAMEREG_SINK, autoload)))
|
||||
return k->monitor_source;
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, int a
|
|||
|
||||
if (!name)
|
||||
return NULL;
|
||||
|
||||
|
||||
if (c->namereg && (e = pa_hashmap_get(c->namereg, name)))
|
||||
if (e->type == type)
|
||||
return e->data;
|
||||
|
|
@ -221,12 +221,12 @@ void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, int a
|
|||
|
||||
if (autoload) {
|
||||
pa_autoload_request(c, name, type);
|
||||
|
||||
|
||||
if (c->namereg && (e = pa_hashmap_get(c->namereg, name)))
|
||||
if (e->type == type)
|
||||
return e->data;
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type, int a
|
|||
|
||||
int pa_namereg_set_default(pa_core*c, const char *name, pa_namereg_type_t type) {
|
||||
char **s;
|
||||
|
||||
|
||||
assert(c);
|
||||
assert(type == PA_NAMEREG_SINK || type == PA_NAMEREG_SOURCE);
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ int pa_namereg_set_default(pa_core*c, const char *name, pa_namereg_type_t type)
|
|||
|
||||
if (!is_valid_name(name))
|
||||
return -1;
|
||||
|
||||
|
||||
pa_xfree(*s);
|
||||
*s = pa_xstrdup(name);
|
||||
pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SERVER|PA_SUBSCRIPTION_EVENT_CHANGE, PA_INVALID_INDEX);
|
||||
|
|
@ -266,12 +266,12 @@ int pa_namereg_set_default(pa_core*c, const char *name, pa_namereg_type_t type)
|
|||
|
||||
const char *pa_namereg_get_default_sink_name(pa_core *c) {
|
||||
pa_sink *s;
|
||||
|
||||
|
||||
assert(c);
|
||||
|
||||
if (c->default_sink_name)
|
||||
return c->default_sink_name;
|
||||
|
||||
|
||||
if ((s = pa_idxset_first(c->sinks, NULL)))
|
||||
pa_namereg_set_default(c, s->name, PA_NAMEREG_SINK);
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ const char *pa_namereg_get_default_sink_name(pa_core *c) {
|
|||
const char *pa_namereg_get_default_source_name(pa_core *c) {
|
||||
pa_source *s;
|
||||
uint32_t idx;
|
||||
|
||||
|
||||
assert(c);
|
||||
|
||||
if (c->default_source_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue