Put the library close function back into miami.library's function table.
[AROS.git] / test / strtodate.c
blob260cb3bc602a184a86835cd38a25c006cd338eb6
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, (long)days, (long)dt.dat_Stamp.ds_Days);
34 days++;
36 } while (!CheckSignal(SIGBREAKF_CTRL_C) && (days < 365 * 300)); /* around 300 years */
38 return 0;