Lines Matching refs:rulep
872 getrule(const char *strp, register struct rule *const rulep) in getrule() argument
878 rulep->r_type = JULIAN_DAY; in getrule()
880 strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); in getrule()
885 rulep->r_type = MONTH_NTH_DAY_OF_WEEK; in getrule()
887 strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); in getrule()
892 strp = getnum(strp, &rulep->r_week, 1, 5); in getrule()
897 strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); in getrule()
902 rulep->r_type = DAY_OF_YEAR; in getrule()
903 strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); in getrule()
912 strp = getoffset(strp, &rulep->r_time); in getrule()
913 } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ in getrule()
923 transtime(const int year, register const struct rule *const rulep, in transtime() argument
933 switch (rulep->r_type) { in transtime()
943 value = (rulep->r_day - 1) * SECSPERDAY; in transtime()
944 if (leapyear && rulep->r_day >= 60) in transtime()
954 value = rulep->r_day * SECSPERDAY; in transtime()
966 m1 = (rulep->r_mon + 9) % 12 + 1; in transtime()
967 yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; in transtime()
980 d = rulep->r_day - dow; in transtime()
983 for (i = 1; i < rulep->r_week; ++i) { in transtime()
985 mon_lengths[leapyear][rulep->r_mon - 1]) in transtime()
994 for (i = 0; i < rulep->r_mon - 1; ++i) in transtime()
1005 return value + rulep->r_time + offset; in transtime()