1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2 #ifndef __dj_include_h_
3 #define __dj_include_h_
5 #ifndef __dj_ENFORCE_ANSI_FREESTANDING
7 #ifndef __STRICT_ANSI__
14 unsigned ft_tsec:5; /* 0-29, double to get real seconds */
15 unsigned ft_min:6; /* 0-59 */
16 unsigned ft_hour:5; /* 0-23 */
17 unsigned ft_day:5; /* 1-31 */
18 unsigned ft_month:4; /* 1-12 */
19 unsigned ft_year:7; /* since 1980 */
30 unsigned char ti_hour;
31 unsigned char ti_hund;
46 extern unsigned short _osmajor, _osminor;
47 extern const char * _os_flavor;
49 unsigned short _get_version(int);
54 int getftime(int handle, struct ftime *ftimep);
55 int setftime(int handle, struct ftime *ftimep);
58 int setcbrk(int new_value);
60 void getdate(struct date *);
61 void gettime(struct time *);
62 void setdate(struct date *);
63 void settime(struct time *);
65 void getdfree(unsigned char drive, struct dfree *ptr);
67 void delay(unsigned msec);
68 /* int _get_default_drive(void);
69 void _fixpath(const char *, char *); */
73 * For compatibility with other DOS C compilers.
76 #define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
77 #define _A_RDONLY 0x01 /* Read only file */
78 #define _A_HIDDEN 0x02 /* Hidden file */
79 #define _A_SYSTEM 0x04 /* System file */
80 #define _A_VOLID 0x08 /* Volume ID file */
81 #define _A_SUBDIR 0x10 /* Subdirectory */
82 #define _A_ARCH 0x20 /* Archive file */
84 #define _enable enable
85 #define _disable disable
88 unsigned char day; /* 1-31 */
89 unsigned char month; /* 1-12 */
90 unsigned short year; /* 1980-2099 */
91 unsigned char dayofweek; /* 0-6, 0=Sunday */
93 #define dosdate_t date_t
96 unsigned char hour; /* 0-23 */
97 unsigned char minute; /* 0-59 */
98 unsigned char second; /* 0-59 */
99 unsigned char hsecond; /* 0-99 */
101 #define dostime_t time_t
105 #define finddata_t _finddata_t
108 #define diskfree_t _diskfree_t
120 #define DOSERROR _DOSERROR
125 void _getdate(struct date_t *_date);
126 unsigned int _setdate(struct date_t *_date);
127 void _gettime(struct time_t *_time);
128 unsigned int _settime(struct time_t *_time);
130 unsigned int _getftime(int _handle, unsigned int *_p_date, unsigned int *_p_time);
131 unsigned int _setftime(int _handle, unsigned int _date, unsigned int _time);
132 unsigned int _getfileattr(const char *_filename, unsigned int *_p_attr);
133 unsigned int _setfileattr(const char *_filename, unsigned int _attr);
136 void _setdrive(unsigned int _drive, unsigned int *_p_drives);
139 int exterr(struct _DOSERROR *_p_error);
140 #define dosexterr(_ep) exterr(_ep)
142 #include <crtdll/direct.h>
144 #define int386(_i, _ir, _or) int86(_i, _ir, _or)
145 #define int386x(_i, _ir, _or, _sr) int86x(_i, _ir, _or, _sr)
151 #endif /* !_POSIX_SOURCE */
152 #endif /* !__STRICT_ANSI__ */
153 #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
155 #ifndef __dj_ENFORCE_FUNCTION_CALLS
156 #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
158 #endif /* !__dj_include_h_ */