Lines Matching refs:rulep
143 static const char * getrule(const char * strp, struct rule * rulep);
174 static int_fast32_t transtime(int year, const struct rule * rulep,
780 getrule(const char *strp, register struct rule *const rulep) in getrule() argument
786 rulep->r_type = JULIAN_DAY; in getrule()
788 strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); in getrule()
793 rulep->r_type = MONTH_NTH_DAY_OF_WEEK; in getrule()
795 strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); in getrule()
800 strp = getnum(strp, &rulep->r_week, 1, 5); in getrule()
805 strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); in getrule()
810 rulep->r_type = DAY_OF_YEAR; in getrule()
811 strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); in getrule()
820 strp = getoffset(strp, &rulep->r_time); in getrule()
821 } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ in getrule()
831 transtime(const int year, register const struct rule *const rulep, in transtime() argument
841 switch (rulep->r_type) { in transtime()
851 value = (rulep->r_day - 1) * SECSPERDAY; in transtime()
852 if (leapyear && rulep->r_day >= 60) in transtime()
862 value = rulep->r_day * SECSPERDAY; in transtime()
874 m1 = (rulep->r_mon + 9) % 12 + 1; in transtime()
875 yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; in transtime()
888 d = rulep->r_day - dow; in transtime()
891 for (i = 1; i < rulep->r_week; ++i) { in transtime()
893 mon_lengths[leapyear][rulep->r_mon - 1]) in transtime()
902 for (i = 0; i < rulep->r_mon - 1; ++i) in transtime()
913 return value + rulep->r_time + offset; in transtime()