diff options
author | jwise <jwise@NetBSD.org> | 2000-11-30 22:06:04 +0000 |
---|---|---|
committer | jwise <jwise@NetBSD.org> | 2000-11-30 22:06:04 +0000 |
commit | 962b76a979befb56046bcf41c361b870ef171b14 (patch) | |
tree | f672df9f17c54011e28f7d09a3e177705af57190 /sail/extern.h | |
parent | 57a75ab7b9a0f4999cae7c0fa5acb46f230f38f2 (diff) | |
download | bsdgames-darwin-962b76a979befb56046bcf41c361b870ef171b14.tar.gz bsdgames-darwin-962b76a979befb56046bcf41c361b870ef171b14.tar.zst bsdgames-darwin-962b76a979befb56046bcf41c361b870ef171b14.zip |
Use random() instead of rand(), and seed from time(3) instead of from getpid().
Diffstat (limited to 'sail/extern.h')
-rw-r--r-- | sail/extern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sail/extern.h b/sail/extern.h index 4d247370..be09b24b 100644 --- a/sail/extern.h +++ b/sail/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.16 2000/11/30 22:02:20 jwise Exp $ */ +/* $NetBSD: extern.h,v 1.17 2000/11/30 22:06:04 jwise Exp $ */ /* * Copyright (c) 1983, 1993 @@ -60,7 +60,7 @@ extern char nobells; /* -b, don't ring bell before Signal */ extern gid_t gid; extern gid_t egid; -#define dieroll() ((rand() >> 3) % 6 + 1) +#define dieroll() ((random()) % 6 + 1) #define sqr(a) ((a) * (a)) #define abs(a) ((a) > 0 ? (a) : -(a)) #define min(a,b) ((a) < (b) ? (a) : (b)) |