HardenedBSD/games/hack/rnd.c
Marcel Moolenaar b945938c63 Add type int to those variables without a type. This is caused by the
frequent use of ``register var'' instead of ``register int var'' and
the removal of the register hint in the previous commit.
1999-11-16 10:26:38 +00:00

34 lines
290 B
C

/* rnd.c - version 1.0.2 */
/* $FreeBSD$ */
#include <stdlib.h>
#define RND(x) (random() % x)
rn1(x,y)
int x,y;
{
return(RND(x)+y);
}
rn2(x)
int x;
{
return(RND(x));
}
rnd(x)
int x;
{
return(RND(x)+1);
}
d(n,x)
int n,x;
{
int tmp = n;
while(n--) tmp += RND(x);
return(tmp);
}