# HG changeset patch # User Matti Hamalainen # Date 1688232825 -10800 # Node ID 4744e64ffa3abee103af9d51db2d65b90ac3badf # Parent 1959ba53e9dc40c4c397149caf7ad108765e314d Whoops. s/ITEM_bool/ITEM_BOOL/g; s/PM_bool/PM_BOOL/g. diff -r 1959ba53e9dc -r 4744e64ffa3a th_config.c --- a/th_config.c Mon Feb 20 23:36:33 2023 +0200 +++ b/th_config.c Sat Jul 01 20:33:45 2023 +0300 @@ -127,7 +127,7 @@ int th_cfg_add_bool(th_cfgitem_t **cfg, const char *name, bool *itemData, bool defValue) { - th_cfgitem_t *node = th_cfg_add(cfg, name, ITEM_bool, (void *) itemData); + th_cfgitem_t *node = th_cfg_add(cfg, name, ITEM_BOOL, (void *) itemData); if (node == NULL) return THERR_MALLOC; @@ -189,7 +189,7 @@ PM_KEYSET, PM_STRING, PM_NUMERIC, - PM_bool, + PM_BOOL, PM_SECTION, PM_LIST, @@ -247,8 +247,8 @@ case ITEM_FLOAT: return PM_NUMERIC; - case ITEM_bool: - return PM_bool; + case ITEM_BOOL: + return PM_BOOL; case ITEM_SECTION: return PM_SECTION; @@ -304,7 +304,7 @@ *(item->v.val_float) = atof(str); break; - case ITEM_bool: + case ITEM_BOOL: res = th_get_boolean(str, item->v.val_bool); break; @@ -681,7 +681,7 @@ ctx.ch = -1; break; - case PM_bool: + case PM_BOOL: // Boolean parsing mode if (isStart) { @@ -775,7 +775,7 @@ case ITEM_INT: case ITEM_UINT: case ITEM_FLOAT: - case ITEM_bool: + case ITEM_BOOL: case ITEM_HEX_TRIPLET: return true; @@ -827,7 +827,7 @@ case ITEM_FLOAT: return thfprintf(fh, "%1.5f", *(item->v.val_float)); - case ITEM_bool: + case ITEM_BOOL: return thfprintf(fh, "%s", *(item->v.val_bool) ? "yes" : "no"); case ITEM_HEX_TRIPLET: diff -r 1959ba53e9dc -r 4744e64ffa3a th_config.h --- a/th_config.h Mon Feb 20 23:36:33 2023 +0200 +++ b/th_config.h Sat Jul 01 20:33:45 2023 +0300 @@ -28,7 +28,7 @@ ITEM_STRING, ITEM_INT, ITEM_UINT, - ITEM_bool, + ITEM_BOOL, ITEM_FLOAT, ITEM_HEX_TRIPLET,