Mercurial > ~darius > hgwebdir.cgi > mikmod
comparison include/tdefs.h @ 10:55420dceb8e0
Initial entry of mikmod into the CVS tree.
author | darius |
---|---|
date | Fri, 23 Jan 1998 16:05:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:990c9dadb348 | 10:55420dceb8e0 |
---|---|
1 /* | |
2 TDEFS.H : Type definitions for the more commonly used type statements. | |
3 A 'shortened' version of MTYPES.H that has only what I use most. | |
4 | |
5 This module is my hidden secret of "portability" to many compilers | |
6 and platforms. I really love C sometimes.. ;) | |
7 */ | |
8 | |
9 | |
10 #ifndef TDEFS_H | |
11 #define TDEFS_H | |
12 | |
13 | |
14 /* | |
15 MikMod atomic types: | |
16 ==================== | |
17 */ | |
18 | |
19 typedef char CHAR; | |
20 | |
21 #ifdef __OS2__ | |
22 | |
23 typedef signed char SBYTE; /* has to be 1 byte signed */ | |
24 typedef unsigned char UBYTE; /* has to be 1 byte unsigned */ | |
25 typedef signed short SWORD; /* has to be 2 bytes signed */ | |
26 typedef unsigned short UWORD; /* has to be 2 bytes unsigned */ | |
27 typedef signed long SLONG; /* has to be 4 bytes signed */ | |
28 /* ULONG and BOOL are already defined in OS2.H */ | |
29 | |
30 #elif defined(__alpha) | |
31 | |
32 typedef signed char SBYTE; /* has to be 1 byte signed */ | |
33 typedef unsigned char UBYTE; /* has to be 1 byte unsigned */ | |
34 typedef signed short SWORD; /* has to be 2 bytes signed */ | |
35 typedef unsigned short UWORD; /* has to be 2 bytes unsigned */ | |
36 /* long is 8 bytes on dec alpha - RCA */ | |
37 typedef signed int SLONG; /* has to be 4 bytes signed */ | |
38 typedef unsigned int ULONG; /* has to be 4 bytes unsigned */ | |
39 typedef int BOOL; /* doesn't matter.. 0=FALSE, <>0 true */ | |
40 | |
41 #else | |
42 | |
43 typedef signed char SBYTE; /* has to be 1 byte signed */ | |
44 typedef unsigned char UBYTE; /* has to be 1 byte unsigned */ | |
45 typedef signed short SWORD; /* has to be 2 bytes signed */ | |
46 typedef unsigned short UWORD; /* has to be 2 bytes unsigned */ | |
47 typedef signed long SLONG; /* has to be 4 bytes signed */ | |
48 typedef unsigned long ULONG; /* has to be 4 bytes unsigned */ | |
49 typedef int BOOL; /* doesn't matter.. 0=FALSE, <>0 true */ | |
50 | |
51 #endif | |
52 | |
53 | |
54 #ifdef __OS2__ | |
55 #define INCL_DOS | |
56 #define INCL_MCIOS2 | |
57 #define INCL_MMIOOS2 | |
58 #include <os2.h> | |
59 #include <os2me.h> | |
60 #include <mmio.h> | |
61 #endif | |
62 | |
63 | |
64 #ifdef __WATCOMC__ | |
65 | |
66 typedef __int64 SDOUBLE; | |
67 typedef unsigned __int64 UDOUBLE; | |
68 | |
69 #define inportb(x) inp(x) | |
70 #define outportb(x,y) outp(x,y) | |
71 #define inport(x) inpw(x) | |
72 #define outport(x,y) outpw(x,y) | |
73 #define disable() _disable() | |
74 #define enable() _enable() | |
75 #endif | |
76 | |
77 #ifdef __BORLANDC__ | |
78 #define inp(x) inportb(x) | |
79 #define outp(x,y) outportb(x,y) | |
80 #define inpw(x) inport(x) | |
81 #define outpw(x,y) outport(x,y) | |
82 #define _disable() disable() | |
83 #define _enable() enable() | |
84 #endif | |
85 | |
86 #ifdef __DJGPP__ | |
87 #include <dpmi.h> | |
88 #include <go32.h> | |
89 #include <pc.h> | |
90 #define inp inportw | |
91 #define outport outportw | |
92 #define inport inportw | |
93 #define interrupt | |
94 #endif | |
95 | |
96 #if defined(__OS2__) | |
97 #define delay(x) DosSleep(x); | |
98 #elif defined(__WIN32__) | |
99 #define delay(x) Sleep(x); | |
100 #elif defined(__GNUC__) | |
101 #define delay(x) ; | |
102 #endif | |
103 | |
104 #endif | |
105 |