]> git.netwichtig.de Git - user/henk/code/snooze.git/commitdiff
use getopt with + hack to not reorder argv in glibc
authorLeah Neukirchen <leah@vuxu.org>
Tue, 29 Aug 2017 15:20:31 +0000 (17:20 +0200)
committerLeah Neukirchen <leah@vuxu.org>
Tue, 29 Aug 2017 15:20:31 +0000 (17:20 +0200)
snooze.c

index 2f4a6ec28a78a94d5ab3daba9a238e0bc1209713..0c49e240b5dc14823a44beda72882b9660c0baa2 100644 (file)
--- 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;