Rev 7700 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6446 | GerdtR | 1 | #ifndef ___PORT_H___ |
2 | #define ___PORT_H___ |
||
3 | |||
4 | #ifdef __cplusplus |
||
5 | extern "C" { |
||
6 | #endif |
||
7 | |||
8 | #define _BORLAND_DOS_REGS |
||
9 | |||
10 | struct DWORDREGS { |
||
11 | unsigned long edi; |
||
12 | unsigned long esi; |
||
13 | unsigned long ebp; |
||
14 | unsigned long cflag; |
||
15 | unsigned long ebx; |
||
16 | unsigned long edx; |
||
17 | unsigned long ecx; |
||
18 | unsigned long eax; |
||
19 | unsigned short eflags; |
||
20 | }; |
||
21 | struct DWORDREGS_W { |
||
22 | unsigned long di; |
||
23 | unsigned long si; |
||
24 | unsigned long bp; |
||
25 | unsigned long cflag; |
||
26 | unsigned long bx; |
||
27 | unsigned long dx; unsigned long cx; |
||
28 | unsigned long ax; |
||
29 | unsigned short flags; |
||
30 | }; |
||
31 | |||
32 | struct WORDREGS { |
||
33 | unsigned short di, _upper_di; |
||
34 | unsigned short si, _upper_si; |
||
35 | unsigned short bp, _upper_bp; |
||
36 | unsigned short cflag, _upper_cflag; |
||
37 | unsigned short bx, _upper_bx; |
||
38 | unsigned short dx, _upper_dx; |
||
39 | unsigned short cx, _upper_cx; |
||
40 | unsigned short ax, _upper_ax; |
||
41 | unsigned short flags; |
||
42 | }; |
||
43 | |||
44 | struct BYTEREGS { |
||
45 | unsigned short di, _upper_di; |
||
46 | unsigned short si, _upper_si; |
||
47 | unsigned short bp, _upper_bp; |
||
48 | unsigned long cflag; |
||
49 | unsigned char bl; |
||
50 | unsigned char bh; |
||
51 | unsigned short _upper_bx; |
||
52 | unsigned char dl; |
||
53 | unsigned char dh; |
||
54 | unsigned short _upper_dx; |
||
55 | unsigned char cl; |
||
56 | unsigned char ch; |
||
57 | unsigned short _upper_cx; |
||
58 | unsigned char al; |
||
59 | unsigned char ah; |
||
60 | unsigned short _upper_ax; |
||
61 | unsigned short flags; |
||
62 | }; |
||
63 | |||
64 | union REGS { |
||
65 | struct DWORDREGS d; |
||
66 | #ifdef _NAIVE_DOS_REGS |
||
67 | struct WORDREGS x; |
||
68 | #else |
||
69 | #ifdef _BORLAND_DOS_REGS |
||
70 | struct DWORDREGS x; |
||
71 | #else |
||
72 | struct DWORDREGS_W x; |
||
73 | #endif |
||
74 | #endif |
||
75 | struct WORDREGS w; |
||
76 | struct BYTEREGS h; |
||
77 | }; |
||
78 | |||
79 | |||
80 | long getfilelen(int); |
||
81 | |||
82 | #ifndef _WIN32_ |
||
83 | #define CP_ACP 0 |
||
84 | #define MB_PRECOMPOSED 1 |
||
85 | #define OemToChar OemToCharA |
||
86 | #define CharToOem CharToOemA |
||
87 | |||
88 | |||
89 | bool OemToCharA(char*, char*); |
||
90 | bool CharToOemA(char*, char*); |
||
91 | int MultiByteToWideChar(unsigned int,unsigned int,char*,int,wchar_t *,int); |
||
92 | |||
7701 | leency | 93 | #else |
94 | |||
95 | int stricmp(const char*, const char*); //Leency |
||
96 | int strnicmp(const char*, const char*, int); //Leency |
||
97 | |||
6446 | GerdtR | 98 | #endif |
99 | |||
7545 | tsdima | 100 | char* strupr(char* s); |
101 | char* strlwr(char* s); |
||
7701 | leency | 102 | //int stricmp(const char*, const char*); //Leency |
103 | //int strnicmp(const char*, const char*, int); //Leency |
||
7545 | tsdima | 104 | |
6446 | GerdtR | 105 | #ifdef _PORT_CPP_ |
106 | |||
107 | long lseek (int, long, int); |
||
108 | char tolower(char c); |
||
109 | char toupper(char c); |
||
110 | |||
111 | char * getcwd (char *buffer, int size); |
||
112 | int stat (const char*, struct _stat*); |
||
113 | |||
114 | void exit(int); |
||
115 | |||
116 | void* malloc(int); |
||
117 | #endif //_PORT_CPP_ |
||
118 | |||
119 | #ifdef __cplusplus |
||
120 | } |
||
121 | #endif |
||
122 | |||
123 | |||
124 | #endif // ___PORT_H___ |