Attempt to close and reopen WB screen when font prefs are updated.
[cake.git] / test / strtodate.c
blob823ba82bdc8a96cf65e1c7d1609e9c19b179fc0f
1 #include <dos/datetime.h>
2 #include <dos/dos.h>
3 #include <proto/dos.h>
4 #include <string.h>
5 #include <stdio.h>
7 struct DateTime dt;
8 struct DateStamp ds;
9 char s[100];
11 LONG days = 0;
13 int main(void)
17 dt.dat_Stamp.ds_Days = days;
18 dt.dat_Format = FORMAT_DOS;
19 dt.dat_StrDate = s;
21 DateToStr(&dt);
23 dt.dat_Stamp.ds_Days = -1;
24 StrToDate(&dt);
26 //printf("date \"%s\" day = %ld\n", s, days);
28 if (dt.dat_Stamp.ds_Days != days)
30 printf("Bad results for date \"%s\" (day #%ld). "
31 "StrToDate thought it was day #%ld\n", s, days, dt.dat_Stamp.ds_Days);
34 days++;
36 } while (!CheckSignal(SIGBREAKF_CTRL_C) && (days < 365 * 300)); /* around 300 years */
38 return 0;