Subversion Repositories Kolibri OS

Rev

Rev 7666 | Rev 7701 | 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
 
93
#endif
94
 
7545 tsdima 95
char* strupr(char* s);
96
char* strlwr(char* s);
7700 leency 97
int stricmp(const char*, const char*);
98
int strnicmp(const char*, const char*, int);
7545 tsdima 99
 
6446 GerdtR 100
#ifdef _PORT_CPP_
101
 
102
long lseek (int, long, int);
103
char tolower(char c);
104
char toupper(char c);
105
 
106
char * getcwd (char *buffer, int size);
107
int 	stat (const char*, struct _stat*);
108
 
109
void exit(int);
110
 
111
void* malloc(int);
112
#endif //_PORT_CPP_
113
 
114
#ifdef __cplusplus
115
}
116
#endif
117
 
118
 
119
#endif  // ___PORT_H___