From b462731cbc1198051cd39ad2f95b1027e441067d Mon Sep 17 00:00:00 2001 From: dholland Date: Sun, 7 Jun 2009 18:30:39 +0000 Subject: ANSIfy function declarations. All object file diffs inspected. --- hack/hack.pri.c | 86 ++++++++++++++++++++++----------------------------------- 1 file changed, 33 insertions(+), 53 deletions(-) (limited to 'hack/hack.pri.c') diff --git a/hack/hack.pri.c b/hack/hack.pri.c index 70ef79d9..52c768af 100644 --- a/hack/hack.pri.c +++ b/hack/hack.pri.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.pri.c,v 1.9 2008/01/28 06:55:42 dholland Exp $ */ +/* $NetBSD: hack.pri.c,v 1.10 2009/06/07 18:30:39 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.pri.c,v 1.9 2008/01/28 06:55:42 dholland Exp $"); +__RCSID("$NetBSD: hack.pri.c,v 1.10 2009/06/07 18:30:39 dholland Exp $"); #endif /* not lint */ #include "hack.h" @@ -72,7 +72,7 @@ xchar scrlx, scrhx, scrly, scrhy; /* corners of new area on * screen */ void -swallowed() +swallowed(void) { char ulook[] = "|@|"; ulook[1] = u.usym; @@ -120,8 +120,7 @@ panic(const char *fmt, ...) } void -atl(x, y, ch) -int x, y, ch; +atl(int x, int y, int ch) { struct rm *crm = &levl[x][y]; @@ -137,8 +136,7 @@ int x, y, ch; } void -on_scr(x, y) -int x, y; +on_scr(int x, int y) { if (x < scrlx) scrlx = x; @@ -156,8 +154,7 @@ int x, y; */ void -tmp_at(x, y) - schar x, y; +tmp_at(schar x, schar y) { static schar prevx, prevy; static char let; @@ -188,8 +185,7 @@ tmp_at(x, y) /* like the previous, but the symbols are first erased on completion */ void -Tmp_at(x, y) - schar x, y; +Tmp_at(schar x, schar y) { static char let; static xchar cnt; @@ -229,16 +225,14 @@ Tmp_at(x, y) } void -setclipped() +setclipped(void) { error("Hack needs a screen of size at least %d by %d.\n", ROWNO + 2, COLNO); } void -at(x, y, ch) - xchar x, y; - char ch; +at(xchar x, xchar y, int ch) { #ifndef lint /* if xchar is unsigned, lint will complain about if(x < 0) */ @@ -258,21 +252,21 @@ at(x, y, ch) } void -prme() +prme(void) { if (!Invisible) at(u.ux, u.uy, u.usym); } int -doredraw() +doredraw(void) { docrt(); return (0); } void -docrt() +docrt(void) { int x, y; struct rm *room; @@ -319,8 +313,7 @@ docrt() } void -docorner(xmin, ymax) - int xmin, ymax; +docorner(int xmin, int ymax) { int x, y; struct rm *room; @@ -361,13 +354,13 @@ docorner(xmin, ymax) } void -curs_on_u() +curs_on_u(void) { curs(u.ux, u.uy + 2); } void -pru() +pru(void) { if (u.udispl && (Invisible || u.udisx != u.ux || u.udisy != u.uy)) /* if(! levl[u.udisx][u.udisy].new) */ @@ -432,8 +425,7 @@ prl(int x, int y) } char -news0(x, y) - xchar x, y; +news0(xchar x, xchar y) { struct obj *otmp; struct trap *ttmp; @@ -493,8 +485,7 @@ news0(x, y) } void -newsym(x, y) - int x, y; +newsym(int x, int y) { atl(x, y, news0(x, y)); } @@ -502,8 +493,7 @@ newsym(x, y) /* used with wand of digging (or pick-axe): fill scrsym and force display */ /* also when a POOL evaporates */ void -mnewsym(x, y) - int x, y; +mnewsym(int x, int y) { struct rm *room; char newscrsym; @@ -519,8 +509,7 @@ mnewsym(x, y) } void -nosee(x, y) - int x, y; +nosee(int x, int y) { struct rm *room; @@ -536,8 +525,7 @@ nosee(x, y) #ifndef QUEST void -prl1(x, y) - int x, y; +prl1(int x, int y) { if (u.dx) { if (u.dy) { @@ -559,8 +547,7 @@ prl1(x, y) } void -nose1(x, y) - int x, y; +nose1(int x, int y) { if (u.dx) { if (u.dy) { @@ -583,8 +570,7 @@ nose1(x, y) #endif /* QUEST */ int -vism_at(x, y) - int x, y; +vism_at(int x, int y) { struct monst *mtmp; @@ -597,8 +583,7 @@ vism_at(x, y) #ifdef NEWSCR void -pobj(obj) - struct obj *obj; +pobj(struct obj *obj) { int show = (!obj->oinvis || See_invisible) && cansee(obj->ox, obj->oy); @@ -619,8 +604,7 @@ pobj(obj) #endif /* NEWSCR */ void -unpobj(obj) - struct obj *obj; +unpobj(struct obj *obj) { /* * if(obj->odispl){ if(!vism_at(obj->odx, obj->ody)) newsym(obj->odx, @@ -631,7 +615,7 @@ unpobj(obj) } void -seeobjs() +seeobjs(void) { struct obj *obj, *obj2; for (obj = fobj; obj; obj = obj2) { @@ -649,7 +633,7 @@ seeobjs() } void -seemons() +seemons(void) { struct monst *mtmp; for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { @@ -665,8 +649,7 @@ seemons() } void -pmon(mon) - struct monst *mon; +pmon(struct monst *mon) { int show = (Blind && Telepat) || canseemon(mon); if (mon->mdispl) { @@ -685,8 +668,7 @@ pmon(mon) } void -unpmon(mon) - struct monst *mon; +unpmon(struct monst *mon) { if (mon->mdispl) { newsym(mon->mdx, mon->mdy); @@ -695,7 +677,7 @@ unpmon(mon) } void -nscr() +nscr(void) { int x, y; struct rm *room; @@ -717,8 +699,7 @@ nscr() /* 100 suffices for bot(); no relation with COLNO */ char oldbot[100], newbot[100]; void -cornbot(lth) - int lth; +cornbot(int lth) { if ((unsigned)lth < sizeof(oldbot)) { oldbot[lth] = 0; @@ -727,7 +708,7 @@ cornbot(lth) } void -bot() +bot(void) { char *ob = oldbot, *nb = newbot; int i; @@ -782,8 +763,7 @@ bot() #ifdef WAN_PROBING void -mstatusline(mtmp) - struct monst *mtmp; +mstatusline(struct monst *mtmp) { pline("Status of %s: ", monnam(mtmp)); pline("Level %-2d Gold %-5lu Hp %3d(%d) Ac %-2d Dam %d", @@ -793,7 +773,7 @@ mstatusline(mtmp) #endif /* WAN_PROBING */ void -cls() +cls(void) { if (flags.toplin == 1) more(); -- cgit v1.2.3-56-ge451