Skip to content

Instantly share code, notes, and snippets.

@MisterDA
Created November 12, 2016 17:48
Show Gist options
  • Save MisterDA/15c79b8741cb8b69ae87cc6d55a53c31 to your computer and use it in GitHub Desktop.
Save MisterDA/15c79b8741cb8b69ae87cc6d55a53c31 to your computer and use it in GitHub Desktop.
ncurses init
#include <locale.h>
#include <ncurses.h>
int main(int argc, char *argv[]) {
int phys_row, phys_col;
setlocale(LC_ALL, "");
initscr();
getmaxyx(stdscr, phys_row, phys_col);
//timeout(10);
cbreak(); // raw();
keypad(stdscr, TRUE);
noecho();
nonl();
scrollok(stdscr, true);
/* ... */
endwin();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment