]> granicus.if.org Git - nethack/commitdiff
more warning suppression
authorPatR <rankin@nethack.org>
Fri, 20 Nov 2015 10:00:31 +0000 (02:00 -0800)
committerPatR <rankin@nethack.org>
Fri, 20 Nov 2015 10:00:31 +0000 (02:00 -0800)
This should avoid two of the three bogus clang complaints about
retaining the address of a stack variable after it has gone out of
scope.

Plus a recreation of some formatting I did a while back and then
accidentally clobbered before committing.

src/mkmaze.c
src/topten.c
src/vision.c
src/windows.c

index f602cb45a8829a709f3e7bad9939036a4d9ff922..d1f372b64210cb6de947f4082e1d1862ed810680 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 mkmaze.c        $NHDT-Date: 1446604114 2015/11/04 02:28:34 $  $NHDT-Branch: master $:$NHDT-Revision: 1.39 $ */
+/* NetHack 3.6 mkmaze.c        $NHDT-Date: 1448013594 2015/11/20 09:59:54 $  $NHDT-Branch: master $:$NHDT-Revision: 1.41 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -16,14 +16,25 @@ STATIC_DCL boolean FDECL(is_solid, (int, int));
 STATIC_DCL int FDECL(extend_spine, (int[3][3], int, int, int));
 STATIC_DCL boolean FDECL(okay, (int, int, int));
 STATIC_DCL void FDECL(maze0xy, (coord *));
-STATIC_DCL boolean
-FDECL(put_lregion_here, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
-                         XCHAR_P, BOOLEAN_P, d_level *));
+STATIC_DCL boolean FDECL(put_lregion_here, (XCHAR_P, XCHAR_P, XCHAR_P,
+                                            XCHAR_P, XCHAR_P, XCHAR_P,
+                                            XCHAR_P, BOOLEAN_P, d_level *));
 STATIC_DCL void NDECL(fixup_special);
-STATIC_DCL void FDECL(move, (int *, int *, int));
 STATIC_DCL void NDECL(setup_waterlevel);
 STATIC_DCL void NDECL(unsetup_waterlevel);
 
+/* adjust a coordinate one step in the specified direction */
+#define mz_move(X, Y, dir) \
+    do {                                                         \
+        switch (dir) {                                           \
+        case 0:  --(Y);  break;                                  \
+        case 1:  (X)++;  break;                                  \
+        case 2:  (Y)++;  break;                                  \
+        case 3:  --(X);  break;                                  \
+        default: panic("mz_move: bad direction %d", dir);        \
+        }                                                        \
+    } while (0)
+
 STATIC_OVL boolean
 iswall(x, y)
 int x, y;
@@ -195,8 +206,8 @@ okay(x, y, dir)
 int x, y;
 register int dir;
 {
-    move(&x, &y, dir);
-    move(&x, &y, dir);
+    mz_move(x, y, dir);
+    mz_move(x, y, dir);
     if (x < 3 || y < 3 || x > x_maze_max || y > y_maze_max
         || levl[x][y].typ != 0)
         return FALSE;
@@ -697,9 +708,9 @@ schar typ;
             pos--;
         else {
             dir = dirs[rn2(q)];
-            move(&x, &y, dir);
+            mz_move(x, y, dir);
             levl[x][y].typ = typ;
-            move(&x, &y, dir);
+            mz_move(x, y, dir);
             pos++;
             if (pos > CELLS)
                 panic("Overflow in walkfrom");
@@ -708,7 +719,7 @@ schar typ;
         }
     }
 }
-#else
+#else /* !MICRO */
 
 void
 walkfrom(x, y, typ)
@@ -739,36 +750,13 @@ schar typ;
         if (!q)
             return;
         dir = dirs[rn2(q)];
-        move(&x, &y, dir);
+        mz_move(x, y, dir);
         levl[x][y].typ = typ;
-        move(&x, &y, dir);
+        mz_move(x, y, dir);
         walkfrom(x, y, typ);
     }
 }
-#endif /* MICRO */
-
-STATIC_OVL void
-move(x, y, dir)
-register int *x, *y;
-register int dir;
-{
-    switch (dir) {
-    case 0:
-        --(*y);
-        break;
-    case 1:
-        (*x)++;
-        break;
-    case 2:
-        (*y)++;
-        break;
-    case 3:
-        --(*x);
-        break;
-    default:
-        panic("move: bad direction");
-    }
-}
+#endif /* ?MICRO */
 
 /* find random point in generated corridors,
    so we don't create items in moats, bunkers, or walls */
index 803476c1dca4363ebb1d500f492a86cbc99d4dda..981086b66fa456aa8df50489d78def3ff47190ee 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 topten.c        $NHDT-Date: 1446887536 2015/11/07 09:12:16 $  $NHDT-Branch: master $:$NHDT-Revision: 1.38 $ */
+/* NetHack 3.6 topten.c        $NHDT-Date: 1448013597 2015/11/20 09:59:57 $  $NHDT-Branch: master $:$NHDT-Revision: 1.39 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -103,12 +103,12 @@ int how;
     switch (killer.format) {
     default:
         impossible("bad killer format? (%d)", killer.format);
-    /*FALLTHRU*/
+        /*FALLTHRU*/
     case NO_KILLER_PREFIX:
         break;
     case KILLED_BY_AN:
         kname = an(kname);
-    /*FALLTHRU*/
+        /*FALLTHRU*/
     case KILLED_BY:
         (void) strncat(buf, killed_by_prefix[how], siz - 1);
         l = strlen(buf);
@@ -325,7 +325,8 @@ struct toptenentry *tt;
             buf, /* (already includes separator) */
             XLOG_SEP, plname, XLOG_SEP, tt->death);
     if (multi)
-        Fprintf(rfile, "%cwhile=%s", XLOG_SEP, multi_reason ? multi_reason : "helpless");
+        Fprintf(rfile, "%cwhile=%s", XLOG_SEP,
+                multi_reason ? multi_reason : "helpless");
     Fprintf(rfile, "%cconduct=0x%lx%cturns=%ld%cachieve=0x%lx", XLOG_SEP,
             encodeconduct(), XLOG_SEP, moves, XLOG_SEP, encodeachieve());
     Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld", XLOG_SEP,
@@ -458,11 +459,11 @@ time_t when;
     FILE *xlfile;
 #endif /* XLOGFILE */
 
-/* Under DICE 3.0, this crashes the system consistently, apparently due to
- * corruption of *rfile somewhere.  Until I figure this out, just cut out
- * topten support entirely - at least then the game exits cleanly.  --AC
- */
 #ifdef _DCC
+    /* Under DICE 3.0, this crashes the system consistently, apparently due to
+     * corruption of *rfile somewhere.  Until I figure this out, just cut out
+     * topten support entirely - at least then the game exits cleanly.  --AC
+     */
     return;
 #endif
 
@@ -489,17 +490,17 @@ time_t when;
     /* create a new 'topten' entry */
     t0_used = FALSE;
     t0 = newttentry();
+    t0->ver_major = VERSION_MAJOR;
+    t0->ver_minor = VERSION_MINOR;
+    t0->patchlevel = PATCHLEVEL;
+    t0->points = u.urexp;
+    t0->deathdnum = u.uz.dnum;
     /* deepest_lev_reached() is in terms of depth(), and reporting the
      * deepest level reached in the dungeon death occurred in doesn't
      * seem right, so we have to report the death level in depth() terms
      * as well (which also seems reasonable since that's all the player
      * sees on the screen anyway)
      */
-    t0->ver_major = VERSION_MAJOR;
-    t0->ver_minor = VERSION_MINOR;
-    t0->patchlevel = PATCHLEVEL;
-    t0->points = u.urexp;
-    t0->deathdnum = u.uz.dnum;
     t0->deathlev = observable_depth(&u.uz);
     t0->maxlvl = deepest_lev_reached(TRUE);
     t0->hp = u.uhp;
@@ -545,8 +546,7 @@ time_t when;
 
     if (wizard || discover) {
         if (how != PANICKED)
-            HUP
-            {
+            HUP {
                 char pbuf[BUFSZ];
                 topten_print("");
                 Sprintf(pbuf,
@@ -711,6 +711,7 @@ time_t when;
         t1->ver_major = t1->ver_minor = t1->patchlevel = 0;
         t1->uid = t1->deathdnum = t1->deathlev = 0;
         t1->maxlvl = t1->hp = t1->maxhp = t1->deaths = 0;
+        t1->uid = 0;
         t1->plrole[0] = t1->plrace[0] = t1->plgend[0] = t1->plalign[0] = '-';
         t1->plrole[1] = t1->plrace[1] = t1->plgend[1] = t1->plalign[1] = 0;
         t1->birthdate = t1->deathdate = yyyymmdd((time_t) 0L);
@@ -989,6 +990,7 @@ char **argv;
 #ifdef AMIGA
     {
         extern winid amii_rawprwin;
+
         init_nhwindows(&argc, argv);
         amii_rawprwin = create_nhwindow(NHW_TEXT);
     }
index 702cbacd29f79e2c13098486abf572c4635985e5..77475af9697a8ca36be1cc22e7c4b90f3db501c9 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 vision.c        $NHDT-Date: 1446861773 2015/11/07 02:02:53 $  $NHDT-Branch: master $:$NHDT-Revision: 1.26 $ */
+/* NetHack 3.6 vision.c        $NHDT-Date: 1448013598 2015/11/20 09:59:58 $  $NHDT-Branch: master $:$NHDT-Revision: 1.27 $ */
 /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */
 /* NetHack may be freely redistributed.  See license for details.       */
 
@@ -65,7 +65,7 @@ char circle_start[] = {
     /*15*/ 119,
 };
 
-/*===========================================================================*/
+/*==========================================================================*/
 /* Vision (arbitrary line of sight)
  * =========================================*/
 
@@ -97,9 +97,9 @@ static char right_ptrs[ROWNO][COLNO];
 STATIC_DCL void FDECL(fill_point, (int, int));
 STATIC_DCL void FDECL(dig_point, (int, int));
 STATIC_DCL void NDECL(view_init);
-STATIC_DCL void FDECL(view_from,
-                      (int, int, char **, char *, char *, int,
-                       void (*)(int, int, genericptr_t), genericptr_t));
+STATIC_DCL void FDECL(view_from, (int, int, char **, char *, char *, int,
+                                  void (*)(int, int, genericptr_t),
+                                  genericptr_t));
 STATIC_DCL void FDECL(get_unused_cs, (char ***, char **, char **));
 STATIC_DCL void FDECL(rogue_vision, (char **, char *, char *));
 
@@ -140,8 +140,8 @@ vision_init()
 
 #ifdef VISION_TABLES
     /* Note:  this initializer doesn't do anything except guarantee that
-              we're linked properly.
-    */
+     *        we're linked properly.
+     */
     vis_tab_init();
 #endif
 }
@@ -349,7 +349,7 @@ char *rmin, *rmax;
     }
 }
 
-    /*#define EXTEND_SPINE*/ /* possibly better looking wall-angle */
+/*#define EXTEND_SPINE*/ /* possibly better looking wall-angle */
 
 #ifdef EXTEND_SPINE
 
@@ -534,7 +534,7 @@ int control;
     /* You see nothing, nothing can see you --- if swallowed or refreshing. */
     if (u.uswallow || control == 2) {
         /* do nothing -- get_unused_cs() nulls out the new work area */
-
+        ;
     } else if (Blind) {
         /*
          * Calculate the could_see array even when blind so that monsters
@@ -594,10 +594,9 @@ int control;
                     next_rmax[row] = max(next_rmax[row], col);
                     next_array[row][col] = IN_SIGHT | COULD_SEE;
                 }
-        }
 
         /* if in a pit, just update for immediate locations */
-        else if (u.utrap && u.utraptype == TT_PIT) {
+        else if (u.utrap && u.utraptype == TT_PIT) {
             for (row = u.uy - 1; row <= u.uy + 1; row++) {
                 if (row < 0)
                     continue;
@@ -741,9 +740,8 @@ int control;
                 /* Update pos if previously not in sight or new angle. */
                 if (!(old_row[col] & IN_SIGHT) || oldseenv != lev->seenv)
                     newsym(col, row);
-            }
 
-            else if ((next_row[col] & COULD_SEE)
+            else if ((next_row[col] & COULD_SEE)
                      && (lev->lit || (next_row[col] & TEMP_LIT))) {
                 /*
                  * We see this position because it is lit.
@@ -795,7 +793,7 @@ int control;
                  */
                 lev->waslit = 0; /* remember lit condition */
                 newsym(col, row);
-            }
+
             /*
              * At this point we know that the row position is *not* in normal
              * sight.  That is, the position is could be seen, but is dark
@@ -806,10 +804,10 @@ int control;
              *   the glyph -- E.g. darken room spot, etc.
              * o If we now could see the location (yet the location is not
              *   lit), but previously we couldn't see the location, or vice
-             *   versa.  Update the spot because there there may be an infrared
-             *   monster there.
+             *   versa.  Update the spot because there there may be an
+             *   infrared monster there.
              */
-            else {
+            else {
             not_in_sight:
                 if ((old_row[col] & IN_SIGHT)
                     || ((next_row[col] & COULD_SEE)
@@ -878,17 +876,17 @@ int x, y;
         vision_full_recalc = 1;
 }
 
-/*===========================================================================*\
- |                                                                           |
- |      Everything below this line uses (y,x) instead of (x,y) --- the       |
- |      algorithms are faster if they are less recursive and can scan        |
- |      on a row longer.                                                     |
- |                                                                           |
-\*===========================================================================*/
+/*==========================================================================*\
+ |                                                                          |
+ |      Everything below this line uses (y,x) instead of (x,y) --- the      |
+ |      algorithms are faster if they are less recursive and can scan       |
+ |      on a row longer.                                                    |
+ |                                                                          |
+\*==========================================================================*/
 
-/* ======================================================================== *\
+/* ======================================================================= *\
                         Left and Right Pointer Updates
-\* ======================================================================== */
+\* ======================================================================= */
 
 /*
  *              LEFT and RIGHT pointer rules
@@ -956,12 +954,11 @@ int row, col;
             for (i = left_ptrs[row][COLNO - 2]; i < COLNO - 1; i++)
                 right_ptrs[row][i] = COLNO - 2;
         }
-    }
 
     /*
      * At this point, we know we aren't on the boundaries.
      */
-    else if (viz_clear[row][col - 1] && viz_clear[row][col + 1]) {
+    else if (viz_clear[row][col - 1] && viz_clear[row][col + 1]) {
         /* Both sides clear */
         for (i = left_ptrs[row][col - 1]; i <= col; i++) {
             if (!viz_clear[row][i])
@@ -1038,12 +1035,11 @@ int row, col;
             for (i = left_ptrs[row][COLNO - 2]; i < COLNO - 1; i++)
                 right_ptrs[row][i] = COLNO - 1;
         }
-    }
 
     /*
      * Else we know that we are not on an edge.
      */
-    else if (viz_clear[row][col - 1] && viz_clear[row][col + 1]) {
+    else if (viz_clear[row][col - 1] && viz_clear[row][col + 1]) {
         /* Both sides clear */
         for (i = left_ptrs[row][col - 1] + 1; i <= col; i++)
             right_ptrs[row][i] = col;
@@ -1093,8 +1089,8 @@ int row, col;
     }
 }
 
-/*===========================================================================*/
-/*===========================================================================*/
+/*==========================================================================*/
+/*==========================================================================*/
 /* Use either algorithm C or D.  See the config.h for more details.
  * =========*/
 
@@ -1355,7 +1351,7 @@ static genericptr_t varg;
         result = 1;                                  \
     }
 
-#else /* quadrants are really functions */
+#else /* !MACRO_CPATH -- quadrants are really functions */
 
 STATIC_DCL int FDECL(_q1_path, (int, int, int, int));
 STATIC_DCL int FDECL(_q2_path, (int, int, int, int));
@@ -1559,7 +1555,7 @@ int scol, srow, y2, x2;
     return 1;
 }
 
-#endif /* quadrants are functions */
+#endif /* ?MACRO_CPATH */
 
 /*
  * Use vision tables to determine if there is a clear path from
@@ -1596,10 +1592,10 @@ cleardone:
 }
 
 #ifdef VISION_TABLES
-/*===========================================================================*\
+/*==========================================================================*\
                             GENERAL LINE OF SIGHT
                                 Algorithm D
-\*===========================================================================*/
+\*==========================================================================*/
 
 /*
  * Indicate caller for the shadow routines.
@@ -1616,8 +1612,8 @@ cleardone:
 static close2d *close_dy[CLOSE_MAX_BC_DY];
 static far2d *far_dy[FAR_MAX_BC_DY];
 
-STATIC_DCL void FDECL(right_side,
-                      (int, int, int, int, int, int, int, char *));
+STATIC_DCL void FDECL(right_side,  (int, int, int, int, int,
+                                    int, int, char *));
 STATIC_DCL void FDECL(left_side, (int, int, int, int, int, int, int, char *));
 STATIC_DCL int FDECL(close_shadow, (int, int, int, int));
 STATIC_DCL int FDECL(far_shadow, (int, int, int, int));
@@ -1966,12 +1962,12 @@ char *limits;       /* points at range limit for current row, or NULL */
             hit_stone = 1;
 
             left = loc_right + 1;
-        }
+
         /*
          * The opening extends beyond the right mark.  This means that
          * the next far block is the current far block.
          */
-        else {
+        else {
             if (vis_func) {
                 for (i = left; i <= right_shadow; i++)
                     (*vis_func)(i, row, varg);
@@ -2169,9 +2165,9 @@ char *limits;
 
             hit_stone = 1; /* needed for walls of width 1 */
             right = loc_left - 1;
-        }
+
         /*  The opening extends beyond the left mark. */
-        else {
+        else {
             if (vis_func) {
                 for (i = left_shadow; i <= right; i++)
                     (*vis_func)(i, row, varg);
@@ -2292,10 +2288,10 @@ genericptr_t arg;
 
 #else /*===== End of algorithm D =====*/
 
-/*===========================================================================*\
+/*==========================================================================*\
                             GENERAL LINE OF SIGHT
                                 Algorithm C
-\*===========================================================================*/
+\*==========================================================================*/
 
 /*
  * Defines local to Algorithm C.
@@ -2418,9 +2414,9 @@ char *limits;   /* points at range limit for current row, or NULL */
             if (left > lim_max)
                 return;            /* check (1) */
             if (left == lim_max) { /* check (2) */
-                if (vis_func)
+                if (vis_func) {
                     (*vis_func)(lim_max, row, varg);
-                else {
+                else {
                     set_cs(rowp, lim_max);
                     set_max(lim_max);
                 }
@@ -2483,10 +2479,10 @@ char *limits;   /* points at range limit for current row, or NULL */
             if (right > lim_max)
                 right = lim_max;
             /* set the bits */
-            if (vis_func)
+            if (vis_func) {
                 for (i = left; i <= right; i++)
                     (*vis_func)(i, row, varg);
-            else {
+            else {
                 for (i = left; i <= right; i++)
                     set_cs(rowp, i);
                 set_min(left);
@@ -2579,9 +2575,9 @@ char *limits;
             if (right < lim_min)
                 return;
             if (right == lim_min) {
-                if (vis_func)
+                if (vis_func) {
                     (*vis_func)(lim_min, row, varg);
-                else {
+                else {
                     set_cs(rowp, lim_min);
                     set_min(lim_min);
                 }
@@ -2618,10 +2614,10 @@ char *limits;
 
             if (left < lim_min)
                 left = lim_min;
-            if (vis_func)
+            if (vis_func) {
                 for (i = left; i <= right; i++)
                     (*vis_func)(i, row, varg);
-            else {
+            else {
                 for (i = left; i <= right; i++)
                     set_cs(rowp, i);
                 set_min(left);
@@ -2754,10 +2750,10 @@ void FDECL((*func), (int, int, genericptr_t));
 genericptr_t arg;
 {
     /* If not centered on hero, do the hard work of figuring the area */
-    if (scol != u.ux || srow != u.uy)
+    if (scol != u.ux || srow != u.uy) {
         view_from(srow, scol, (char **) 0, (char *) 0, (char *) 0, range,
                   func, arg);
-    else {
+    else {
         register int x;
         int y, min_x, max_x, max_y, offset;
         char *limits;
index 125fcba0d9db02147a087eee4362223d3de58850..1423f8cf16c0f52de9fd25a9f85c73181730d7cf 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 windows.c       $NHDT-Date: 1433806591 2015/06/08 23:36:31 $  $NHDT-Branch: master $:$NHDT-Revision: 1.34 $ */
+/* NetHack 3.6 windows.c       $NHDT-Date: 1448013599 2015/11/20 09:59:59 $  $NHDT-Branch: master $:$NHDT-Revision: 1.35 $ */
 /* Copyright (c) D. Cohrs, 1993. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -7,8 +7,8 @@
 #include "wintty.h"
 #endif
 #ifdef X11_GRAPHICS
-/* cannot just blindly include winX.h without including all of X11 stuff */
-/* and must get the order of include files right.  Don't bother */
+/* Cannot just blindly include winX.h without including all of X11 stuff
+   and must get the order of include files right.  Don't bother. */
 extern struct window_procs X11_procs;
 extern void FDECL(win_X11_init, (int));
 #endif
@@ -27,7 +27,7 @@ extern void FDECL(be_win_init, (int));
 FAIL /* be_win_init doesn't exist? XXX*/
 #endif
 #ifdef AMIGA_INTUITION
-    extern struct window_procs amii_procs;
+extern struct window_procs amii_procs;
 extern struct window_procs amiv_procs;
 extern void FDECL(ami_wininit_data, (int));
 #endif
@@ -155,7 +155,7 @@ wl_addtail(struct winlink *wl)
     p->nextlink = wl;
     return;
 }
-#endif
+#endif /* WINCHAIN */
 
 static struct win_choices *last_winchoice = 0;
 
@@ -191,8 +191,7 @@ const char *s;
             return &winchoices[i];
         }
     }
-
-    return NULL;
+    return (struct win_choices *) 0;
 }
 #endif
 
@@ -348,7 +347,7 @@ commit_windowchain()
         p = np; /* assignment, not proof */
     }
 }
-#endif
+#endif /* WINCHAIN */
 
 /*
  * tty_message_menu() provides a means to get feedback from the
@@ -401,23 +400,24 @@ genl_putmsghistory(msg, is_restoring)
 const char *msg;
 boolean is_restoring;
 {
-/* window ports can provide
-   their own putmsghistory() routine to
-   load message history from a saved game.
-   The routine is called repeatedly from
-   the core restore routine, starting with
-   the oldest saved message first, and
-   finishing with the latest.
-   The window port routine is expected to
-   load the message recall buffers in such
-   a way that the ordering is preserved.
-   The window port routine should make no
-   assumptions about how many messages are
-   forthcoming, nor should it assume that
-   another message will follow this one,
-   so it should keep all pointers/indexes
-   intact at the end of each call.
- */
+    /* window ports can provide
+       their own putmsghistory() routine to
+       load message history from a saved game.
+       The routine is called repeatedly from
+       the core restore routine, starting with
+       the oldest saved message first, and
+       finishing with the latest.
+       The window port routine is expected to
+       load the message recall buffers in such
+       a way that the ordering is preserved.
+       The window port routine should make no
+       assumptions about how many messages are
+       forthcoming, nor should it assume that
+       another message will follow this one,
+       so it should keep all pointers/indexes
+       intact at the end of each call.
+    */
+
     /* this doesn't provide for reloading the message window with the
        previous session's messages upon restore, but it does put the quest
        message summary lines there by treating them as ordinary messages */
@@ -470,7 +470,8 @@ static void FDECL(hup_void_fdecl_winid, (winid));
 static void FDECL(hup_void_fdecl_constchar_p, (const char *));
 
 static struct window_procs hup_procs = {
-    "hup", 0L, 0L, hup_init_nhwindows, hup_void_ndecl, /* player_selection */
+    "hup", 0L, 0L, hup_init_nhwindows,
+    hup_void_ndecl,                                    /* player_selection */
     hup_void_ndecl,                                    /* askname */
     hup_void_ndecl,                                    /* get_nh_event */
     hup_exit_nhwindows, hup_void_fdecl_constchar_p,    /* suspend_nhwindows */
@@ -480,39 +481,39 @@ static struct window_procs hup_procs = {
     hup_curs, hup_putstr, hup_putstr,                  /* putmixed */
     hup_display_file, hup_void_fdecl_winid,            /* start_menu */
     hup_add_menu, hup_end_menu, hup_select_menu, genl_message_menu,
-    hup_void_ndecl, /* update_inventory */
-    hup_void_ndecl, /* mark_synch */
-    hup_void_ndecl, /* wait_synch */
+    hup_void_ndecl,                                    /* update_inventory */
+    hup_void_ndecl,                                    /* mark_synch */
+    hup_void_ndecl,                                    /* wait_synch */
 #ifdef CLIPPING
     hup_cliparound,
 #endif
 #ifdef POSITIONBAR
-    (void FDECL(
-        (*), (char *))) hup_void_fdecl_constchar_p, /* update_positionbar */
+    (void FDECL((*), (char *))) hup_void_fdecl_constchar_p,
+                                                      /* update_positionbar */
 #endif
     hup_print_glyph,
-    hup_void_fdecl_constchar_p,                 /* raw_print */
-    hup_void_fdecl_constchar_p,                 /* raw_print_bold */
-    hup_nhgetch, hup_nh_poskey, hup_void_ndecl, /* nhbell  */
-    hup_int_ndecl,                              /* doprev_message */
-    hup_yn_function, hup_getlin, hup_int_ndecl, /* get_ext_cmd */
-    hup_void_fdecl_int,                         /* number_pad */
-    hup_void_ndecl,                             /* delay_output  */
+    hup_void_fdecl_constchar_p,                       /* raw_print */
+    hup_void_fdecl_constchar_p,                       /* raw_print_bold */
+    hup_nhgetch, hup_nh_poskey, hup_void_ndecl,       /* nhbell  */
+    hup_int_ndecl,                                    /* doprev_message */
+    hup_yn_function, hup_getlin, hup_int_ndecl,       /* get_ext_cmd */
+    hup_void_fdecl_int,                               /* number_pad */
+    hup_void_ndecl,                                   /* delay_output  */
 #ifdef CHANGE_COLOR
     hup_change_color,
 #ifdef MAC
-    hup_void_fdecl_int, /* change_background */
+    hup_void_fdecl_int,                               /* change_background */
     hup_set_font_name,
 #endif
     hup_get_color_string,
-#endif              /* CHANGE_COLOR */
-    hup_void_ndecl, /* start_screen */
-    hup_void_ndecl, /* end_screen */
+#endif /* CHANGE_COLOR */
+    hup_void_ndecl,                                   /* start_screen */
+    hup_void_ndecl,                                   /* end_screen */
     hup_outrip, genl_preference_update, genl_getmsghistory,
     genl_putmsghistory,
 #ifdef STATUS_VIA_WINDOWPORT
-    hup_void_ndecl, /* status_init */
-    hup_void_ndecl, /* status_finish */
+    hup_void_ndecl,                                   /* status_init */
+    hup_void_ndecl,                                   /* status_finish */
     genl_status_enablefield, hup_status_update,
 #ifdef STATUS_HILITES
     genl_status_threshold,
@@ -801,9 +802,9 @@ const char *string UNUSED;
 
 #ifdef STATUS_VIA_WINDOWPORT
 
-/*****************************************************************************/
-/* genl backward compat stuff                                                */
-/*****************************************************************************/
+/****************************************************************************/
+/* genl backward compat stuff                                               */
+/****************************************************************************/
 
 const char *status_fieldnm[MAXBLSTATS];
 const char *status_fieldfmt[MAXBLSTATS];
@@ -864,10 +865,11 @@ genericptr_t ptr;
 
     enum statusfields fieldorder[2][15] = {
         { BL_TITLE, BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, BL_ALIGN,
-          BL_SCORE, BL_FLUSH, BL_FLUSH, BL_FLUSH, BL_FLUSH, BL_FLUSH, BL_FLUSH},
+          BL_SCORE, BL_FLUSH, BL_FLUSH, BL_FLUSH, BL_FLUSH, BL_FLUSH,
+          BL_FLUSH },
         { BL_LEVELDESC, BL_GOLD, BL_HP, BL_HPMAX, BL_ENE, BL_ENEMAX,
           BL_AC, BL_XP, BL_EXP, BL_HD, BL_TIME, BL_HUNGER,
-          BL_CAP, BL_CONDITION, BL_FLUSH}
+          BL_CAP, BL_CONDITION, BL_FLUSH }
     };
 
     if (idx != BL_FLUSH) {
@@ -893,7 +895,8 @@ genericptr_t ptr;
                 Strcat(status_vals[idx], " Slime");
             break;
         default:
-            Sprintf(status_vals[idx], status_fieldfmt[idx] ? status_fieldfmt[idx] : "%s", text);
+            Sprintf(status_vals[idx],
+                    status_fieldfmt[idx] ? status_fieldfmt[idx] : "%s", text);
             break;
         }
     }