Statusline got to work properly on ncurses
This commit is contained in:
@@ -1581,6 +1581,7 @@ void vclrscr(int atr) {
|
||||
|
||||
#if defined(__USE_NCURSES__)
|
||||
|
||||
clearok(stdscr, TRUE);
|
||||
for(int row = 0; row < LINES; row++)
|
||||
mvhline(row, 0, ' ' | gvid_attrcalc(atr), COLS);
|
||||
move(0, 0);
|
||||
@@ -1930,7 +1931,7 @@ void vcurset(int sline, int eline) {
|
||||
|
||||
if((sline == 0) and (eline == 0))
|
||||
curs_set(0);
|
||||
else if((eline - sline) <= 3)
|
||||
else if((eline - sline) <= 4)
|
||||
curs_set(1);
|
||||
else
|
||||
curs_set(2);
|
||||
|
@@ -4,6 +4,7 @@
|
||||
// The Goldware Library
|
||||
// Copyright (C) 1990-1999 Odinn Sorensen
|
||||
// Copyright (C) 1999-2000 Alexander S. Aganichev
|
||||
// Copyright (C) 2000 Jacobo Tarrio
|
||||
// ------------------------------------------------------------------
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
@@ -395,6 +396,7 @@ int wtitle (const char* str, int tpos, int tattr);
|
||||
int wunhide (int whandle);
|
||||
int wunlink (int w);
|
||||
int wvline (int wsrow, int wscol, int count, int btype, int attr);
|
||||
int wwprintc (int whandle, int wrow, int wcol, int attr, const vchar chr);
|
||||
int wwprints (int whandle, int wrow, int wcol, int attr, const char* str);
|
||||
int wwprintstr (int whandle, int wrow, int wcol, int attr, const char* str);
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
// The Goldware Library
|
||||
// Copyright (C) 1990-1999 Odinn Sorensen
|
||||
// Copyright (C) 1999-2000 Alexander S. Aganichev
|
||||
// Copyright (C) 2000 Jacobo Tarrio
|
||||
// ------------------------------------------------------------------
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
@@ -1581,6 +1582,33 @@ static void update_buffers(vatch* pcurr, int shadow) {
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int wwprintc(int whandle, int wrow, int wcol, int attr, const vchar chr) {
|
||||
|
||||
// check for existance of active window or hidden windows
|
||||
if(!gwin.total and gwin.hidden==NULL)
|
||||
return gwin.werrno=W_NOACTIVE;
|
||||
|
||||
// find address of window's record
|
||||
_wrec_t* found = wfindrec(whandle);
|
||||
if(found==NULL) {
|
||||
found = gwin.hidden;
|
||||
while(found) {
|
||||
if(whandle==found->whandle)
|
||||
break;
|
||||
found = found->prev;
|
||||
}
|
||||
if(found==NULL)
|
||||
return gwin.werrno=W_NOTFOUND;
|
||||
}
|
||||
|
||||
// display character
|
||||
vputc(found->srow+wrow+found->border, found->scol+wcol+found->border, attr, chr);
|
||||
|
||||
// return to caller
|
||||
return gwin.werrno = W_NOERROR;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user