1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-26 07:55:01 +00:00
Initialize random
This commit is contained in:
Andrey A. Chernov 1997-09-24 21:16:13 +00:00
parent 29f700bbe6
commit 74163a02d6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29823

View File

@ -54,6 +54,9 @@ static char sccsid[] = "@(#)rain.c 8.1 (Berkeley) 5/31/93";
#include <sgtty.h>
#endif
#include <signal.h>
#include <termcap.h>
#include <stdlib.h>
#include <string.h>
#define cursor(c, r) tputs(tgoto(CM, c, r), 1, fputchar)
@ -64,7 +67,7 @@ static struct sgttyb sg, old_tty;
#endif
int fputchar();
char *LL, *TE, *tgoto();
char *LL, *TE;
main(argc, argv)
int argc;
@ -74,9 +77,8 @@ main(argc, argv)
extern char *UP;
register int x, y, j;
register char *CM, *BC, *DN, *ND, *term;
char *TI, *tcp, *mp, tcb[100],
*malloc(), *getenv(), *strcpy(), *tgetstr();
long cols, lines, random();
char *TI, *tcp, *mp, tcb[100];
long cols, lines;
int xpos[5], ypos[5];
static void onsig();
@ -119,6 +121,7 @@ main(argc, argv)
}
(void)strcpy(LL, tgoto(CM, 0, 23));
}
srandomdev();
#ifdef USG
ioctl(1, TCGETA, &sg);
ospeed = sg.c_cflag&CBAUD;