aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-06-03 06:55:04 +0200
committerMax Kellermann <max@duempel.org>2009-06-03 06:55:04 +0200
commitddc2694419442b68eac4c04069c991ecd2fa26ee (patch)
tree005978160f38610f7cb40f2b554dc85fb501a9c6
parent5c5d39b0124027fdd6ad035d784cbea97e7fecb7 (diff)
downloadmpd-ddc2694419442b68eac4c04069c991ecd2fa26ee.tar.gz
mpd-ddc2694419442b68eac4c04069c991ecd2fa26ee.tar.xz
mpd-ddc2694419442b68eac4c04069c991ecd2fa26ee.zip
conf: eliminated CamelCase
Renamed all remaining CamelCase functions.
-rw-r--r--src/conf.c24
-rw-r--r--src/conf.h7
-rw-r--r--src/output/shout_plugin.c2
-rw-r--r--src/volume.c10
-rw-r--r--test/run_encoder.c4
5 files changed, 24 insertions, 23 deletions
diff --git a/src/conf.c b/src/conf.c
index 608b4804b..50d6bcba0 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -70,7 +70,7 @@ static int get_bool(const char *value)
}
struct config_param *
-newConfigParam(const char *value, int line)
+config_new_param(const char *value, int line)
{
struct config_param *ret = g_new(struct config_param, 1);
@@ -220,8 +220,8 @@ void config_global_init(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)
{
struct block_param *bp;
@@ -239,9 +239,9 @@ addBlockParam(struct config_param * param, const char *name, const char *value,
}
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 = newConfigParam(NULL, *count);
+ struct config_param *ret = config_new_param(NULL, *count);
int i;
int numberOfArgs;
@@ -284,7 +284,7 @@ config_read_fileigBlock(FILE * fp, int *count, char *string)
*count, string, ret->line);
}
- addBlockParam(ret, array[0], array[1], *count);
+ config_add_block_param(ret, array[0], array[1], *count);
}
return ret;
@@ -349,9 +349,9 @@ void config_read_file(const char *file)
g_error("improperly formatted config file at "
"line %i: %s\n", count, string);
}
- param = config_read_fileigBlock(fp, &count, string);
+ param = config_read_block(fp, &count, string);
} else
- param = newConfigParam(array[1], count);
+ param = config_new_param(array[1], count);
entry->params = g_slist_append(entry->params, param);
}
@@ -446,7 +446,7 @@ config_get_positive(const char *name, unsigned default_value)
}
struct block_param *
-getBlockParam(const struct config_param * param, const char *name)
+config_get_block_param(const struct config_param * param, const char *name)
{
struct block_param *ret = NULL;
int i;
@@ -492,7 +492,7 @@ const char *
config_get_block_string(const struct config_param *param, const char *name,
const char *default_value)
{
- struct block_param *bp = getBlockParam(param, name);
+ struct block_param *bp = config_get_block_param(param, name);
if (bp == NULL)
return default_value;
@@ -504,7 +504,7 @@ unsigned
config_get_block_unsigned(const struct config_param *param, const char *name,
unsigned default_value)
{
- struct block_param *bp = getBlockParam(param, name);
+ struct block_param *bp = config_get_block_param(param, name);
long value;
char *endptr;
@@ -525,7 +525,7 @@ bool
config_get_block_bool(const struct config_param *param, const char *name,
bool default_value)
{
- struct block_param *bp = getBlockParam(param, name);
+ struct block_param *bp = config_get_block_param(param, name);
int value;
if (bp == NULL)
diff --git a/src/conf.h b/src/conf.h
index 9f084013c..c67023a82 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -127,7 +127,7 @@ unsigned
config_get_positive(const char *name, unsigned default_value);
struct block_param *
-getBlockParam(const struct config_param *param, const char *name);
+config_get_block_param(const struct config_param *param, const char *name);
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,
bool default_value);
struct config_param *
-newConfigParam(const char *value, int line);
+config_new_param(const char *value, int line);
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
diff --git a/src/output/shout_plugin.c b/src/output/shout_plugin.c
index 2c195b091..8e091679e 100644
--- a/src/output/shout_plugin.c
+++ b/src/output/shout_plugin.c
@@ -98,7 +98,7 @@ static void free_shout_data(struct shout_data *sd)
}
#define check_block_param(name) { \
- block_param = getBlockParam(param, name); \
+ block_param = config_get_block_param(param, name); \
if (!block_param) { \
g_error("no \"%s\" defined for shout device defined at line " \
"%i\n", name, param->line); \
diff --git a/src/volume.c b/src/volume.c
index 9b1032294..e7fa20a62 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -111,20 +111,20 @@ mixer_copy_legacy_param(const char *type, const char *name)
it does not match the mixer_type setting */
g_error("no '%s' audio output found", type);
- output = newConfigParam(NULL, param->line);
- addBlockParam(output, "type", type, param->line);
- addBlockParam(output, "name", type, param->line);
+ output = config_new_param(NULL, param->line);
+ config_add_block_param(output, "type", type, param->line);
+ config_add_block_param(output, "name", type, param->line);
config_add_param(CONF_AUDIO_OUTPUT, output);
}
- bp = getBlockParam(output, name);
+ bp = config_get_block_param(output, name);
if (bp != NULL)
g_error("the '%s' audio output already has a '%s' setting",
type, name);
/* duplicate the parameter in the configuration section */
- addBlockParam(output, name, param->value, param->line);
+ config_add_block_param(output, name, param->value, param->line);
}
static void
diff --git a/test/run_encoder.c b/test/run_encoder.c
index 6b519d130..8cb1c6d1d 100644
--- a/test/run_encoder.c
+++ b/test/run_encoder.c
@@ -74,8 +74,8 @@ int main(int argc, char **argv)
return 1;
}
- param = newConfigParam(NULL, -1);
- addBlockParam(param, "quality", "5.0", -1);
+ param = config_new_param(NULL, -1);
+ config_add_block_param(param, "quality", "5.0", -1);
encoder = encoder_init(plugin, param, &error);
if (encoder == NULL) {