Propogate the ``call mktime'' flag from adjwday() down to adjday().

Submitted by: Christian Weisgerber <naddy@mips.inka.de>
This commit is contained in:
Brian Somers 2000-05-23 23:58:18 +00:00
parent 4a97e2b82b
commit 7ecff35b0d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60836

View File

@ -257,7 +257,7 @@ adjwday(struct tm *t, char type, int val, int istext, int mk)
val -= t->tm_wday; /* later this week */
else
val *= 7; /* "-v+5w" == "5 weeks in the future" */
return !val || adjday(t, '+', val, 0);
return !val || adjday(t, '+', val, mk);
case '-':
if (istext) {
if (val > t->tm_wday)
@ -266,14 +266,14 @@ adjwday(struct tm *t, char type, int val, int istext, int mk)
val = t->tm_wday - val; /* early this week */
} else
val *= 7; /* "-v-5w" == "5 weeks ago" */
return !val || adjday(t, '-', val, 0);
return !val || adjday(t, '-', val, mk);
default:
if (val < t->tm_wday)
return adjday(t, '-', t->tm_wday - val, 0);
return adjday(t, '-', t->tm_wday - val, mk);
else if (val > 6)
return 0;
else if (val > t->tm_wday)
return adjday(t, '+', val - t->tm_wday, 0);
return adjday(t, '+', val - t->tm_wday, mk);
}
return 1;
}