Here is the code I used to test:
----------------------------------------------------
#include <curses.h>
int main(int argc, char *argv[])
{
int c, ret;
/* Curses init */
initscr();
cbreak();
noecho();
ret = mvaddch(LINES-1,COLS-1, ACS_CKBOARD);
if (ret == ERR) {
mvaddstr(0,0, "mvaddch had an error!");
}
/* refresh, accept single keystroke of input */
c = getch();
endwin();
return 0;
}
----------------------------------------------------
....compiled with "gcc -lncurses curses-demo.c" on Mac OS X 10.4, which is
ncurses 5.0 by default, but I also tried linking with a copy of 5.4 I found
lying around, and version "5.6+20070812-1" on Debian Testing, all with the
same behaviour.
What I expected:
- chequerboard character appears at bottom-right corner of screen
- everything else is blank
What I got:
- chequerboard character appears at bottom-right corner of screen
- error message at top-left corner of screen
It looks like the best way to draw on the bottom-right corner of the screen
is to write my own wrapper function for mvaddch() that silently ignores
errors if the coordinates are (LINES-1,COLS-1)... but I hate the thought of
any solution involving the phrase "silently ignore errors". Is there a better
way?
_______________________________________________
Bug-ncurses mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-ncurses