cmd.c formatting bit

Move '||' from the end of the first half of a continuation line to
the start of the second half.  Wrap or condense a few wide lines.
This commit is contained in:
PatR
2024-04-04 06:57:34 -07:00
parent ca5fd442b8
commit 12873e2773

View File

@@ -1315,11 +1315,15 @@ dolookaround(void)
iflags.getloc_filter = GFILTER_VIEW; iflags.getloc_filter = GFILTER_VIEW;
for (y = 0; y < ROWNO; y++) for (y = 0; y < ROWNO; y++)
for (x = 1; x < COLNO; x++) for (x = 1; x < COLNO; x++) {
int glyph = glyph_at(x, y),
mapsym = glyph_is_cmap(glyph) ? glyph_to_cmap(glyph) : -1;
if (!u_at(x, y) if (!u_at(x, y)
&& (gather_locs_interesting(x, y, GLOC_INTERESTING) || && (gather_locs_interesting(x, y, GLOC_INTERESTING)
(corr_next2u && (glyph_at(x,y) == cmap_to_glyph(S_corr) /* note: GLOC_INTERESTING catches S_engrcorr */
|| glyph_at(x,y) == cmap_to_glyph(S_litcorr))))) { || (corr_next2u && (mapsym == S_corr
|| mapsym == S_litcorr)))) {
char buf[BUFSZ]; char buf[BUFSZ];
coord cc; coord cc;
int sym = 0; int sym = 0;
@@ -1329,6 +1333,7 @@ dolookaround(void)
do_screen_description(cc, TRUE, sym, buf, &firstmatch, NULL); do_screen_description(cc, TRUE, sym, buf, &firstmatch, NULL);
pline_xy(x, y, "%s.", firstmatch); pline_xy(x, y, "%s.", firstmatch);
} }
}
iflags.getloc_filter = tmp_getloc_filter; iflags.getloc_filter = tmp_getloc_filter;
a11y.accessiblemsg = tmp_accessiblemsg; a11y.accessiblemsg = tmp_accessiblemsg;
@@ -2056,7 +2061,8 @@ count_bind_keys(void)
int i; int i;
for (i = 0; i < extcmdlist_length; i++) for (i = 0; i < extcmdlist_length; i++)
if (extcmdlist[i].key && gc.Cmd.commands[extcmdlist[i].key] != &extcmdlist[i]) if (extcmdlist[i].key
&& gc.Cmd.commands[extcmdlist[i].key] != &extcmdlist[i])
nbinds++; nbinds++;
return nbinds; return nbinds;
} }
@@ -2345,7 +2351,8 @@ bind_mousebtn(int btn, const char *command)
struct ext_func_tab *extcmd; struct ext_func_tab *extcmd;
if (btn < 1 || btn > NUM_MOUSE_BUTTONS) { if (btn < 1 || btn > NUM_MOUSE_BUTTONS) {
config_error_add("Wrong mouse button, valid are 1-%i", NUM_MOUSE_BUTTONS); config_error_add("Wrong mouse button, valid are 1-%i",
NUM_MOUSE_BUTTONS);
return FALSE; return FALSE;
} }
btn--; btn--;
@@ -3056,13 +3063,13 @@ reset_commands(boolean initial)
/* phone_layout has been toggled */ /* phone_layout has been toggled */
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
c = '1' + i; /* 1,2,3 <-> 7,8,9 */ c = '1' + i; /* 1,2,3 <-> 7,8,9 */
cmdtmp = gc.Cmd.commands[c]; /* tmp = [1] */ cmdtmp = gc.Cmd.commands[c]; /* tmp = [1] */
gc.Cmd.commands[c] = gc.Cmd.commands[c + 6]; /* [1] = [7] */ gc.Cmd.commands[c] = gc.Cmd.commands[c + 6]; /* [1] = [7] */
gc.Cmd.commands[c + 6] = cmdtmp; /* [7] = tmp */ gc.Cmd.commands[c + 6] = cmdtmp; /* [7] = tmp */
c = (M('1') & 0xff) + i; /* M-1,M-2,M-3 <-> M-7,M-8,M-9 */ c = (M('1') & 0xff) + i; /* M-1,M-2,M-3 <-> M-7,M-8,M-9 */
cmdtmp = gc.Cmd.commands[c]; /* tmp = [M-1] */ cmdtmp = gc.Cmd.commands[c]; /* tmp = [M-1] */
gc.Cmd.commands[c] = gc.Cmd.commands[c + 6]; /* [M-1] = [M-7] */ gc.Cmd.commands[c] = gc.Cmd.commands[c + 6]; /* [M-1]=[M-7] */
gc.Cmd.commands[c + 6] = cmdtmp; /* [M-7] = tmp */ gc.Cmd.commands[c + 6] = cmdtmp; /* [M-7] = tmp */
} }
} }
} /*?initial*/ } /*?initial*/
@@ -3394,8 +3401,8 @@ rhack(int key)
&& gd.domove_attempting) { && gd.domove_attempting) {
/* not a movement command, but a move prefix earlier? */ /* not a movement command, but a move prefix earlier? */
; /* just do nothing */ ; /* just do nothing */
} else if (((gd.domove_attempting & (DOMOVE_RUSH | DOMOVE_WALK)) } else if (((gd.domove_attempting
!= 0L) & (DOMOVE_RUSH | DOMOVE_WALK)) != 0L)
&& !gc.context.travel && !dxdy_moveok()) { && !gc.context.travel && !dxdy_moveok()) {
/* trying to move diagonally as a grid bug */ /* trying to move diagonally as a grid bug */
You_cant("get there from here..."); You_cant("get there from here...");