Improve error message

This commit is contained in:
2026-01-10 04:22:14 -08:00
parent a6e23534ee
commit 8f00012b28

View File

@ -149,7 +149,7 @@ int main(int argc, char *const *argv) {
} break; } break;
case ':': case ':':
if (isprint(optopt)) { if (isprint(optopt)) {
eprintf("option requires argument: -%c", optopt); eprintf("option requires argument: %c", optopt);
} else { } else {
eprintf("option requires argument: 0x%x", optopt); eprintf("option requires argument: 0x%x", optopt);
} }
@ -157,7 +157,7 @@ int main(int argc, char *const *argv) {
break; break;
case '?': case '?':
if (isprint(optopt)) { if (isprint(optopt)) {
eprintf("unknown option: -%c", optopt); eprintf("unknown option: %c", optopt);
} else { } else {
eprintf("unknown option: 0x%x", optopt); eprintf("unknown option: 0x%x", optopt);
} }