summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-07-22 21:23:46 +0200
committerTom Smeding <tom@tomsmeding.com>2024-07-22 21:23:46 +0200
commit9794094a5b3ac975d661643fc0bde6f6340ceafb (patch)
treec424182e73e4bea2cd7dd81c480b7250d906eb0a /main.c
parentbaa5edb354dddf921c6558b648a79d28eb2bc094 (diff)
Geen Engelse foutmelding bij ongeldige opties
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index e251f5f..898c821 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
#define X(name) int entry_ ## name (int argc, char **argv);
PROGNAMES_XLIST
@@ -14,6 +15,9 @@ static char* basename(char *path) {
}
int main(int argc, char **argv) {
+ // Ensure getopt(3) does not print an (English) error
+ opterr = 0;
+
const char *prognamearg = basename(argv[0]);
if (strcmp(prognamearg, "drukkedoos") == 0) {