From: Leah Neukirchen Date: Tue, 29 Aug 2017 15:20:31 +0000 (+0200) Subject: use getopt with + hack to not reorder argv in glibc X-Git-Tag: v0.2~7 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=f8d0a870a9eaa2faaf11b7ebf947da9714976518;p=user%2Fhenk%2Fcode%2Fsnooze.git use getopt with + hack to not reorder argv in glibc --- diff --git a/snooze.c b/snooze.c index 2f4a6ec..0c49e24 100644 --- a/snooze.c +++ b/snooze.c @@ -242,7 +242,7 @@ int main(int argc, char *argv[]) minute[0] = '*'; second[0] = '*'; - while ((c = getopt(argc, argv, "D:W:H:M:S:T:R:d:m:ns:t:vw:")) != -1) + while ((c = getopt(argc, argv, "+D:W:H:M:S:T:R:d:m:ns:t:vw:")) != -1) switch(c) { case 'D': parse(optarg, dayofyear, sizeof dayofyear, -1); break; case 'W': parse(optarg, weekofyear, sizeof weekofyear, -1); break;