view finch/libgnt/test/key.c @ 29833:834038426c38

Minor cleanup. * g_free is NULL-safe. * No need for an extra * on the gpointer. * Adium doesn't like / in their <img> tags. * purple_xfer_set_thumbnail should free previous data.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 25 Apr 2010 20:38:17 +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;
}