source reformatting

Fixup some of the inconsistently formatted code that has been
introduced recently or been building up for a while.  Done manually.
I wasn't systematic except for looking for lines ending in '&' or '|'
(which wouldn't find such things if they're followed by a comment)
so there might be lots more.  I changed a bunch of C++-style //...
comments to old style C /*...*/ so that they'll match the rest of
the core's code rather than because they shouldn't be used.
This commit is contained in:
PatR
2023-12-08 00:30:10 -08:00
parent 2bd967fe8a
commit c41cb1a7fa
9 changed files with 165 additions and 124 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 write.c $NHDT-Date: 1596498232 2020/08/03 23:43:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.26 $ */
/* NetHack 3.7 write.c $NHDT-Date: 1702023275 2023/12/08 08:14:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.41 $ */
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
@@ -349,8 +349,8 @@ dowrite(struct obj *pen)
/* else fresh knowledge of the spell works */
&& spell_knowledge != spe_Fresh
/* and Luck might override after previous checks have failed */
&& rnl(((Role_if(PM_WIZARD) && paper->oclass != SPBOOK_CLASS) ||
spell_knowledge == spe_GoingStale)
&& rnl(((Role_if(PM_WIZARD) && paper->oclass != SPBOOK_CLASS)
|| spell_knowledge == spe_GoingStale)
? 5 : 15)) {
You("%s to write that.", by_descr ? "fail" : "don't know how");
/* scrolls disappear, spellbooks don't */