Solving attribute constants definition conflicts

This commit is contained in:
Ianos Gnatiuc 2006-01-20 00:15:05 +00:00
parent bcf87c8591
commit 10f34e6765
33 changed files with 133 additions and 150 deletions

View File

@ -237,69 +237,69 @@ const word CRC_SCERROR = 0xAB65;
vattr GetColor(char* ink) vattr GetColor(char* ink)
{ {
word crc; word crc;
vattr color = BLACK|_BLACK; vattr color = BLACK_|_BLACK;
crc = strCrc16(strupr(ink)); crc = strCrc16(strupr(ink));
switch(crc) { switch(crc) {
// Black is the default // Black is the default
case CRC_BLACK: case CRC_BLACK:
color = BLACK|_BLACK; color = BLACK_|_BLACK;
break; break;
case CRC_BLUE: case CRC_BLUE:
color = BLUE|_BLACK; color = BLUE_|_BLACK;
break; break;
case CRC_GREEN: case CRC_GREEN:
color = GREEN|_BLACK; color = GREEN_|_BLACK;
break; break;
case CRC_CYAN: case CRC_CYAN:
color = CYAN|_BLACK; color = CYAN_|_BLACK;
break; break;
case CRC_RED: case CRC_RED:
color = RED|_BLACK; color = RED_|_BLACK;
break; break;
case CRC_MAGENTA: case CRC_MAGENTA:
color = MAGENTA|_BLACK; color = MAGENTA_|_BLACK;
break; break;
case CRC_BROWN: case CRC_BROWN:
color = BROWN|_BLACK; color = BROWN_|_BLACK;
break; break;
case CRC_LGRAY: case CRC_LGRAY:
case CRC_LGREY: case CRC_LGREY:
case CRC_LIGHTGRAY: case CRC_LIGHTGRAY:
case CRC_LIGHTGREY: case CRC_LIGHTGREY:
color = LGREY|_BLACK; color = LGREY_|_BLACK;
break; break;
case CRC_DGRAY: case CRC_DGRAY:
case CRC_DGREY: case CRC_DGREY:
case CRC_DARKGRAY: case CRC_DARKGRAY:
case CRC_DARKGREY: case CRC_DARKGREY:
color = DGREY|_BLACK; color = DGREY_|_BLACK;
break; break;
case CRC_LBLUE: case CRC_LBLUE:
case CRC_LIGHTBLUE: case CRC_LIGHTBLUE:
color = LBLUE|_BLACK; color = LBLUE_|_BLACK;
break; break;
case CRC_LGREEN: case CRC_LGREEN:
case CRC_LIGHTGREEN: case CRC_LIGHTGREEN:
color = LGREEN|_BLACK; color = LGREEN_|_BLACK;
break; break;
case CRC_LCYAN: case CRC_LCYAN:
case CRC_LIGHTCYAN: case CRC_LIGHTCYAN:
color = LCYAN|_BLACK; color = LCYAN_|_BLACK;
break; break;
case CRC_LRED: case CRC_LRED:
case CRC_LIGHTRED: case CRC_LIGHTRED:
color = LRED|_BLACK; color = LRED_|_BLACK;
break; break;
case CRC_LMAGENTA: case CRC_LMAGENTA:
case CRC_LIGHTMAGENTA: case CRC_LIGHTMAGENTA:
color = LMAGENTA|_BLACK; color = LMAGENTA_|_BLACK;
break; break;
case CRC_YELLOW: case CRC_YELLOW:
color = YELLOW|_BLACK; color = YELLOW_|_BLACK;
break; break;
case CRC_WHITE: case CRC_WHITE:
color = WHITE|_BLACK; color = WHITE_|_BLACK;
break; break;
case CRC_UNDERLINE: case CRC_UNDERLINE:
color = UNDERLINE; color = UNDERLINE;

View File

@ -467,7 +467,7 @@ public:
void SelMaskPick::open() { void SelMaskPick::open() {
window.openxy(ypos, xpos, ylen+2, xlen+2, btype, battr, LGREY); window.openxy(ypos, xpos, ylen+2, xlen+2, btype, battr, LGREY_|_BLACK);
window.title(title, tattr); window.title(title, tattr);
window.shadow(C_SHADOW); window.shadow(C_SHADOW);
update(); update();

View File

@ -192,7 +192,7 @@ void Area::DelMsgs(GMsg* msg) {
if(delask) { if(delask) {
if(msg->attr.uns() and not (msg->attr.rcv() or msg->attr.del())) { if(msg->attr.uns() and not (msg->attr.rcv() or msg->attr.del())) {
AA->LoadMsg(msg, msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar)); AA->LoadMsg(msg, msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar));
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
HeaderView->Use(AA, msg); HeaderView->Use(AA, msg);
HeaderView->Paint(); HeaderView->Paint();
BodyView->Use(AA, msg, topline); BodyView->Use(AA, msg, topline);
@ -213,7 +213,7 @@ void Area::DelMsgs(GMsg* msg) {
} }
if(msg->attr.lok() and not dellocked and not deletethis) { if(msg->attr.lok() and not dellocked and not deletethis) {
AA->LoadMsg(msg, msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar)); AA->LoadMsg(msg, msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar));
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
HeaderView->Use(AA, msg); HeaderView->Use(AA, msg);
HeaderView->Paint(); HeaderView->Paint();
BodyView->Use(AA, msg, topline); BodyView->Use(AA, msg, topline);
@ -238,7 +238,7 @@ void Area::DelMsgs(GMsg* msg) {
isreadmark = false; isreadmark = false;
Mark.ResetAll(); Mark.ResetAll();
} }
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
} }
} }
if(n == 0) { if(n == 0) {

View File

@ -262,7 +262,7 @@ static void WriteMsgs(GMsg* msg) {
remove(fname); remove(fname);
} }
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
} }
else if(source == WRITE_CURRENT) { else if(source == WRITE_CURRENT) {
if(target & WRITE_FILE) { if(target & WRITE_FILE) {

View File

@ -147,7 +147,7 @@ void Cleanup(void) {
} }
// Reset border color // Reset border color
if (C_BACKB != (BLACK|_BLACK)) if (C_BACKB != (BLACK_|_BLACK))
gvid->setoverscan(gvid->orig.color.overscan); gvid->setoverscan(gvid->orig.color.overscan);
wcloseall(); // Close all windows wcloseall(); // Close all windows
@ -294,11 +294,11 @@ int ShellToDos(char* command, char* message, vattr cls, int cursor, int pause) {
gvid->setmode(gvid->orig.screen.mode); gvid->setmode(gvid->orig.screen.mode);
// Clear screen // Clear screen
if (cls != (BLACK|_BLACK)) if (cls != (BLACK_|_BLACK))
vclrscr(cls); vclrscr(cls);
// Reset border color // Reset border color
if (C_BACKB != (BLACK|_BLACK)) if (C_BACKB != (BLACK_|_BLACK))
gvid->setoverscan(gvid->orig.color.overscan); gvid->setoverscan(gvid->orig.color.overscan);
// Turn on the blinking attributes // Turn on the blinking attributes
@ -316,7 +316,7 @@ int ShellToDos(char* command, char* message, vattr cls, int cursor, int pause) {
#endif #endif
// Return cursor into 1st column // Return cursor into 1st column
if (cls != (BLACK|_BLACK)) puts(""); if (cls != (BLACK_|_BLACK)) puts("");
// Write message on screen // Write message on screen
if(*message) puts(message); if(*message) puts(message);
@ -406,7 +406,7 @@ int ShellToDos(char* command, char* message, vattr cls, int cursor, int pause) {
gvid->setintensity(CFG->intensecolors); gvid->setintensity(CFG->intensecolors);
// Restore border color // Restore border color
if (C_BACKB != (BLACK|_BLACK)) if (C_BACKB != (BLACK_|_BLACK))
gvid->setoverscan(C_BACKB); gvid->setoverscan(C_BACKB);
// Set palette if changes were specified // Set palette if changes were specified
@ -515,7 +515,7 @@ const char* Unpack(const char* archive) {
getcwd(orgdir, sizeof(Path)); getcwd(orgdir, sizeof(Path));
gchdir(newdir); gchdir(newdir);
// Now unpack it // Now unpack it
ShellToDos(cmdline, "", LGREY|_BLACK, 0, -1); ShellToDos(cmdline, "", LGREY_|_BLACK, 0, -1);
// Restore current directory // Restore current directory
gchdir(orgdir); gchdir(orgdir);
strxcpy(newname, AddPath(AddBackslash(newdir), filename), sizeof(Path)); strxcpy(newname, AddPath(AddBackslash(newdir), filename), sizeof(Path));

View File

@ -2913,7 +2913,7 @@ int IEclass::Start(int __mode, uint* __position, GMsg* __msg) {
gotorowcol(col, row); gotorowcol(col, row);
batch_mode = 0; batch_mode = 0;
vattr backattr = BLACK|_BLACK; vattr backattr = BLACK_|_BLACK;
if(blockcol == -1) { if(blockcol == -1) {
backattr = dispchar(currline->txt.c_str()[col], C_READC); backattr = dispchar(currline->txt.c_str()[col], C_READC);
gotorowcol(col, row); gotorowcol(col, row);

View File

@ -949,7 +949,7 @@ void IEclass::editimport(Line* __line, char* __filename, bool imptxt) {
isPipe = YES; isPipe = YES;
mktemp(strxcpy(tmpfile, AddPath(CFG->temppath, "GIXXXXXX"), sizeof(Path))); mktemp(strxcpy(tmpfile, AddPath(CFG->temppath, "GIXXXXXX"), sizeof(Path)));
strxmerge(cmdline, sizeof(Path), filenamebuf.c_str()+1, " > ", tmpfile, NULL); strxmerge(cmdline, sizeof(Path), filenamebuf.c_str()+1, " > ", tmpfile, NULL);
ShellToDos(cmdline, "", BLACK|_BLACK, NO); ShellToDos(cmdline, "", BLACK_|_BLACK, NO);
filenamebuf = tmpfile; filenamebuf = tmpfile;
fileselected = true; fileselected = true;
} else { } else {
@ -1324,7 +1324,7 @@ void IEclass::SpellCheck() {
strchg(_buf2, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR); strchg(_buf2, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR);
strischg(_buf, "@file", _buf2); strischg(_buf, "@file", _buf2);
sprintf(_buf2, LNG->SpellChecker, _buf); sprintf(_buf2, LNG->SpellChecker, _buf);
ShellToDos(_buf, _buf2, LGREY|_BLACK, YES); ShellToDos(_buf, _buf2, LGREY_|_BLACK, YES);
LoadFile(); LoadFile();
GFTRK(NULL); GFTRK(NULL);
@ -1357,7 +1357,7 @@ void IEclass::DosShell() {
GFTRK("EditDosShell"); GFTRK("EditDosShell");
ShellToDos(getenv(GOLD_SHELL_ENV), LNG->DOS_Shell, LGREY|_BLACK, YES); ShellToDos(getenv(GOLD_SHELL_ENV), LNG->DOS_Shell, LGREY_|_BLACK, YES);
cursoron(); cursoron();
cursoroff(); cursoroff();

View File

@ -608,7 +608,7 @@ void CreateFileMsgs(int mode, GMsg* msg) {
msg->TextToLines(CFG->dispmargin); msg->TextToLines(CFG->dispmargin);
if(specfiles > 1) if(specfiles > 1)
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
} }

View File

@ -181,7 +181,7 @@ bool FindString(GMsg* msg, const char* prompt, int what) {
AA->set_lastread(last); AA->set_lastread(last);
} }
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
if(breakloop) if(breakloop)
HandleGEvent(EVTT_BREAKLOOP); HandleGEvent(EVTT_BREAKLOOP);

View File

@ -785,7 +785,7 @@ void Initialize(int argc, char* argv[]) {
gvid->setintensity(CFG->intensecolors); gvid->setintensity(CFG->intensecolors);
if (C_BACKB != (BLACK|_BLACK)) if (C_BACKB != (BLACK_|_BLACK))
gvid->setoverscan(C_BACKB); gvid->setoverscan(C_BACKB);
vcurhide(); vcurhide();

View File

@ -733,7 +733,7 @@ public:
void GThreadlist::open() { void GThreadlist::open() {
window.openxy(ypos, xpos, ylen+2, xlen+2, btype, battr, LGREY); window.openxy(ypos, xpos, ylen+2, xlen+2, btype, battr, LGREY_|_BLACK);
update_title(); update_title();
center(CFG->displistcursor); center(CFG->displistcursor);

View File

@ -209,7 +209,7 @@ void MarkMsgs_Txt(int item, char* markstring) {
} }
} }
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
ResetMsg(msg); ResetMsg(msg);
throw_free(msg); throw_free(msg);

View File

@ -540,7 +540,7 @@ static void MakeMsg2(int& mode, int& status, int& forwstat, int& topline, GMsg*
strischg(buf, "@file", buf2); strischg(buf, "@file", buf2);
long ftbefore = GetFiletime(AddPath(CFG->goldpath, EDIT->File())); long ftbefore = GetFiletime(AddPath(CFG->goldpath, EDIT->File()));
sprintf(buf2, LNG->EditCmd, buf); sprintf(buf2, LNG->EditCmd, buf);
ShellToDos(buf, buf2, LGREY|_BLACK, YES); ShellToDos(buf, buf2, LGREY_|_BLACK, YES);
long ftafter = GetFiletime(AddPath(CFG->goldpath, EDIT->File())); long ftafter = GetFiletime(AddPath(CFG->goldpath, EDIT->File()));
if(status != MODE_SAVE) { if(status != MODE_SAVE) {
status = MODE_SAVE; status = MODE_SAVE;

View File

@ -337,7 +337,7 @@ int ImportQWK() {
if(imported and *QWK->ReplyLinker()) { if(imported and *QWK->ReplyLinker()) {
char buf[256]; char buf[256];
sprintf(buf, LNG->Replylinker, QWK->ReplyLinker()); sprintf(buf, LNG->Replylinker, QWK->ReplyLinker());
ShellToDos(QWK->ReplyLinker(), buf, LGREY|_BLACK, YES); ShellToDos(QWK->ReplyLinker(), buf, LGREY_|_BLACK, YES);
} }
} }

View File

@ -510,7 +510,7 @@ void NewArea(bool jumpnext) {
void DosShell() { void DosShell() {
ShellToDos(getenv(GOLD_SHELL_ENV), LNG->DOS_Shell, LGREY|_BLACK, YES); ShellToDos(getenv(GOLD_SHELL_ENV), LNG->DOS_Shell, LGREY_|_BLACK, YES);
} }
@ -567,7 +567,7 @@ int ExternUtil(GMsg *msg, ExtUtil *extutil) {
pauseval = 1; pauseval = 1;
ShellToDos(cmdline, "", ShellToDos(cmdline, "",
extutil->options & EXTUTIL_CLS ? LGREY|_BLACK : BLACK|_BLACK, extutil->options & EXTUTIL_CLS ? LGREY_|_BLACK : BLACK_|_BLACK,
extutil->options & EXTUTIL_CURSOR, extutil->options & EXTUTIL_CURSOR,
pauseval pauseval
); );
@ -777,7 +777,7 @@ void ReadPeekURLs(GMsg* msg) {
pauseval = 1; pauseval = 1;
ShellToDos(cmdline, "", ShellToDos(cmdline, "",
CFG->urlhandler.options & EXTUTIL_CLS ? LGREY|_BLACK : BLACK|_BLACK, CFG->urlhandler.options & EXTUTIL_CLS ? LGREY_|_BLACK : BLACK_|_BLACK,
CFG->urlhandler.options & EXTUTIL_CURSOR, CFG->urlhandler.options & EXTUTIL_CURSOR,
pauseval pauseval
); );
@ -827,7 +827,7 @@ void UUDecode(GMsg* msg) {
SaveLines(overwrite ? MODE_WRITE : MODE_APPEND, infile, msg, 79); SaveLines(overwrite ? MODE_WRITE : MODE_APPEND, infile, msg, 79);
} }
if(AA->Mark.Count()) if(AA->Mark.Count())
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
} }
else if(source == WRITE_CURRENT) { else if(source == WRITE_CURRENT) {
AA->LoadMsg(msg, msg->msgno, 79); AA->LoadMsg(msg, msg->msgno, 79);
@ -903,7 +903,7 @@ void Make_Userlist(const char* userlist) {
} }
} }
throw_free(crclist); throw_free(crclist);
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
fclose(fp); fclose(fp);
} }
@ -982,7 +982,7 @@ void make_pathreport(const char* reportfile) {
fp.printf("%s\n", path.c_str()); fp.printf("%s\n", path.c_str());
} }
} }
w_progress(MODE_QUIT, BLACK|_BLACK, 0, 0, NULL); w_progress(MODE_QUIT, BLACK_|_BLACK, 0, 0, NULL);
fp.fclose(); fp.fclose();
ResetMsg(msg); ResetMsg(msg);
throw_free(msg); throw_free(msg);

View File

@ -591,7 +591,7 @@ int ImportSOUP() {
if(importedmsgs and *CFG->soupreplylinker) { if(importedmsgs and *CFG->soupreplylinker) {
sprintf(buf, LNG->Replylinker, CFG->soupreplylinker); sprintf(buf, LNG->Replylinker, CFG->soupreplylinker);
ShellToDos(CFG->soupreplylinker, buf, LGREY|_BLACK, YES); ShellToDos(CFG->soupreplylinker, buf, LGREY_|_BLACK, YES);
} }
} }
} }

View File

@ -429,9 +429,9 @@ void search_mgr_form::select(gstrarray& menu, const char* title) {
GMnu m; GMnu m;
m.Init(); m.Init();
m.SetColor(LGREY, LGREY, LGREY, _LGREY, DGREY); m.SetColor(LGREY_|_BLACK, LGREY_|_BLACK, LGREY_|_BLACK, BLACK_|_LGREY, DGREY_|_BLACK);
m.SetTitle(title, YELLOW); m.SetTitle(title, YELLOW_|_BLACK);
m.SetBorder(0, LGREY); m.SetBorder(0, LGREY_|_BLACK);
m.SetPos(srow, scol); m.SetPos(srow, scol);
m.SetMask(0); m.SetMask(0);
m.Begin(); m.Begin();
@ -526,14 +526,14 @@ void AdvancedSearch(GMsg*, int&, int&) {
int widths[3] = { 55, 5, 7 }; int widths[3] = { 55, 5, 7 };
int field_widths[3] = { 100, 5, 7 }; int field_widths[3] = { 100, 5, 7 };
int border_type = BT_SINGLE; int border_type = BT_SINGLE;
vattr title_color = YELLOW | _BLUE; vattr title_color = YELLOW_|_BLUE;
vattr heading_color = YELLOW | _BLUE; vattr heading_color = YELLOW_|_BLUE;
vattr window_color = LGREY | _BLUE; vattr window_color = LGREY_ |_BLUE;
vattr border_color = LBLUE | _BLUE; vattr border_color = LBLUE_ |_BLUE;
vattr edit_color = YELLOW | _BLUE; vattr edit_color = YELLOW_|_BLUE;
vattr idle_color = LGREY | _BLUE; vattr idle_color = LGREY_ |_BLUE;
vattr active_color = WHITE | _BLUE; vattr active_color = WHITE_ |_BLUE;
vattr shadow_color = DGREY | _BLACK; vattr shadow_color = DGREY_ |_BLACK;
widths[0] = width - 3*2 - 2 - 5 - 7 - 2; widths[0] = width - 3*2 - 2 - 5 - 7 - 2;

View File

@ -167,7 +167,7 @@ void guserbase::unlock() {
void guserbase::open() { void guserbase::open() {
window.openxy(ypos, xpos, ylen+2, xlen+2, btype, battr, LGREY); window.openxy(ypos, xpos, ylen+2, xlen+2, btype, battr, LGREY_|_BLACK);
cwidth = (xlen-28) / 2; cwidth = (xlen-28) / 2;
window.message(LNG->UserHeaderName, TP_BORD, 3, tattr); window.message(LNG->UserHeaderName, TP_BORD, 3, tattr);

View File

@ -283,9 +283,9 @@ void ScreenBlankIdle() {
if(blanked and (whb == -1)) { if(blanked and (whb == -1)) {
wascurhid = vcurhidden(); wascurhid = vcurhidden();
vcurhide(); vcurhide();
if (C_BACKB != (BLACK|_BLACK)) if (C_BACKB != (BLACK_|_BLACK))
gvid->setoverscan(BLACK|_BLACK); gvid->setoverscan(BLACK_|_BLACK);
whb = wopen(0,0,MAXROW-1,MAXCOL-1, 5, LGREY, LGREY); whb = wopen(0,0,MAXROW-1,MAXCOL-1, 5, LGREY_|_BLACK, LGREY_|_BLACK);
if(CFG->screenblankertype == BLANK_SLIDEWIN) if(CFG->screenblankertype == BLANK_SLIDEWIN)
whh = wopen_(ry, rx, windowheight, blankmsglen+2, W_BINFO, C_INFOB, C_INFOW); whh = wopen_(ry, rx, windowheight, blankmsglen+2, W_BINFO, C_INFOB, C_INFOW);
lastmoved = gkbd.tickvalue; lastmoved = gkbd.tickvalue;
@ -300,7 +300,7 @@ void ScreenBlankIdle() {
wactiv_(whb); wactiv_(whb);
wclose(); wclose();
whb = -1; whb = -1;
if (C_BACKB != (BLACK|_BLACK)) if (C_BACKB != (BLACK_|_BLACK))
gvid->setoverscan(C_BACKB); gvid->setoverscan(C_BACKB);
if(wascurhid) if(wascurhid)
vcurhide(); vcurhide();

View File

@ -39,10 +39,10 @@ GMsgHeaderView::GMsgHeaderView() {
alive = false; alive = false;
at_row = at_column = width = height = 0; at_row = at_column = width = height = 0;
border_type = gwindow::bordertype_none; border_type = gwindow::bordertype_none;
window_color = from_color = to_color = subject_color = BLUE|_LGREY; window_color = from_color = to_color = subject_color = BLUE_|_LGREY;
location_color = BLUE|_LGREY; location_color = BLUE_|_LGREY;
title_color = highlight_color = RED|_LGREY; title_color = highlight_color = RED_|_LGREY;
border_color = YELLOW|_LGREY; border_color = YELLOW_|_LGREY;
} }
@ -367,10 +367,10 @@ GMsgBodyView::GMsgBodyView() {
scrollbar_visible = false; scrollbar_visible = false;
at_row = at_column = width = height = visible_width = 0; at_row = at_column = width = height = visible_width = 0;
border_type = gwindow::bordertype_none; border_type = gwindow::bordertype_none;
window_color = BLACK|_LGREY; window_color = BLACK_|_LGREY;
highlight_color = WHITE|_RED; highlight_color = WHITE_|_RED;
scrollbar_color = DGREY|_LGREY; scrollbar_color = DGREY_|_LGREY;
border_color = YELLOW|_LGREY; border_color = YELLOW_|_LGREY;
} }

View File

@ -85,57 +85,40 @@ typedef word vatch; // Type of character-attribute groups
// Attribute codes for functions that use them // Attribute codes for functions that use them
const vattr DEFATTR = -1; const vattr DEFATTR = -1;
#ifndef MSDOS
const vattr BLACK = 0; const vattr BLACK_ = 0;
const vattr BLUE = 1; const vattr BLUE_ = 1;
const vattr GREEN = 2; const vattr GREEN_ = 2;
const vattr CYAN = 3; const vattr CYAN_ = 3;
const vattr RED = 4; const vattr RED_ = 4;
const vattr MAGENTA = 5; const vattr MAGENTA_ = 5;
const vattr BROWN = 6; const vattr BROWN_ = 6;
const vattr LGREY = 7; const vattr LGREY_ = 7;
const vattr DGREY = 8; const vattr DGREY_ = 8;
const vattr LBLUE = 9; const vattr LBLUE_ = 9;
const vattr LGREEN = 10; const vattr LGREEN_ = 10;
const vattr LCYAN = 11; const vattr LCYAN_ = 11;
const vattr LRED = 12; const vattr LRED_ = 12;
const vattr LMAGENTA = 13; const vattr LMAGENTA_ = 13;
const vattr YELLOW = 14; const vattr YELLOW_ = 14;
const vattr WHITE = 15; const vattr WHITE_ = 15;
#else
#define BLACK 0 const vattr _BLACK = (BLACK_ << 4);
#define BLUE 1 const vattr _BLUE = (BLUE_ << 4);
#define GREEN 2 const vattr _GREEN = (GREEN_ << 4);
#define CYAN 3 const vattr _CYAN = (CYAN_ << 4);
#define RED 4 const vattr _RED = (RED_ << 4);
#define MAGENTA 5 const vattr _MAGENTA = (MAGENTA_ << 4);
#define BROWN 6 const vattr _BROWN = (BROWN_ << 4);
#define LGREY 7 const vattr _LGREY = (LGREY_ << 4);
#define DGREY 8 const vattr _DGREY = (DGREY_ << 4);
#define LBLUE 9 const vattr _LBLUE = (LBLUE_ << 4);
#define LGREEN 10 const vattr _LGREEN = (LGREEN_ << 4);
#define LCYAN 11 const vattr _LCYAN = (LCYAN_ << 4);
#define LRED 12 const vattr _LRED = (LRED_ << 4);
#define LMAGENTA 13 const vattr _LMAGENTA = (LMAGENTA_<< 4);
#define YELLOW 14 const vattr _YELLOW = (YELLOW_ << 4);
#define WHITE 15 const vattr _WHITE = (WHITE_ << 4);
#endif
const vattr _BLACK = (BLACK << 4);
const vattr _BLUE = (BLUE << 4);
const vattr _GREEN = (GREEN << 4);
const vattr _CYAN = (CYAN << 4);
const vattr _RED = (RED << 4);
const vattr _MAGENTA = (MAGENTA << 4);
const vattr _BROWN = (BROWN << 4);
const vattr _LGREY = (LGREY << 4);
const vattr _DGREY = (DGREY << 4);
const vattr _LBLUE = (LBLUE << 4);
const vattr _LGREEN = (LGREEN << 4);
const vattr _LCYAN = (LCYAN << 4);
const vattr _LRED = (LRED << 4);
const vattr _LMAGENTA = (LMAGENTA << 4);
const vattr _YELLOW = (YELLOW << 4);
const vattr _WHITE = (WHITE << 4);
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -1228,7 +1228,7 @@ void vgetc(int row, int col, vattr* atr, vchar* chr) {
if((row < 0) or (row > gvid->numrows-1) or (col < 0) or (col > gvid->numcols-1)) { if((row < 0) or (row > gvid->numrows-1) or (col < 0) or (col > gvid->numcols-1)) {
*chr = ' '; *chr = ' ';
*atr = BLACK|_BLACK; *atr = BLACK_|_BLACK;
} }
else { else {
vatch tmp = vgetw(row, col); vatch tmp = vgetw(row, col);

View File

@ -826,7 +826,7 @@ void GVid::setrows(int _rows) {
#endif #endif
if(origrows < _rows) if(origrows < _rows)
vfill(origrows, 0, _rows, 80, ' ', LGREY); vfill(origrows, 0, _rows, 80, ' ', LGREY_|_BLACK);
detectinfo(&curr); detectinfo(&curr);
resetcurr(); resetcurr();

View File

@ -408,7 +408,7 @@ int wshadoff() {
throw_xrelease(gwin.active->wsbuf); throw_xrelease(gwin.active->wsbuf);
// update window's record // update window's record
gwin.active->wsattr = WHITE|_WHITE; gwin.active->wsattr = WHITE_|_WHITE;
// return with no error // return with no error
return gwin.werrno=W_NOERROR; return gwin.werrno=W_NOERROR;

View File

@ -228,14 +228,14 @@ inline void gwindow::init() {
end_row = gvid->curr.screen.rows - 1; end_row = gvid->curr.screen.rows - 1;
end_column = gvid->curr.screen.columns - 1; end_column = gvid->curr.screen.columns - 1;
window_style = 0; window_style = 0;
window_color = BLACK|_LGREY; window_color = BLACK_|_LGREY;
border_hi_color = BLUE|_LGREY; border_hi_color = BLUE_|_LGREY;
border_lo_color = DEFATTR; border_lo_color = DEFATTR;
scrollbar_color = DEFATTR; scrollbar_color = DEFATTR;
title_color = BLUE|_LGREY; title_color = BLUE_|_LGREY;
title_position = title_center; title_position = title_center;
message_color = BLUE|_LGREY; message_color = BLUE_|_LGREY;
shadow_color = DGREY|_BLACK; shadow_color = DGREY_|_BLACK;
} }

View File

@ -66,10 +66,10 @@ public:
file = NULL; file = NULL;
helpptr = -1; helpptr = -1;
key = 0; key = 0;
winattr = BLACK|_BLACK; winattr = BLACK_|_BLACK;
textattr = BLACK|_BLACK; textattr = BLACK_|_BLACK;
selattr = BLACK|_BLACK; selattr = BLACK_|_BLACK;
barattr = BLACK|_BLACK; barattr = BLACK_|_BLACK;
srow = 3; srow = 3;
scol = 8; scol = 8;
erow = 21; erow = 21;
@ -113,7 +113,7 @@ int whelpush();
int whelpushc(int cat); int whelpushc(int cat);
int whelpwin(int srow, int scol, int erow, int ecol, int btype, int title); int whelpwin(int srow, int scol, int erow, int ecol, int btype, int title);
void whelpcompile(const char* helpfile, long& offset); void whelpcompile(const char* helpfile, long& offset);
inline int whelpundef() { return whelpdef(NULL,0,BLACK|_BLACK,BLACK|_BLACK,BLACK|_BLACK,BLACK|_BLACK,NULL); } inline int whelpundef() { return whelpdef(NULL,0,BLACK_|_BLACK,BLACK_|_BLACK,BLACK_|_BLACK,BLACK_|_BLACK,NULL); }
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View File

@ -303,7 +303,7 @@ static void disp_cat() {
setonkey(Key_Esc,esc_esc,0); setonkey(Key_Esc,esc_esc,0);
// end the menu and process it // end the menu and process it
wmenuend(BASETAGID,M_OMNI|M_NOQS,0,0,whelp.selattr,whelp.selattr,BLACK|_BLACK,whelp.barattr); wmenuend(BASETAGID,M_OMNI|M_NOQS,0,0,whelp.selattr,whelp.selattr,BLACK_|_BLACK,whelp.barattr);
gmnudropthrough = YES; gmnudropthrough = YES;
kbch = i = (gkey)wmenuget(); kbch = i = (gkey)wmenuget();
gmnudropthrough = NO; gmnudropthrough = NO;

View File

@ -135,7 +135,7 @@ static void show_mouse_cursor_mnu(void) {
#ifdef GOLD_MOUSE #ifdef GOLD_MOUSE
if(gmou.FreeCursor()) { if(gmou.FreeCursor()) {
gmou.ShowCursor(); gmou.ShowCursor();
gmou.SetCursor(0,0xFFFF,((LGREY|_LGREY)<<8)); gmou.SetCursor(0,0xFFFF,((LGREY_|_LGREY)<<8));
} }
#endif #endif
} }
@ -762,7 +762,7 @@ int wmenubeg(int srow, int scol, int erow, int ecol, int btype, vattr battr, vat
wmenu->item=NULL; wmenu->item=NULL;
wmenu->title = ""; wmenu->title = "";
wmenu->titlepos = -1; wmenu->titlepos = -1;
wmenu->titleattr = BLACK|_BLACK; wmenu->titleattr = BLACK_|_BLACK;
wmenu->shadattr = DEFATTR; wmenu->shadattr = DEFATTR;
wmenu->items = 0; wmenu->items = 0;
@ -809,7 +809,7 @@ int wmenuitem(int wrow, int wcol, const char* str, char schar, int tagid, int fm
witem->dwhdl = -1; witem->dwhdl = -1;
witem->dwrow = 0; witem->dwrow = 0;
witem->dwcol = 0; witem->dwcol = 0;
witem->dattr = BLACK|_BLACK; witem->dattr = BLACK_|_BLACK;
witem->redisp = NO; witem->redisp = NO;
witem->help = help; witem->help = help;
witem->child = NULL; witem->child = NULL;

View File

@ -34,22 +34,22 @@
void GMnu::Init() { void GMnu::Init() {
bordertype = 0; bordertype = 0;
bordercolor = BLACK|_BLACK; bordercolor = BLACK_|_BLACK;
textcolor = BLACK|_BLACK; textcolor = BLACK_|_BLACK;
quickcolor = BLACK|_BLACK; quickcolor = BLACK_|_BLACK;
noselcolor = BLACK|_BLACK; noselcolor = BLACK_|_BLACK;
barcolor = BLACK|_BLACK; barcolor = BLACK_|_BLACK;
shadowcolor = DEFATTR; shadowcolor = DEFATTR;
title = NULL; title = NULL;
titlepos = TCENTER; titlepos = TCENTER;
titlecolor = BLACK|_BLACK; titlecolor = BLACK_|_BLACK;
deschdl = -1; deschdl = -1;
descrow = 0; descrow = 0;
desccolumn = 0; desccolumn = 0;
desccolor = BLACK|_BLACK; desccolor = BLACK_|_BLACK;
helpnumber = -1; helpnumber = -1;

View File

@ -75,7 +75,7 @@ static void show_mouse_cursor_pck() {
#ifdef GOLD_MOUSE #ifdef GOLD_MOUSE
if(gmou.FreeCursor()) { if(gmou.FreeCursor()) {
gmou.ShowCursor(); gmou.ShowCursor();
gmou.SetCursor(0,0xFFFF,((LGREY|_LGREY)<<8)); gmou.SetCursor(0,0xFFFF,((LGREY_|_LGREY)<<8));
} }
#endif #endif
} }

View File

@ -44,7 +44,7 @@ gwinpick::gwinpick() {
keyok = false; keyok = false;
ypos = xpos = ylen = xlen = 0; ypos = xpos = ylen = xlen = 0;
btype = 0; btype = 0;
battr = wattr = tattr = sattr = hattr = loattr = sbattr = BLACK|_BLACK; battr = wattr = tattr = sattr = hattr = loattr = sbattr = BLACK_|_BLACK;
title = NULL; title = NULL;
helpcat = 0; helpcat = 0;
maximum_index = minimum_index = maximum_position = index = position = 0; maximum_index = minimum_index = maximum_position = index = position = 0;

View File

@ -41,7 +41,7 @@ gwinput::gwinput(gwindow &w) : window(w) {
first_field = current = NULL; first_field = current = NULL;
fill_acs = false; fill_acs = false;
idle_attr = active_attr = edit_attr = LGREY; idle_attr = active_attr = edit_attr = LGREY_|_BLACK;
idle_fill = active_fill = edit_fill = ' '; idle_fill = active_fill = edit_fill = ' ';
insert_mode = true; insert_mode = true;
done = dropped = false; done = dropped = false;

View File

@ -149,8 +149,8 @@ public:
Line* prev; // Pointer to previous line Line* prev; // Pointer to previous line
Line* next; // Pointer to next line Line* next; // Pointer to next line
Line() : txt ("") { color = BLACK|_BLACK; type = kludge = 0; prev = next = NULL; } Line() : txt ("") { color = BLACK_|_BLACK; type = kludge = 0; prev = next = NULL; }
Line(const char *str) : txt (str) { color = BLACK|_BLACK; type = kludge = 0; prev = next = NULL; } Line(const char *str) : txt (str) { color = BLACK_|_BLACK; type = kludge = 0; prev = next = NULL; }
~Line() {} ~Line() {}
int istearline() { return !!(type & GLINE_TEAR); } int istearline() { return !!(type & GLINE_TEAR); }