Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ddc26944
Commit
ddc26944
authored
Jun 03, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: eliminated CamelCase
Renamed all remaining CamelCase functions.
parent
5c5d39b0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
23 deletions
+24
-23
conf.c
src/conf.c
+12
-12
conf.h
src/conf.h
+4
-3
shout_plugin.c
src/output/shout_plugin.c
+1
-1
volume.c
src/volume.c
+5
-5
run_encoder.c
test/run_encoder.c
+2
-2
No files found.
src/conf.c
View file @
ddc26944
...
@@ -70,7 +70,7 @@ static int get_bool(const char *value)
...
@@ -70,7 +70,7 @@ static int get_bool(const char *value)
}
}
struct
config_param
*
struct
config_param
*
newConfigP
aram
(
const
char
*
value
,
int
line
)
config_new_p
aram
(
const
char
*
value
,
int
line
)
{
{
struct
config_param
*
ret
=
g_new
(
struct
config_param
,
1
);
struct
config_param
*
ret
=
g_new
(
struct
config_param
,
1
);
...
@@ -220,8 +220,8 @@ void config_global_init(void)
...
@@ -220,8 +220,8 @@ void config_global_init(void)
}
}
void
void
addBlockParam
(
struct
config_param
*
param
,
const
char
*
name
,
const
char
*
valu
e
,
config_add_block_param
(
struct
config_param
*
param
,
const
char
*
nam
e
,
int
line
)
const
char
*
value
,
int
line
)
{
{
struct
block_param
*
bp
;
struct
block_param
*
bp
;
...
@@ -239,9 +239,9 @@ addBlockParam(struct config_param * param, const char *name, const char *value,
...
@@ -239,9 +239,9 @@ addBlockParam(struct config_param * param, const char *name, const char *value,
}
}
static
struct
config_param
*
static
struct
config_param
*
config_read_
fileigBlock
(
FILE
*
fp
,
int
*
count
,
char
*
string
)
config_read_
block
(
FILE
*
fp
,
int
*
count
,
char
*
string
)
{
{
struct
config_param
*
ret
=
newConfigP
aram
(
NULL
,
*
count
);
struct
config_param
*
ret
=
config_new_p
aram
(
NULL
,
*
count
);
int
i
;
int
i
;
int
numberOfArgs
;
int
numberOfArgs
;
...
@@ -284,7 +284,7 @@ config_read_fileigBlock(FILE * fp, int *count, char *string)
...
@@ -284,7 +284,7 @@ config_read_fileigBlock(FILE * fp, int *count, char *string)
*
count
,
string
,
ret
->
line
);
*
count
,
string
,
ret
->
line
);
}
}
addBlockP
aram
(
ret
,
array
[
0
],
array
[
1
],
*
count
);
config_add_block_p
aram
(
ret
,
array
[
0
],
array
[
1
],
*
count
);
}
}
return
ret
;
return
ret
;
...
@@ -349,9 +349,9 @@ void config_read_file(const char *file)
...
@@ -349,9 +349,9 @@ void config_read_file(const char *file)
g_error
(
"improperly formatted config file at "
g_error
(
"improperly formatted config file at "
"line %i: %s
\n
"
,
count
,
string
);
"line %i: %s
\n
"
,
count
,
string
);
}
}
param
=
config_read_
fileigB
lock
(
fp
,
&
count
,
string
);
param
=
config_read_
b
lock
(
fp
,
&
count
,
string
);
}
else
}
else
param
=
newConfigP
aram
(
array
[
1
],
count
);
param
=
config_new_p
aram
(
array
[
1
],
count
);
entry
->
params
=
g_slist_append
(
entry
->
params
,
param
);
entry
->
params
=
g_slist_append
(
entry
->
params
,
param
);
}
}
...
@@ -446,7 +446,7 @@ config_get_positive(const char *name, unsigned default_value)
...
@@ -446,7 +446,7 @@ config_get_positive(const char *name, unsigned default_value)
}
}
struct
block_param
*
struct
block_param
*
getBlockP
aram
(
const
struct
config_param
*
param
,
const
char
*
name
)
config_get_block_p
aram
(
const
struct
config_param
*
param
,
const
char
*
name
)
{
{
struct
block_param
*
ret
=
NULL
;
struct
block_param
*
ret
=
NULL
;
int
i
;
int
i
;
...
@@ -492,7 +492,7 @@ const char *
...
@@ -492,7 +492,7 @@ const char *
config_get_block_string
(
const
struct
config_param
*
param
,
const
char
*
name
,
config_get_block_string
(
const
struct
config_param
*
param
,
const
char
*
name
,
const
char
*
default_value
)
const
char
*
default_value
)
{
{
struct
block_param
*
bp
=
getBlockP
aram
(
param
,
name
);
struct
block_param
*
bp
=
config_get_block_p
aram
(
param
,
name
);
if
(
bp
==
NULL
)
if
(
bp
==
NULL
)
return
default_value
;
return
default_value
;
...
@@ -504,7 +504,7 @@ unsigned
...
@@ -504,7 +504,7 @@ unsigned
config_get_block_unsigned
(
const
struct
config_param
*
param
,
const
char
*
name
,
config_get_block_unsigned
(
const
struct
config_param
*
param
,
const
char
*
name
,
unsigned
default_value
)
unsigned
default_value
)
{
{
struct
block_param
*
bp
=
getBlockP
aram
(
param
,
name
);
struct
block_param
*
bp
=
config_get_block_p
aram
(
param
,
name
);
long
value
;
long
value
;
char
*
endptr
;
char
*
endptr
;
...
@@ -525,7 +525,7 @@ bool
...
@@ -525,7 +525,7 @@ bool
config_get_block_bool
(
const
struct
config_param
*
param
,
const
char
*
name
,
config_get_block_bool
(
const
struct
config_param
*
param
,
const
char
*
name
,
bool
default_value
)
bool
default_value
)
{
{
struct
block_param
*
bp
=
getBlockP
aram
(
param
,
name
);
struct
block_param
*
bp
=
config_get_block_p
aram
(
param
,
name
);
int
value
;
int
value
;
if
(
bp
==
NULL
)
if
(
bp
==
NULL
)
...
...
src/conf.h
View file @
ddc26944
...
@@ -127,7 +127,7 @@ unsigned
...
@@ -127,7 +127,7 @@ unsigned
config_get_positive
(
const
char
*
name
,
unsigned
default_value
);
config_get_positive
(
const
char
*
name
,
unsigned
default_value
);
struct
block_param
*
struct
block_param
*
getBlockP
aram
(
const
struct
config_param
*
param
,
const
char
*
name
);
config_get_block_p
aram
(
const
struct
config_param
*
param
,
const
char
*
name
);
bool
config_get_bool
(
const
char
*
name
,
bool
default_value
);
bool
config_get_bool
(
const
char
*
name
,
bool
default_value
);
...
@@ -151,9 +151,10 @@ config_get_block_bool(const struct config_param *param, const char *name,
...
@@ -151,9 +151,10 @@ config_get_block_bool(const struct config_param *param, const char *name,
bool
default_value
);
bool
default_value
);
struct
config_param
*
struct
config_param
*
newConfigP
aram
(
const
char
*
value
,
int
line
);
config_new_p
aram
(
const
char
*
value
,
int
line
);
void
void
addBlockParam
(
struct
config_param
*
param
,
const
char
*
name
,
const
char
*
value
,
int
line
);
config_add_block_param
(
struct
config_param
*
param
,
const
char
*
name
,
const
char
*
value
,
int
line
);
#endif
#endif
src/output/shout_plugin.c
View file @
ddc26944
...
@@ -98,7 +98,7 @@ static void free_shout_data(struct shout_data *sd)
...
@@ -98,7 +98,7 @@ static void free_shout_data(struct shout_data *sd)
}
}
#define check_block_param(name) { \
#define check_block_param(name) { \
block_param =
getBlockP
aram(param, name); \
block_param =
config_get_block_p
aram(param, name); \
if (!block_param) { \
if (!block_param) { \
g_error("no \"%s\" defined for shout device defined at line " \
g_error("no \"%s\" defined for shout device defined at line " \
"%i\n", name, param->line); \
"%i\n", name, param->line); \
...
...
src/volume.c
View file @
ddc26944
...
@@ -111,20 +111,20 @@ mixer_copy_legacy_param(const char *type, const char *name)
...
@@ -111,20 +111,20 @@ mixer_copy_legacy_param(const char *type, const char *name)
it does not match the mixer_type setting */
it does not match the mixer_type setting */
g_error
(
"no '%s' audio output found"
,
type
);
g_error
(
"no '%s' audio output found"
,
type
);
output
=
newConfigP
aram
(
NULL
,
param
->
line
);
output
=
config_new_p
aram
(
NULL
,
param
->
line
);
addBlockP
aram
(
output
,
"type"
,
type
,
param
->
line
);
config_add_block_p
aram
(
output
,
"type"
,
type
,
param
->
line
);
addBlockP
aram
(
output
,
"name"
,
type
,
param
->
line
);
config_add_block_p
aram
(
output
,
"name"
,
type
,
param
->
line
);
config_add_param
(
CONF_AUDIO_OUTPUT
,
output
);
config_add_param
(
CONF_AUDIO_OUTPUT
,
output
);
}
}
bp
=
getBlockP
aram
(
output
,
name
);
bp
=
config_get_block_p
aram
(
output
,
name
);
if
(
bp
!=
NULL
)
if
(
bp
!=
NULL
)
g_error
(
"the '%s' audio output already has a '%s' setting"
,
g_error
(
"the '%s' audio output already has a '%s' setting"
,
type
,
name
);
type
,
name
);
/* duplicate the parameter in the configuration section */
/* duplicate the parameter in the configuration section */
addBlockP
aram
(
output
,
name
,
param
->
value
,
param
->
line
);
config_add_block_p
aram
(
output
,
name
,
param
->
value
,
param
->
line
);
}
}
static
void
static
void
...
...
test/run_encoder.c
View file @
ddc26944
...
@@ -74,8 +74,8 @@ int main(int argc, char **argv)
...
@@ -74,8 +74,8 @@ int main(int argc, char **argv)
return
1
;
return
1
;
}
}
param
=
newConfigP
aram
(
NULL
,
-
1
);
param
=
config_new_p
aram
(
NULL
,
-
1
);
addBlockP
aram
(
param
,
"quality"
,
"5.0"
,
-
1
);
config_add_block_p
aram
(
param
,
"quality"
,
"5.0"
,
-
1
);
encoder
=
encoder_init
(
plugin
,
param
,
&
error
);
encoder
=
encoder_init
(
plugin
,
param
,
&
error
);
if
(
encoder
==
NULL
)
{
if
(
encoder
==
NULL
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment