Lines Matching refs:current

142 days_in_month(struct tm *current, int offset /* -1, 0, 1 */ )
149 int year = current->tm_year;
150 int month = current->tm_mon + offset;
168 days_in_year(struct tm *current, int offset /* -1, 0, 1 */ )
170 int year = current->tm_year + 1900 + offset;
176 day_cell_number(struct tm *current)
179 cell = current->tm_mday - ((6 + current->tm_mday - current->tm_wday) % 7);
180 if ((current->tm_mday - 1) % 7 != current->tm_wday)
216 draw_day(BOX * data, struct tm *current)
221 int day = current->tm_mday;
224 int last = days_in_month(current, 0);
225 int prev = days_in_month(current, -1);
244 mday = ((6 + current->tm_mday - current->tm_wday) % 7) - 7;
248 week = (current->tm_yday + 6 + mday - current->tm_mday) / 7;
293 draw_month(BOX * data, struct tm *current)
297 month = current->tm_mon + 1;
317 draw_year(BOX * data, struct tm *current)
319 int year = current->tm_year + 1900;
381 #define DrawObject(data) (data)->box_draw(data, &current)
438 struct tm current;
452 current = *localtime(&now_time);
454 day = current.tm_mday;
456 month = current.tm_mon + 1;
458 year = current.tm_year + 1900;
464 if (year > current.tm_year) {
465 now_time += ONE_DAY * days_in_year(&current, 0);
466 } else if (year < current.tm_year) {
467 now_time -= ONE_DAY * days_in_year(&current, -1);
468 } else if (month > current.tm_mon + 1) {
469 now_time += ONE_DAY * days_in_month(&current, 0);
470 } else if (month < current.tm_mon + 1) {
471 now_time -= ONE_DAY * days_in_month(&current, -1);
472 } else if (day > current.tm_mday) {
474 } else if (day < current.tm_mday) {
479 current = *localtime(&now_time);
615 - day_cell_number(&current));
622 struct tm old = current;
630 days_in_month(&current, 0);
633 days_in_month(&current, -1);
637 * days_in_year(&current, 0));
640 * days_in_year(&current, -1));
643 current = *localtime(&now_time);
646 && (current.tm_mday != old.tm_mday
647 || current.tm_mon != old.tm_mon
648 || current.tm_year != old.tm_year))
650 if (obj != &mn_box && current.tm_mon != old.tm_mon)
652 if (obj != &yr_box && current.tm_year != old.tm_year)
675 &current);
677 DefaultFormat(buffer, current);
680 DefaultFormat(buffer, current);