some trailing whitespace in src, include

This commit is contained in:
nhmall
2021-10-16 12:12:21 -04:00
parent 711007cd44
commit 39713783d1
25 changed files with 52 additions and 52 deletions

View File

@@ -119,7 +119,7 @@ struct sinfo {
/* NetHack ftypes */
#define NHF_LEVELFILE 1
#define NHF_SAVEFILE 2
#define NHF_SAVEFILE 2
#define NHF_BONESFILE 3
/* modes */
#define READING 0x0
@@ -137,7 +137,7 @@ struct fieldlevel_content {
boolean binary; /* binary rather than text */
boolean json; /* JSON */
};
typedef struct {
int fd; /* for traditional structlevel binary writes */
int mode; /* holds READING, WRITING, or FREEING modes */
@@ -822,7 +822,7 @@ struct instance_globals {
dlevel_t level; /* level map */
long moves; /* turn counter */
long wailmsg;
struct obj *migrating_objs; /* objects moving to another dungeon level */
struct obj *migrating_objs; /* objects moving to another dungeon level */
struct obj *billobjs; /* objects not yet paid for */
#if defined(MICRO) || defined(WIN32)
char hackdir[PATHLEN]; /* where rumors, help, record are */
@@ -832,7 +832,7 @@ struct instance_globals {
struct context_info context;
char *fqn_prefix[PREFIX_COUNT];
/* Windowing stuff that's really tty oriented, but present for all ports */
struct tc_gbl_data tc_gbl_data; /* AS,AE, LI,CO */
struct tc_gbl_data tc_gbl_data; /* AS,AE, LI,CO */
#if defined(UNIX) || defined(VMS)
int locknum; /* max num of simultaneous users */
#endif
@@ -883,7 +883,7 @@ struct instance_globals {
char dogname[PL_PSIZ];
char catname[PL_PSIZ];
char horsename[PL_PSIZ];
char preferred_pet; /* '\0', 'c', 'd', 'n' (none) */
char preferred_pet; /* '\0', 'c', 'd', 'n' (none) */
struct monst *mydogs; /* monsters that went down/up together with @ */
struct monst *migrating_mons; /* monsters moving to another level */
struct autopickup_exception *apelist;
@@ -949,7 +949,7 @@ struct instance_globals {
/* invent.c */
int lastinvnr; /* 0 ... 51 (never saved&restored) */
unsigned sortlootmode; /* set by sortloot() for use by sortloot_cmp();
unsigned sortlootmode; /* set by sortloot() for use by sortloot_cmp();
* reset by sortloot when done */
char *invbuf;
unsigned invbufsiz;
@@ -990,7 +990,7 @@ struct instance_globals {
int min_rx; /* rectangle bounds for regions */
int max_rx;
int min_ry;
int max_ry;
int max_ry;
int n_loc_filled;
/* mkmaze.c */

View File

@@ -158,7 +158,7 @@ typedef struct branch {
#define MIGR_WITH_HERO 9 /* mon: followers; obj: trap door */
#define MIGR_NOBREAK 1024 /* bitmask: don't break on delivery */
#define MIGR_NOSCATTER 2048 /* don't scatter on delivery */
#define MIGR_TO_SPECIES 4096 /* migrating to species as they are made */
#define MIGR_TO_SPECIES 4096 /* migrating to species as they are made */
#define MIGR_LEFTOVERS 8192 /* grab remaining MIGR_TO_SPECIES objects */
/* level information (saved via ledger number) */

View File

@@ -2,7 +2,7 @@
/*-Copyright (c) Michael Allison, 2020. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef FNAMESIZ_H
#ifndef FNAMESIZ_H
#define FNAMESIZ_H
/*

View File

@@ -418,10 +418,10 @@ opt_##a,
&flags.showrace)
#ifdef SCORE_ON_BOTL
NHOPTB(showscore, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&flags.showscore)
&flags.showscore)
#else
NHOPTB(showscore, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias,
(boolean *) 0)
(boolean *) 0)
#endif
NHOPTB(silent, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.silent)
@@ -443,7 +443,7 @@ opt_##a,
&iflags.status_updates)
NHOPTO("status condition fields", o_status_cond, BUFSZ, opt_in,
set_in_game, No, Yes, No, NoAlias, "edit status condition fields")
#ifdef STATUS_HILITES
#ifdef STATUS_HILITES
NHOPTC(statushilites, 20, opt_in, set_in_game, Yes, Yes, Yes, No, NoAlias,
"0=no status highlighting, N=show highlights for N turns")
NHOPTO("status hilite rules", o_status_hilites, BUFSZ, opt_in, set_in_game,

View File

@@ -85,7 +85,7 @@
* fix potential buffer overflow in pline(), raw_printf(), and config_error_add()
* fix potential buffer overflow in choose_windows()
* use vsnprintf instead of vsprintf in pline.c where possible
* Windows: incldues a fix from a 3.6.4 post-release update where
* Windows: incldues a fix from a 3.6.4 post-release update where
* OPTIONS=map_mode:fit_to_screen could cause a game start failure
* Windows: users with C-locale unmappable names could get game start failure
*/

View File

@@ -23,7 +23,7 @@
#define CONFIG_FILE "defaults.nh"
#define GUIDEBOOK_FILE "Guidebook.txt"
/*
* The following options are somewhat configurable depending on
* your compiler.

View File

@@ -34,7 +34,7 @@ struct TileSetImage {
struct Pixel *pixels; /* for direct color */
unsigned char *indexes; /* for paletted images */
struct Pixel palette[256];
/* Image description from the file */
char *image_desc;

View File

@@ -169,7 +169,7 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then
#define FCMASK 0660 /* file creation mask */
/*
*
*
*/
#define NO_VSNPRINTF /* Avoid vsnprintf, use less-safe vsprintf instead. */
@@ -178,12 +178,12 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then
*/
/* This used to be force-defined for VMS in topten.c, but with
* the global variable consolidation into g in 3.7, it has to be
* the global variable consolidation into g in 3.7, it has to be
* defined here so that decl.h includes the field in g.
*/
#define UPDATE_RECORD_IN_PLACE
/* data librarian defs */
/* data librarian defs */
#ifdef DLB
#define DLBFILE "nh-data.dlb"
/*

View File

@@ -111,7 +111,7 @@ extern void interject(int);
#endif
/* extern int getlock(void); */
#endif
#ifdef _MSC_VER
#define HAS_STDINT
#if (_MSC_VER > 1000)

View File

@@ -153,7 +153,7 @@ save_dungeon(NHFILE *nhfp, boolean perform_write, boolean free_data)
bwrite(nhfp->fd, (genericptr_t) curr, sizeof *curr);
}
count = maxledgerno();
if (nhfp->structlevel) {
if (nhfp->structlevel) {
bwrite(nhfp->fd, (genericptr_t) &count, sizeof count);
bwrite(nhfp->fd, (genericptr_t) g.level_info,
(unsigned) count * sizeof (struct linfo));
@@ -168,7 +168,7 @@ save_dungeon(NHFILE *nhfp, boolean perform_write, boolean free_data)
for (curr_ms = g.mapseenchn; curr_ms; curr_ms = curr_ms->next) {
save_mapseen(nhfp, curr_ms);
}
}
}
if (free_data) {

View File

@@ -123,7 +123,7 @@ panictrace_handler(int sig_unused UNUSED)
curses_uncurse_terminal();
}
#endif
f2 = (int) write(2, SIG_MSG, sizeof SIG_MSG - 1);
nhUse(f2); /* what could we do if write to fd#2 (stderr) fails */
NH_abort(); /* ... and we're already in the process of quitting? */

View File

@@ -382,7 +382,7 @@ save_light_sources(NHFILE *nhfp, int range)
panic("counted %d light sources, wrote %d! [range=%d]", count,
actual, range);
}
if (release_data(nhfp)) {
for (prev = &g.light_base; (curr = *prev) != 0; ) {
if (!curr->id.a_monst) {

View File

@@ -519,7 +519,7 @@ static const char *build_opts[] = {
#ifdef WIN32
"strong PRNG seed from CNG BCryptGenRandom()",
#endif
#endif /* DEV_RANDOM */
#endif /* DEV_RANDOM */
#else /* ISAAC64 */
#ifdef RANDOM
"pseudo random numbers generated by random()",

View File

@@ -312,10 +312,10 @@ joinm:
static void
finish_map(
schar fg_typ,
schar bg_typ,
boolean lit,
boolean walled,
schar fg_typ,
schar bg_typ,
boolean lit,
boolean walled,
boolean icedpools)
{
int i, j;

View File

@@ -1887,7 +1887,7 @@ peek_at_iced_corpse_age(struct obj *otmp)
static void
obj_timer_checks(
struct obj *otmp,
xchar x, xchar y,
xchar x, xchar y,
int force) /* 0 = no force so do checks, <0 = force off, >0 force on */
{
long tleft = 0L;

View File

@@ -3314,7 +3314,7 @@ maybe_mnexto(struct monst* mtmp)
int
mnearto(
register struct monst *mtmp,
xchar x,
xchar x,
xchar y,
boolean move_other) /* make sure mtmp gets to x, y! so move m_at(x, y) */
{

View File

@@ -788,7 +788,7 @@ should_displace(
coord *poss, /* coord poss[9] */
long *info, /* long info[9] */
int cnt,
xchar gx,
xchar gx,
xchar gy)
{
int shortest_with_displacing = -1;

View File

@@ -40,7 +40,7 @@ m_has_launcher_and_ammo(struct monst* mtmp)
/* hero is hit by something other than a monster */
int
thitu(
int tlev,
int tlev,
int dam,
struct obj **objp,
const char *name) /* if null, then format `*objp' */

View File

@@ -677,7 +677,7 @@ save_regions(NHFILE* nhfp)
bwrite(nhfp->fd, (genericptr_t) &g.regions[i]->arg, sizeof (anything));
}
}
skip_lots:
if (release_data(nhfp))
clear_regions();

View File

@@ -1531,7 +1531,7 @@ root_plselection_prompt(
char *
build_plselection_prompt(
char *buf, int buflen,
char *buf, int buflen,
int rolenum, int racenum, int gendnum, int alignnum)
{
const char *defprompt = "Shall I pick a character for you? [ynaq] ";

View File

@@ -874,7 +874,7 @@ savetrapchn(NHFILE* nhfp, register struct trap* trap)
while (trap) {
trap2 = trap->ntrap;
if (perform_bwrite(nhfp)) {
if (nhfp->structlevel)
if (nhfp->structlevel)
bwrite(nhfp->fd, (genericptr_t) trap, sizeof *trap);
}
if (release_data(nhfp))

View File

@@ -1570,10 +1570,10 @@ dopay(void)
*/
static int
dopayobj(
register struct monst* shkp,
register struct bill_x* bp,
struct obj** obj_p,
int which /* 0 => used-up item, 1 => other (unpaid or lost) */,
register struct monst* shkp,
register struct bill_x* bp,
struct obj** obj_p,
int which /* 0 => used-up item, 1 => other (unpaid or lost) */,
boolean itemize)
{
@@ -2044,7 +2044,7 @@ oid_price_adjustment(struct obj* obj, unsigned int oid)
/* calculate the value that the shk will charge for [one of] an object */
static long
get_cost(
register struct obj* obj,
register struct obj* obj,
register struct monst* shkp) /* if angry, impose a surcharge */
{
long tmp = getprice(obj, FALSE),
@@ -2514,7 +2514,7 @@ add_to_billobjs(struct obj* obj)
static void
bill_box_content(
register struct obj *obj,
register boolean ininv,
register boolean ininv,
register boolean dummy,
register struct monst *shkp)
{
@@ -2613,7 +2613,7 @@ billable(
void
addtobill(
struct obj *obj,
boolean ininv,
boolean ininv,
boolean dummy,
boolean silent)
{
@@ -2876,9 +2876,9 @@ stolen_container(
long
stolen_value(
struct obj *obj,
xchar x,
xchar x,
xchar y,
boolean peaceful,
boolean peaceful,
boolean silent)
{
long value = 0L, gvalue = 0L, billamt = 0L;

View File

@@ -142,7 +142,7 @@ enexto(
boolean
enexto_core(
coord *cc,
xchar xx,
xchar xx,
xchar yy,
struct permonst *mdat,
long entflags)
@@ -1135,7 +1135,7 @@ level_tele_trap(struct trap* trap, unsigned int trflags)
/* check whether monster can arrive at location <x,y> via Tport (or fall) */
static boolean
rloc_pos_ok(
register int x,
register int x,
register int y, /* x,y - coordinates of candidate location */
struct monst *mtmp)
{

View File

@@ -596,7 +596,7 @@ fall_through(
struct monst *
animate_statue(
struct obj *statue,
xchar x,
xchar x,
xchar y,
int cause,
int *fail_reason)
@@ -776,7 +776,7 @@ animate_statue(
struct monst *
activate_statue_trap(
struct trap *trap,
xchar x,
xchar x,
xchar y,
boolean shatter)
{
@@ -2950,7 +2950,7 @@ feeltrap(struct trap* trap)
static int
mkroll_launch(
struct trap *ttmp,
xchar x,
xchar x,
xchar y,
short otyp,
long ocount)
@@ -3796,7 +3796,7 @@ fire_damage(
int
fire_damage_chain(
struct obj *chain,
boolean force,
boolean force,
boolean here,
xchar x,
xchar y)

View File

@@ -39,7 +39,7 @@ getversionstring(char *buf)
#if defined(RUNTIME_PORT_ID)
tmp = get_port_id(tmpbuf);
if (tmp)
Snprintf(eos(buf), (sizeof buf - strlen(buf)) - 1,
Snprintf(eos(buf), (sizeof buf - strlen(buf)) - 1,
"%s%s", c++ ? "," : "", tmp);
#endif
if (nomakedefs.git_sha)
@@ -223,7 +223,7 @@ early_version_info(boolean pastebuf)
raw_printf("%s", buf);
if (pastebuf) {
#if defined(RUNTIME_PASTEBUF_SUPPORT) && !defined(LIBNH)
#if defined(RUNTIME_PASTEBUF_SUPPORT) && !defined(LIBNH)
/*
* Call a platform/port-specific routine to insert the
* version information into a paste buffer. Useful for