Use UpperMap for rgblink -S scramble spec matching

This also makes invalid RGBLINK CLI options into fatal errors
like the other programs
This commit is contained in:
Rangi42
2025-07-29 03:37:32 -04:00
parent cecbf0aa0e
commit 308d488833
5 changed files with 100 additions and 142 deletions

View File

@@ -103,17 +103,6 @@ void errorNoDump(char const *fmt, ...) {
warnings.incrementErrors();
}
void argError(char flag, char const *fmt, ...) {
va_list args;
fprintf(stderr, "error: Invalid argument for option '%c': ", flag);
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
putc('\n', stderr);
warnings.incrementErrors();
}
void scriptError(char const *name, uint32_t lineNo, char const *fmt, va_list args) {
fprintf(stderr, "error: %s(%" PRIu32 "): ", name, lineNo);
vfprintf(stderr, fmt, args);