some reformatting (1 of 4)

I recently realized that I've been editing sources in a terminal
window that was widened in order to fit curses borders for testing
something or other.  That has resulted in some new wide lines in the
source.  There were lots of old ones too.

This updates some source files to try to achieve the goal of 78
characters or less.  As in the past, I've been inconsistent about
lines with 79 characters.  Lines with 80 or more have been wrapped
or shortened (usually by trimming an end of line comment or removing
redundant parantheses, sometimes just by reducing the indentation
of the continuation portion of an already wrapped line).

I eliminated one instance of warning manipulation for non-constant
format string, and simplified stone_luck() where Ken had a silly
comment about the function argument's name.
This commit is contained in:
PatR
2024-09-05 13:12:11 -07:00
parent 74981d9ff2
commit 50412ba53b
11 changed files with 102 additions and 64 deletions
+4 -4
View File
@@ -405,8 +405,10 @@ change_luck(schar n)
u.uluck = LUCKMAX;
}
/* decide whether there are more blessed luckstones (plus luck-conferring
artifacts) than cursed ones; optionally combine uncursed with blessed */
int
stone_luck(boolean parameter) /* So I can't think up of a good name. So sue me. --KAA */
stone_luck(boolean include_uncursed)
{
struct obj *otmp;
long bonchance = 0;
@@ -415,9 +417,7 @@ stone_luck(boolean parameter) /* So I can't think up of a good name. So sue me.
if (confers_luck(otmp)) {
if (otmp->cursed)
bonchance -= otmp->quan;
else if (otmp->blessed)
bonchance += otmp->quan;
else if (parameter)
else if (otmp->blessed || include_uncursed)
bonchance += otmp->quan;
}