diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-07-22 21:23:46 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-07-22 21:23:46 +0200 |
commit | 9794094a5b3ac975d661643fc0bde6f6340ceafb (patch) | |
tree | c424182e73e4bea2cd7dd81c480b7250d906eb0a /main.c | |
parent | baa5edb354dddf921c6558b648a79d28eb2bc094 (diff) |
Geen Engelse foutmelding bij ongeldige opties
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) { |