I'm compiling some c code using the ncurses library, under gcc and Fedora. The code is copied exactly from http://techlister.com/linux/creating-menu-with-ncurses-in-c/1293/
It compiles fine but as I manipulate the code I wanted to understand some of ncurses' subtleties - specifically, its screen refresh scheme. I've read in multiple places (this site and elsewhere) statements such as:
The refresh and wrefresh routines (or wnoutrefresh and doupdate) must be called to get actual output to the terminal, as other routines merely manipulate data structures.
I interpret that as meaning if I call things like mvwprintw(), I am only manipulating what amounts to a virtual window, and to get my changes to actually appear, I need to call wrefresh(). However the code I copied only calls wrefresh() once near the top and seems to repaint the screen as needed.
QUESTION: Can some one clarify when one should need to call refresh() or wrefresh()?
Thanks.