config-parser: Make get_bool be bool

Wayland innovated a lot of cool things, but non-binary boolean values is
the great advances of our time.

Make config_parser_get_bool() work on boolean values, and switch all its
users.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone
2019-11-26 00:14:24 +00:00
committed by Daniel Stone
parent 0a4f6e7d6d
commit 51d995ad82
7 changed files with 83 additions and 75 deletions
+2 -1
View File
@@ -30,6 +30,7 @@
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#define WESTON_CONFIG_FILE_ENV_VAR "WESTON_CONFIG_FILE"
@@ -102,7 +103,7 @@ weston_config_section_get_string(struct weston_config_section *section,
int
weston_config_section_get_bool(struct weston_config_section *section,
const char *key,
int *value, int default_value);
bool *value, bool default_value);
const char *
weston_config_get_name_from_env(void);