diff options
author | christos <christos@NetBSD.org> | 1997-10-12 21:24:24 +0000 |
---|---|---|
committer | christos <christos@NetBSD.org> | 1997-10-12 21:24:24 +0000 |
commit | 634cb6ceab3191623a3daed5e953821e3f37a4cb (patch) | |
tree | 2bb707d4d2f4e28a241cac2e70f7392be0acb329 /trek/destruct.c | |
parent | a77b3f8edc13dc6efdbcf80e336689cfa1de08ab (diff) | |
download | bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.tar.gz bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.tar.zst bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.zip |
Warnsify and remove local implementations of libc functions.
Diffstat (limited to 'trek/destruct.c')
-rw-r--r-- | trek/destruct.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/trek/destruct.c b/trek/destruct.c index f4bee5c2..86799d27 100644 --- a/trek/destruct.c +++ b/trek/destruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: destruct.c,v 1.3 1995/04/22 10:58:44 cgd Exp $ */ +/* $NetBSD: destruct.c,v 1.4 1997/10/12 21:24:40 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -33,15 +33,19 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)destruct.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: destruct.c,v 1.3 1995/04/22 10:58:44 cgd Exp $"; +__RCSID("$NetBSD: destruct.c,v 1.4 1997/10/12 21:24:40 christos Exp $"); #endif #endif /* not lint */ -# include "trek.h" +#include <stdio.h> +#include <unistd.h> +#include "trek.h" +#include "getpar.h" /* ** Self Destruct Sequence @@ -63,14 +67,19 @@ static char rcsid[] = "$NetBSD: destruct.c,v 1.3 1995/04/22 10:58:44 cgd Exp $"; ** Uses trace flag 41 */ -destruct() +/*ARGSUSED*/ +void +destruct(v) + int v; { char checkpass[15]; - register int i, j; + int i, j; double zap; - if (damaged(COMPUTER)) - return (out(COMPUTER)); + if (damaged(COMPUTER)) { + out(COMPUTER); + return; + } printf("\n\07 --- WORKING ---\07\n"); sleep(3); /* output the count 10 9 8 7 6 */ @@ -85,8 +94,10 @@ destruct() skiptonl(0); getstrpar("Enter password verification", checkpass, 14, 0); sleep(2); - if (!sequal(checkpass, Game.passwd)) - return (printf("Self destruct sequence aborted\n")); + if (strcmp(checkpass, Game.passwd) != 0) { + printf("Self destruct sequence aborted\n"); + return; + } printf("Password verified; self destruct sequence continues:\n"); sleep(2); /* output count 5 4 3 2 1 0 */ |