view finch/libgnt/test/key.c @ 28012:cc8f641d2fde

Add the MTN revision in the Pidgin About and finch --version dialogs. Main idea taken from monotone's own hook, but I left out the full revision stuff for now.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 25 Jul 2009 06:49:18 +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;
}