From 927a087250c6d788d6df6cc7fcb0359653e2efd3 Mon Sep 17 00:00:00 2001 From: dholland Date: Sun, 24 May 2009 21:44:56 +0000 Subject: KNF: brace and comment placement. Object files identical. --- trek/nova.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'trek/nova.c') diff --git a/trek/nova.c b/trek/nova.c index 8a417d30..eb24a284 100644 --- a/trek/nova.c +++ b/trek/nova.c @@ -1,4 +1,4 @@ -/* $NetBSD: nova.c,v 1.7 2009/05/24 19:18:44 dholland Exp $ */ +/* $NetBSD: nova.c,v 1.8 2009/05/24 21:44:56 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)nova.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: nova.c,v 1.7 2009/05/24 19:18:44 dholland Exp $"); +__RCSID("$NetBSD: nova.c,v 1.8 2009/05/24 21:44:56 dholland Exp $"); #endif #endif /* not lint */ @@ -63,8 +63,7 @@ nova(int x, int y) if (Sect[x][y] != STAR || Quad[Ship.quadx][Ship.quady].stars < 0) return; - if (ranf(100) < 15) - { + if (ranf(100) < 15) { printf("Spock: Star at %d,%d failed to nova.\n", x, y); return; } @@ -74,26 +73,22 @@ nova(int x, int y) } printf("Spock: Star at %d,%d gone nova\n", x, y); - if (ranf(4) != 0) + if (ranf(4) != 0) { Sect[x][y] = EMPTY; - else - { + } else { Sect[x][y] = HOLE; Quad[Ship.quadx][Ship.quady].holes += 1; } Quad[Ship.quadx][Ship.quady].stars -= 1; Game.kills += 1; - for (i = x - 1; i <= x + 1; i++) - { + for (i = x - 1; i <= x + 1; i++) { if (i < 0 || i >= NSECTS) continue; - for (j = y - 1; j <= y + 1; j++) - { + for (j = y - 1; j <= y + 1; j++) { if (j < 0 || j >= NSECTS) continue; se = Sect[i][j]; - switch (se) - { + switch (se) { case EMPTY: case HOLE: -- cgit v1.2.3-56-ge451