diff options
author | lukem <lukem@NetBSD.org> | 1997-10-10 11:39:08 +0000 |
---|---|---|
committer | lukem <lukem@NetBSD.org> | 1997-10-10 11:39:08 +0000 |
commit | b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0 (patch) | |
tree | 5cd3c69d8e6d56c42128666f35ceed56746ed1d2 /battlestar/init.c | |
parent | 7016350ffcce57245468046bd3e36559e2684dca (diff) | |
download | bsdgames-darwin-b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0.tar.gz bsdgames-darwin-b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0.tar.zst bsdgames-darwin-b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0.zip |
WARNSify
Diffstat (limited to 'battlestar/init.c')
-rw-r--r-- | battlestar/init.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/battlestar/init.c b/battlestar/init.c index b05d545c..6627984d 100644 --- a/battlestar/init.c +++ b/battlestar/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.5 1997/01/07 11:56:45 tls Exp $ */ +/* $NetBSD: init.c,v 1.6 1997/10/10 11:40:01 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -33,23 +33,22 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)init.c 8.4 (Berkeley) 4/30/95"; #else -static char rcsid[] = "$NetBSD: init.c,v 1.5 1997/01/07 11:56:45 tls Exp $"; +__RCSID("$NetBSD: init.c,v 1.6 1997/10/10 11:40:01 lukem Exp $"); #endif #endif /* not lint */ -#include <sys/types.h> #include "extern.h" -#include <pwd.h> +void initialize(startup) char startup; { - register struct objs *p; - void die(); + struct objs *p; puts("Version 4.2, fall 1984."); puts("First Adventure game written by His Lordship, the honorable"); @@ -60,7 +59,7 @@ initialize(startup) wordinit(); if (startup) { direction = NORTH; - time = 0; + ourtime = 0; snooze = CYCLE * 1.5; position = 22; setbit(wear, PAJAMAS); @@ -71,9 +70,10 @@ initialize(startup) } else restore(); wiz = wizard(uname); - signal(SIGINT, die); + signal(SIGINT, diesig); } +void getutmp(uname) char *uname; { @@ -101,20 +101,22 @@ char *badguys[] = { 0 }; +int wizard(uname) char *uname; { - char flag; + int flag; - if (flag = checkout(uname)) + if ((flag = checkout(uname)) != 0) printf("You are the Great wizard %s.\n", uname); return flag; } +int checkout(uname) - register char *uname; + char *uname; { - register char **ptr; + char **ptr; for (ptr = list; *ptr; ptr++) if (strcmp(*ptr, uname) == 0) @@ -125,7 +127,7 @@ checkout(uname) uname); CUMBER = 3; WEIGHT = 9; /* that'll get him! */ - clock = 10; + ourclock = 10; setbit(location[7].objects, WOODSMAN); /* viper room */ setbit(location[20].objects, WOODSMAN); /* laser " */ setbit(location[13].objects, DARK); /* amulet " */ |