Using normal magic-chars on LiNUX platform.
This commit is contained in:
parent
bcee4e834b
commit
c02dcab88d
@ -37,7 +37,11 @@
|
||||
#include <gcurses.h>
|
||||
#else
|
||||
#define ACS_BOARD '°'
|
||||
#ifndef __linux__
|
||||
#define ACS_BLOCK 'Û'
|
||||
#else
|
||||
#define ACS_BLOCK ' '
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__WIN32__)
|
||||
#include <windows.h>
|
||||
|
@ -404,14 +404,23 @@ int GVid::detectadapter() {
|
||||
#elif defined(__UNIX__)
|
||||
|
||||
const char* term = getenv("TERM");
|
||||
#ifndef __linux__
|
||||
if(term and strneql(term, "xterm", 5)) {
|
||||
#endif
|
||||
gvid_xterm = true;
|
||||
for(int n=0; n<8; n++)
|
||||
__box_table[n] = __box_table[8];
|
||||
#ifndef __linux__
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __linux__
|
||||
gvid_acs_enable = gvid_xterm ? "\033)0\033(B\016" : "\033[11m";
|
||||
gvid_acs_disable = gvid_xterm ? "\033(B\033)B\017" : "\033[10m";
|
||||
#else
|
||||
gvid_acs_enable = gvid_xterm ? "\016" : "";
|
||||
gvid_acs_disable = gvid_xterm ? "\017" : "";
|
||||
#endif
|
||||
|
||||
gvid_stdout = fileno(stdout);
|
||||
|
||||
|
@ -309,10 +309,18 @@ int wshadow(int attr) {
|
||||
// read current screen characters/attributes and save in shadow's buffer
|
||||
vatch tmp[2];
|
||||
*q = vgetw(crow, ccol);
|
||||
#ifndef __linux__
|
||||
tmp[0] = vsattr(*q, attr);
|
||||
#else
|
||||
tmp[0] = vsattr(' ', attr);
|
||||
#endif
|
||||
q++;
|
||||
*q = vgetw(crow, ccol + 1);
|
||||
#ifndef __linux__
|
||||
tmp[1] = vsattr(*q, attr);
|
||||
#else
|
||||
tmp[1] = vsattr(' ', attr);
|
||||
#endif
|
||||
q++;
|
||||
|
||||
// write characters back to screen using shadow's attribute
|
||||
@ -331,7 +339,11 @@ int wshadow(int attr) {
|
||||
|
||||
// read attribs/chars and store in buffers
|
||||
*q = vgetw(crow, ccol++);
|
||||
#ifndef __linux__
|
||||
*wptr++ = vsattr(*q, attr);
|
||||
#else
|
||||
*wptr++ = vsattr(' ', attr);
|
||||
#endif
|
||||
q++;
|
||||
}
|
||||
|
||||
@ -1879,8 +1891,13 @@ void wpropbar(int mode, int xx, int yy, long len, long barlen, int attr, long po
|
||||
// pos = present position.
|
||||
// size = total size of field.
|
||||
|
||||
#ifndef __linux__
|
||||
const vchar _fld = ACS_BOARD;
|
||||
const vchar _bar = ACS_BLOCK;
|
||||
#else
|
||||
const vchar _fld = ' ';
|
||||
const vchar _bar = _box_table(gwin.active->btype, 13);
|
||||
#endif
|
||||
const vchar _up = '\x18';
|
||||
const vchar _dwn = '\x19';
|
||||
|
||||
@ -2035,6 +2052,9 @@ void wscrollbar(int orientation, uint total, uint maxpos, uint pos, int sadd) {
|
||||
const vchar arrowrightchar = '\x1A';
|
||||
|
||||
int attr = (gwin.active->sbattr == -1) ? gwin.active->battr : gwin.active->sbattr;
|
||||
#ifdef __linux__
|
||||
int thumbattr = revsattr(attr);
|
||||
#endif
|
||||
|
||||
int srow, scol;
|
||||
uint visiblelen, barlen;
|
||||
@ -2077,7 +2097,11 @@ void wscrollbar(int orientation, uint total, uint maxpos, uint pos, int sadd) {
|
||||
while(row < erow1)
|
||||
vputc(row++, scol, attr|ACSET, barchar);
|
||||
while(row < erow2)
|
||||
#ifdef __linux__
|
||||
vputc(row++, scol, thumbattr|ACSET, thumbchar);
|
||||
#else
|
||||
vputc(row++, scol, attr|ACSET, thumbchar);
|
||||
#endif
|
||||
while(row < erow3)
|
||||
vputc(row++, scol, attr|ACSET, barchar);
|
||||
vputc(row, scol, revsattr(attr), arrowdownchar);
|
||||
@ -2091,7 +2115,11 @@ void wscrollbar(int orientation, uint total, uint maxpos, uint pos, int sadd) {
|
||||
while(col < ecol1)
|
||||
vputc(srow, col++, attr|ACSET, barchar);
|
||||
while(col < ecol2)
|
||||
#ifdef __linux__
|
||||
vputc(srow, col++, thumbattr|ACSET, thumbchar);
|
||||
#else
|
||||
vputc(srow, col++, attr|ACSET, thumbchar);
|
||||
#endif
|
||||
while(col < ecol3)
|
||||
vputc(srow, col++, attr|ACSET, barchar);
|
||||
vputc(srow, col, revsattr(attr), arrowrightchar);
|
||||
|
Reference in New Issue
Block a user