]> granicus.if.org Git - nethack/commitdiff
couple of formatting tweaks
authorPatR <rankin@nethack.org>
Mon, 4 Apr 2016 21:05:31 +0000 (14:05 -0700)
committerPatR <rankin@nethack.org>
Mon, 4 Apr 2016 21:05:31 +0000 (14:05 -0700)
src/cmd.c
src/sp_lev.c

index 40c711bd0e4f732acb527bbe4e5ab6b28df01bd2..cdad0923757eb8fa57f3f220832073c0b41b1698 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1124,7 +1124,8 @@ wiz_intrinsic(VOID_ARGS)
         for (i = 0; i < SIZE(intrinsics); ++i) {
             accelerator = intrinsics[i][0];
             any.a_int = i + 1;
-            add_menu(win, NO_GLYPH, &any, accelerator, 0, ATR_NONE, intrinsics[i], FALSE);
+            add_menu(win, NO_GLYPH, &any, accelerator, 0,
+                     ATR_NONE, intrinsics[i], FALSE);
         }
         end_menu(win, "Which intrinsic?");
         n = select_menu(win, PICK_ONE, &pick_list);
@@ -1137,7 +1138,7 @@ wiz_intrinsic(VOID_ARGS)
             return 0;
         }
 
-        if (!strcmp(intrinsics[i],"deafness")) {
+        if (!strcmp(intrinsics[i], "deafness")) {
             You("go deaf.");
             incr_itimeout(&HDeaf, 30);
             context.botl = TRUE;
index 30476bb398b6ac692f809ac53d4a51aa1a93f2be..4d7e56e3b81de8b9b9f2bb256cf851bbb7c6e25f 100644 (file)
@@ -611,8 +611,8 @@ schar filling;
             if (level.flags.corrmaze)
                 levl[x][y].typ = STONE;
             else
-                levl[x][y].typ =
-                    (y < 2 || ((x % 2) && (y % 2))) ? STONE : filling;
+                levl[x][y].typ = (y < 2 || ((x % 2) && (y % 2))) ? STONE
+                                                                 : filling;
         }
 }
 
@@ -4747,7 +4747,8 @@ struct sp_coder *coder;
         dy1 = (xchar) SP_REGION_Y1(OV_i(r));
         dx2 = (xchar) SP_REGION_X2(OV_i(r));
         dy2 = (xchar) SP_REGION_Y2(OV_i(r));
-        wallify_map(dx1 < 0 ? (xstart-1) : dx1, dy1 < 0 ? (ystart-1) : dy1,
+        wallify_map(dx1 < 0 ? (xstart - 1) : dx1,
+                    dy1 < 0 ? (ystart - 1) : dy1,
                     dx2 < 0 ? (xstart + xsize + 1) : dx2,
                     dy2 < 0 ? (ystart + ysize + 1) : dy2);
         break;
@@ -4846,7 +4847,7 @@ struct sp_coder *coder;
         ystart = valign;
         break;
     }
-    if ((ystart < 0) || (ystart + ysize > ROWNO)) {
+    if (ystart < 0 || ystart + ysize > ROWNO) {
         /* try to move the start a bit */
         ystart += (ystart > 0) ? -2 : 2;
         if (ysize == ROWNO)
@@ -4860,13 +4861,13 @@ struct sp_coder *coder;
         xsize = COLNO - 1;
         ysize = ROWNO;
     } else {
-        xchar x, y;
+        xchar x, y, mptyp;
+
         /* Load the map */
         for (y = ystart; y < ystart + ysize; y++)
             for (x = xstart; x < xstart + xsize; x++) {
-                xchar mptyp =
-                    (mpmap->vardata.str[(y - ystart) * xsize + (x - xstart)]
-                     - 1);
+                mptyp = (mpmap->vardata.str[(y - ystart) * xsize
+                                                  + (x - xstart)] - 1);
                 if (mptyp >= MAX_TYPE)
                     continue;
                 levl[x][y].typ = mptyp;
@@ -5907,7 +5908,8 @@ const char *name;
         (void) dlb_fclose(fd);
         goto give_up;
     }
-    lvl = (sp_lev *) alloc(sizeof(sp_lev));
+
+    lvl = (sp_lev *) alloc(sizeof (sp_lev));
     result = sp_level_loader(fd, lvl);
     (void) dlb_fclose(fd);
     if (result)