X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/f12b51f99bbe8bb6ad7eca12b047ba9b46836ee6..65dc63694f4b73fa9ab999ec34c932de770f8457:/trek/dcrept.c?ds=sidebyside diff --git a/trek/dcrept.c b/trek/dcrept.c index b57120cd..eebd0349 100644 --- a/trek/dcrept.c +++ b/trek/dcrept.c @@ -1,4 +1,4 @@ -/* $NetBSD: dcrept.c,v 1.6 2003/08/07 09:37:50 agc Exp $ */ +/* $NetBSD: dcrept.c,v 1.10 2009/05/24 22:55:03 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dcrept.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dcrept.c,v 1.6 2003/08/07 09:37:50 agc Exp $"); +__RCSID("$NetBSD: dcrept.c,v 1.10 2009/05/24 22:55:03 dholland Exp $"); #endif #endif /* not lint */ @@ -55,8 +55,7 @@ __RCSID("$NetBSD: dcrept.c,v 1.6 2003/08/07 09:37:50 agc Exp $"); /*ARGSUSED*/ void -dcrept(v) - int v __attribute__((__unused__)); +dcrept(int v __unused) { int i, f; double x; @@ -64,13 +63,10 @@ dcrept(v) struct event *e; /* set up the magic factors to output the time till fixed */ - if (Ship.cond == DOCKED) - { + if (Ship.cond == DOCKED) { m1 = 1.0 / Param.dockfac; m2 = 1.0; - } - else - { + } else { m1 = 1.0; m2 = Param.dockfac; } @@ -78,15 +74,13 @@ dcrept(v) f = 1; /* scan for damages */ - for (i = 0; i < MAXEVENTS; i++) - { + for (i = 0; i < MAXEVENTS; i++) { e = &Event[i]; if (e->evcode != E_FIXDV) continue; /* output the title first time */ - if (f) - { + if (f) { printf("\t\t\t repair times\n"); printf("device\t\t\tin flight docked\n"); f = 0; @@ -95,7 +89,8 @@ dcrept(v) /* compute time till fixed, then adjust by the magic factors */ x = e->date - Now.date; printf("%-24s%7.2f %7.2f\n", - Device[e->systemname].name, x * m1 + 0.005, x * m2 + 0.005); + Device[e->systemname].name, x * m1 + 0.005, + x * m2 + 0.005); /* do a little consistancy checking */ }