view finch/libgnt/test/key.c @ 22015:72f90ea7ae34

Don't assume perl is at /usr/bin/perl, use /usr/bin/env instead. This is not foolproof, but it's consistent with what we're doing for Python. If this causes problems, we can revert or try something else. Refs #4436
author Richard Laager <rlaager@wiktel.com>
date Sat, 05 Jan 2008 18:41:33 +0000
parents f104e1d45d85
children
line wrap: on
line source

#include <ncurses.h>

int main()
{
	int ch;

	initscr();
	noecho();
	cbreak();
	refresh();

	WINDOW *win = newpad(20, 30);
	box(win, 0, 0);
	prefresh(win, 0, 0, 0, 0, 19, 29);
	doupdate();

	while ((ch = getch())) {
		printw("%d ", ch);
		refresh();
	}

	endwin();
	return 0;
}