From 84e7d0704483ce39bbdeacd5e676168db6fa664f Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 19 Oct 1997 16:56:41 +0000 Subject: WARNsify... --- hack/rnd.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'hack/rnd.c') diff --git a/hack/rnd.c b/hack/rnd.c index 6bdd0aba..33e96c22 100644 --- a/hack/rnd.c +++ b/hack/rnd.c @@ -1,32 +1,44 @@ +/* $NetBSD: rnd.c,v 1.4 1997/10/19 16:59:39 christos Exp $ */ + +#include #ifndef lint -static char rcsid[] = "$NetBSD: rnd.c,v 1.3 1995/03/23 08:32:28 cgd Exp $"; -#endif /* not lint */ +__RCSID("$NetBSD: rnd.c,v 1.4 1997/10/19 16:59:39 christos Exp $"); +#endif /* not lint */ + +#include +#include "hack.h" +#include "extern.h" #define RND(x) ((random()>>3) % x) -rn1(x,y) -register x,y; +int +rn1(x, y) + int x, y; { - return(RND(x)+y); + return (RND(x) + y); } +int rn2(x) -register x; + int x; { - return(RND(x)); + return (RND(x)); } +int rnd(x) -register x; + int x; { - return(RND(x)+1); + return (RND(x) + 1); } -d(n,x) -register n,x; +int +d(n, x) + int n, x; { - register tmp = n; + int tmp = n; - while(n--) tmp += RND(x); - return(tmp); + while (n--) + tmp += RND(x); + return (tmp); } -- cgit v1.2.3