diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-05-25 13:15:00 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-05-25 13:15:00 -0700 |
commit | 9b6136a732114949be57d42ce358f7b3cc2f5bbf (patch) | |
tree | 151634aa9577dc9838ac7516dfa8e54b91c2be68 /src/til_args.c | |
parent | 3e3faa57e22610fa03050089b0e15c9df7fe832e (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/til_args.c')
-rw-r--r-- | src/til_args.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/til_args.c b/src/til_args.c index b010b04..e06d0d9 100644 --- a/src/til_args.c +++ b/src/til_args.c @@ -40,13 +40,13 @@ static int args_parse(int argc, const char *argv[], til_args_t *res_args, int *r /* this is intentionally being kept very simple, no new dependencies like getopt. */ for (int i = 1; i < argc; i++) { - if (!strncmp("--video=", argv[i], 8)) { + if (!strncasecmp("--video=", argv[i], 8)) { res_args->video = &argv[i][8]; - } else if (!strncmp("--module=", argv[i], 9)) { + } else if (!strncasecmp("--module=", argv[i], 9)) { res_args->module = &argv[i][9]; - } else if (!strcmp("--defaults", argv[i])) { + } else if (!strcasecmp("--defaults", argv[i])) { res_args->use_defaults = 1; - } else if (!strcmp("--help", argv[i])) { + } else if (!strcasecmp("--help", argv[i])) { res_args->help = 1; } else { if (!res_argv) |