From 4a2122eaf4bffdf7ebb012fe6348602d8e54ced0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Sep 2007 23:59:33 +0000 Subject: conf: improved boolean config parameter handling from -ke the force flag will issue FATAL() if an invalid value is specified git-svn-id: https://svn.musicpd.org/mpd/trunk@6857 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/conf.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/conf.h') diff --git a/src/conf.h b/src/conf.h index f5ef07525..01337d349 100644 --- a/src/conf.h +++ b/src/conf.h @@ -64,6 +64,9 @@ #define CONF_SAVE_ABSOLUTE_PATHS "save_absolute_paths_in_playlists" #define CONF_GAPLESS_MP3_PLAYBACK "gapless_mp3_playback" +#define CONF_BOOL_UNSET -1 +#define CONF_BOOL_INVALID -2 + typedef struct _BlockParam { char *name; char *value; @@ -90,10 +93,12 @@ ConfigParam *getNextConfigParam(char *name, ConfigParam * last); char *getConfigParamValue(char *name); -int getBoolConfigParam(char *name); - BlockParam *getBlockParam(ConfigParam * param, char *name); ConfigParam *parseConfigFilePath(char *name, int force); +int getBoolConfigParam(char *name, int force); + +int getBoolBlockParam(ConfigParam *param, char *name, int force); + #endif -- cgit v1.2.3