Commit 71eff460983c1d6d06bb7d9b74f5331a2980fb59

Con Kolivas 2011-09-01T23:18:31

Mingw32 doesn't support strptime so use sscanf.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/main.c b/main.c
index 8b483bd..5ca38b5 100644
--- a/main.c
+++ b/main.c
@@ -1095,7 +1095,7 @@ static char *enable_debug(bool *flag)
 
 static char *set_schedtime(const char *arg, struct schedtime *st)
 {
-	if (!strptime(arg, "%H:%M", &st->tm))
+	if (sscanf(arg, "%d:%d", &st->tm.tm_hour, &st->tm.tm_min) != 2)
 		return "Invalid time set, should be HH:MM";
 	st->enable = true;
 	return NULL;