fixes
This commit is contained in:
@@ -38,11 +38,14 @@
|
||||
// ------------------------------------------------------------------
|
||||
// Define portability and shorthand notation
|
||||
|
||||
// GCC after 2.95.x have "and", "not", and "or" predefined
|
||||
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
|
||||
#ifndef and
|
||||
#define not !
|
||||
#define and &&
|
||||
#define or ||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef true
|
||||
#define true 1
|
||||
|
@@ -1189,7 +1189,7 @@ gkey kbxget_raw(int mode) {
|
||||
|
||||
if(alt_pressed)
|
||||
special_key = is_numpad_key(inp); // Alt-<numpad key>
|
||||
else if(not gkbd_nt and not (CKS & ENHANCED_KEY) and (ascii and not ctrl_pressed) and not (iscntrl(ascii) and shift_pressed))
|
||||
else if(not gkbd_nt and not (CKS & ENHANCED_KEY) and not (VKC == VK_CLEAR) and (ascii and not ctrl_pressed) and not (iscntrl(ascii) and shift_pressed))
|
||||
special_key = true; // It is alphanumeric key under Win9x
|
||||
if(special_key) {
|
||||
ReadConsole(gkbd_hin, &ascii, 1, &nread, NULL);
|
||||
|
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <gdefs.h>
|
||||
#include <gstrall.h>
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@@ -484,7 +485,7 @@ typedef ftn_attr Attr;
|
||||
|
||||
inline void AttrAdd(Attr* a, Attr* b) { a->add(*b); }
|
||||
inline void GetAttribstr(Attr* attr, const char* attrs) { attr->get(attrs); }
|
||||
inline char* MakeAttrStr(char* str, const Attr* attr) { string tmp; attr->make_string(tmp); strcpy(str, tmp.c_str()); return str; }
|
||||
inline char* MakeAttrStr(char* str, size_t maxlen, const Attr* attr) { string tmp; attr->make_string(tmp); strxcpy(str, tmp.c_str(), maxlen); return str; }
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@@ -1204,10 +1204,16 @@ vatch vgetw(int row, int col) {
|
||||
|
||||
void vgetc(int row, int col, int* atr, vchar* chr) {
|
||||
|
||||
vatch tmp = vgetw(row, col);
|
||||
if((row < 0) || (row > gvid->numrows-1) || (col < 0) || (col > gvid->numcols-1)) {
|
||||
*chr = ' ';
|
||||
*atr = 0;
|
||||
}
|
||||
else {
|
||||
vatch tmp = vgetw(row, col);
|
||||
|
||||
*chr = vgchar(tmp);
|
||||
*atr = vgattr(tmp);
|
||||
*chr = vgchar(tmp);
|
||||
*atr = vgattr(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user