]> granicus.if.org Git - nethack/commitdiff
replace leading tabs in several files
authornhmall <nhmall@nethack.org>
Mon, 30 May 2022 16:09:35 +0000 (12:09 -0400)
committernhmall <nhmall@nethack.org>
Mon, 30 May 2022 16:09:35 +0000 (12:09 -0400)
18 files changed:
src/cmd.c
src/end.c
src/explode.c
src/isaac64.c
src/light.c
src/mail.c
src/mhitu.c
src/mklev.c
src/nhlsel.c
src/o_init.c
src/restore.c
src/sounds.c
src/sp_lev.c
src/u_init.c
src/uhitm.c
src/utf8map.c
src/version.c
src/worm.c

index b74e3a34805973c52f6e061b4bcc5c4662ac4cca..068bcba553c6579ea611bfd7a5c8def549738d9b 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1245,7 +1245,7 @@ wiz_load_lua(void)
 {
     if (wizard) {
         char buf[BUFSZ];
-       nhl_sandbox_info sbi = {NHL_SB_SAFE, 0, 0, 0};
+        nhl_sandbox_info sbi = {NHL_SB_SAFE, 0, 0, 0};
 
         buf[0] = '\0';
         getlin("Load which lua file?", buf);
index a79dfa674a64430d450d5f775bf594509be36afe..124451d82119b37415168e0dd57d294ba13d5e1c 100644 (file)
--- a/src/end.c
+++ b/src/end.c
@@ -1871,7 +1871,7 @@ save_killers(NHFILE *nhfp)
     if (perform_bwrite(nhfp)) {
         for (kptr = &g.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
             if (nhfp->structlevel)
-               bwrite(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo));
+                bwrite(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo));
         }
     }
     if (release_data(nhfp)) {
@@ -1890,7 +1890,7 @@ restore_killers(NHFILE *nhfp)
 
     for (kptr = &g.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
         if (nhfp->structlevel)
-           mread(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo));
+            mread(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo));
         if (kptr->next) {
             kptr->next = (struct kinfo *) alloc(sizeof (struct kinfo));
         }
index de8bb3f90394b5706bb4c1780b8e499159b59f94..a2443706fc4b5cfcc8866109f0db4552321e4f55 100644 (file)
@@ -560,9 +560,9 @@ explode(
             g.context.botl = 1;
         }
 
-       /* You resisted the damage, lets not keep that to ourselves */
-       if (uhurt == 1)
-           monstseesu_ad(adtyp);
+        /* You resisted the damage, lets not keep that to ourselves */
+        if (uhurt == 1)
+            monstseesu_ad(adtyp);
 
         if (u.uhp <= 0 || (Upolyd && u.mh <= 0)) {
             if (Upolyd) {
index 4d19335a310b12cc44b2f134efe4ff7b26f47f15..76cb769fca37753e45b5a9f7848975b0f4bbf846 100644 (file)
 /* Extract ISAAC64_SZ_LOG bits (starting at bit 3). */
 static inline uint32_t lower_bits(uint64_t x)
 {
-       return (x & ((ISAAC64_SZ-1) << 3)) >>3;
+    return (x & ((ISAAC64_SZ-1) << 3)) >>3;
 }
 
 /* Extract next ISAAC64_SZ_LOG bits (starting at bit ISAAC64_SZ_LOG+2). */
 static inline uint32_t upper_bits(uint64_t y)
 {
-       return (y >> (ISAAC64_SZ_LOG+3)) & (ISAAC64_SZ-1);
+    return (y >> (ISAAC64_SZ_LOG+3)) & (ISAAC64_SZ-1);
 }
 
 static void isaac64_update(isaac64_ctx *_ctx){
index bf379161678b73a35ae5cb1a1aa72dca80237485..b57693a1f97c7bdee538f26c6c22d0b66662c5d0 100644 (file)
@@ -69,7 +69,7 @@ new_light_core(xchar x, xchar y, int range, int type, anything *id)
         /* camera flash uses radius 0 and passes Null object */
         || (range == 0 && (type != LS_OBJECT || id->a_obj != 0))) {
         impossible("new_light_source:  illegal range %d", range);
-       return (light_source *) 0;
+        return (light_source *) 0;
     }
 
     ls = (light_source *) alloc(sizeof *ls);
index d407f395c229e6ce8bab1b4fbed94c5ef1dbb8d4..06431ad3dc6c4d26b852caf151fd2379ff142cee 100644 (file)
@@ -664,7 +664,7 @@ ck_server_admin_msg(void)
     if (!stat(SERVER_ADMIN_MSG, &nst)) {
         if (nst.st_mtime > ost.st_mtime)
             read_simplemail(nonconst(SERVER_ADMIN_MSG, adminbuf,
-                                    sizeof adminbuf), TRUE);
+                                     sizeof adminbuf), TRUE);
         ost.st_mtime = nst.st_mtime;
     }
 #endif /* SERVER_ADMIN_MSG */
index 79c5435809fa4564f5cde40c3d2651ad3acbcb7d..1b182217240bd8bb158b9aa3e8f0e9dc974da6a9 100644 (file)
@@ -1916,7 +1916,7 @@ doseduce(struct monst *mon)
                           yourgloves ? " and eleven more pairs of gloves"
                                      : "");
             }
-       } else if (seewho)
+        } else if (seewho)
             pline("%s appears to sigh.", Monnam(mon));
         /* else no regret message if can't see or hear seducer */
 
index f3eb47b0f978535d9c8cea9405dfd7b73d74baf4..0736752f8eccc53a30d361eeb4f4ca5ded1b4cce 100644 (file)
@@ -304,9 +304,9 @@ makerooms(void)
                 iflags.in_lua = g.in_mk_themerooms = TRUE;
                 g.themeroom_failed = FALSE;
                 lua_getglobal(themes, "themerooms_generate");
-               if ( nhl_pcall(themes, 0, 0)){
-                   impossible("Lua error: %s", lua_tostring(themes, -1));
-               }
+                if ( nhl_pcall(themes, 0, 0)){
+                    impossible("Lua error: %s", lua_tostring(themes, -1));
+                }
                 iflags.in_lua = g.in_mk_themerooms = FALSE;
                 if (g.themeroom_failed
                     && ((themeroom_tries++ > 10)
index 55144eacb642ffc1f0b09dd177088027c8801018..48bd6b2e51a64f09200ad7edca7a2b92d2f3dff4 100644 (file)
@@ -817,11 +817,11 @@ l_selection_iterate(lua_State *L)
                     lua_pushvalue(L, 2);
                     lua_pushinteger(L, x - g.xstart);
                     lua_pushinteger(L, y - g.ystart);
-                   if (nhl_pcall(L, 2, 0)) {
-                       impossible("Lua error: %s", lua_tostring(L, -1));
-                       /* abort the loops to prevent possible error cascade */
-                       goto out;
-                   }
+                    if (nhl_pcall(L, 2, 0)) {
+                        impossible("Lua error: %s", lua_tostring(L, -1));
+                        /* abort the loops to prevent possible error cascade */
+                        goto out;
+                    }
                 }
     } else {
         nhl_error(L, "wrong parameters");
index 251bb13e47dd2c65a46408206fa404a7ded49461..6529404c870fac1d06edcebd357b9acbd881bf84 100644 (file)
@@ -417,7 +417,7 @@ restnames(NHFILE* nhfp)
             if (nhfp->structlevel) {
                 mread(nhfp->fd, (genericptr_t)objects[i].oc_uname, len);
             }
-       }
+        }
     }
 #ifdef USE_TILES
     shuffle_tiles();
index c3e208bb09c8a1a4ca653c1cb8f7e789772ab3e3..51d068656fe8359333d7c232d885c447bcb967a4 100644 (file)
@@ -1453,18 +1453,18 @@ validate(NHFILE* nhfp, const char *name)
     if (!(reslt = uptodate(nhfp, name, utdflags))) return 1;
 
     if ((nhfp->mode & WRITING) == 0) {
-       if (nhfp->structlevel)
+        if (nhfp->structlevel)
             rlen = (readLenType) read(nhfp->fd, (genericptr_t) &sfi, sizeof sfi);
     } else {
         if (nhfp->structlevel)
             rlen = (readLenType) read(nhfp->fd, (genericptr_t) &sfi, sizeof sfi);
         minit();               /* ZEROCOMP */
         if (rlen == 0) {
-           if (verbose) {
-               pline("File \"%s\" is empty during save file feature check?", name);
-               wait_synch();
-           }
-           return -1;
+            if (verbose) {
+                pline("File \"%s\" is empty during save file feature check?", name);
+                wait_synch();
+            }
+            return -1;
         }
     }
     return 0;
index e0f2252f95fd9c49b96636a7cfdf8076a459ea5c..777090fe3f6fefe1b00e663b9a4e807ad94578f9 100644 (file)
@@ -1441,7 +1441,7 @@ add_sound_mapping(const char* mapping)
         if (strlen(sounddir) + 1 + strlen(filename) >= sizeof filespec) {
             raw_print("sound file name too long");
             return 0;
-       }
+        }
         Snprintf(filespec, sizeof filespec, "%s/%s", sounddir, filename);
 
         if (idx >= 0 || can_read_file(filespec)) {
index 3964515748f33c7b9385e512f48262a19ae00363..ac8b6bddba3f4348c4a3eda0857e25d331c2bb1f 100644 (file)
@@ -543,46 +543,46 @@ flip_level(int flp, boolean extras)
     for (ttmp = g.ftrap; ttmp; ttmp = ttmp->ntrap) {
         if (!inFlipArea(ttmp->tx, ttmp->ty))
             continue;
-       if (flp & 1) {
-           ttmp->ty = FlipY(ttmp->ty);
-           if (ttmp->ttyp == ROLLING_BOULDER_TRAP) {
-               ttmp->launch.y = FlipY(ttmp->launch.y);
-               ttmp->launch2.y = FlipY(ttmp->launch2.y);
-           } else if (is_pit(ttmp->ttyp) && ttmp->conjoined) {
+        if (flp & 1) {
+            ttmp->ty = FlipY(ttmp->ty);
+            if (ttmp->ttyp == ROLLING_BOULDER_TRAP) {
+                ttmp->launch.y = FlipY(ttmp->launch.y);
+                ttmp->launch2.y = FlipY(ttmp->launch2.y);
+            } else if (is_pit(ttmp->ttyp) && ttmp->conjoined) {
                 ttmp->conjoined = flip_encoded_direction_bits(flp,
                                                               ttmp->conjoined);
             }
-       }
-       if (flp & 2) {
-           ttmp->tx = FlipX(ttmp->tx);
-           if (ttmp->ttyp == ROLLING_BOULDER_TRAP) {
-               ttmp->launch.x = FlipX(ttmp->launch.x);
-               ttmp->launch2.x = FlipX(ttmp->launch2.x);
-           } else if (is_pit(ttmp->ttyp) && ttmp->conjoined) {
+        }
+        if (flp & 2) {
+            ttmp->tx = FlipX(ttmp->tx);
+            if (ttmp->ttyp == ROLLING_BOULDER_TRAP) {
+                ttmp->launch.x = FlipX(ttmp->launch.x);
+                ttmp->launch2.x = FlipX(ttmp->launch2.x);
+            } else if (is_pit(ttmp->ttyp) && ttmp->conjoined) {
                 ttmp->conjoined = flip_encoded_direction_bits(flp,
                                                               ttmp->conjoined);
-           }
-       }
+            }
+        }
     }
 
     /* objects */
     for (otmp = fobj; otmp; otmp = otmp->nobj) {
         if (!inFlipArea(otmp->ox, otmp->oy))
             continue;
-       if (flp & 1)
-           otmp->oy = FlipY(otmp->oy);
-       if (flp & 2)
-           otmp->ox = FlipX(otmp->ox);
+        if (flp & 1)
+            otmp->oy = FlipY(otmp->oy);
+        if (flp & 2)
+            otmp->ox = FlipX(otmp->ox);
     }
 
     /* buried objects */
     for (otmp = g.level.buriedobjlist; otmp; otmp = otmp->nobj) {
         if (!inFlipArea(otmp->ox, otmp->oy))
             continue;
-       if (flp & 1)
-           otmp->oy = FlipY(otmp->oy);
-       if (flp & 2)
-           otmp->ox = FlipX(otmp->ox);
+        if (flp & 1)
+            otmp->oy = FlipY(otmp->oy);
+        if (flp & 2)
+            otmp->ox = FlipX(otmp->ox);
     }
 
     /* monsters */
@@ -592,10 +592,10 @@ flip_level(int flp, boolean extras)
         /* skip the occasional earth elemental outside the flip area */
         if (!inFlipArea(mtmp->mx, mtmp->my))
             continue;
-       if (flp & 1)
-           mtmp->my = FlipY(mtmp->my);
-       if (flp & 2)
-           mtmp->mx = FlipX(mtmp->mx);
+        if (flp & 1)
+            mtmp->my = FlipY(mtmp->my);
+        if (flp & 2)
+            mtmp->mx = FlipX(mtmp->mx);
 
         if (mtmp->ispriest) {
             Flip_coord(EPRI(mtmp)->shrpos);
@@ -606,8 +606,8 @@ flip_level(int flp, boolean extras)
             if (flp & 1)
                 flip_worm_segs_vertical(mtmp, miny, maxy);
             if (flp & 2)
-               flip_worm_segs_horizontal(mtmp, minx, maxx);
-       }
+                flip_worm_segs_horizontal(mtmp, minx, maxx);
+        }
 #if 0   /* not useful unless tracking also gets flipped */
         if (extras) {
             if (mtmp->tame && has_edog(mtmp))
@@ -618,48 +618,48 @@ flip_level(int flp, boolean extras)
 
     /* engravings */
     for (etmp = head_engr; etmp; etmp = etmp->nxt_engr) {
-       if (flp & 1)
-           etmp->engr_y = FlipY(etmp->engr_y);
-       if (flp & 2)
-           etmp->engr_x = FlipX(etmp->engr_x);
+        if (flp & 1)
+            etmp->engr_y = FlipY(etmp->engr_y);
+        if (flp & 2)
+            etmp->engr_x = FlipX(etmp->engr_x);
     }
 
     /* level (teleport) regions */
     for (i = 0; i < g.num_lregions; i++) {
-       if (flp & 1) {
-           g.lregions[i].inarea.y1 = FlipY(g.lregions[i].inarea.y1);
-           g.lregions[i].inarea.y2 = FlipY(g.lregions[i].inarea.y2);
-           if (g.lregions[i].inarea.y1 > g.lregions[i].inarea.y2) {
-               itmp = g.lregions[i].inarea.y1;
-               g.lregions[i].inarea.y1 = g.lregions[i].inarea.y2;
-               g.lregions[i].inarea.y2 = itmp;
-           }
-
-           g.lregions[i].delarea.y1 = FlipY(g.lregions[i].delarea.y1);
-           g.lregions[i].delarea.y2 = FlipY(g.lregions[i].delarea.y2);
-           if (g.lregions[i].delarea.y1 > g.lregions[i].delarea.y2) {
-               itmp = g.lregions[i].delarea.y1;
-               g.lregions[i].delarea.y1 = g.lregions[i].delarea.y2;
-               g.lregions[i].delarea.y2 = itmp;
-           }
-       }
-       if (flp & 2) {
-           g.lregions[i].inarea.x1 = FlipX(g.lregions[i].inarea.x1);
-           g.lregions[i].inarea.x2 = FlipX(g.lregions[i].inarea.x2);
-           if (g.lregions[i].inarea.x1 > g.lregions[i].inarea.x2) {
-               itmp = g.lregions[i].inarea.x1;
-               g.lregions[i].inarea.x1 = g.lregions[i].inarea.x2;
-               g.lregions[i].inarea.x2 = itmp;
-           }
-
-           g.lregions[i].delarea.x1 = FlipX(g.lregions[i].delarea.x1);
-           g.lregions[i].delarea.x2 = FlipX(g.lregions[i].delarea.x2);
-           if (g.lregions[i].delarea.x1 > g.lregions[i].delarea.x2) {
-               itmp = g.lregions[i].delarea.x1;
-               g.lregions[i].delarea.x1 = g.lregions[i].delarea.x2;
-               g.lregions[i].delarea.x2 = itmp;
-           }
-       }
+        if (flp & 1) {
+            g.lregions[i].inarea.y1 = FlipY(g.lregions[i].inarea.y1);
+            g.lregions[i].inarea.y2 = FlipY(g.lregions[i].inarea.y2);
+            if (g.lregions[i].inarea.y1 > g.lregions[i].inarea.y2) {
+                itmp = g.lregions[i].inarea.y1;
+                g.lregions[i].inarea.y1 = g.lregions[i].inarea.y2;
+                g.lregions[i].inarea.y2 = itmp;
+            }
+
+            g.lregions[i].delarea.y1 = FlipY(g.lregions[i].delarea.y1);
+            g.lregions[i].delarea.y2 = FlipY(g.lregions[i].delarea.y2);
+            if (g.lregions[i].delarea.y1 > g.lregions[i].delarea.y2) {
+                itmp = g.lregions[i].delarea.y1;
+                g.lregions[i].delarea.y1 = g.lregions[i].delarea.y2;
+                g.lregions[i].delarea.y2 = itmp;
+            }
+        }
+        if (flp & 2) {
+            g.lregions[i].inarea.x1 = FlipX(g.lregions[i].inarea.x1);
+            g.lregions[i].inarea.x2 = FlipX(g.lregions[i].inarea.x2);
+            if (g.lregions[i].inarea.x1 > g.lregions[i].inarea.x2) {
+                itmp = g.lregions[i].inarea.x1;
+                g.lregions[i].inarea.x1 = g.lregions[i].inarea.x2;
+                g.lregions[i].inarea.x2 = itmp;
+            }
+
+            g.lregions[i].delarea.x1 = FlipX(g.lregions[i].delarea.x1);
+            g.lregions[i].delarea.x2 = FlipX(g.lregions[i].delarea.x2);
+            if (g.lregions[i].delarea.x1 > g.lregions[i].delarea.x2) {
+                itmp = g.lregions[i].delarea.x1;
+                g.lregions[i].delarea.x1 = g.lregions[i].delarea.x2;
+                g.lregions[i].delarea.x2 = itmp;
+            }
+        }
     }
 
     /* regions (poison clouds, etc) */
@@ -693,100 +693,100 @@ flip_level(int flp, boolean extras)
 
     /* rooms */
     for (sroom = &g.rooms[0]; ; sroom++) {
-       if (sroom->hx < 0)
+        if (sroom->hx < 0)
             break;
 
-       if (flp & 1) {
-           sroom->ly = FlipY(sroom->ly);
-           sroom->hy = FlipY(sroom->hy);
-           if (sroom->ly > sroom->hy) {
-               itmp = sroom->ly;
-               sroom->ly = sroom->hy;
-               sroom->hy = itmp;
-           }
-       }
-       if (flp & 2) {
-           sroom->lx = FlipX(sroom->lx);
-           sroom->hx = FlipX(sroom->hx);
-           if (sroom->lx > sroom->hx) {
-               itmp = sroom->lx;
-               sroom->lx = sroom->hx;
-               sroom->hx = itmp;
-           }
-       }
-
-       if (sroom->nsubrooms)
-           for (i = 0; i < sroom->nsubrooms; i++) {
-               struct mkroom *rroom = sroom->sbrooms[i];
-
-               if (flp & 1) {
-                   rroom->ly = FlipY(rroom->ly);
-                   rroom->hy = FlipY(rroom->hy);
-                   if (rroom->ly > rroom->hy) {
-                       itmp = rroom->ly;
-                       rroom->ly = rroom->hy;
-                       rroom->hy = itmp;
-                   }
-               }
-               if (flp & 2) {
-                   rroom->lx = FlipX(rroom->lx);
-                   rroom->hx = FlipX(rroom->hx);
-                   if (rroom->lx > rroom->hx) {
-                       itmp = rroom->lx;
-                       rroom->lx = rroom->hx;
-                       rroom->hx = itmp;
-                   }
-               }
-           }
+        if (flp & 1) {
+            sroom->ly = FlipY(sroom->ly);
+            sroom->hy = FlipY(sroom->hy);
+            if (sroom->ly > sroom->hy) {
+                itmp = sroom->ly;
+                sroom->ly = sroom->hy;
+                sroom->hy = itmp;
+            }
+        }
+        if (flp & 2) {
+            sroom->lx = FlipX(sroom->lx);
+            sroom->hx = FlipX(sroom->hx);
+            if (sroom->lx > sroom->hx) {
+                itmp = sroom->lx;
+                sroom->lx = sroom->hx;
+                sroom->hx = itmp;
+            }
+        }
+
+        if (sroom->nsubrooms)
+            for (i = 0; i < sroom->nsubrooms; i++) {
+                struct mkroom *rroom = sroom->sbrooms[i];
+
+                if (flp & 1) {
+                    rroom->ly = FlipY(rroom->ly);
+                    rroom->hy = FlipY(rroom->hy);
+                    if (rroom->ly > rroom->hy) {
+                        itmp = rroom->ly;
+                        rroom->ly = rroom->hy;
+                        rroom->hy = itmp;
+                    }
+                }
+                if (flp & 2) {
+                    rroom->lx = FlipX(rroom->lx);
+                    rroom->hx = FlipX(rroom->hx);
+                    if (rroom->lx > rroom->hx) {
+                        itmp = rroom->lx;
+                        rroom->lx = rroom->hx;
+                        rroom->hx = itmp;
+                    }
+                }
+            }
     }
 
     /* doors */
     for (i = 0; i < g.doorindex; i++) {
-       Flip_coord(g.doors[i]);
+        Flip_coord(g.doors[i]);
     }
 
     /* the map */
     if (flp & 1) {
-       for (x = minx; x <= maxx; x++)
-           for (y = miny; y < (miny + ((maxy - miny + 1) / 2)); y++) {
+        for (x = minx; x <= maxx; x++)
+            for (y = miny; y < (miny + ((maxy - miny + 1) / 2)); y++) {
                 int ny = FlipY(y);
 
-               flip_drawbridge_vertical(&levl[x][y]);
-               flip_drawbridge_vertical(&levl[x][ny]);
+                flip_drawbridge_vertical(&levl[x][y]);
+                flip_drawbridge_vertical(&levl[x][ny]);
 
-               trm = levl[x][y];
-               levl[x][y] = levl[x][ny];
-               levl[x][ny] = trm;
+                trm = levl[x][y];
+                levl[x][y] = levl[x][ny];
+                levl[x][ny] = trm;
 
-               otmp = g.level.objects[x][y];
-               g.level.objects[x][y] = g.level.objects[x][ny];
-               g.level.objects[x][ny] = otmp;
+                otmp = g.level.objects[x][y];
+                g.level.objects[x][y] = g.level.objects[x][ny];
+                g.level.objects[x][ny] = otmp;
 
-               mtmp = g.level.monsters[x][y];
-               g.level.monsters[x][y] = g.level.monsters[x][ny];
-               g.level.monsters[x][ny] = mtmp;
-           }
+                mtmp = g.level.monsters[x][y];
+                g.level.monsters[x][y] = g.level.monsters[x][ny];
+                g.level.monsters[x][ny] = mtmp;
+            }
     }
     if (flp & 2) {
-       for (x = minx; x < (minx + ((maxx - minx + 1) / 2)); x++)
-           for (y = miny; y <= maxy; y++) {
+        for (x = minx; x < (minx + ((maxx - minx + 1) / 2)); x++)
+            for (y = miny; y <= maxy; y++) {
                 int nx = FlipX(x);
 
-               flip_drawbridge_horizontal(&levl[x][y]);
-               flip_drawbridge_horizontal(&levl[nx][y]);
+                flip_drawbridge_horizontal(&levl[x][y]);
+                flip_drawbridge_horizontal(&levl[nx][y]);
 
-               trm = levl[x][y];
-               levl[x][y] = levl[nx][y];
-               levl[nx][y] = trm;
+                trm = levl[x][y];
+                levl[x][y] = levl[nx][y];
+                levl[nx][y] = trm;
 
-               otmp = g.level.objects[x][y];
-               g.level.objects[x][y] = g.level.objects[nx][y];
-               g.level.objects[nx][y] = otmp;
+                otmp = g.level.objects[x][y];
+                g.level.objects[x][y] = g.level.objects[nx][y];
+                g.level.objects[nx][y] = otmp;
 
-               mtmp = g.level.monsters[x][y];
-               g.level.monsters[x][y] = g.level.monsters[nx][y];
-               g.level.monsters[nx][y] = mtmp;
-           }
+                mtmp = g.level.monsters[x][y];
+                g.level.monsters[x][y] = g.level.monsters[nx][y];
+                g.level.monsters[nx][y] = mtmp;
+            }
     }
 
     /* timed effects */
@@ -3197,9 +3197,9 @@ lspo_monster(lua_State *L)
 
     if (tmpmons.has_invent && lua_type(L, -1) == LUA_TFUNCTION) {
         lua_remove(L, -2);
-       if (nhl_pcall(L, 0, 0)){
-           impossible("Lua error: %s", lua_tostring(L, -1));
-       }
+        if (nhl_pcall(L, 0, 0)){
+            impossible("Lua error: %s", lua_tostring(L, -1));
+        }
         spo_end_moninvent();
     } else
         lua_pop(L, 1);
@@ -3513,9 +3513,9 @@ lspo_object(lua_State *L)
 
     if (lua_type(L, -1) == LUA_TFUNCTION) {
         lua_remove(L, -2);
-       if (nhl_pcall(L, 0, 0)){
-           impossible("Lua error: %s", lua_tostring(L, -1));
-       }
+        if (nhl_pcall(L, 0, 0)){
+            impossible("Lua error: %s", lua_tostring(L, -1));
+        }
     } else
         lua_pop(L, 1);
 
@@ -3825,9 +3825,9 @@ lspo_room(lua_State *L)
                 if (lua_type(L, -1) == LUA_TFUNCTION) {
                     lua_remove(L, -2);
                     l_push_mkroom_table(L, tmpcr);
-                   if (nhl_pcall(L, 1, 0)){
-                       impossible("Lua error: %s", lua_tostring(L, -1));
-                   }
+                    if (nhl_pcall(L, 1, 0)){
+                        impossible("Lua error: %s", lua_tostring(L, -1));
+                    }
                 } else
                     lua_pop(L, 1);
                 spo_endroom(g.coder);
@@ -5766,9 +5766,9 @@ lspo_region(lua_State *L)
             lua_getfield(L, 1, "contents");
             if (lua_type(L, -1) == LUA_TFUNCTION) {
                 lua_remove(L, -2);
-               if (nhl_pcall(L, 0, 0)){
-                   impossible("Lua error: %s", lua_tostring(L, -1));
-               }
+                if (nhl_pcall(L, 0, 0)){
+                    impossible("Lua error: %s", lua_tostring(L, -1));
+                }
             } else
                 lua_pop(L, 1);
             spo_endroom(g.coder);
@@ -6372,9 +6372,9 @@ TODO: g.coder->croom needs to be updated
 
     if (has_contents && !(g.in_mk_themerooms && g.themeroom_failed)) {
         l_push_wid_hei_table(L, g.xsize, g.ysize);
-       if (nhl_pcall(L, 1, 0)){
-           impossible("Lua error: %s", lua_tostring(L, -1));
-       }
+        if (nhl_pcall(L, 1, 0)){
+            impossible("Lua error: %s", lua_tostring(L, -1));
+        }
     }
 
     return 0;
index 575eea60d5ed016624b4045ed817615569796816..ce3090dd6c48bb6e062b43a2983a5324b3847cea 100644 (file)
@@ -1007,7 +1007,7 @@ ini_inv(struct trobj *trop)
     int otyp, i;
     boolean got_sp1 = FALSE; /* got a level 1 spellbook? */
 
-       while (trop->trclass) {
+    while (trop->trclass) {
         otyp = (int) trop->trotyp;
         if (otyp != UNDEF_TYP) {
             obj = mksobj(otyp, TRUE, FALSE);
index b50b3d744c7416135955a6b4591b202d17157e4d..63eef0c7dad6bdcdad715f29576225b4f6d22707 100644 (file)
@@ -651,7 +651,7 @@ hitum_cleave(
         dieroll = rnd(20);
         mhit = (tmp > dieroll);
         g.bhitpos.x = tx, g.bhitpos.y = ty; /* normally set up by
-                                              do_attack() */
+                                               do_attack() */
         (void) known_hitum(mtmp, uwep, &mhit, tmp, armorpenalty,
                            uattk, dieroll);
         (void) passive(mtmp, uwep, mhit, !DEADMONSTER(mtmp), AT_WEAP, !uwep);
index fba35b5b90cb56f13b084dc241412e1dd55fd912..d4564486f06863422ed39d46c43d9ce145b89dbe 100644 (file)
@@ -1026,7 +1026,7 @@ static int find_glyphs(const char *id);
 static void just_find_callback(int glyph, struct find_struct *findwhat);
 static void to_unicode_callback(int glyph, struct find_struct *findwhat);
 static struct customization_detail *find_display_urep_customization(
-               const char *customization_name, int glyphidx,
+                const char *customization_name, int glyphidx,
                 enum graphics_sets which_set);
 
 void
@@ -1045,7 +1045,7 @@ test_glyphnames(void)
 static void
 just_find_callback(int glyph UNUSED, struct find_struct *findwhat UNUSED)
 {
-       /* nothing */
+    /* nothing */
 }
 static int
 find_glyphs(const char *id)
index 8958a3de4682d95b8c58e3dcc1789906e83e81e5..19167ad137104737b8a13dc96c6e6e70a380b231 100644 (file)
@@ -272,7 +272,7 @@ insert_rtoption(char *buf)
     for (i = 0; i < SIZE(rt_opts); ++i) {
         if (strstri(buf, rt_opts[i].token) && *rt_opts[i].value) {
             (void) strsubst(buf, rt_opts[i].token, rt_opts[i].value);
-       }
+        }
         /* we don't break out of the loop after a match; there might be
            other matches on the same line */
     }
index fe8ae12b33d75717d54e34f0ae1ddf7433c0fe8e..b25f68b6867853a21679802a4ca033204cedae22 100644 (file)
@@ -1005,8 +1005,8 @@ flip_worm_segs_vertical(struct monst *worm, int miny, int maxy)
     struct wseg *curr = wtails[worm->wormno];
 
     while (curr) {
-       curr->wy = (maxy - curr->wy + miny);
-       curr = curr->nseg;
+        curr->wy = (maxy - curr->wy + miny);
+        curr = curr->nseg;
     }
 }
 
@@ -1016,8 +1016,8 @@ flip_worm_segs_horizontal(struct monst *worm, int minx, int maxx)
     struct wseg *curr = wtails[worm->wormno];
 
     while (curr) {
-       curr->wx = (maxx - curr->wx + minx);
-       curr = curr->nseg;
+        curr->wx = (maxx - curr->wx + minx);
+        curr = curr->nseg;
     }
 }