Ejemplo n.º 1
0
/* Exits the window system.  This should dismiss all windows,
   except the "window" used for raw_print().  str is printed if possible.
*/
void curses_exit_nhwindows(const char *str)
{
    curses_cleanup();
    curs_set(orig_cursor);
    endwin();
    iflags.window_inited = 0;
    if (str != NULL)
    {
        raw_print(str);
    }
}
int main(int argc, char *argv[]) {
  if(argc!=2) {
    usage();
  }
	char game_grid[16][16];
	if(argc >= 2) {
		player_name = argv[1];
		if(strlen(player_name) > 32) {
			player_name[32] = 0;
		}
	}
	
	curses_setup();
	play_game(game_grid);
	curses_cleanup();
	return 0;
}
Ejemplo n.º 3
0
static void curses_atexit(void)
{
    curses_cleanup(NULL);
}