Tabs to spaces.
[AROS.git] / test / dos / strtodate.c
blobdec844933e745898f8d115e4b9cfea65728a1523
1 /*
2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <dos/datetime.h>
7 #include <dos/dos.h>
8 #include <proto/dos.h>
9 #include <string.h>
10 #include <stdio.h>
12 struct DateTime dt;
13 struct DateStamp ds;
14 char s[100];
16 LONG days = 0;
18 int main(void)
22 dt.dat_Stamp.ds_Days = days;
23 dt.dat_Format = FORMAT_DOS;
24 dt.dat_StrDate = s;
26 DateToStr(&dt);
28 dt.dat_Stamp.ds_Days = -1;
29 StrToDate(&dt);
31 //printf("date \"%s\" day = %ld\n", s, days);
33 if (dt.dat_Stamp.ds_Days != days)
35 printf("Bad results for date \"%s\" (day #%ld). "
36 "StrToDate thought it was day #%ld\n", s, (long)days,
37 (long)dt.dat_Stamp.ds_Days);
40 days++;
43 while (!CheckSignal(SIGBREAKF_CTRL_C) && (days < 36525));
44 /* 2078-01-01: same as 1978 in FORMAT_DOS */
46 return 0;