From: Pasi Kallinen Date: Wed, 25 Nov 2015 08:15:41 +0000 (+0200) Subject: More tiny formatting fixes, move function names to start of line X-Git-Tag: NetHack-3.6.0_RC01~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=943cc6057ce1bbaf6c47380a668d7447af2269bf;p=nethack More tiny formatting fixes, move function names to start of line --- diff --git a/src/alloc.c b/src/alloc.c index 468cb9f86..2d51fc786 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -27,7 +27,8 @@ extern void VDECL(panic, (const char *, ...)) PRINTF_F(1, 2); -long *alloc(lth) +long * +alloc(lth) register unsigned int lth; { #ifdef LINT diff --git a/src/attrib.c b/src/attrib.c index d2dafb4ff..b0ee0fc11 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -171,7 +171,9 @@ boolean givemsg; givemsg ? -1 : 1); } -void losestr(num) /* may kill you; cause may be poison or monster like 'a' */ +/* may kill you; cause may be poison or monster like 'a' */ +void +losestr(num) register int num; { int ustr = ABASE(A_STR) - num; diff --git a/src/end.c b/src/end.c index 44cc01662..e245e30e4 100644 --- a/src/end.c +++ b/src/end.c @@ -382,7 +382,9 @@ int sig_unused UNUSED; } #if defined(UNIX) || defined(VMS) || defined(__EMX__) -static void done_hangup(sig) /* signal() handler */ +/* signal() handler */ +static void +done_hangup(sig) int sig; { program_state.done_hup++; diff --git a/src/exper.c b/src/exper.c index 4f72e9784..06456e0c0 100644 --- a/src/exper.c +++ b/src/exper.c @@ -181,7 +181,9 @@ register int exper, rexp; flags.beginner = 0; } -void losexp(drainer) /* e.g., hit by drain life attack */ +/* e.g., hit by drain life attack */ +void +losexp(drainer) const char *drainer; /* cause of death, if drain should be fatal */ { register int num; diff --git a/src/hack.c b/src/hack.c index 187c1a9bb..3e606f6be 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1795,8 +1795,10 @@ switch_terrain() /* extracted from spoteffects; called by spoteffects to check for entering or leaving a pool of water/lava, and by moveloop to check for staying on one - */ -boolean pooleffects(newspot) /* returns true to skip rest of spoteffects */ + + returns true to skip rest of spoteffects */ +boolean +pooleffects(newspot) boolean newspot; /* true if called by spoteffects */ { /* check for leaving water */ diff --git a/src/mcastu.c b/src/mcastu.c index 3b3c03286..24463a59b 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -835,7 +835,9 @@ int spellnum; /* convert 1..10 to 0..9; add 10 for second group (spell casting) */ #define ad_to_typ(k) (10 + (int) k - 1) -int buzzmu(mtmp, mattk) /* monster uses spell (ranged) */ +/* monster uses spell (ranged) */ +int +buzzmu(mtmp, mattk) register struct monst *mtmp; register struct attack *mattk; { diff --git a/src/mhitm.c b/src/mhitm.c index 37c5d49e4..f0eab761e 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -116,7 +116,9 @@ struct attack *mattk; * then we report that the monster did nothing so it will continue to * digest the hero. */ -int fightm(mtmp) /* have monsters fight each other */ + /* have monsters fight each other */ +int +fightm(mtmp) register struct monst *mtmp; { register struct monst *mon, *nmon; diff --git a/src/minion.c b/src/minion.c index 7fdb84e49..1af08f5ea 100644 --- a/src/minion.c +++ b/src/minion.c @@ -45,7 +45,9 @@ boolean spotted; /* seen|sensed vs all */ return count; } -int msummon(mon) /* mon summons a monster */ +/* mon summons a monster */ +int +msummon(mon) struct monst *mon; { struct permonst *ptr; @@ -205,7 +207,9 @@ boolean talk; #define Athome (Inhell && (mtmp->cham == NON_PM)) -int demon_talk(mtmp) /* returns 1 if it won't attack. */ +/* returns 1 if it won't attack. */ +int +demon_talk(mtmp) register struct monst *mtmp; { long cash, demand, offer; diff --git a/src/rnd.c b/src/rnd.c index 8bb1365f8..8c15f22d4 100644 --- a/src/rnd.c +++ b/src/rnd.c @@ -94,7 +94,8 @@ register int x; } /* d(N,X) == NdX == dX+dX+...+dX N times; n <= d(n,x) <= (n*x) */ -int d(n, x) +int +d(n, x) register int n, x; { register int tmp = n; diff --git a/src/save.c b/src/save.c index 92a2a2e7b..2fc087209 100644 --- a/src/save.c +++ b/src/save.c @@ -619,7 +619,8 @@ int fd; } /* flush run and buffer */ -void bflush(fd) +void +bflush(fd) register int fd; { (*saveprocs.save_bflush)(fd);