src/core/config/parser.c
/**
 * Here we will handle the creation of a simple boolean value of the form:
 *
 * "true" or "false"
 *
 * The casing of the above values does not matter, just that they are
 * alphabetically equal
 *
 * No other "falsey" values will be parsed as boolean.
 */
Here we will handle the creation of a simple boolean value of the form:
"true" or "false"

The casing of the above values does not matter, just that they are
alphabetically equal

No other "falsey" values will be parsed as boolean.
Here we will handle the creation of a simple boolean value of the form : " true " or " false " The casing of the above values does not matter just that they are alphabetically equal No other " falsey " values will be parsed as boolean .
static struct config_value *parser_parse_boolean(const struct parser *parser, char *value)
{
        bool boolean = false;
        enum natwm_error err = string_to_boolean(value, &boolean);
        if (err != NO_ERROR) {
                LOG_ERROR(natwm_logger,
                          "Invalid boolean value '%s' found - Line %zu",
                          value,
                          parser->line_num);
                return NULL;
        }
        struct config_value *config_value = config_value_create_boolean(boolean);
        if (config_value == NULL) {
                return NULL;
        }
        free(value);
        return config_value;
}
static struct config_value * parser_parse_boolean ( const struct parser * parser , char * value ) { bool boolean = false ; enum natwm_error err = string_to_boolean ( value , & boolean ) ; if ( err != NO_ERROR ) { LOG_ERROR ( natwm_logger , " " , value , parser -> line_num ) ; return NULL ; } struct config_value * config_value = config_value_create_boolean ( boolean ) ; if ( config_value == NULL ) { return NULL ; } free ( value ) ; return config_value ; }
Here we will handle the creation of a simple boolean value of the form:
 "true" or "false"
Here we will handle the creation of a simple boolean value of the form : " true " or " false "