/*
* Author: Thomas E. Dickey <dickey@clark.net> 1999
*
- * $Id: dots.c,v 1.34 2019/01/21 14:20:18 tom Exp $
+ * $Id: dots.c,v 1.35 2019/08/24 21:49:50 tom Exp $
*
* A simple demo of the terminfo interface.
*/
main(int argc,
char *argv[])
{
- int x, y, z, p;
+ int ch;
double r;
double c;
int my_colors;
size_t need;
char *my_env;
- while ((x = getopt(argc, argv, "T:efm:s:")) != -1) {
- switch (x) {
+ while ((ch = getopt(argc, argv, "T:efm:s:")) != -1) {
+ switch (ch) {
case 'T':
need = 6 + strlen(optarg);
my_env = malloc(need);
started = time((time_t *) 0);
while (!interrupted) {
- x = (int) (c * ranf()) + m_option;
- y = (int) (r * ranf()) + m_option;
- p = (ranf() > 0.9) ? '*' : ' ';
+ int x = (int) (c * ranf()) + m_option;
+ int y = (int) (r * ranf()) + m_option;
+ int p = (ranf() > 0.9) ? '*' : ' ';
tputs(tparm3(cursor_address, y, x), 1, outc);
if (my_colors > 0) {
- z = (int) (ranf() * my_colors);
+ int z = (int) (ranf() * my_colors);
if (ranf() > 0.01) {
tputs(tparm2(set_a_foreground, z), 1, outc);
} else {