📄 common.h
字号:
// common.h
//
// common definitions
#ifndef common_h
#define common_h
// basic type definitions.
typedef unsigned char byte;
typedef unsigned short int word;
typedef unsigned long dword;
typedef char * string;
// basic class for lptr's - pointers comprised of a segment and offset.
// the intention is that addresses are well defined within Borg. So comparison
// operators exist in a well defined way. Addresses are not converted to 32 bit
// equivalents or whatever for this.
class lptr //Pointer Struct 32-bit.
{ public:
word segm; //segment
dword offs; //offset
public:
lptr(){};
lptr(word seg,dword off);
~lptr(){};
void assign(word seg,dword off);
bool between(const lptr& lwb,const lptr& upb);
bool operator==(const lptr& loc2);
bool operator<=(const lptr& loc2);
bool operator>=(const lptr& loc2);
bool operator<(const lptr& loc2);
bool operator>(const lptr& loc2);
bool operator!=(const lptr& loc2);
lptr operator+(dword offs2);
lptr& operator++(int x);
lptr& operator+=(dword offs2);
lptr operator-(dword offs2);
dword operator-(lptr& loc2);
};
// predefined null pointer.
extern const lptr nlptr;
// basic support functions
void cleanstring(char *str);
void CenterWindow(HWND hdwnd);
void demangle(char **nme);
void getfiletoload(char *fname);
void getfiletosave(char *fname);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -