NCurses: Setting last character on screen (without scrolling enabled)

放肆的年华 提交于 2019-12-11 20:07:41

问题


Assume you have a NCurses Window (could be a subwindow) with dimensions ROWS and COLS. How do I set the character at ROWS-1 and COLS-1. If I use waddstr at this position with one character it doesn't work (throws a user exception). I assume this is because the cursor is moved to a position outside the window?


回答1:


The behaviour seems to be intentional: http://old.nabble.com/Setting-last-character-on-screen-%28without-scrolling-enabled%29-to33969235.html

checking portability: Solaris 10 returns ERR IRIX64 returns ERR HPUX 11.23 returns OK Tru64 returns ERR AIX 6.1 returns OK

Though HPUX implemented SVr4, it was the last (and some of its differences from the other systems demonstrate that the implementers relied more on documentation than on cross-checking). Tru64 is technically the best of the above listed; Solaris has a lot of code rot. So I've found no reason to change the quirk.

-- Thomas E. Dickey



来源:https://stackoverflow.com/questions/10877469/ncurses-setting-last-character-on-screen-without-scrolling-enabled

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!