]> granicus.if.org Git - nethack/commitdiff
More tiny formatting fixes, move function names to start of line
authorPasi Kallinen <paxed@alt.org>
Wed, 25 Nov 2015 08:15:41 +0000 (10:15 +0200)
committerPasi Kallinen <paxed@alt.org>
Wed, 25 Nov 2015 08:15:41 +0000 (10:15 +0200)
src/alloc.c
src/attrib.c
src/end.c
src/exper.c
src/hack.c
src/mcastu.c
src/mhitm.c
src/minion.c
src/rnd.c
src/save.c

index 468cb9f862c64ea4838c0e54f130cb7145613888..2d51fc7865e2327640a0e192150a19d94bd7ce7b 100644 (file)
@@ -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
index d2dafb4ffbf786d8a8925302fa0c8b1f07b404db..b0ee0fc11664e502cc3a6b1d31614aa0f5f2f1de 100644 (file)
@@ -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;
index 44cc016629b65219e145ef87beae03d531049936..e245e30e4fe258a2053ce598c748b0be0268925a 100644 (file)
--- 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++;
index 4f72e97844c6bc027bcce76507ad41c989c07058..06456e0c0e436df75133e43a6f1855b8d34a9357 100644 (file)
@@ -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;
index 187c1a9bb93ec443317b1c5d0ab2d4c8da85806a..3e606f6beb25b786ac3b5aa4a755f078d38a45b9 100644 (file)
@@ -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 */
index 3b3c032864a587710e1260478e893a1390035f8c..24463a59bfd4c8d952cca0ba9bb06519ee601dae 100644 (file)
@@ -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;
 {
index 37c5d49e49121f190476f8e4fb46f723f23528cc..f0eab761e51e1620b1db5728d40994319fdf2c4d 100644 (file)
@@ -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;
index 7fdb84e498406a25550785b3ceddf1a23454eaaa..1af08f5ea92db437a07275bbea1b68a9f009e59b 100644 (file)
@@ -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;
index 8bb1365f8c7b8153634434fb44c75e937f79fbd7..8c15f22d457b4d88fc8785d4e00f6f04b946afe7 100644 (file)
--- 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;
index 92a2a2e7bb23078a19a1098d3f5c2340aa4d4cd4..2fc0872093f6689144d8ca3e88aa2faa46caac2e 100644 (file)
@@ -619,7 +619,8 @@ int fd;
 }
 
 /* flush run and buffer */
-void bflush(fd)
+void
+bflush(fd)
 register int fd;
 {
     (*saveprocs.save_bflush)(fd);