Lines Matching refs:spec
391 /* We reached the end of the weekday spec part */
711 int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
717 assert(spec);
883 *spec = c;
968 static int find_next(const CalendarSpec *spec, struct tm *tm, usec_t *usec) {
973 assert(spec);
981 mktime_or_timegm(&c, spec->utc);
985 r = find_matching_component(spec->year, &c.tm_year);
993 if (r < 0 || tm_out_of_bounds(&c, spec->utc))
997 r = find_matching_component(spec->month, &c.tm_mon);
1004 if (r < 0 || tm_out_of_bounds(&c, spec->utc)) {
1012 r = find_matching_component(spec->day, &c.tm_mday);
1015 if (r < 0 || tm_out_of_bounds(&c, spec->utc)) {
1022 if (!matches_weekday(spec->weekdays_bits, &c, spec->utc)) {
1028 r = find_matching_component(spec->hour, &c.tm_hour);
1031 if (r < 0 || tm_out_of_bounds(&c, spec->utc)) {
1037 r = find_matching_component(spec->minute, &c.tm_min);
1040 if (r < 0 || tm_out_of_bounds(&c, spec->utc)) {
1047 r = find_matching_component(spec->microsecond, &c.tm_sec);
1051 if (r < 0 || tm_out_of_bounds(&c, spec->utc)) {
1063 int calendar_spec_next_usec(const CalendarSpec *spec, usec_t usec, usec_t *next) {
1069 assert(spec);
1074 assert_se(localtime_or_gmtime_r(&t, &tm, spec->utc));
1077 r = find_next(spec, &tm, &tm_usec);
1081 t = mktime_or_timegm(&tm, spec->utc);