Improve error message
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user