int main() { printf("%d\n", previous_day(Monday)); printf("%d\n", next_day(Sunday)); printf("%d %d", increment_day(Thursday, 4), increment_day(Monday, -4)); return 0; }
INLINE void CLU57813P::addretrace (void) { datetime.seconds++; if ( (datetime.seconds & 0x0f) < 10 ) return; datetime.seconds &= 0xf0; datetime.seconds += 0x10; if (datetime.seconds < 0x60) return; datetime.seconds = 0; datetime.minutes++; if ( (datetime.minutes & 0x0f) < 10 ) return; datetime.minutes &= 0xf0; datetime.minutes += 0x10; if (datetime.minutes < 0x60) return; datetime.minutes = 0; datetime.hours++; if ( (datetime.hours & 0x0f) < 10 ) return; datetime.hours &= 0xf0; datetime.hours += 0x10; if (datetime.hours < 0x24) return; datetime.hours = 0; increment_day(); }