From 634cb6ceab3191623a3daed5e953821e3f37a4cb Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 12 Oct 1997 21:24:24 +0000 Subject: Warnsify and remove local implementations of libc functions. --- trek/dock.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'trek/dock.c') diff --git a/trek/dock.c b/trek/dock.c index 7dcc1f52..74d1ea7c 100644 --- a/trek/dock.c +++ b/trek/dock.c @@ -1,4 +1,4 @@ -/* $NetBSD: dock.c,v 1.3 1995/04/22 10:58:45 cgd Exp $ */ +/* $NetBSD: dock.c,v 1.4 1997/10/12 21:24:41 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -33,15 +33,17 @@ * SUCH DAMAGE. */ +#include #ifndef lint #if 0 static char sccsid[] = "@(#)dock.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: dock.c,v 1.3 1995/04/22 10:58:45 cgd Exp $"; +__RCSID("$NetBSD: dock.c,v 1.4 1997/10/12 21:24:41 christos Exp $"); #endif #endif /* not lint */ -# include "trek.h" +#include +#include "trek.h" /* ** DOCK TO STARBASE @@ -58,14 +60,19 @@ static char rcsid[] = "$NetBSD: dock.c,v 1.3 1995/04/22 10:58:45 cgd Exp $"; ** are docked. */ -dock() +/*ARGSUSED*/ +void +dock(v) + int v; { - register int i, j; - int ok; - register struct event *e; + int i, j; + int ok; + struct event *e; - if (Ship.cond == DOCKED) - return (printf("Chekov: But captain, we are already docked\n")); + if (Ship.cond == DOCKED) { + printf("Chekov: But captain, we are already docked\n"); + return; + } /* check for ok to dock, i.e., adjacent to a starbase */ ok = 0; for (i = Ship.sectx - 1; i <= Ship.sectx + 1 && !ok; i++) @@ -83,8 +90,10 @@ dock() } } } - if (!ok) - return (printf("Chekov: But captain, we are not adjacent to a starbase.\n")); + if (!ok) { + printf("Chekov: But captain, we are not adjacent to a starbase.\n"); + return; + } /* restore resources */ Ship.energy = Param.energy; @@ -125,10 +134,13 @@ dock() ** is to reschedule any damages so that they will take longer. */ -undock() +/*ARGSUSED*/ +void +undock(v) + int v; { - register struct event *e; - register int i; + struct event *e; + int i; if (Ship.cond != DOCKED) { -- cgit v1.2.3-56-ge451