diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 1998-08-19 07:42:28 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 1998-08-19 07:42:28 +0000 |
commit | ed884b9fa4509c09f0f7ab71efe57a4e83a2e055 (patch) | |
tree | ef9d859a0754785b42ea5cacb27aff54b5000315 /games/trek/attack.c | |
parent | f4fc9566a4d35c0cc2bf8c7f1136287d8eec8c44 (diff) |
tags, formatting, ANSI-fication, prototypes, de-typos, and the occasional
initialization, removal of unused variable, or other minor fix. Most
changes are from or inspired by NetBSD.
Diffstat (limited to 'games/trek/attack.c')
-rw-r--r-- | games/trek/attack.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/games/trek/attack.c b/games/trek/attack.c index b1b0abb64ff..0bfb0d3b92e 100644 --- a/games/trek/attack.c +++ b/games/trek/attack.c @@ -1,3 +1,4 @@ +/* $OpenBSD: attack.c,v 1.2 1998/08/19 07:41:10 pjanzen Exp $ */ /* $NetBSD: attack.c,v 1.3 1995/04/22 10:58:26 cgd Exp $ */ /* @@ -37,11 +38,13 @@ #if 0 static char sccsid[] = "@(#)attack.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: attack.c,v 1.3 1995/04/22 10:58:26 cgd Exp $"; +static char rcsid[] = "$OpenBSD: attack.c,v 1.2 1998/08/19 07:41:10 pjanzen Exp $"; #endif #endif /* not lint */ -# include "trek.h" +#include <stdio.h> +#include <math.h> +#include "trek.h" /* ** Klingon Attack Routine @@ -73,15 +76,16 @@ static char rcsid[] = "$NetBSD: attack.c,v 1.3 1995/04/22 10:58:26 cgd Exp $"; ** Casualties can also occur. */ +void attack(resting) -int resting; /* set if attack while resting */ + int resting; /* set if attack while resting */ { - register int hit, i, l; - int maxhit, tothit, shldabsb; - double chgfac, propor, extradm; - double dustfac, tothe; - int cas; - int hitflag; + register int hit, i, l; + int maxhit, tothit, shldabsb; + double chgfac, propor, extradm; + double dustfac, tothe; + int cas; + int hitflag; if (Move.free) return; @@ -189,6 +193,4 @@ int resting; /* set if attack while resting */ /* allow Klingons to move after attacking */ klmove(1); - - return; } |