/*
* snooze - run a command at a particular time
*
- * To the extent possible under law,
- * Christian Neukirchen <chneukirchen@gmail.com>
+ * To the extent possible under law, Leah Neukirchen <leah@vuxu.org>
* has waived all copyright and related or neighboring rights to this work.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-/*
-##% gcc -Os -Wall -g -o $STEM $FILE -Wextra -Wwrite-strings
-*/
-
#include <sys/stat.h>
#include <sys/types.h>
tm->tm_hour = 0;
t = mktime(tm);
- if (t > from+(365*24*60*60)) // no result within a year
+ if (t > from+(366*24*60*60)) // no result within a year
return -1;
}
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;