summaryrefslogtreecommitdiff
path: root/src/modules/checkers
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-05-25 13:15:00 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-05-25 13:15:00 -0700
commit9b6136a732114949be57d42ce358f7b3cc2f5bbf (patch)
tree151634aa9577dc9838ac7516dfa8e54b91c2be68 /src/modules/checkers
parent3e3faa57e22610fa03050089b0e15c9df7fe832e (diff)
*: normalize on all case-insensitive comparisons
I don't think rototiller is an appropriate place for being so uncooperative, if someone gets the case wrong anywhere just make it work. We should avoid making different things so subtly different that case alone is the distinction anyways, so I don't see this creating any future namespace collision problems.
Diffstat (limited to 'src/modules/checkers')
-rw-r--r--src/modules/checkers/checkers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/checkers/checkers.c b/src/modules/checkers/checkers.c
index 56037fa..e911089 100644
--- a/src/modules/checkers/checkers.c
+++ b/src/modules/checkers/checkers.c
@@ -259,22 +259,22 @@ static int checkers_setup(const til_settings_t *settings, til_setting_t **res_se
sscanf(size, "%u", &setup->size);
- if (!strcmp(pattern, "checkered"))
+ if (!strcasecmp(pattern, "checkered"))
setup->pattern = CHECKERS_PATTERN_CHECKERED;
- else if (!strcmp(pattern, "random"))
+ else if (!strcasecmp(pattern, "random"))
setup->pattern = CHECKERS_PATTERN_RANDOM;
else {
free(setup);
return -EINVAL;
}
- if (!strcmp(dynamics, "odd"))
+ if (!strcasecmp(dynamics, "odd"))
setup->dynamics = CHECKERS_DYNAMICS_ODD;
- else if (!strcmp(dynamics, "even"))
+ else if (!strcasecmp(dynamics, "even"))
setup->dynamics = CHECKERS_DYNAMICS_EVEN;
- else if (!strcmp(dynamics, "alternating"))
+ else if (!strcasecmp(dynamics, "alternating"))
setup->dynamics = CHECKERS_DYNAMICS_ALTERNATING;
- else if (!strcmp(dynamics, "random"))
+ else if (!strcasecmp(dynamics, "random"))
setup->dynamics = CHECKERS_DYNAMICS_RANDOM;
else {
free(setup);
© All Rights Reserved