src formatting

Remove a couple of tabs, and for the affected files, put 'goto' labels
in column 2 where they're easier to spot.
This commit is contained in:
PatR
2019-01-04 18:47:00 -08:00
parent 9bcc42957b
commit c0cce3110e
3 changed files with 20 additions and 19 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 drawing.c $NHDT-Date: 1546212616 2018/12/30 23:30:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.58 $ */ /* NetHack 3.6 drawing.c $NHDT-Date: 1546656404 2019/01/05 02:46:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
/* Copyright (c) NetHack Development Team 1992. */ /* Copyright (c) NetHack Development Team 1992. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
+15 -14
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 hack.c $NHDT-Date: 1545530973 2018/12/23 02:09:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.202 $ */ /* NetHack 3.6 hack.c $NHDT-Date: 1546656413 2019/01/05 02:46:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.203 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */ /*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -279,7 +279,7 @@ moverock()
/* note: reset to zero after save/restore cycle */ /* note: reset to zero after save/restore cycle */
static NEARDATA long lastmovetime; static NEARDATA long lastmovetime;
#endif #endif
dopush: dopush:
if (!u.usteed) { if (!u.usteed) {
if (moves > lastmovetime + 2 || moves < lastmovetime) if (moves > lastmovetime + 2 || moves < lastmovetime)
pline("With %s effort you move %s.", pline("With %s effort you move %s.",
@@ -304,7 +304,7 @@ moverock()
newsym(sx, sy); newsym(sx, sy);
} }
} else { } else {
nopushmsg: nopushmsg:
if (u.usteed) if (u.usteed)
pline("%s tries to move %s, but cannot.", pline("%s tries to move %s, but cannot.",
upstart(y_monnam(u.usteed)), the(xname(otmp))); upstart(y_monnam(u.usteed)), the(xname(otmp)));
@@ -312,7 +312,7 @@ moverock()
You("try to move %s, but in vain.", the(xname(otmp))); You("try to move %s, but in vain.", the(xname(otmp)));
if (Blind) if (Blind)
feel_location(sx, sy); feel_location(sx, sy);
cannot_push: cannot_push:
if (throws_rocks(youmonst.data)) { if (throws_rocks(youmonst.data)) {
boolean boolean
canpickup = (!Sokoban canpickup = (!Sokoban
@@ -797,7 +797,7 @@ int mode;
return FALSE; return FALSE;
} }
} else { } else {
testdiag: testdiag:
if (dx && dy && !Passes_walls if (dx && dy && !Passes_walls
&& (!doorless_door(x, y) || block_door(x, y))) { && (!doorless_door(x, y) || block_door(x, y))) {
/* Diagonal moves into a door are not allowed. */ /* Diagonal moves into a door are not allowed. */
@@ -955,8 +955,8 @@ int mode;
uy = u.uy; uy = u.uy;
} }
noguess: noguess:
(void) memset((genericptr_t) travel, 0, sizeof(travel)); (void) memset((genericptr_t) travel, 0, sizeof travel);
travelstepx[0][0] = tx; travelstepx[0][0] = tx;
travelstepy[0][0] = ty; travelstepy[0][0] = ty;
@@ -1141,7 +1141,7 @@ int mode;
return FALSE; return FALSE;
} }
found: found:
u.dx = 0; u.dx = 0;
u.dy = 0; u.dy = 0;
nomul(0); nomul(0);
@@ -1294,7 +1294,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
Norep("You are %s %s.", predicament, culprit); Norep("You are %s %s.", predicament, culprit);
} }
} else { } else {
wriggle_free: wriggle_free:
if (u.usteed) if (u.usteed)
pline("%s finally %s free.", upstart(steedname), pline("%s finally %s free.", upstart(steedname),
!anchored ? "lurches" : "wrenches the ball"); !anchored ? "lurches" : "wrenches the ball");
@@ -1493,7 +1493,7 @@ domove()
case 0: case 0:
case 1: case 1:
case 2: case 2:
pull_free: pull_free:
You("pull free from %s.", mon_nam(u.ustuck)); You("pull free from %s.", mon_nam(u.ustuck));
u.ustuck = 0; u.ustuck = 0;
break; break;
@@ -2203,7 +2203,7 @@ boolean pick;
} }
mnexto(mtmp); /* have to move the monster */ mnexto(mtmp); /* have to move the monster */
} }
spotdone: spotdone:
if (!--inspoteffects) { if (!--inspoteffects) {
spotterrain = STONE; /* 0 */ spotterrain = STONE; /* 0 */
spotloc.x = spotloc.y = 0; spotloc.x = spotloc.y = 0;
@@ -2581,7 +2581,8 @@ dopickup(VOID_ARGS)
int count, tmpcount, ret; int count, tmpcount, ret;
/* awful kludge to work around parse()'s pre-decrement */ /* awful kludge to work around parse()'s pre-decrement */
count = (multi || (save_cm && *save_cm == cmd_from_func(dopickup))) ? multi + 1 : 0; count = (multi || (save_cm && *save_cm == cmd_from_func(dopickup)))
? multi + 1 : 0;
multi = 0; /* always reset */ multi = 0; /* always reset */
if ((ret = pickup_checks() >= 0)) if ((ret = pickup_checks() >= 0))
@@ -2654,7 +2655,7 @@ lookaround()
} }
goto bcorr; goto bcorr;
} else if (levl[x][y].typ == CORR) { } else if (levl[x][y].typ == CORR) {
bcorr: bcorr:
if (levl[u.ux][u.uy].typ != ROOM) { if (levl[u.ux][u.uy].typ != ROOM) {
if (context.run == 1 || context.run == 3 if (context.run == 1 || context.run == 3
|| context.run == 8) { || context.run == 8) {
@@ -2712,7 +2713,7 @@ lookaround()
|| ((y == u.uy - u.dy) && (x != u.ux + u.dx))) || ((y == u.uy - u.dy) && (x != u.ux + u.dx)))
continue; continue;
} }
stop: stop:
nomul(0); nomul(0);
return; return;
} /* end for loops */ } /* end for loops */
+3 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 pager.c $NHDT-Date: 1546144745 2018/12/30 04:39:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.146 $ */ /* NetHack 3.6 pager.c $NHDT-Date: 1546656415 2019/01/05 02:46:55 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.147 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2018. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -117,7 +117,7 @@ char *outbuf;
} else if (mon->m_ap_type == M_AP_OBJECT } else if (mon->m_ap_type == M_AP_OBJECT
/* remembered glyph, not glyph_at() which is 'mon' */ /* remembered glyph, not glyph_at() which is 'mon' */
&& glyph_is_object(glyph)) { && glyph_is_object(glyph)) {
objfrommap: objfrommap:
otmp = (struct obj *) 0; otmp = (struct obj *) 0;
fakeobj = object_from_map(glyph, x, y, &otmp); fakeobj = object_from_map(glyph, x, y, &otmp);
Strcat(outbuf, (otmp && otmp->otyp != STRANGE_OBJECT) Strcat(outbuf, (otmp && otmp->otyp != STRANGE_OBJECT)
@@ -1421,7 +1421,7 @@ boolean without_asking;
} else { } else {
textp = suptext2; textp = suptext2;
gang = ""; gang = "";
} }
datawin = create_nhwindow(NHW_MENU); datawin = create_nhwindow(NHW_MENU);
for (i = 0; textp[i]; i++) { for (i = 0; textp[i]; i++) {
char buf[BUFSZ]; char buf[BUFSZ];