return true;
}
+bool
+fw3_parse_include_type(void *ptr, const char *val)
+{
+ if (!strcmp(val, "script"))
+ *((enum fw3_include_type *)ptr) = FW3_INC_TYPE_SCRIPT;
+ else if (!strcmp(val, "restore"))
+ *((enum fw3_include_type *)ptr) = FW3_INC_TYPE_RESTORE;
+ else
+ return false;
+
+ return true;
+}
+
void
fw3_parse_options(void *s, const struct fw3_option *opts,
if (time->monthdays & 0xFFFFFFFE)
{
- fw3_pr(" %s--monthdays", (time->monthdays & 1) ? "! " : "");
+ fw3_pr(" %s--monthdays", hasbit(time->monthdays, 0) ? "! " : "");
for (i = 1, first = true; i < 32; i++)
{
if (time->weekdays & 0xFE)
{
- fw3_pr(" %s--weekdays", (time->weekdays & 1) ? "! " : "");
+ fw3_pr(" %s--weekdays", hasbit(time->weekdays, 0) ? "! " : "");
for (i = 1, first = true; i < 8; i++)
{