]> granicus.if.org Git - nethack/commitdiff
realign macro continuation after g to g? expansion
authornhmall <nhmall@nethack.org>
Wed, 7 Dec 2022 16:24:17 +0000 (11:24 -0500)
committernhmall <nhmall@nethack.org>
Wed, 7 Dec 2022 16:24:17 +0000 (11:24 -0500)
src/botl.c
src/display.c
src/mon.c
src/mthrowu.c

index 8609ca79d18787d23809f89610ec81f61360b179..24349001842e9ef1ae9096f1c026d7c227ac637e 100644 (file)
@@ -676,11 +676,11 @@ static const char *cache_nomovemsg = NULL, *cache_multi_reason = NULL;
 do {                                                        \
     boolean clear_cache = FALSE, refresh_cache = FALSE;     \
                                                             \
-    if (gm.multi < 0) {                                      \
-        if (gn.nomovemsg || gm.multi_reason) {                \
-            if (cache_nomovemsg != gn.nomovemsg)             \
+    if (gm.multi < 0) {                                     \
+        if (gn.nomovemsg || gm.multi_reason) {              \
+            if (cache_nomovemsg != gn.nomovemsg)            \
                 refresh_cache = TRUE;                       \
-            if (cache_multi_reason != gm.multi_reason)       \
+            if (cache_multi_reason != gm.multi_reason)      \
                 refresh_cache = TRUE;                       \
         } else {                                            \
             clear_cache = TRUE;                             \
@@ -693,8 +693,8 @@ do {                                                        \
         cache_multi_reason = (const char *) 0;              \
     }                                                       \
     if (refresh_cache) {                                    \
-        cache_nomovemsg = gn.nomovemsg;                      \
-        cache_multi_reason = gm.multi_reason;                \
+        cache_nomovemsg = gn.nomovemsg;                     \
+        cache_multi_reason = gm.multi_reason;               \
     }                                                       \
     if (clear_cache || refresh_cache) {                     \
         cache_reslt[0] = cache_avail[0] = FALSE;            \
index ee5a3230f0fccec9062dc5e63e7bb15879c8f04e..a1149468656ac75d61bce64be24306602a0b3251 100644 (file)
@@ -1814,14 +1814,14 @@ show_glyph(coordxy x, coordxy y, int glyph)
  * Reset the changed glyph borders so that none of the 3rd screen has
  * changed.
  */
-#define reset_glyph_bbox()               \
-    {                                    \
-        int i;                           \
-                                         \
-        for (i = 0; i < ROWNO; i++) {    \
+#define reset_glyph_bbox()                \
+    {                                     \
+        int i;                            \
+                                          \
+        for (i = 0; i < ROWNO; i++) {     \
             gg.gbuf_start[i] = COLNO - 1; \
             gg.gbuf_stop[i] = 0;          \
-        }                                \
+        }                                 \
     }
 
 static gbuf_entry nul_gbuf = {
@@ -2410,7 +2410,7 @@ int wallcolors[sokoban_walls + 1] = {
 #endif
 
 #if 0
-#define is_objpile(x, y)                         \
+#define is_objpile(x, y)                          \
     (!Hallucination && gl.level.objects[(x)][(y)] \
      && gl.level.objects[(x)][(y)]->nexthere)
 #endif
index c0c4a51b696d3f094b970f968432e47d3494c189..866abd84b69179e5f92d12a58576dc1819ba21df 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -475,13 +475,13 @@ pm_to_cham(int mndx)
 }
 
 /* for deciding whether corpse will carry along full monster data */
-#define KEEPTRAITS(mon)                                                 \
-    ((mon)->isshk || (mon)->mtame || unique_corpstat((mon)->data)       \
-     || is_reviver((mon)->data)                                         \
-        /* normally quest leader will be unique, */                     \
-        /* but he or she might have been polymorphed  */                \
+#define KEEPTRAITS(mon)                                                  \
+    ((mon)->isshk || (mon)->mtame || unique_corpstat((mon)->data)        \
+     || is_reviver((mon)->data)                                          \
+        /* normally quest leader will be unique, */                      \
+        /* but he or she might have been polymorphed  */                 \
      || (mon)->m_id == gq.quest_status.leader_m_id                       \
-        /* special cancellation handling for these */                   \
+        /* special cancellation handling for these */                    \
      || (dmgtype((mon)->data, AD_SEDU) || dmgtype((mon)->data, AD_SSEX)))
 
 /* Creates a monster corpse, a "special" corpse, or nothing if it doesn't
index 2c34ac0fa3f0aca4693807941d3ab02bc1fa55ef..133b0014c238769eb5c5ebb7817ec7c4a29bb2e6 100644 (file)
@@ -523,22 +523,22 @@ ucatchgem(
 }
 
 #define MT_FLIGHTCHECK(pre,forcehit) \
-    (/* missile hits edge of screen */                                  \
-     !isok(gb.bhitpos.x + dx, gb.bhitpos.y + dy)                          \
-     /* missile hits the wall */                                        \
-     || IS_ROCK(levl[gb.bhitpos.x + dx][gb.bhitpos.y + dy].typ)           \
-     /* missile hit closed door */                                      \
-     || closed_door(gb.bhitpos.x + dx, gb.bhitpos.y + dy)                 \
-     /* missile might hit iron bars */                                  \
-     /* the random chance for small objects hitting bars is */          \
-     /* skipped when reaching them at point blank range */              \
-     || (levl[gb.bhitpos.x + dx][gb.bhitpos.y + dy].typ == IRONBARS       \
-         && hits_bars(&singleobj,                                       \
-                      gb.bhitpos.x, gb.bhitpos.y,                         \
-                      gb.bhitpos.x + dx, gb.bhitpos.y + dy,               \
-                      ((pre) ? 0 : forcehit), 0))                       \
-     /* Thrown objects "sink" */                                        \
-     || (!(pre) && IS_SINK(levl[gb.bhitpos.x][gb.bhitpos.y].typ))         \
+    (/* missile hits edge of screen */                                 \
+     !isok(gb.bhitpos.x + dx, gb.bhitpos.y + dy)                       \
+     /* missile hits the wall */                                       \
+     || IS_ROCK(levl[gb.bhitpos.x + dx][gb.bhitpos.y + dy].typ)        \
+     /* missile hit closed door */                                     \
+     || closed_door(gb.bhitpos.x + dx, gb.bhitpos.y + dy)              \
+     /* missile might hit iron bars */                                 \
+     /* the random chance for small objects hitting bars is */         \
+     /* skipped when reaching them at point blank range */             \
+     || (levl[gb.bhitpos.x + dx][gb.bhitpos.y + dy].typ == IRONBARS    \
+         && hits_bars(&singleobj,                                      \
+                      gb.bhitpos.x, gb.bhitpos.y,                      \
+                      gb.bhitpos.x + dx, gb.bhitpos.y + dy,            \
+                      ((pre) ? 0 : forcehit), 0))                      \
+     /* Thrown objects "sink" */                                       \
+     || (!(pre) && IS_SINK(levl[gb.bhitpos.x][gb.bhitpos.y].typ))      \
      )
 
 void