Get the latest tech news

Writing Programs with Ncurses


ps://invisible-island.net/ncurses/ by Eric S. Raymond and Zeyd M.

Historically, the first ancestor of curses was the routines written to provide screen-handling for the vi editor; these used the termcap database facility (both released in 3BSD) for describing terminal capabilities. setupterm(term, filenum, errret) This routine is called to initialize a terminal's description, without setting up the curses screen structures or changing the tty-driver mode bits. The right way to handle this is to use subwin(), or not touch stdscr at all and tile your screen with declared windows which you then wnoutrefresh() somewhere in your program event loop, with a single doupdate() call to trigger actual repainting.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Ncurses

Ncurses

Photo of Writing Programs

Writing Programs

Related news:

News photo

SCIM: Ncurses based, Vim-like spreadsheet