]> granicus.if.org Git - nethack/commitdiff
Make a few fixes to code that was confusing indent
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Mon, 2 Mar 2015 18:11:24 +0000 (13:11 -0500)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Mon, 2 Mar 2015 18:25:41 +0000 (13:25 -0500)
src/dog.c
src/end.c
src/mon.c
sys/msdos/pctiles.c
sys/msdos/vidvga.c

index ff7dd525da8e6832e33142dc899d3bb7831e0587..d8ab09e4fd126de8265542f24780a22634227e21 100644 (file)
--- a/src/dog.c
+++ b/src/dog.c
@@ -1,4 +1,4 @@
-/* NetHack 3.5 dog.c   $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 dog.c   $NHDT-Date: 1425319883 2015/03/02 18:11:23 $  $NHDT-Branch: master $:$NHDT-Revision: 1.39 $ */
 /* NetHack 3.5 dog.c   $Date: 2011/04/15 01:55:42 $  $Revision: 1.37 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -295,16 +295,12 @@ boolean with_you;
 
        num_segs = mtmp->wormno;
        /* baby long worms have no tail so don't use is_longworm() */
-       if ((mtmp->data == &mons[PM_LONG_WORM]) &&
-#ifdef DCC30_BUG
-           (mtmp->wormno = get_wormno(), mtmp->wormno != 0))
-#else
-           (mtmp->wormno = get_wormno()) != 0)
-#endif
-       {
-           initworm(mtmp, num_segs);
-           /* tail segs are not yet initialized or displayed */
-       } else mtmp->wormno = 0;
+       if (mtmp->data == &mons[PM_LONG_WORM]) {
+            mtmp->wormno = get_wormno();
+            if (mtmp->wormno)
+                initworm(mtmp, num_segs);
+        } else
+            mtmp->wormno = 0;
 
        /* some monsters might need to do something special upon arrival
           _after_ the current level has been fully set up; see dochug() */
index f7e7f5ec3ad77c0c3c22fc0da572d3c682e4ca84..995ef8ec75bfc98542c87eaa8211ce75bac5e958 100644 (file)
--- a/src/end.c
+++ b/src/end.c
@@ -1,4 +1,4 @@
-/* NetHack 3.5 end.c   $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 end.c   $NHDT-Date: 1425319883 2015/03/02 18:11:23 $  $NHDT-Branch: master $:$NHDT-Revision: 1.81 $ */
 /* NetHack 3.5 end.c   $Date: 2012/04/09 02:56:30 $  $Revision: 1.79 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
index f229cd399416d6d17f5704abb48d97b481312dfc..82457199a3b27b60f1e31a659a4a41b4bfa012ea 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1,4 +1,4 @@
-/* NetHack 3.5 mon.c   $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 mon.c   $NHDT-Date: 1425319883 2015/03/02 18:11:23 $  $NHDT-Branch: master $:$NHDT-Revision: 1.137 $ */
 /* NetHack 3.5 mon.c   $Date: 2012/05/16 02:15:10 $  $Revision: 1.126 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -32,6 +32,7 @@ STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int));
 /* part of the original warning code which was replaced in 3.3.1 */
 const char *warnings[] = {
        "white", "pink", "red", "ruby", "purple", "black"
+};
 #endif /* 0 */
 
 STATIC_DCL struct obj *FDECL(make_corpse,(struct monst *, unsigned));
index e60c26f7a8ad8d69bc2b003604f4d6fc71dac413..fb294067a4425a16cfa24f6d4c8711c005a72065 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.5 pctiles.c       $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 pctiles.c       $NHDT-Date: 1425319883 2015/03/02 18:11:23 $  $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */
 /* NetHack 3.5 pctiles.c       $Date: 2009/05/06 10:49:39 $  $Revision: 1.5 $ */
 /*   SCCS Id: @(#)pctiles.c   3.5     1995/07/31                    */
 /*   Copyright (c) NetHack PC Development Team 1993, 1994           */
@@ -241,7 +241,7 @@ char (*pta)[TILE_X];
        long fpos;
        
        fpos = ((long)(tilenum) * (long)(TILE_Y * TILE_X) +
-               (long)TIBHEADER_SIZE;
+               (long)TIBHEADER_SIZE);
        if (fseek(tilefile,fpos,SEEK_SET)) {
                return 1;
        } else {
index 0784cf007568425c78fcbf753b9ea816c8569ddf..e93810fea0db3cb22afaf92de5d1de5b10ae98ff 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.5 vidvga.c        $NHDT-Date$  $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 vidvga.c        $NHDT-Date: 1425319884 2015/03/02 18:11:24 $  $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
 /* NetHack 3.5 vidvga.c        $Date: 2009/05/06 10:49:50 $  $Revision: 1.9 $ */
 /*   SCCS Id: @(#)vidvga.c   3.5     2006/07/08                          */
 /*   Copyright (c) NetHack PC Development Team 1995                 */
@@ -627,12 +627,13 @@ boolean left;
        for (y = 0; y < ROWNO; ++y) {
            for (x = i; x < j; x += 2) {
                t = map[y][x].glyph;
-               if (!ReadPlanarTileFile(glyph2tile[t], &planecell))
+               if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) {
                        if (map[y][x].special) decal_planar(planecell, map[y][x].special);
                        vga_DisplayCell(planecell, x - clipx, y + TOP_MAP_ROW);
-               else
+               } else {
                        pline("vga_shiftmap: Error reading tile (%d,%d)",
-                               t, glyph2tile[t]);              
+                               t, glyph2tile[t]);
+                }
            }
        }
 }