annotate include/tdefs.h @ 22:d9f79436e0af default tip

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