diff options
| author | dholland <dholland@NetBSD.org> | 2009-06-07 18:30:39 +0000 |
|---|---|---|
| committer | dholland <dholland@NetBSD.org> | 2009-06-07 18:30:39 +0000 |
| commit | 1fa8a9a633c6f43b2e4cc46b520a81da0c53b6da (patch) | |
| tree | b0f7681d34d87154ea94fbb1cb475330e7b76e57 /games/hack/hack.mkobj.c | |
| parent | 57aadb4062ffaba26b131457aac1da14d2b4a16d (diff) | |
ANSIfy function declarations. All object file diffs inspected.
Diffstat (limited to 'games/hack/hack.mkobj.c')
| -rw-r--r-- | games/hack/hack.mkobj.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/games/hack/hack.mkobj.c b/games/hack/hack.mkobj.c index 4a72255f591..b204cdf2105 100644 --- a/games/hack/hack.mkobj.c +++ b/games/hack/hack.mkobj.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.mkobj.c,v 1.6 2003/04/02 18:36:38 jsm Exp $ */ +/* $NetBSD: hack.mkobj.c,v 1.7 2009/06/07 18:30:39 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.mkobj.c,v 1.6 2003/04/02 18:36:38 jsm Exp $"); +__RCSID("$NetBSD: hack.mkobj.c,v 1.7 2009/06/07 18:30:39 dholland Exp $"); #endif /* not lint */ #include "hack.h" @@ -72,8 +72,7 @@ __RCSID("$NetBSD: hack.mkobj.c,v 1.6 2003/04/02 18:36:38 jsm Exp $"); char mkobjstr[] = "))[[!!!!????%%%%/=**))[[!!!!????%%%%/=**(%"; struct obj * -mkobj_at(let, x, y) - int let, x, y; +mkobj_at(int let, int x, int y) { struct obj *otmp = mkobj(let); otmp->ox = x; @@ -84,8 +83,7 @@ mkobj_at(let, x, y) } void -mksobj_at(otyp, x, y) - int otyp, x, y; +mksobj_at(int otyp, int x, int y) { struct obj *otmp = mksobj(otyp); otmp->ox = x; @@ -95,8 +93,7 @@ mksobj_at(otyp, x, y) } struct obj * -mkobj(let) - int let; +mkobj(int let) { if (!let) let = mkobjstr[rn2(sizeof(mkobjstr) - 1)]; @@ -113,8 +110,7 @@ mkobj(let) struct obj zeroobj; struct obj * -mksobj(otyp) - int otyp; +mksobj(int otyp) { struct obj *otmp; char let = objects[otyp].oc_olet; @@ -193,15 +189,13 @@ mksobj(otyp) } int -letter(c) - int c; +letter(int c) { return (('@' <= c && c <= 'Z') || ('a' <= c && c <= 'z')); } int -weight(obj) - struct obj *obj; +weight(struct obj *obj) { int wt = objects[obj->otyp].oc_weight; return (wt ? wt * obj->quan : (obj->quan + 1) / 2); |
