conf: eliminated CamelCase
Renamed all remaining CamelCase functions.
This commit is contained in:
parent
5c5d39b012
commit
ddc2694419
24
src/conf.c
24
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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); \
|
||||
|
|
10
src/volume.c
10
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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue