/*
 * Demo program using term.c's point plotting code
 *
 *	Martin Guy, UKC, November 1988
 */

#include <stdio.h>
#include <signal.h>
#include "term.h"

die()
{
	term_deinit();
	exit(1);
}

main()
{
	term_init();
	
	signal(SIGINT, die);

	srandom(time(0));

	while (1) {
		int x, y;

		x = abs(random()) % TERM_WIDTH;
		y = abs(random()) % TERM_HEIGHT;

		term_dot(x, y);
	}
}

int abs(x)
{
	return (x>=0 ? x : -x);
}
