#include int curses_mode = 0; /** * Initialize and setup Curses */ void init_curses() { initscr(); /* Start curses mode */ cbreak(); /* Line buffering disabled, Pass on everything */ start_color(); /* try color mode */ noecho(); nonl(); curses_mode = 1; } /** * Quit curses mode */ void quit_curses() { curses_mode = 0; endwin(); } /* author: Gustavo Sverzut Barbieri (http://www.gustavobarbieri.com.br) */