-
Notifications
You must be signed in to change notification settings - Fork 0
/
MTYPES.H
73 lines (57 loc) · 2.07 KB
/
MTYPES.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef MTYPES_H
#define MTYPES_H
/*
MikMod atomic types:
====================
*/
#ifdef __OS2__
typedef signed char SBYTE; /* has to be 1 byte signed */
typedef unsigned char UBYTE; /* has to be 1 byte unsigned */
typedef short SWORD; /* has to be 2 bytes signed */
typedef unsigned short UWORD; /* has to be 2 bytes unsigned */
typedef long SLONG; /* has to be 4 bytes signed */
/* ULONG and BOOL are already defined in OS2.H */
#elif defined(__alpha)
typedef char SBYTE; /* has to be 1 byte signed */
typedef unsigned char UBYTE; /* has to be 1 byte unsigned */
typedef short SWORD; /* has to be 2 bytes signed */
typedef unsigned short UWORD; /* has to be 2 bytes unsigned */
/* long is 8 bytes on dec alpha - RCA */
typedef int SLONG; /* has to be 4 bytes signed */
typedef unsigned int ULONG; /* has to be 4 bytes unsigned */
typedef int BOOL; /* doesn't matter.. 0=FALSE, <>0 true */
#else
typedef char SBYTE; /* has to be 1 byte signed */
typedef unsigned char UBYTE; /* has to be 1 byte unsigned */
typedef short SWORD; /* has to be 2 bytes signed */
typedef unsigned short UWORD; /* has to be 2 bytes unsigned */
typedef long SLONG; /* has to be 4 bytes signed */
typedef unsigned long ULONG; /* has to be 4 bytes unsigned */
typedef int BOOL; /* doesn't matter.. 0=FALSE, <>0 true */
#endif
#ifdef __OS2__
#define INCL_DOS
#define INCL_MCIOS2
#define INCL_MMIOOS2
#include <os2.h>
#include <os2me.h>
#include <mmio.h>
#endif
#ifdef __WATCOMC__
#define inportb(x) inp(x)
#define outportb(x,y) outp(x,y)
#define inport(x) inpw(x)
#define outport(x,y) outpw(x,y)
#define disable() _disable()
#define enable() _enable()
#endif
#ifdef __DJGPP__
#include <dpmi.h>
#include <go32.h>
#include <pc.h>
#define inp inportw
#define outport outportw
#define inport inportw
#define interrupt
#endif
#endif