conf: eliminated CamelCase

Renamed all remaining CamelCase functions.
This commit is contained in:
Max Kellermann 2009-06-03 06:55:04 +02:00
parent 5c5d39b012
commit ddc2694419
5 changed files with 24 additions and 23 deletions

View File

@ -70,7 +70,7 @@ static int get_bool(const char *value)
} }
struct config_param * 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); struct config_param *ret = g_new(struct config_param, 1);
@ -220,8 +220,8 @@ void config_global_init(void)
} }
void void
addBlockParam(struct config_param * param, const char *name, const char *value, config_add_block_param(struct config_param * param, const char *name,
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,
} }
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 = newConfigParam(NULL, *count); struct config_param *ret = config_new_param(NULL, *count);
int i; int i;
int numberOfArgs; int numberOfArgs;
@ -284,7 +284,7 @@ config_read_fileigBlock(FILE * fp, int *count, char *string)
*count, string, ret->line); *count, string, ret->line);
} }
addBlockParam(ret, array[0], array[1], *count); config_add_block_param(ret, array[0], array[1], *count);
} }
return ret; return ret;
@ -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_fileigBlock(fp, &count, string); param = config_read_block(fp, &count, string);
} else } else
param = newConfigParam(array[1], count); param = config_new_param(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)
} }
struct block_param * 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; struct block_param *ret = NULL;
int i; int i;
@ -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 = getBlockParam(param, name); struct block_param *bp = config_get_block_param(param, name);
if (bp == NULL) if (bp == NULL)
return default_value; return default_value;
@ -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 = getBlockParam(param, name); struct block_param *bp = config_get_block_param(param, name);
long value; long value;
char *endptr; char *endptr;
@ -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 = getBlockParam(param, name); struct block_param *bp = config_get_block_param(param, name);
int value; int value;
if (bp == NULL) if (bp == NULL)

View File

@ -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 *
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); 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); bool default_value);
struct config_param * struct config_param *
newConfigParam(const char *value, int line); config_new_param(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

View File

@ -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 = getBlockParam(param, name); \ block_param = config_get_block_param(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); \

View File

@ -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 = newConfigParam(NULL, param->line); output = config_new_param(NULL, param->line);
addBlockParam(output, "type", type, param->line); config_add_block_param(output, "type", type, param->line);
addBlockParam(output, "name", type, param->line); config_add_block_param(output, "name", type, param->line);
config_add_param(CONF_AUDIO_OUTPUT, output); config_add_param(CONF_AUDIO_OUTPUT, output);
} }
bp = getBlockParam(output, name); bp = config_get_block_param(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 */
addBlockParam(output, name, param->value, param->line); config_add_block_param(output, name, param->value, param->line);
} }
static void static void

View File

@ -74,8 +74,8 @@ int main(int argc, char **argv)
return 1; return 1;
} }
param = newConfigParam(NULL, -1); param = config_new_param(NULL, -1);
addBlockParam(param, "quality", "5.0", -1); config_add_block_param(param, "quality", "5.0", -1);
encoder = encoder_init(plugin, param, &error); encoder = encoder_init(plugin, param, &error);
if (encoder == NULL) { if (encoder == NULL) {