1 /* NetHack 3.6 def_os2.h $NHDT-Date: 1432512782 2015/05/25 00:13:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
2 /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993. */
3 /* NetHack may be freely redistributed. See license for details. */
6 * Only a small portion of all OS/2 defines are needed, so the
7 * actual include files often need not be used. In fact,
8 * including the full headers may stall the compile in DOS.
11 #ifdef OS2_USESYSHEADERS
14 #define INCL_DOSFILEMGR
25 typedef unsigned char UCHAR;
26 typedef unsigned short USHORT;
27 typedef unsigned int UINT;
28 typedef unsigned long ULONG;
29 typedef unsigned char BYTE;
33 typedef unsigned long SHANDLE;
37 #define CCHMAXPATHCOMP 256
40 #define API16 _Far16 _Pascal
43 #define KbdGetStatus KBD16GETSTATUS
44 #define KbdSetStatus KBD16SETSTATUS
45 #define KbdCharIn KBD16CHARIN
46 #define KbdPeek KBD16PEEK
47 #define VioGetMode VIO16GETMODE
48 #define VioSetCurPos VIO16SETCURPOS
57 #else /* OS2_32BITAPI */
59 typedef unsigned short SHANDLE;
63 #define CCHMAXPATHCOMP 13
66 #define API16 pascal far
72 #endif /* OS2_32BITAPI */
74 typedef USHORT *DAT16 PUSHORT;
75 typedef BYTE *DAT16 PBYTE;
76 typedef ULONG *DAT PULONG;
77 typedef VOID *DAT PVOID;
80 typedef HDIR *DAT PHDIR;
82 typedef char *DAT16 PCH;
83 typedef char *DAT PSZ;
85 /* all supported compilers understand this */
98 typedef KBDKEYINFO *DAT16 PKBDKEYINFO;
100 /* File time and date types */
117 ULONG oNextEntryOffset;
120 FDATE fdateLastAccess;
121 FTIME ftimeLastAccess;
122 FDATE fdateLastWrite;
123 FTIME ftimeLastWrite;
128 CHAR achName[CCHMAXPATHCOMP];
136 FDATE fdateLastAccess;
137 FTIME ftimeLastAccess;
138 FDATE fdateLastWrite;
139 FTIME ftimeLastWrite;
144 CHAR achName[CCHMAXPATHCOMP];
147 typedef FILEFINDBUF *DAT16 PFILEFINDBUF;
149 #endif /* OS2_32BITAPI */
167 typedef KBDINFO *DAT16 PKBDINFO;
182 ULONG partial_length;
186 typedef VIOMODEINFO *DAT16 PVIOMODEINFO;
190 /* OS2 API functions */
192 USHORT API16 KbdGetStatus(PKBDINFO, HKBD);
193 USHORT API16 KbdSetStatus(PKBDINFO, HKBD);
194 USHORT API16 KbdCharIn(PKBDKEYINFO, USHORT, HKBD);
195 USHORT API16 KbdPeek(PKBDKEYINFO, HKBD);
197 USHORT API16 VioGetMode(PVIOMODEINFO, HVIO);
198 USHORT API16 VioSetCurPos(USHORT, USHORT, HVIO);
201 ULONG API32 DosQueryFSInfo(ULONG, ULONG, PVOID, ULONG);
202 ULONG API32 DosFindFirst(PSZ, PHDIR, ULONG, PVOID, ULONG, PULONG, ULONG);
203 ULONG API32 DosFindNext(HDIR, PVOID, ULONG, PULONG);
204 ULONG API32 DosSetDefaultDisk(ULONG);
206 USHORT API16 DosQFSInfo(USHORT, USHORT, PBYTE, USHORT);
208 DosFindFirst(PSZ, PHDIR, USHORT, PFILEFINDBUF, USHORT, PUSHORT, ULONG);
209 USHORT API16 DosFindNext(HDIR, PFILEFINDBUF, USHORT, PUSHORT);
210 USHORT API16 DosSelectDisk(USHORT);
211 #endif /* OS2_32BITAPI */
213 #endif /* OS2_USESYSHEADERS */