some reformatting
Replace some (foo && bar) that had crept back into the code with (foo && bar) to match the reformatting which took place before 3.6.0. There are a couple of lines ending in '||' still present but they look intentional. isaac64.c has some trailing '|' bit operators that could/should be moved to the start of the next line but I didn't touch that file. While in the affected files, I tried to shorten most overly wide lines (the right margin is supposed to at column 78 and there are quite a few lines which are 79 characters long, but I left most of those rather than introduce new line splits). Also replace a handful of tabs with spaces. I was a little surprised not find any trailing spaces (in the dozen or so files being updated). I didn't look for trailing arithmetic or '?'/':' operators which aught to be moved to the start of the next line.
This commit is contained in:
@@ -190,8 +190,8 @@ getpos_help(boolean force, const char *goal)
|
||||
if (iflags.cmdassist) { /* assisting the '/' command, I suppose... */
|
||||
Sprintf(sbuf,
|
||||
(iflags.getpos_coords == GPCOORDS_NONE)
|
||||
? "(Set 'whatis_coord' option to include coordinates with '%s' text.)"
|
||||
: "(Reset 'whatis_coord' option to omit coordinates from '%s' text.)",
|
||||
? "(Set 'whatis_coord' option to include coordinates with '%s' text.)"
|
||||
: "(Reset 'whatis_coord' option to omit coordinates from '%s' text.)",
|
||||
visctrl(g.Cmd.spkeys[NHKF_GETPOS_AUTODESC]));
|
||||
}
|
||||
/* disgusting hack; the alternate selection characters work for any
|
||||
@@ -211,7 +211,7 @@ getpos_help(boolean force, const char *goal)
|
||||
putstr(tmpwin, 0, sbuf);
|
||||
if (doing_what_is) {
|
||||
Sprintf(sbuf,
|
||||
" '%s' describe current spot, show 'more info', move to another spot.",
|
||||
" '%s' describe current spot, show 'more info', move to another spot.",
|
||||
visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK_V]));
|
||||
putstr(tmpwin, 0, sbuf);
|
||||
Sprintf(sbuf,
|
||||
@@ -370,8 +370,8 @@ gather_locs_interesting(int x, int y, int gloc)
|
||||
/* unlike '/M', this skips monsters revealed by
|
||||
warning glyphs and remembered unseen ones */
|
||||
return (glyph_is_monster(glyph)
|
||||
&& glyph != monnum_to_glyph(PM_LONG_WORM_TAIL,MALE) &&
|
||||
glyph != monnum_to_glyph(PM_LONG_WORM_TAIL, FEMALE));
|
||||
&& glyph != monnum_to_glyph(PM_LONG_WORM_TAIL,MALE)
|
||||
&& glyph != monnum_to_glyph(PM_LONG_WORM_TAIL, FEMALE));
|
||||
case GLOC_OBJS:
|
||||
return (glyph_is_object(glyph)
|
||||
&& glyph != objnum_to_glyph(BOULDER)
|
||||
@@ -532,7 +532,7 @@ coord_desc(int x, int y, char *outbuf, char cmode)
|
||||
than Nx999 or 999xM will still work, but not line up like normal
|
||||
when displayed in a column setting.
|
||||
|
||||
The (100) is placed in brackets below to mark the [: "03"] as
|
||||
The (100) is placed in brackets below to mark the [: "03"] as
|
||||
explicit compile-time dead code for clang */
|
||||
if (!*screen_fmt)
|
||||
Sprintf(screen_fmt, "[%%%sd,%%%sd]",
|
||||
@@ -1027,7 +1027,7 @@ new_mgivenname(struct monst *mon,
|
||||
if (!mon->mextra)
|
||||
mon->mextra = newmextra();
|
||||
else
|
||||
free_mgivenname(mon); /* already has mextra, might also have name */
|
||||
free_mgivenname(mon); /* has mextra, might also have name */
|
||||
MGIVENNAME(mon) = (char *) alloc((unsigned) lth);
|
||||
} else {
|
||||
/* zero length: the new name is empty; get rid of the old name */
|
||||
@@ -1097,7 +1097,7 @@ christen_monst(struct monst *mtmp, const char *name)
|
||||
int lth;
|
||||
char buf[PL_PSIZ];
|
||||
|
||||
/* g.dogname & g.catname are PL_PSIZ arrays; object names have same limit */
|
||||
/* dogname & catname are PL_PSIZ arrays; object names have same limit */
|
||||
lth = (name && *name) ? ((int) strlen(name) + 1) : 0;
|
||||
if (lth > PL_PSIZ) {
|
||||
lth = PL_PSIZ;
|
||||
@@ -1111,7 +1111,7 @@ christen_monst(struct monst *mtmp, const char *name)
|
||||
}
|
||||
|
||||
/* check whether user-supplied name matches or nearly matches an unnameable
|
||||
monster's name; if so, give an alternate reject message for do_mgivenname() */
|
||||
monster's name; if so, give alternate reject message for do_mgivenname() */
|
||||
static boolean
|
||||
alreadynamed(struct monst *mtmp, char *monnambuf, char *usrbuf)
|
||||
{
|
||||
@@ -1579,7 +1579,8 @@ namefloorobj(void)
|
||||
been moved off the hero's '@' yet, but there's no way to adjust
|
||||
the help text once getpos() has started */
|
||||
Sprintf(buf, "object on map (or '.' for one %s you)",
|
||||
(u.uundetected && hides_under(g.youmonst.data)) ? "over" : "under");
|
||||
(u.uundetected && hides_under(g.youmonst.data))
|
||||
? "over" : "under");
|
||||
if (getpos(&cc, FALSE, buf) < 0 || cc.x <= 0)
|
||||
return;
|
||||
if (cc.x == u.ux && cc.y == u.uy) {
|
||||
@@ -1660,7 +1661,8 @@ static const char *const ghostnames[] = {
|
||||
const char *
|
||||
rndghostname(void)
|
||||
{
|
||||
return rn2(7) ? ghostnames[rn2(SIZE(ghostnames))] : (const char *) g.plname;
|
||||
return rn2(7) ? ghostnames[rn2(SIZE(ghostnames))]
|
||||
: (const char *) g.plname;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2070,9 +2072,11 @@ mon_nam_too(struct monst *mon, struct monst *other_mon)
|
||||
/* construct "<monnamtext> <verb> <othertext> {him|her|it}self" which might
|
||||
be distorted by Hallu; if that's plural, adjust monnamtext and verb */
|
||||
char *
|
||||
monverbself(struct monst *mon,
|
||||
char *monnamtext, /* modifiable 'mbuf' with adequare room at end */
|
||||
const char *verb, const char *othertext)
|
||||
monverbself(
|
||||
struct monst *mon,
|
||||
char *monnamtext, /* modifiable 'mbuf' with adequare room at end */
|
||||
const char *verb,
|
||||
const char *othertext)
|
||||
{
|
||||
char *verbs, selfbuf[40]; /* sizeof "themselves" suffices */
|
||||
|
||||
@@ -2323,7 +2327,8 @@ static NEARDATA const char *const hliquids[] = {
|
||||
|
||||
/* if hallucinating, return a random liquid instead of 'liquidpref' */
|
||||
const char *
|
||||
hliquid(const char *liquidpref) /* use as-is when not hallucinating (unless empty) */
|
||||
hliquid(
|
||||
const char *liquidpref) /* use as-is when not hallucintg (unless empty) */
|
||||
{
|
||||
if (Hallucination || !liquidpref || !*liquidpref) {
|
||||
int indx, count = SIZE(hliquids);
|
||||
|
||||
Reference in New Issue
Block a user