Skip to content

Instantly share code, notes, and snippets.

@txdv
Created January 26, 2012 00:50
Show Gist options
  • Save txdv/1680098 to your computer and use it in GitHub Desktop.
Save txdv/1680098 to your computer and use it in GitHub Desktop.
Example of the code I want to get going.
#include <ncurses.h>
int main(int argc, char **argv)
{
int i;
char buffer[512];
initscr();
nonl();
cbreak();
raw();
noecho();
notimeout(stdscr, true);
intrflush(stdscr, FALSE);
keypad(stdscr, TRUE);
while (true) {
int i = getch();
if (i == 113) {
break;
}
sprintf(buffer, "%u\n", i);
addstr(buffer);
}
endwin();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment