view finch/libgnt/test/key.c @ 28201:2da9e4266742

Add a test for qq's qq_encrypt function. Refs #10191. The string of length 7 demonstrates the bug: 7+16=23, but the qq_encrypt function at least thinks that it is writing 24 bytes
author Mark Doliner <mark@kingant.net>
date Fri, 04 Sep 2009 06:23:41 +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;
}