From 88f6df2d8b48532d5d8b415182fcf90c612f035b Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 26 Oct 2022 14:21:23 -0400 Subject: [PATCH] some tabs to spaces cd src grep -P -n '\t' *.c | grep -v "1:" cd ../include grep -P -n '\t' *.h | grep -v "1:" cd .. side note: win/Qt/*.cpp are full of tabs --- include/align.h | 2 +- include/attrib.h | 4 +- include/config.h | 2 +- include/decl.h | 30 +++++++------- include/dgn_file.h | 8 ++-- include/extern.h | 2 +- include/flag.h | 6 +-- include/monattk.h | 10 ++--- include/mondata.h | 2 +- include/monflag.h | 2 +- include/monst.h | 2 +- include/pcconf.h | 22 +++++----- include/permonst.h | 24 +++++------ include/prop.h | 2 +- include/quest.h | 2 +- include/rect.h | 2 +- include/region.h | 2 +- include/rm.h | 2 +- include/sp_lev.h | 2 +- include/spell.h | 2 +- include/timeout.h | 2 +- include/vision.h | 16 ++++---- include/windconf.h | 4 +- include/winprocs.h | 12 +++--- include/wintty.h | 2 +- include/xwindow.h | 70 ++++++++++++++++---------------- include/xwindowp.h | 2 +- include/youprop.h | 2 +- src/allmain.c | 2 +- src/artifact.c | 2 +- src/cmd.c | 2 +- src/date.c | 4 +- src/decl.c | 6 +-- src/display.c | 2 +- src/dlb.c | 2 +- src/dungeon.c | 2 +- src/engrave.c | 2 +- src/invent.c | 2 +- src/restore.c | 2 +- src/sp_lev.c | 24 +++++------ sys/msdos/msdos.c | 4 +- sys/msdos/tile2bin.c | 8 ++-- sys/msdos/video.c | 86 ++++++++++++++++++++-------------------- sys/msdos/vidvesa.c | 14 +++---- sys/msdos/vidvga.c | 30 +++++++------- sys/share/pcmain.c | 4 +- sys/share/pcsys.c | 2 +- sys/share/random.c | 36 ++++++++--------- sys/share/tclib.c | 2 +- sys/share/unixtty.c | 2 +- sys/share/uudecode.c | 4 +- sys/unix/unixres.c | 4 +- sys/vms/oldcrtl.c | 4 +- sys/windows/consoletty.c | 14 +++---- sys/windows/win10.c | 2 +- sys/windows/windmain.c | 4 +- sys/windows/windsys.c | 4 +- win/X11/Window.c | 68 +++++++++++++++---------------- win/X11/tile2x11.c | 4 +- win/X11/winmenu.c | 4 +- win/X11/winmesg.c | 10 ++--- win/X11/winstat.c | 22 +++++----- win/X11/wintext.c | 6 +-- win/X11/winval.c | 4 +- win/chain/wc_chainin.c | 10 ++--- win/chain/wc_chainout.c | 2 +- win/chain/wc_trace.c | 12 +++--- win/curses/cursstat.c | 4 +- win/share/tile2bmp.c | 6 +-- win/tty/getline.c | 4 +- win/win32/mhaskyn.c | 2 +- win/win32/mhdlg.c | 2 +- win/win32/mhfont.c | 2 +- win/win32/mhinput.c | 2 +- win/win32/mhmain.c | 38 +++++++++--------- win/win32/mhmsgwnd.c | 2 +- win/win32/mhrip.c | 2 +- win/win32/mhsplash.c | 2 +- win/win32/mhstatus.c | 2 +- win/win32/mhtext.c | 2 +- win/win32/mswproc.c | 2 +- 81 files changed, 365 insertions(+), 365 deletions(-) diff --git a/include/align.h b/include/align.h index 6a2b70a11..2c75132ae 100644 --- a/include/align.h +++ b/include/align.h @@ -1,5 +1,5 @@ /* NetHack 3.7 align.h $NHDT-Date: 1604269810 2020/11/01 22:30:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */ -/* Copyright (c) Mike Stephenson, Izchak Miller 1991. */ +/* Copyright (c) Mike Stephenson, Izchak Miller 1991. */ /* NetHack may be freely redistributed. See license for details. */ #ifndef ALIGN_H diff --git a/include/attrib.h b/include/attrib.h index 17671f464..ac29cc0c5 100644 --- a/include/attrib.h +++ b/include/attrib.h @@ -1,8 +1,8 @@ /* NetHack 3.7 attrib.h $NHDT-Date: 1596498527 2020/08/03 23:48:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */ -/* Copyright 1988, Mike Stephenson */ +/* Copyright 1988, Mike Stephenson */ /* NetHack may be freely redistributed. See license for details. */ -/* attrib.h - Header file for character class processing. */ +/* attrib.h - Header file for character class processing. */ #ifndef ATTRIB_H #define ATTRIB_H diff --git a/include/config.h b/include/config.h index 8e5858c80..8de38dc50 100644 --- a/include/config.h +++ b/include/config.h @@ -287,7 +287,7 @@ * commenting it out. */ -#define ENHANCED_SYMBOLS +/* #define ENHANCED_SYMBOLS */ /* * If COMPRESS is defined, it should contain the full path name of your diff --git a/include/decl.h b/include/decl.h index 0a5e374f7..993e63ac7 100644 --- a/include/decl.h +++ b/include/decl.h @@ -361,17 +361,17 @@ E struct tc_gbl_data { /* also declared in tcap.h */ * provides all the subclasses that seem reasonable, and sets up for all * prefixes being null. Port code can set those that it wants. */ -#define HACKPREFIX 0 /* shared, RO */ -#define LEVELPREFIX 1 /* per-user, RW */ -#define SAVEPREFIX 2 /* per-user, RW */ -#define BONESPREFIX 3 /* shared, RW */ -#define DATAPREFIX 4 /* dungeon/dlb; must match value in dlb.c */ -#define SCOREPREFIX 5 /* shared, RW */ -#define LOCKPREFIX 6 /* shared, RW */ -#define SYSCONFPREFIX 7 /* shared, RO */ -#define CONFIGPREFIX 8 -#define TROUBLEPREFIX 9 /* shared or per-user, RW (append-only) */ -#define PREFIX_COUNT 10 +#define HACKPREFIX 0 /* shared, RO */ +#define LEVELPREFIX 1 /* per-user, RW */ +#define SAVEPREFIX 2 /* per-user, RW */ +#define BONESPREFIX 3 /* shared, RW */ +#define DATAPREFIX 4 /* dungeon/dlb; must match value in dlb.c */ +#define SCOREPREFIX 5 /* shared, RW */ +#define LOCKPREFIX 6 /* shared, RW */ +#define SYSCONFPREFIX 7 /* shared, RO */ +#define CONFIGPREFIX 8 +#define TROUBLEPREFIX 9 /* shared or per-user, RW (append-only) */ +#define PREFIX_COUNT 10 /* used in files.c; xxconf.h can override if needed */ #ifndef FQN_MAX_FILENAME #define FQN_MAX_FILENAME 512 @@ -698,7 +698,7 @@ struct enum_dump { const char *nm; }; -typedef long cmdcount_nht; /* Command counts */ +typedef long cmdcount_nht; /* Command counts */ enum { CQ_CANNED = 0, /* internal canned sequence */ @@ -1260,9 +1260,9 @@ struct instance_globals { short corpsenm_digested; /* monster type being digested, set by gulpum */ /* vision.c */ - seenV **viz_array; /* used in cansee() and couldsee() macros */ - coordxy *viz_rmin; /* min could see indices */ - coordxy *viz_rmax; /* max could see indices */ + seenV **viz_array; /* used in cansee() and couldsee() macros */ + coordxy *viz_rmin; /* min could see indices */ + coordxy *viz_rmax; /* max could see indices */ boolean vision_full_recalc; int seethru; /* 'bubble' debugging: clouds and water don't block light */ diff --git a/include/dgn_file.h b/include/dgn_file.h index dc3422391..84e523a94 100644 --- a/include/dgn_file.h +++ b/include/dgn_file.h @@ -1,5 +1,5 @@ /* NetHack 3.7 dgn_file.h $NHDT-Date: 1596498533 2020/08/03 23:48:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */ -/* Copyright (c) 1989 by M. Stephenson */ +/* Copyright (c) 1989 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ #ifndef DGN_FILE_H @@ -43,7 +43,7 @@ struct tmpbranch { }; /* - * Values for type for tmpbranch structure. + * Values for type for tmpbranch structure. */ #define TBR_STAIR 0 /* connection with both ends having a staircase */ #define TBR_NO_UP 1 /* connection with no up staircase */ @@ -51,7 +51,7 @@ struct tmpbranch { #define TBR_PORTAL 3 /* portal connection */ /* - * Flags that map into the dungeon flags bitfields. + * Flags that map into the dungeon flags bitfields. */ #define TOWN 1 /* levels only */ #define HELLISH 2 @@ -66,7 +66,7 @@ struct tmpbranch { #define D_ALIGN_MASK 0x70 /* - * Max number of prototype levels and branches. + * Max number of prototype levels and branches. */ #define LEV_LIMIT 50 #define BRANCH_LIMIT 32 diff --git a/include/extern.h b/include/extern.h index 3d36e6a18..55cb0e43d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,5 +1,5 @@ /* NetHack 3.7 extern.h $NHDT-Date: 1657918089 2022/07/15 20:48:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1132 $ */ -/* Copyright (c) Steve Creps, 1988. */ +/* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ #ifndef EXTERN_H diff --git a/include/flag.h b/include/flag.h index 1b73cb0e6..6a66a50d9 100644 --- a/include/flag.h +++ b/include/flag.h @@ -378,10 +378,10 @@ struct instance_flags { boolean wc2_hitpointbar; /* show graphical bar representing hit points */ boolean wc2_guicolor; /* allow colours in gui (outside map) */ int wc_mouse_support; /* allow mouse support */ - int wc2_term_cols; /* terminal width, in characters */ - int wc2_term_rows; /* terminal height, in characters */ + int wc2_term_cols; /* terminal width, in characters */ + int wc2_term_rows; /* terminal height, in characters */ int wc2_statuslines; /* default = 2, curses can handle 3 */ - int wc2_windowborders; /* display borders on NetHack windows */ + int wc2_windowborders; /* display borders on NetHack windows */ int wc2_petattr; /* text attributes for pet */ #ifdef WIN32 #define MAX_ALTKEYHANDLING 25 diff --git a/include/monattk.h b/include/monattk.h index 04bbb74ee..9f0bb78f1 100644 --- a/include/monattk.h +++ b/include/monattk.h @@ -5,8 +5,8 @@ #ifndef MONATTK_H #define MONATTK_H -/* Add new attack types below - ordering affects experience (exper.c). - * Attacks > AT_BUTT are worth extra experience. +/* Add new attack types below - ordering affects experience (exper.c). + * Attacks > AT_BUTT are worth extra experience. */ #define AT_ANY (-1) /* fake attack; dmgtype_fromattack wildcard */ #define AT_NONE 0 /* passive monster (ex. acid blob) */ @@ -33,10 +33,10 @@ || (atyp) == AT_MAGC \ || (atyp) == AT_GAZE) -/* Add new damage types below. +/* Add new damage types below. * - * Note that 1-10 correspond to the types of attack used in buzz(). - * Please don't disturb the order unless you rewrite the buzz() code. + * Note that 1-10 correspond to the types of attack used in buzz(). + * Please don't disturb the order unless you rewrite the buzz() code. */ #define AD_ANY (-1) /* fake damage; attacktype_fordmg wildcard */ #define AD_PHYS 0 /* ordinary physical */ diff --git a/include/mondata.h b/include/mondata.h index 14825bc29..117e933d4 100644 --- a/include/mondata.h +++ b/include/mondata.h @@ -1,5 +1,5 @@ /* NetHack 3.7 mondata.h $NHDT-Date: 1606473485 2020/11/27 10:38:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.45 $ */ -/* Copyright (c) 1989 Mike Threepoint */ +/* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ #ifndef MONDATA_H diff --git a/include/monflag.h b/include/monflag.h index f90d89a59..d7bf33fd1 100644 --- a/include/monflag.h +++ b/include/monflag.h @@ -1,5 +1,5 @@ /* NetHack 3.7 monflag.h $NHDT-Date: 1596498549 2020/08/03 23:49:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.21 $ */ -/* Copyright (c) 1989 Mike Threepoint */ +/* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ #ifndef MONFLAG_H diff --git a/include/monst.h b/include/monst.h index fb10cea7b..84cb5660c 100644 --- a/include/monst.h +++ b/include/monst.h @@ -41,7 +41,7 @@ enum wpn_chk_flags { * PICK_NONE, PICK_ONE, PICK_ANY (wintype.h) 0, 1, 2 * MINV_NOLET If set, don't display inventory letters on monster's inventory. * MINV_ALL If set, display all items in monster's inventory, otherwise - * just display wielded weapons and worn items. + * just display wielded weapons and worn items. */ #define MINV_PICKMASK 0x03 /* 1|2 */ #define MINV_NOLET 0x04 diff --git a/include/pcconf.h b/include/pcconf.h index a7891d1bf..bb812a044 100644 --- a/include/pcconf.h +++ b/include/pcconf.h @@ -18,7 +18,7 @@ * _MSC_VER is defined automatically by Microsoft C. * __BORLANDC__ is defined automatically by Borland C. * __SC__ is defined automatically by Symantec C. - * Note: 3.6.x was not verified with Symantec C. + * Note: 3.6.x was not verified with Symantec C. */ #define CONFIG_FILE "defaults.nh" @@ -43,10 +43,10 @@ * Screen control options * * You may uncomment: - * ANSI_DEFAULT - * or TERMLIB - * or ANSI_DEFAULT and TERMLIB - * or NO_TERMS + * ANSI_DEFAULT + * or TERMLIB + * or ANSI_DEFAULT and TERMLIB + * or NO_TERMS */ /* # define TERMLIB */ /* enable use of termcap file /etc/termcap */ @@ -61,7 +61,7 @@ #ifdef NO_TERMS /* if NO_TERMS select one screen package below */ #define SCREEN_BIOS /* Use bios calls for all screen control */ -/* #define SCREEN_DJGPPFAST */ /* Use djgpp fast screen routines */ +/* #define SCREEN_DJGPPFAST */ /* Use djgpp fast screen routines */ #endif /* # define PC9800 */ /* Allows NetHack to run on NEC PC-9800 machines */ @@ -76,7 +76,7 @@ #ifndef SUPPRESS_GRAPHICS #if (defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST)) && !defined(PC9800) #ifdef USE_TILES -#define SCREEN_VGA /* Include VGA graphics routines in the build */ +#define SCREEN_VGA /* Include VGA graphics routines in the build */ #define SCREEN_VESA #endif #endif @@ -96,7 +96,7 @@ #define MAIL /* Allows for fake mail daemon to deliver mail */ /* in the MSDOS version. (For AMIGA MAIL see */ - /* amiconf.h). In the future this will be the */ + /* amiconf.h). In the future this will be the */ /* hook for mail reader implementation. */ /* The following is needed for prototypes of certain functions */ @@ -215,9 +215,9 @@ #define VROOMM /* Borland's VROOMM overlay system */ #endif #if !defined(STKSIZ) -#define STKSIZ 5 * 1024 /* Use a default of 5K stack for Borland C */ +#define STKSIZ 5 * 1024 /* Use a default of 5K stack for Borland C */ /* This macro is used in any file that contains */ - /* a main() function. */ + /* a main() function. */ #endif #define PC_LOCKING #endif @@ -288,7 +288,7 @@ */ #endif #else -/* djgpp C compiler */ +/* djgpp C compiler */ #if defined(SCREEN_BIOS) #undef SCREEN_BIOS #endif diff --git a/include/permonst.h b/include/permonst.h index 22a95d295..753749141 100644 --- a/include/permonst.h +++ b/include/permonst.h @@ -6,16 +6,16 @@ #ifndef PERMONST_H #define PERMONST_H -/* This structure covers all attack forms. - * aatyp is the gross attack type (eg. claw, bite, breath, ...) - * adtyp is the damage type (eg. physical, fire, cold, spell, ...) - * damn is the number of hit dice of damage from the attack. - * damd is the number of sides on each die. +/* This structure covers all attack forms. + * aatyp is the gross attack type (eg. claw, bite, breath, ...) + * adtyp is the damage type (eg. physical, fire, cold, spell, ...) + * damn is the number of hit dice of damage from the attack. + * damd is the number of sides on each die. * - * Some attacks can do no points of damage. Additionally, some can - * have special effects *and* do damage as well. If damn and damd - * are set, they may have a special meaning. For example, if set - * for a blinding attack, they determine the amount of time blinded. + * Some attacks can do no points of damage. Additionally, some can + * have special effects *and* do damage as well. If damn and damd + * are set, they may have a special meaning. For example, if set + * for a blinding attack, they determine the amount of time blinded. */ struct attack { @@ -23,12 +23,12 @@ struct attack { uchar adtyp, damn, damd; }; -/* Max # of attacks for any given monster. +/* Max # of attacks for any given monster. */ #define NATTK 6 -/* Weight of a human body +/* Weight of a human body */ #define WT_HUMAN 1450 @@ -58,7 +58,7 @@ struct permonst { unsigned long mflags1, /* boolean bitflags */ mflags2; /* more boolean bitflags */ unsigned short mflags3; /* yet more boolean bitflags */ - uchar difficulty; /* toughness (formerly from makedefs -m) */ + uchar difficulty; /* toughness (formerly from makedefs -m) */ #ifdef TEXTCOLOR uchar mcolor; /* color to use */ #endif diff --git a/include/prop.h b/include/prop.h index 889ada22f..1d4e3ee11 100644 --- a/include/prop.h +++ b/include/prop.h @@ -1,5 +1,5 @@ /* NetHack 3.7 prop.h $NHDT-Date: 1596498555 2020/08/03 23:49:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */ -/* Copyright (c) 1989 Mike Threepoint */ +/* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ #ifndef PROP_H diff --git a/include/quest.h b/include/quest.h index 88fd47eca..28d5ebeb1 100644 --- a/include/quest.h +++ b/include/quest.h @@ -1,5 +1,5 @@ /* NetHack 3.7 quest.h $NHDT-Date: 1596498556 2020/08/03 23:49:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */ -/* Copyright (c) Mike Stephenson 1991. */ +/* Copyright (c) Mike Stephenson 1991. */ /* NetHack may be freely redistributed. See license for details. */ #ifndef QUEST_H diff --git a/include/rect.h b/include/rect.h index b40bac767..5544db272 100644 --- a/include/rect.h +++ b/include/rect.h @@ -1,5 +1,5 @@ /* NetHack 3.7 rect.h $NHDT-Date: 1596498557 2020/08/03 23:49:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */ -/* Copyright (c) 1990 by Jean-Christophe Collet */ +/* Copyright (c) 1990 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ #ifndef RECT_H diff --git a/include/region.h b/include/region.h index b52baa641..c712173c1 100644 --- a/include/region.h +++ b/include/region.h @@ -1,5 +1,5 @@ /* NetHack 3.7 region.h $NHDT-Date: 1596498557 2020/08/03 23:49:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */ -/* Copyright (c) 1996 by Jean-Christophe Collet */ +/* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ #ifndef REGION_H diff --git a/include/rm.h b/include/rm.h index 71ea4da0b..b2a0f65bb 100644 --- a/include/rm.h +++ b/include/rm.h @@ -9,7 +9,7 @@ /* * The dungeon presentation graphics code and data structures were rewritten * and generalized for NetHack's release 2 by Eric S. Raymond (eric@snark) - * building on Don G Kneller's MS-DOS implementation. See drawing.c for + * building on Don G Kneller's MS-DOS implementation. See drawing.c for * the code that permits the user to set the contents of the symbol structure. * * The door representation was changed by Ari diff --git a/include/sp_lev.h b/include/sp_lev.h index 624dd8158..aa5f9a810 100644 --- a/include/sp_lev.h +++ b/include/sp_lev.h @@ -1,5 +1,5 @@ /* NetHack 3.7 sp_lev.h $NHDT-Date: 1622361649 2021/05/30 08:00:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.47 $ */ -/* Copyright (c) 1989 by Jean-Christophe Collet */ +/* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ #ifndef SP_LEV_H diff --git a/include/spell.h b/include/spell.h index f52053b47..a2ecc8348 100644 --- a/include/spell.h +++ b/include/spell.h @@ -1,5 +1,5 @@ /* NetHack 3.7 spell.h $NHDT-Date: 1646838388 2022/03/09 15:06:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $ */ -/* Copyright 1986, M. Stephenson */ +/* Copyright 1986, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ #ifndef SPELL_H diff --git a/include/timeout.h b/include/timeout.h index 45aab9545..f01139936 100644 --- a/include/timeout.h +++ b/include/timeout.h @@ -1,5 +1,5 @@ /* NetHack 3.7 timeout.h $NHDT-Date: 1596498564 2020/08/03 23:49:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */ -/* Copyright 1994, Dean Luick */ +/* Copyright 1994, Dean Luick */ /* NetHack may be freely redistributed. See license for details. */ #ifndef TIMEOUT_H diff --git a/include/vision.h b/include/vision.h index c37cedb92..89a6b75da 100644 --- a/include/vision.h +++ b/include/vision.h @@ -1,6 +1,6 @@ /* NetHack 3.7 vision.h $NHDT-Date: 1666478832 2022/10/22 22:47:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */ -/* NetHack may be freely redistributed. See license for details. */ +/* NetHack may be freely redistributed. See license for details. */ #ifndef VISION_H #define VISION_H @@ -16,10 +16,10 @@ #define LS_MONSTER 1 /* - * cansee() - Returns true if the hero can see the location. + * cansee() - Returns true if the hero can see the location. * - * couldsee() - Returns true if the hero has a clear line of sight to - * the location. + * couldsee() - Returns true if the hero has a clear line of sight to + * the location. */ #define cansee(x, y) ((g.viz_array[y][x] & IN_SIGHT) != 0) #define couldsee(x, y) ((g.viz_array[y][x] & COULD_SEE) != 0) @@ -28,12 +28,12 @@ /* * The following assume the monster is not blind. * - * m_cansee() - Returns true if the monster can see the given location. + * m_cansee() - Returns true if the monster can see the given location. * * m_canseeu() - Returns true if the monster could see the hero. Assumes - * that if the hero has a clear line of sight to the monster's - * location and the hero is visible, then monster can see the - * hero. + * that if the hero has a clear line of sight to the monster's + * location and the hero is visible, then monster can see the + * hero. */ #define m_cansee(mtmp, x2, y2) clear_path((mtmp)->mx, (mtmp)->my, (x2), (y2)) diff --git a/include/windconf.h b/include/windconf.h index e4f7a3e47..513276c7e 100644 --- a/include/windconf.h +++ b/include/windconf.h @@ -5,7 +5,7 @@ #ifndef WINDCONF_H #define WINDCONF_H -/* #define SHELL */ /* nt use of pcsys routines caused a hang */ +/* #define SHELL */ /* nt use of pcsys routines caused a hang */ #define TEXTCOLOR /* Color text */ @@ -213,7 +213,7 @@ typedef SSIZE_T ssize_t; #ifndef M #define M(c) ((char) (0x80 | (c))) -/* #define M(c) ((c) - 128) */ +/* #define M(c) ((c) - 128) */ #endif #ifndef C diff --git a/include/winprocs.h b/include/winprocs.h index 8d7ee6164..67d228d66 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -1,5 +1,5 @@ /* NetHack 3.7 winprocs.h $NHDT-Date: 1596498572 2020/08/03 23:49:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.56 $ */ -/* Copyright (c) David Cohrs, 1992 */ +/* Copyright (c) David Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ #ifndef WINPROCS_H @@ -9,9 +9,9 @@ enum wp_ids { wp_tty = 1, wp_X11, wp_Qt, wp_mswin, wp_curses, wp_chainin, wp_chainout, wp_safestartup, wp_shim, - wp_hup, wp_guistubs, wp_ttystubs, + wp_hup, wp_guistubs, wp_ttystubs, #ifdef OUTDATED_STUFF - , wp_mac, wp_Gem, wp_Gnome, wp_amii, wp_amiv + , wp_mac, wp_Gem, wp_Gnome, wp_amii, wp_amiv #endif }; @@ -317,9 +317,9 @@ struct wc_Opt { #ifdef WINCHAIN /* Setup phases for window chain elements. - void * rv = X_procs_chain(int, int, void *, void *, void *); - Xprivate* ALLOC n 0 0 0 - - INIT n self next nextdata + void * rv = X_procs_chain(int, int, void *, void *, void *); + Xprivate* ALLOC n 0 0 0 + - INIT n self next nextdata where: Xprivate* is anything window chain entry type X wants back n is the link count (starting with 1) diff --git a/include/wintty.h b/include/wintty.h index e59cf6a50..7973776a1 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -1,5 +1,5 @@ /* NetHack 3.7 wintty.h $NHDT-Date: 1656014599 2022/06/23 20:03:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.55 $ */ -/* Copyright (c) David Cohrs, 1991,1992 */ +/* Copyright (c) David Cohrs, 1991,1992 */ /* NetHack may be freely redistributed. See license for details. */ #ifndef WINTTY_H diff --git a/include/xwindow.h b/include/xwindow.h index ab10be952..c388fb54b 100644 --- a/include/xwindow.h +++ b/include/xwindow.h @@ -1,5 +1,5 @@ /* NetHack 3.7 xwindow.h $NHDT-Date: 1596498574 2020/08/03 23:49:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ #ifndef _xwindow_h @@ -13,44 +13,44 @@ /* Resources: - Name Class RepType Default Value - ---- ----- ------- ------------- - background Background Pixel XtDefaultBackground - border BorderColor Pixel XtDefaultForeground - borderWidth BorderWidth Dimension 1 - destroyCallback Callback Pointer NULL - height Height Dimension 0 - mappedWhenManaged MappedWhenManaged Boolean True - sensitive Sensitive Boolean True - width Width Dimension 0 - x Position Position 0 - y Position Position 0 + Name Class RepType Default Value + ---- ----- ------- ------------- + background Background Pixel XtDefaultBackground + border BorderColor Pixel XtDefaultForeground + borderWidth BorderWidth Dimension 1 + destroyCallback Callback Pointer NULL + height Height Dimension 0 + mappedWhenManaged MappedWhenManaged Boolean True + sensitive Sensitive Boolean True + width Width Dimension 0 + x Position Position 0 + y Position Position 0 - rows Width Dimension 21 - columns Height Dimension 80 - foreground Color Pixel XtDefaultForeground + rows Width Dimension 21 + columns Height Dimension 80 + foreground Color Pixel XtDefaultForeground - black Color Pixel "black" - red Color Pixel "red" - green Color Pixel "pale green" - brown Color Pixel "brown" - blue Color Pixel "blue" - magenta Color Pixel "magenta" - cyan Color Pixel "light cyan" - gray Color Pixel "gray" + black Color Pixel "black" + red Color Pixel "red" + green Color Pixel "pale green" + brown Color Pixel "brown" + blue Color Pixel "blue" + magenta Color Pixel "magenta" + cyan Color Pixel "light cyan" + gray Color Pixel "gray" //no color// - orange Color Pixel "orange" - bright_green Color Pixel "green" - yellow Color Pixel "yellow" - bright_blue Color Pixel "royal blue" - bright_magenta Color Pixel "violet" - bright_cyan Color Pixel "cyan" - white Color Pixel "white" + orange Color Pixel "orange" + bright_green Color Pixel "green" + yellow Color Pixel "yellow" + bright_blue Color Pixel "royal blue" + bright_magenta Color Pixel "violet" + bright_cyan Color Pixel "cyan" + white Color Pixel "white" - font Font XFontStruct* XtDefaultFont - exposeCallback Callback Callback NULL - callback Callback Callback NULL - resizeCallback Callback Callback NULL + font Font XFontStruct* XtDefaultFont + exposeCallback Callback Callback NULL + callback Callback Callback NULL + resizeCallback Callback Callback NULL */ /* define any special resource names here that are not in diff --git a/include/xwindowp.h b/include/xwindowp.h index 10ee0b815..8aa0fb37f 100644 --- a/include/xwindowp.h +++ b/include/xwindowp.h @@ -1,5 +1,5 @@ /* NetHack 3.7 xwindowp.h $NHDT-Date: 1596498575 2020/08/03 23:49:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ #ifndef _xwindowp_h diff --git a/include/youprop.h b/include/youprop.h index d004c1d28..82162b35a 100644 --- a/include/youprop.h +++ b/include/youprop.h @@ -1,5 +1,5 @@ /* NetHack 3.7 youprop.h $NHDT-Date: 1596498577 2020/08/03 23:49:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.32 $ */ -/* Copyright (c) 1989 Mike Threepoint */ +/* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ #ifndef YOUPROP_H diff --git a/src/allmain.c b/src/allmain.c index e506d1e3b..35d8a7c41 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -687,7 +687,7 @@ newgame(void) * any artifacts */ u_init(); - l_nhcore_init(); /* create a Lua state that lasts until the end of the game */ + l_nhcore_init(); /* create a Lua state that lasts until the end of the game */ reset_glyphmap(gm_newgame); #ifndef NO_SIGNAL (void) signal(SIGINT, (SIG_RET_TYPE) done1); diff --git a/src/artifact.c b/src/artifact.c index ed9e63d9c..b7efb011a 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -117,7 +117,7 @@ restore_artifacts(NHFILE *nhfp) mread(nhfp->fd, (genericptr_t) artiexist, sizeof artiexist); mread(nhfp->fd, (genericptr_t) artidisco, sizeof artidisco); } - hack_artifacts(); /* redo non-saved special cases */ + hack_artifacts(); /* redo non-saved special cases */ } const char * diff --git a/src/cmd.c b/src/cmd.c index 6377cf221..65c960f63 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -4143,7 +4143,7 @@ wiz_mon_diff(void) ptr->pmnames[NEUTRAL], cnt, mlev, mcalculated, mhardcoded, mdiff); putstr(win, 0, buf); - } + } } if (!trouble) putstr(win, 0, "No monster difficulty discrepencies were detected."); diff --git a/src/date.c b/src/date.c index 4c3ec587c..46d33eb5a 100644 --- a/src/date.c +++ b/src/date.c @@ -26,8 +26,8 @@ struct nomakedefs_s nomakedefs = { comp.sources.games/91SfKYg_xzI/dGnR3JnspFkJ */ "Tue, 28-Jul-87 13:18:57 EDT", "Version 1.0, built Jul 28 13:18:57 1987.", - (const char *) 0, /* git_sha */ - (const char *) 0, /* git_branch */ + (const char *) 0, /* git_sha */ + (const char *) 0, /* git_branch */ "1.0.0-0", "NetHack Version 1.0.0-0 - last build Tue Jul 28 13:18:57 1987.", 0x01010000UL, diff --git a/src/decl.c b/src/decl.c index 40e04ec2e..4d0b18d4c 100644 --- a/src/decl.c +++ b/src/decl.c @@ -204,9 +204,9 @@ const struct instance_globals g_init = { 0, /* mrank_sz */ { { { NULL, NULL, 0L, FALSE, FALSE, 0, 0U, { 0 }, NULL, 0, 0, 0 #ifdef STATUS_HILITES - , UNDEFINED_PTR, UNDEFINED_PTR + , UNDEFINED_PTR, UNDEFINED_PTR #endif - } } + } } }, /* blstats */ FALSE, /* blinit */ FALSE, /* update_all */ @@ -474,7 +474,7 @@ const struct instance_globals g_init = { /* mkmaze.c */ { {COLNO, ROWNO, 0, 0}, {COLNO, ROWNO, 0, 0}, - FALSE, FALSE, 0, 0, { 0 } }, /* bughack */ + FALSE, FALSE, 0, 0, { 0 } }, /* bughack */ UNDEFINED_PTR, /* bbubbles */ UNDEFINED_PTR, /* ebubbles */ UNDEFINED_PTR, /* wportal */ diff --git a/src/display.c b/src/display.c index 01cb436d4..ba51bc7a8 100644 --- a/src/display.c +++ b/src/display.c @@ -1483,7 +1483,7 @@ extern glyph_map glyphmap[MAX_GLYPH]; /* from tile.c */ glyph_map glyphmap[MAX_GLYPH] = { { 0U, { 0, 0}, 0 #ifdef ENHANCED_SYMBOLS - , 0 + , 0 #endif } }; diff --git a/src/dlb.c b/src/dlb.c index c52f286f9..7be7ccf42 100644 --- a/src/dlb.c +++ b/src/dlb.c @@ -9,7 +9,7 @@ #include #endif -#define DATAPREFIX 4 /* see decl.h */ +#define DATAPREFIX 4 /* see decl.h */ #ifdef DLB /* diff --git a/src/dungeon.c b/src/dungeon.c index 8fcdb8931..762eed495 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -753,7 +753,7 @@ init_dungeons(void) (void) memset(&pd, 0, sizeof (struct proto_dungeon)); pd.n_levs = pd.n_brs = 0; - L = nhl_init(&sbi); /* private Lua state for this function */ + L = nhl_init(&sbi); /* private Lua state for this function */ if (!L) { panic1("'nhl_init' failed; can't continue."); /*NOTREACHED*/ diff --git a/src/engrave.c b/src/engrave.c index cae185878..f2ee017c0 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1385,7 +1385,7 @@ rest_engravings(NHFILE *nhfp) } ep->nxt_engr = head_engr; head_engr = ep; - ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ + ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ /* mark as finished for bones levels -- no problem for * normal levels as the player must have finished engraving * to be able to move again */ diff --git a/src/invent.c b/src/invent.c index 5b2b8638f..d3912e190 100644 --- a/src/invent.c +++ b/src/invent.c @@ -3245,7 +3245,7 @@ display_pickinv( sparse = ((wri_info.fromcore.invmode & InvSparse) != 0); inuse_only = ((wri_info.fromcore.invmode & InvInUse) != 0); doing_perm_invent = TRUE; - nhUse(sparse); + nhUse(sparse); } /* * Exit early if no inventory -- but keep going if we are doing diff --git a/src/restore.c b/src/restore.c index feffd1c30..e779fd308 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1484,7 +1484,7 @@ validate(NHFILE* nhfp, const char *name) } else { if (nhfp->structlevel) rlen = (readLenType) read(nhfp->fd, (genericptr_t) &sfi, sizeof sfi); - minit(); /* ZEROCOMP */ + minit(); /* ZEROCOMP */ if (rlen == 0) { if (verbose) { pline("File \"%s\" is empty during save file feature check?", name); diff --git a/src/sp_lev.c b/src/sp_lev.c index 191a50c99..9b3bf5964 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -3443,18 +3443,18 @@ int lspo_object(lua_State *L) { static object zeroobject = { - { 0 }, /* Str_or_len name */ - 0, /* corpsenm */ - 0, 0, /* id, spe */ - 0, /* coord */ - 0, 0, /* coordxy x,y */ - 0, 0, /* class, containment */ - 0, /* curse_state */ - 0, /* quan */ - 0, /* buried */ - 0, /* lit */ - 0, 0, 0, 0, 0, 0, 0, 0, /* eroded, locked, trapped, recharged, - invis, greased, broken, achievment */ + { 0 }, /* Str_or_len name */ + 0, /* corpsenm */ + 0, 0, /* id, spe */ + 0, /* coord */ + 0, 0, /* coordxy x,y */ + 0, 0, /* class, containment */ + 0, /* curse_state */ + 0, /* quan */ + 0, /* buried */ + 0, /* lit */ + 0, 0, 0, 0, 0, 0, 0, 0, /* eroded, locked, trapped, recharged, + invis, greased, broken, achievment */ }; #if 0 int nparams = 0; diff --git a/sys/msdos/msdos.c b/sys/msdos/msdos.c index eff5afb45..6ff84febd 100644 --- a/sys/msdos/msdos.c +++ b/sys/msdos/msdos.c @@ -43,7 +43,7 @@ */ #define READCHAR 0x00 /* Read Character from Keyboard */ #define GETKEYFLAGS 0x02 /* Get Keyboard Flags */ -/*#define KEY_DEBUG */ /* print values of unexpected key codes - devel*/ +/*#define KEY_DEBUG */ /* print values of unexpected key codes - devel*/ void get_cursor(int *, int *); @@ -201,7 +201,7 @@ static const struct pad { * Unlike Ctrl-letter, the Alt-letter keystrokes have no specific ASCII * meaning unless assigned one by a keyboard conversion table, so the * keyboard BIOS normally does not return a character code when Alt-letter - * is pressed. So, to interpret unassigned Alt-letters, we must use a + * is pressed. So, to interpret unassigned Alt-letters, we must use a * scan code table to translate the scan code into a letter, then set the * "meta" bit for it. -3. */ diff --git a/sys/msdos/tile2bin.c b/sys/msdos/tile2bin.c index fea00b15e..d8b97da1a 100644 --- a/sys/msdos/tile2bin.c +++ b/sys/msdos/tile2bin.c @@ -5,10 +5,10 @@ /* * Edit History: * - * Initial Creation M.Allison 93/10/21 - * ifndef MONITOR_HEAP for heaputil.c P.Winner 94/03/12 - * added Borland C _stklen variable Y.Sapir 94/05/01 - * fixed to use text tiles from win/share M.Allison 95/01/31 + * Initial Creation M.Allison 1993/10/21 + * ifndef MONITOR_HEAP for heaputil.c P.Winner 1994/03/12 + * added Borland C _stklen variable Y.Sapir 1994/05/01 + * fixed to use text tiles from win/share M.Allison 1995/01/31 * */ diff --git a/sys/msdos/video.c b/sys/msdos/video.c index a2668d78c..b7596a4d0 100644 --- a/sys/msdos/video.c +++ b/sys/msdos/video.c @@ -1,13 +1,13 @@ /* NetHack 3.7 video.c $NHDT-Date: 1596498277 2020/08/03 23:44:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.16 $ */ -/* Copyright (c) NetHack PC Development Team 1993, 1994, 2001 */ +/* Copyright (c) NetHack PC Development Team 1993, 1994, 2001 */ /* NetHack may be freely redistributed. See license for details. */ -/* */ + /* * video.c - Hardware video support front-ends * *Edit History: - * Initial Creation M. Allison 1993/04/04 - * Add djgpp support K. Smolkowski 1993/04/26 + * Initial Creation M. Allison 1993/04/04 + * Add djgpp support K. Smolkowski 1993/04/26 * Add txt/graphics mode support M. Allison 1993/10/30 * Add graphics mode cursor sim. M. Allison 1994/02/19 * Add hooks for decals on vga M. Allison 2001/04/07 @@ -527,25 +527,25 @@ gr_finish(void) * as those in win/tty). * * xputs - Writes a c null terminated string at the current location. - * Depending on compile options, this could just be a series - * of repeated calls to xputc() for each character. + * Depending on compile options, this could just be a series + * of repeated calls to xputc() for each character. * * xputc - Writes a single character at the current location. Since - * various places in the code assume that control characters - * can be used to control, we are forced to interpret some of - * the more common ones, in order to keep things looking correct. + * various places in the code assume that control characters + * can be used to control, we are forced to interpret some of + * the more common ones, in order to keep things looking correct. * * xputg - If using a graphics mode display mechanism (such as VGA, this - * routine is used to display a graphical representation of a - * NetHack glyph at the current location. For more information on - * NetHack glyphs refer to the comments in include/display.h. + * routine is used to display a graphical representation of a + * NetHack glyph at the current location. For more information on + * NetHack glyphs refer to the comments in include/display.h. * * NOTES: - * wintty.h uses macros to redefine common output functions - * such as puts, putc, putchar, so that they get steered into - * either xputs (for strings) or xputc (for single characters). - * References to puts, putc, and putchar in other source files - * (that include wintty.h) are actually using these routines. + * wintty.h uses macros to redefine common output functions + * such as puts, putc, putchar, so that they get steered into + * either xputs (for strings) or xputc (for single characters). + * References to puts, putc, and putchar in other source files + * (that include wintty.h) are actually using these routines. */ void @@ -683,30 +683,30 @@ HideCursor(void) #ifdef TEXTCOLOR /* - * CLR_BLACK 0 - * CLR_RED 1 - * CLR_GREEN 2 - * CLR_BROWN 3 low-intensity yellow - * CLR_BLUE 4 - * CLR_MAGENTA 5 - * CLR_CYAN 6 - * CLR_GRAY 7 low-intensity white - * NO_COLOR 8 - * CLR_ORANGE 9 - * CLR_BRIGHT_GREEN 10 - * CLR_YELLOW 11 - * CLR_BRIGHT_BLUE 12 - * CLR_BRIGHT_MAGENTA 13 - * CLR_BRIGHT_CYAN 14 - * CLR_WHITE 15 - * CLR_MAX 16 - * BRIGHT 8 + * CLR_BLACK 0 + * CLR_RED 1 + * CLR_GREEN 2 + * CLR_BROWN 3 low-intensity yellow + * CLR_BLUE 4 + * CLR_MAGENTA 5 + * CLR_CYAN 6 + * CLR_GRAY 7 low-intensity white + * NO_COLOR 8 + * CLR_ORANGE 9 + * CLR_BRIGHT_GREEN 10 + * CLR_YELLOW 11 + * CLR_BRIGHT_BLUE 12 + * CLR_BRIGHT_MAGENTA 13 + * CLR_BRIGHT_CYAN 14 + * CLR_WHITE 15 + * CLR_MAX 16 + * BRIGHT 8 */ #ifdef VIDEOSHADES /* assign_videoshades() is prototyped in extern.h */ /* assign_videocolors() is prototyped in extern.h */ -/* assign_video() is prototyped in extern.h */ +/* assign_video() is prototyped in extern.h */ int shadeflag; /* shades are initialized */ int colorflag; /* colors are initialized */ @@ -832,8 +832,8 @@ assign_videoshades(char *choiceptr) /* * Process defaults.nh OPTIONS=videocolors:xxx * Left to right assignments for: - * red green brown blue magenta cyan orange br.green yellow - * br.blue br.mag br.cyan + * red green brown blue magenta cyan orange br.green yellow + * br.blue br.mag br.cyan * * Default Mapping (BIOS): 4-2-6-1-5-3-12-10-14-9-13-11 */ @@ -913,8 +913,8 @@ convert_uchars(char *bufp, /* current pointer */ * where (current) legitimate values are: * * autodetect (attempt to determine the adapter type) - * default (force use of the default video method for environment) - * vga (use vga adapter code) + * default (force use of the default video method for environment) + * vga (use vga adapter code) */ int assign_video(char *sopt) @@ -922,8 +922,8 @@ assign_video(char *sopt) /* * debug * - * printf("video is %s",sopt); - * getch(); + * printf("video is %s",sopt); + * getch(); */ iflags.grmode = 0; iflags.hasvesa = 0; @@ -966,7 +966,7 @@ assign_video(char *sopt) #endif /* * Auto-detect Priorities (arbitrary for now): - * VESA, VGA + * VESA, VGA */ if (iflags.hasvesa) iflags.usevesa = 1; else if (iflags.hasvga) { diff --git a/sys/msdos/vidvesa.c b/sys/msdos/vidvesa.c index e67ba81fd..97541d4d1 100644 --- a/sys/msdos/vidvesa.c +++ b/sys/msdos/vidvesa.c @@ -725,7 +725,7 @@ vesa_xputg(const glyph_info *glyphinfo) * These include: * * vesa_gotoloc(x,y) - Moves the "cursor" on screen to the specified x - * and y character cell location. This routine + * and y character cell location. This routine * determines the location where screen writes * will occur next, it does not change the location * of the player on the NetHack level. @@ -862,7 +862,7 @@ vesa_redrawmap(void) void vesa_userpan(enum vga_pan_direction pan) { - /* pline("Into userpan"); */ + /* pline("Into userpan"); */ if (iflags.over_view || iflags.traditional_view) return; @@ -918,7 +918,7 @@ vesa_userpan(enum vga_pan_direction pan) void vesa_overview(boolean on) { - /* vesa_HideCursor(); */ + /* vesa_HideCursor(); */ if (on) { iflags.over_view = TRUE; clipx = 0; @@ -951,9 +951,9 @@ vesa_overview(boolean on) void vesa_traditional(boolean on) { - /* vesa_HideCursor(); */ + /* vesa_HideCursor(); */ if (on) { - /* switch_symbols(FALSE); */ + /* switch_symbols(FALSE); */ iflags.traditional_view = TRUE; clipx = 0; clipxmax = COLNO - 1; @@ -1054,7 +1054,7 @@ vesa_Init(void) iflags.over_view = FALSE; CO = 80; LI = 25; - /* clear_screen() */ /* not vesa_clear_screen() */ + /* clear_screen() */ /* not vesa_clear_screen() */ return; } #endif @@ -1070,7 +1070,7 @@ vesa_Init(void) iflags.over_view = FALSE; CO = 80; LI = 25; - /* clear_screen() */ /* not vesa_clear_screen() */ + /* clear_screen() */ /* not vesa_clear_screen() */ return; } diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 178bba54d..56fab0db1 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -186,7 +186,7 @@ static int viewport_size = 40; /* static char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; */ /* static char bittable[8]= {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; */ #if 0 -static char defpalette[] = { /* Default VGA palette */ +static char defpalette[] = { /* Default VGA palette */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0xaa, 0x00, @@ -214,7 +214,7 @@ int vp2[SCREENPLANES] = { 1, 2, 4, 8 }; static struct planar_cell_struct planecell; static struct overview_planar_cell_struct planecell_O; -/* static int g_attribute; */ /* Current attribute to use */ +/* static int g_attribute; */ /* Current attribute to use */ void vga_get_scr_size(void) @@ -424,7 +424,7 @@ vga_xputg(const glyph_info *glyphinfo) * These include: * * vga_gotoloc(x,y) - Moves the "cursor" on screen to the specified x - * and y character cell location. This routine + * and y character cell location. This routine * determines the location where screen writes * will occur next, it does not change the location * of the player on the NetHack level. @@ -513,7 +513,7 @@ vga_userpan(enum vga_pan_direction pan) { int x; - /* pline("Into userpan"); */ + /* pline("Into userpan"); */ if (iflags.over_view || iflags.traditional_view) return; if (pan == pan_left) @@ -530,7 +530,7 @@ vga_userpan(enum vga_pan_direction pan) void vga_overview(boolean on) { - /* vga_HideCursor(); */ + /* vga_HideCursor(); */ if (on) { iflags.over_view = TRUE; clipx = 0; @@ -547,9 +547,9 @@ vga_overview(boolean on) void vga_traditional(boolean on) { - /* vga_HideCursor(); */ + /* vga_HideCursor(); */ if (on) { - /* switch_symbols(FALSE); */ + /* switch_symbols(FALSE); */ iflags.traditional_view = TRUE; clipx = 0; clipxmax = CO - 1; @@ -762,7 +762,7 @@ vga_Init(void) iflags.over_view = FALSE; CO = 80; LI = 25; - /* clear_screen() */ /* not vga_clear_screen() */ + /* clear_screen() */ /* not vga_clear_screen() */ return; } #endif @@ -868,7 +868,7 @@ vga_NoBorder(int bc) regs.h.al = (char)0x01; regs.h.bh = (char)bc; regs.h.bl = 0; - (void) int86(VIDEO_BIOS, ®s, ®s); + (void) int86(VIDEO_BIOS, ®s, ®s); } #endif @@ -918,9 +918,9 @@ vga_detect(void) /* * debug * - * printf("vga_detect returned al=%02x, bh=%02x, bl=%02x\n", - * (int)regs.h.al, (int)regs.h.bh, (int)regs.h.bl); - * getch(); + * printf("vga_detect returned al=%02x, bh=%02x, bl=%02x\n", + * (int)regs.h.al, (int)regs.h.bh, (int)regs.h.bl); + * getch(); */ if ((int) regs.h.al == 0x1a) { if (((int) regs.h.bl == 8) || ((int) regs.h.bl == 7)) { @@ -947,7 +947,7 @@ vga_WriteChar(uint32 chr, int col, int row, int colour) int vplane; unsigned char bitmap[ROWS_PER_CELL]; - /* if (chr < ' ') chr = ' '; */ /* assumes ASCII set */ + /* if (chr < ' ') chr = ' '; */ /* assumes ASCII set */ vga_GetBitmap(chr, bitmap); x = min(col, (CO - 1)); /* min() used protection from callers */ @@ -1312,8 +1312,8 @@ vga_DrawCursor(void) char __far *tmp1; char __far *tmp2; unsigned char first, second; - /* char on[2] = {0xFF,0xFF}; */ - /* char off[2] = {0x00,0x00}; */ + /* char on[2] = {0xFF,0xFF}; */ + /* char off[2] = {0x00,0x00}; */ boolean isrogue = Is_rogue_level(&u.uz); boolean singlebyte = (isrogue || iflags.over_view || iflags.traditional_view || !inmap); diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 899b26f07..8a04bead3 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -296,7 +296,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++; - } + } if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { /* avoid matching "-dec" for DECgraphics; since the man page @@ -566,7 +566,7 @@ process_options(int argc, char *argv[]) switch_symbols(TRUE); } break; - /* case 'D': */ + /* case 'D': */ case 'd': if (!strncmpi(argv[0] + 1, "DEC", 3)) { load_symset("DECGraphics", PRIMARYSET); diff --git a/sys/share/pcsys.c b/sys/share/pcsys.c index c09887305..fc2a7d789 100644 --- a/sys/share/pcsys.c +++ b/sys/share/pcsys.c @@ -131,7 +131,7 @@ dosh(void) #endif /* MICRO */ /* - * Add a backslash to any name not ending in /, \ or : There must + * Add a backslash to any name not ending in /, \ or : There must * be room for the \ */ void diff --git a/sys/share/random.c b/sys/share/random.c index 37e4a25c9..5c94a03c0 100644 --- a/sys/share/random.c +++ b/sys/share/random.c @@ -18,20 +18,20 @@ /* Several minor changes were made for the NetHack distribution to satisfy * non-BSD compilers (by definition BSD compilers do not need to compile * this file for NetHack). These changes consisted of: - * - changing the sccsid conditions to nested ifdefs from defined()s - * to accommodate stupid preprocessors - * - giving srandom() type void instead of allowing it to default to int - * - making the first return in initstate() return a value consistent - * with its type (instead of no value) - * - ANSI function prototyping in extern.h - therefore include hack.h - * instead of stdio.h and remove separate declaration of random() from - * the beginning of function srandom - * - moving sccsid after hack.h to allow precompiled headers, which - * means the defined()s would be ok again... - * - change fprintf(stderr, "x(%d)y\n", z) to impossible("x(%d)y", z) - * - remove useless variable `j' from srandom() - * - cast result of pointer subtraction to long since ptrdiff_t could - * be bigger than that and trigger warnings when assigning to long + * - changing the sccsid conditions to nested ifdefs from defined()s + * to accommodate stupid preprocessors + * - giving srandom() type void instead of allowing it to default to int + * - making the first return in initstate() return a value consistent + * with its type (instead of no value) + * - ANSI function prototyping in extern.h - therefore include hack.h + * instead of stdio.h and remove separate declaration of random() from + * the beginning of function srandom + * - moving sccsid after hack.h to allow precompiled headers, which + * means the defined()s would be ok again... + * - change fprintf(stderr, "x(%d)y\n", z) to impossible("x(%d)y", z) + * - remove useless variable `j' from srandom() + * - cast result of pointer subtraction to long since ptrdiff_t could + * be bigger than that and trigger warnings when assigning to long * * $NHDT-Date: 1432512787 2015/05/25 00:13:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */ @@ -42,7 +42,7 @@ #else #ifdef LIBC_SCCS #ifndef lint -static char sccsid[] = "@(#)random.c 5.5 (Berkeley) 7/6/88"; +static char sccsid[] = "@(#)random.c 5.5 (Berkeley) 7/6/88"; #endif #endif /* LIBC_SCCS and not lint */ @@ -131,13 +131,13 @@ static const int seps[MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 }; /* * Initially, everything is set up as if from : - * initstate( 1, &randtbl, 128 ); + * initstate( 1, &randtbl, 128 ); * Note that this initialization takes advantage of the fact that srandom() * advances the front and rear pointers 10*rand_deg times, and hence the * rear pointer which starts at 0 will also end up at zero; thus the zeroeth * element of the state information, which contains info about the current * position of the rear pointer is just - * MAX_TYPES*(rptr - state) + TYPE_3 == TYPE_3. + * MAX_TYPES*(rptr - state) + TYPE_3 == TYPE_3. */ static long randtbl[DEG_3 + 1] = { @@ -158,7 +158,7 @@ static long randtbl[DEG_3 + 1] = { * away with just one pointer, but the code for random() is more efficient *this * way). The pointers are left positioned as they would be from the call - * initstate( 1, randtbl, 128 ) + * initstate( 1, randtbl, 128 ) * (The position of the rear pointer, rptr, is really 0 (as explained above * in the initialization of randtbl) because the state table pointer is set * to point to randtbl[1] (as explained below). diff --git a/sys/share/tclib.c b/sys/share/tclib.c index be0b3bc48..8c46a3aac 100644 --- a/sys/share/tclib.c +++ b/sys/share/tclib.c @@ -1,5 +1,5 @@ /* NetHack 3.7 tclib.c $NHDT-Date: 1596498287 2020/08/03 23:44:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */ -/* Copyright (c) Robert Patrick Rankin, 1995 */ +/* Copyright (c) Robert Patrick Rankin, 1995 */ /* NetHack may be freely redistributed. See license for details. */ /* termcap library implementation */ diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index 4e932b748..90517a093 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -257,7 +257,7 @@ setftty(void) /* Should use (ECHO|CRMOD) here instead of ECHO */ if ((unsigned) (curttyb.echoflgs & ECHO) != ef) { curttyb.echoflgs &= ~ECHO; - /* curttyb.echoflgs |= ef; */ + /* curttyb.echoflgs |= ef; */ change++; } if ((unsigned) (curttyb.cbrkflgs & CBRKMASK) != cf) { diff --git a/sys/share/uudecode.c b/sys/share/uudecode.c index 4c3d8cc3c..b5468f1f1 100644 --- a/sys/share/uudecode.c +++ b/sys/share/uudecode.c @@ -25,7 +25,7 @@ * produces a binary only 6 blocks long, as opposed to the 137-block one * produced by an ordinary link). To set up the VMS symbol to run the * program ("run uudecode filename" won't work), do: - * uudecode :== "$disk:[directory]uudecode.exe" + * uudecode :== "$disk:[directory]uudecode.exe" * and don't forget the leading "$" or it still won't work. The binaries * produced by this program are in VMS "stream-LF" format; this makes no * difference to VMS when running decoded executables, nor to VMS unzip, @@ -45,7 +45,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)uudecode.c 5.5 (Berkeley) 7/6/88"; +static char sccsid[] = "@(#)uudecode.c 5.5 (Berkeley) 7/6/88"; #endif /* not lint */ #ifdef __MSDOS__ /* For Turbo C */ diff --git a/sys/unix/unixres.c b/sys/unix/unixres.c index f2a2fe8a6..538d8bdcc 100644 --- a/sys/unix/unixres.c +++ b/sys/unix/unixres.c @@ -6,8 +6,8 @@ * will hide privileges from the caller if so desired. * * Currently supported UNIX variants: - * Linux version 2.1.44 and above - * FreeBSD (versions unknown) + * Linux version 2.1.44 and above + * FreeBSD (versions unknown) * * Note: SunOS and Solaris have no mechanism for retrieving the saved id, * so temporarily dropping privileges on these systems is sufficient to diff --git a/sys/vms/oldcrtl.c b/sys/vms/oldcrtl.c index 43bbd815a..2753c7755 100644 --- a/sys/vms/oldcrtl.c +++ b/sys/vms/oldcrtl.c @@ -1,5 +1,5 @@ /* NetHack 3.7 oldcrtl.c $NHDT-Date: 1596498304 2020/08/03 23:45:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */ -/* Pat Rankin May'90 */ +/* Pat Rankin May'90 */ /* VMS NetHack support, not needed for vms 4.6,4.7,5.x,or later */ #ifdef VERYOLD_VMS @@ -7,7 +7,7 @@ * The following routines are used by NetHack but were not available * from the C Run-Time Library (VAXCRTL) prior to VMS V4.6. * - * atexit, memcmp, memcpy, qsort, rename, vprintf, vsprintf + * atexit, memcmp, memcpy, qsort, rename, vprintf, vsprintf * * Most of them are implemented here, but others will have to be worked * around in another fashion [such as '#define USE_OLDARGS' (even though diff --git a/sys/windows/consoletty.c b/sys/windows/consoletty.c index ec6c3b665..d8177d62a 100644 --- a/sys/windows/consoletty.c +++ b/sys/windows/consoletty.c @@ -5,11 +5,11 @@ /* tty.c - (Windows console) version */ /* - * Initial Creation M. Allison 1993/01/31 - * Switch to low level console output routines M. Allison 2003/10/01 - * Restrict cursor movement until input pending M. Lehotay 2003/10/02 - * Call Unicode version of output API on NT R. Chason 2005/10/28 - * Use of back buffer to improve performance B. House 2018/05/06 + * Initial Creation M. Allison 1993/01/31 + * Switch to low level console output routines M. Allison 2003/10/01 + * Restrict cursor movement until input pending M. Lehotay 2003/10/02 + * Call Unicode version of output API on NT R. Chason 2005/10/28 + * Use of back buffer to improve performance B. House 2018/05/06 * */ @@ -1013,7 +1013,7 @@ static BOOL CtrlHandler(DWORD ctrltype) { switch (ctrltype) { - /* case CTRL_C_EVENT: */ + /* case CTRL_C_EVENT: */ case CTRL_BREAK_EVENT: clear_screen(); case CTRL_CLOSE_EVENT: @@ -3519,7 +3519,7 @@ ray_checkinput( else if (ir->Event.MouseEvent.dwButtonState & RIGHTBUTTON) *mod = CLICK_2; -#if 0 /* middle button */ +#if 0 /* middle button */ else if (ir->Event.MouseEvent.dwButtonState & MIDBUTTON) *mod = CLICK_3; #endif diff --git a/sys/windows/win10.c b/sys/windows/win10.c index 6e610d4ea..7eeaab811 100644 --- a/sys/windows/win10.c +++ b/sys/windows/win10.c @@ -1,5 +1,5 @@ /* NetHack 3.7 win10.c $NHDT-Date: 1596498318 2020/08/03 23:45:18 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */ -/* Copyright (C) 2018 by Bart House */ +/* Copyright (C) 2018 by Bart House */ /* NetHack may be freely redistributed. See license for details. */ #include "win10.h" diff --git a/sys/windows/windmain.c b/sys/windows/windmain.c index 8d51c7abc..cafa850ea 100644 --- a/sys/windows/windmain.c +++ b/sys/windows/windmain.c @@ -679,7 +679,7 @@ attempt_restore: You("are in non-scoring discovery mode."); } - // iflags.debug_fuzzer = TRUE; + // iflags.debug_fuzzer = TRUE; moveloop(resuming); nethack_exit(EXIT_SUCCESS); @@ -970,7 +970,7 @@ fakeconsole(void) /* Bool rval; */ AllocConsole(); AttachConsole(GetCurrentProcessId()); - /* rval = SetStdHandle(STD_OUTPUT_HANDLE, hWrite); */ + /* rval = SetStdHandle(STD_OUTPUT_HANDLE, hWrite); */ freopen("CON", "w", stdout); freopen("CON", "r", stdin); } diff --git a/sys/windows/windsys.c b/sys/windows/windsys.c index 42115121c..9a063337f 100644 --- a/sys/windows/windsys.c +++ b/sys/windows/windsys.c @@ -180,7 +180,7 @@ void nt_regularize(char* s) /* normalize file name */ char *getxxx(void) { char szFullPath[MAX_PATH] = ""; -HMODULE hInst = NULL; /* NULL gets the filename of this module */ +HMODULE hInst = NULL; /* NULL gets the filename of this module */ GetModuleFileName(hInst, szFullPath, sizeof(szFullPath)); return &szFullPath[0]; @@ -621,7 +621,7 @@ windows_early_options(const char *window_opt) } /* - * Add a backslash to any name not ending in /, \ or : There must + * Add a backslash to any name not ending in /, \ or : There must * be room for the \ */ void diff --git a/win/X11/Window.c b/win/X11/Window.c index 9bc448627..64f690a6e 100644 --- a/win/X11/Window.c +++ b/win/X11/Window.c @@ -1,5 +1,5 @@ /* NetHack 3.7 Window.c $NHDT-Date: 1596498371 2020/08/03 23:46:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ /* @@ -130,40 +130,40 @@ Resize(Widget w) WindowClassRec windowClassRec = { { /* core fields */ - /* superclass */ (WidgetClass) &widgetClassRec, - /* class_name */ nhStr("Window"), - /* widget_size */ sizeof(WindowRec), - /* class_initialize */ 0, - /* class_part_initialize */ 0, - /* class_inited */ FALSE, - /* initialize */ 0, - /* initialize_hook */ 0, - /* realize */ XtInheritRealize, - /* actions */ actions, - /* num_actions */ XtNumber(actions), - /* resources */ resources, - /* num_resources */ XtNumber(resources), - /* xrm_class */ NULLQUARK, - /* compress_motion */ TRUE, - /* compress_exposure */ TRUE, - /* compress_enterleave */ TRUE, - /* visible_interest */ FALSE, - /* destroy */ 0, - /* resize */ Resize, - /* expose */ Redisplay, - /* set_values */ 0, - /* set_values_hook */ 0, - /* set_values_almost */ XtInheritSetValuesAlmost, - /* get_values_hook */ 0, - /* accept_focus */ 0, - /* version */ XtVersion, - /* callback_private */ 0, - /* tm_table */ translations, - /* query_geometry */ XtInheritQueryGeometry, - /* display_accelerator */ XtInheritDisplayAccelerator, - /* extension */ 0 }, + /* superclass */ (WidgetClass) &widgetClassRec, + /* class_name */ nhStr("Window"), + /* widget_size */ sizeof(WindowRec), + /* class_initialize */ 0, + /* class_part_initialize */ 0, + /* class_inited */ FALSE, + /* initialize */ 0, + /* initialize_hook */ 0, + /* realize */ XtInheritRealize, + /* actions */ actions, + /* num_actions */ XtNumber(actions), + /* resources */ resources, + /* num_resources */ XtNumber(resources), + /* xrm_class */ NULLQUARK, + /* compress_motion */ TRUE, + /* compress_exposure */ TRUE, + /* compress_enterleave */ TRUE, + /* visible_interest */ FALSE, + /* destroy */ 0, + /* resize */ Resize, + /* expose */ Redisplay, + /* set_values */ 0, + /* set_values_hook */ 0, + /* set_values_almost */ XtInheritSetValuesAlmost, + /* get_values_hook */ 0, + /* accept_focus */ 0, + /* version */ XtVersion, + /* callback_private */ 0, + /* tm_table */ translations, + /* query_geometry */ XtInheritQueryGeometry, + /* display_accelerator */ XtInheritDisplayAccelerator, + /* extension */ 0 }, { /* window fields */ - /* empty */ 0 } + /* empty */ 0 } }; WidgetClass windowWidgetClass = (WidgetClass) &windowClassRec; diff --git a/win/X11/tile2x11.c b/win/X11/tile2x11.c index 53e7e57d2..82826c2df 100644 --- a/win/X11/tile2x11.c +++ b/win/X11/tile2x11.c @@ -7,8 +7,8 @@ * by nethack. * * Assumptions: - * + Two dimensional byte arrays are in row order and are not padded - * between rows (x11_colormap[][]). + * + Two dimensional byte arrays are in row order and are not padded + * between rows (x11_colormap[][]). */ #include "hack.h" /* for MAX_GLYPH */ #include "tile.h" diff --git a/win/X11/winmenu.c b/win/X11/winmenu.c index 4a4d7676a..7d6986773 100644 --- a/win/X11/winmenu.c +++ b/win/X11/winmenu.c @@ -1,11 +1,11 @@ /* NetHack 3.7 winmenu.c $NHDT-Date: 1644531504 2022/02/10 22:18:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.50 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ /* * File for creating menus. * - * + Global functions: start_menu, add_menu, end_menu, select_menu + * + Global functions: start_menu, add_menu, end_menu, select_menu */ #ifndef SYSV diff --git a/win/X11/winmesg.c b/win/X11/winmesg.c index 73e8a5fca..a4e9abe8c 100644 --- a/win/X11/winmesg.c +++ b/win/X11/winmesg.c @@ -1,15 +1,15 @@ /* NetHack 3.7 winmesg.c $NHDT-Date: 1596498373 2020/08/03 23:46:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ /* * Message window routines. * * Global functions: - * create_message_window() - * destroy_message_window() - * display_message_window() - * append_message() + * create_message_window() + * destroy_message_window() + * display_message_window() + * append_message() */ #ifndef SYSV diff --git a/win/X11/winstat.c b/win/X11/winstat.c index ca6d6e391..a1d35518e 100644 --- a/win/X11/winstat.c +++ b/win/X11/winstat.c @@ -1,5 +1,5 @@ /* NetHack 3.7 winstat.c $NHDT-Date: 1649269127 2022/04/06 18:18:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.37 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ /* @@ -179,7 +179,7 @@ static const char *fancy_status_hilite_colors[] = { "magenta3", "dark cyan", "web gray", - "", /* NO_COLOR */ + "", /* NO_COLOR */ "orange", "green3", "goldenrod", @@ -1750,11 +1750,11 @@ apply_hilite_attributes(struct X_status_value *sv, int attributes) * the other. So only do our update when we update the second line. * * Information on the first line: - * name, characteristics, alignment, score + * name, characteristics, alignment, score * * Information on the second line: - * dlvl, gold, hp, power, ac, {level & exp or HD **}, time, - * status * (stone, slime, strngl, foodpois, termill, + * dlvl, gold, hp, power, ac, {level & exp or HD **}, time, + * status * (stone, slime, strngl, foodpois, termill, * hunger, encumbrance, lev, fly, ride, * blind, deaf, stun, conf, hallu) * @@ -1912,8 +1912,8 @@ update_fancy_status_field(int i, int color, int attributes) /* * There is a possible infinite loop that occurs with: * - * impossible->pline->flush_screen->bot->bot{1,2}-> - * putstr->adjust_status->update_other->impossible + * impossible->pline->flush_screen->bot->bot{1,2}-> + * putstr->adjust_status->update_other->impossible * * Break out with this. */ @@ -2306,12 +2306,12 @@ static int characteristics_indices[11 - 2] = { /* * Produce a form that looks like the following: * - * title + * title * location - * col1_indices[0] col2_indices[0] col3_indices[0] - * col1_indices[1] col2_indices[1] col3_indices[1] + * col1_indices[0] col2_indices[0] col3_indices[0] + * col1_indices[1] col2_indices[1] col3_indices[1] * ... ... ... - * col1_indices[5] col2_indices[5] col3_indices[5] + * col1_indices[5] col2_indices[5] col3_indices[5] * * The status conditions are managed separately and appear to the right * of this form. diff --git a/win/X11/wintext.c b/win/X11/wintext.c index d83574658..0503fdce8 100644 --- a/win/X11/wintext.c +++ b/win/X11/wintext.c @@ -1,11 +1,11 @@ /* NetHack 3.7 wintext.c $NHDT-Date: 1597967808 2020/08/20 23:56:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ /* * File for dealing with text windows. * - * + No global functions. + * + No global functions. */ #ifndef SYSV @@ -194,7 +194,7 @@ display_text_window(struct xwindow *wp, boolean blocking) if (width > (Dimension) XtScreen(wp->w)->width) { /* too wide for screen */ /* Back off some amount - we really need to back off the scrollbar */ - /* width plus some extra. */ + /* width plus some extra. */ width = XtScreen(wp->w)->width - 20; } XtSetArg(args[num_args], XtNstring, text_info->text.text); diff --git a/win/X11/winval.c b/win/X11/winval.c index 19a0ecbc7..c333a5483 100644 --- a/win/X11/winval.c +++ b/win/X11/winval.c @@ -1,5 +1,5 @@ /* NetHack 3.7 winval.c $NHDT-Date: 1611697183 2021/01/26 21:39:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */ -/* Copyright (c) Dean Luick, 1992 */ +/* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ /* @@ -149,7 +149,7 @@ get_value_width(Widget w) } /* Swap foreground and background colors (this is the best I can do with */ -/* a label widget, unless I can get some init hook in there). */ +/* a label widget, unless I can get some init hook in there). */ void hilight_value(Widget w) { diff --git a/win/chain/wc_chainin.c b/win/chain/wc_chainin.c index 7b8b6a419..d6df8de4b 100644 --- a/win/chain/wc_chainin.c +++ b/win/chain/wc_chainin.c @@ -1,5 +1,5 @@ /* NetHack 3.7 wc_chainin.c $NHDT-Date: 1596498323 2020/08/03 23:45:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */ -/* Copyright (c) Kenneth Lorber, 2012 */ +/* Copyright (c) Kenneth Lorber, 2012 */ /* NetHack may be freely redistributed. See license for details. */ /* -chainin is an internal processor that changes the flow from window_procs @@ -559,10 +559,10 @@ chainin_status_enablefield( } void chainin_status_update( - int idx, - genericptr_t ptr, - int chg, int percent, int color, - unsigned long *colormasks) + int idx, + genericptr_t ptr, + int chg, int percent, int color, + unsigned long *colormasks) { (*cibase->nprocs->win_status_update)(cibase->ndata, idx, ptr, chg, percent, color, colormasks); diff --git a/win/chain/wc_chainout.c b/win/chain/wc_chainout.c index 71e9603b8..0f4ebcb57 100644 --- a/win/chain/wc_chainout.c +++ b/win/chain/wc_chainout.c @@ -1,5 +1,5 @@ /* NetHack 3.7 wc_chainout.c $NHDT-Date: 1596498324 2020/08/03 23:45:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */ -/* Copyright (c) Kenneth Lorber, 2012 */ +/* Copyright (c) Kenneth Lorber, 2012 */ /* NetHack may be freely redistributed. See license for details. */ /* -chainout is an internal processor that changes the flow from chain_procs diff --git a/win/chain/wc_trace.c b/win/chain/wc_trace.c index 340ac840a..d710f4479 100644 --- a/win/chain/wc_trace.c +++ b/win/chain/wc_trace.c @@ -1,5 +1,5 @@ /* NetHack 3.7 wc_trace.c $NHDT-Date: 1596498324 2020/08/03 23:45:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $ */ -/* Copyright (c) Kenneth Lorber, 2012 */ +/* Copyright (c) Kenneth Lorber, 2012 */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" @@ -50,8 +50,8 @@ void trace_putmixed(void *,winid, int, const char *); void trace_display_file(void *,const char *, boolean); void trace_start_menu(void *,winid, unsigned long); void trace_add_menu(void *,winid, const glyph_info *, const ANY_P *, - char, char, int, int, - const char *, unsigned int); + char, char, int, int, + const char *, unsigned int); void trace_end_menu(void *,winid, const char *); int trace_select_menu(void *,winid, int, MENU_ITEM_P **); char trace_message_menu(void *,char, int, const char *); @@ -65,7 +65,7 @@ void trace_cliparound(void *,int, int); void trace_update_positionbar(void *,char *); #endif void trace_print_glyph(void *,winid, coordxy, coordxy, - const glyph_info *, const glyph_info *); + const glyph_info *, const glyph_info *); void trace_raw_print(void *,const char *); void trace_raw_print_bold(void *,const char *); int trace_nhgetch(void *); @@ -96,9 +96,9 @@ void trace_putmsghistory(void *,const char *, boolean); void trace_status_init(void *); void trace_status_finish(void *); void trace_status_enablefield(void *,int, const char *, const char *, - boolean); + boolean); void trace_status_update(void *,int, genericptr_t, int, int, int, - unsigned long *); + unsigned long *); boolean trace_can_suspend(void *); diff --git a/win/curses/cursstat.c b/win/curses/cursstat.c index 790738cc3..0566574e2 100644 --- a/win/curses/cursstat.c +++ b/win/curses/cursstat.c @@ -298,8 +298,8 @@ draw_horizontal(boolean border) #endif int i, j, number_of_lines, cap_and_hunger, exp_points, sho_score, - /* both height and width get their values set, - * but only width gets used in this function */ + /* both height and width get their values set, + * but only width gets used in this function */ height UNUSED, width, w, xtra, clen, x, y, t, ex, ey, condstart = 0, conddummy = 0; #ifdef STATUS_HILITES diff --git a/win/share/tile2bmp.c b/win/share/tile2bmp.c index fc1942be1..1de3c6212 100644 --- a/win/share/tile2bmp.c +++ b/win/share/tile2bmp.c @@ -5,8 +5,8 @@ /* * Edit History: * - * Initial Creation M.Allison 1994/01/11 - * 256 colour bmp and statue support M.Allison 2015/04/19 + * Initial Creation M.Allison 1994/01/11 + * 256 colour bmp and statue support M.Allison 2015/04/19 * */ @@ -258,7 +258,7 @@ main(int argc, char *argv[]) initflag = 1; } set_grayscale(pass == 3); - /* printf("Colormap initialized\n"); */ + /* printf("Colormap initialized\n"); */ while (read_text_tile(tilepixels)) { build_bmptile(tilepixels); tilecount++; diff --git a/win/tty/getline.c b/win/tty/getline.c index 13309c456..c10cbd1b6 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -242,8 +242,8 @@ xwaitforspace(register const char *s) /* chars allowed besides return */ * Return TRUE if we've extended the string at base. Otherwise return FALSE. * Assumptions: * - * + we don't change the characters that are already in base - * + base has enough room to hold our string + * + we don't change the characters that are already in base + * + base has enough room to hold our string */ static boolean ext_cmd_getlin_hook(char *base) diff --git a/win/win32/mhaskyn.c b/win/win32/mhaskyn.c index bcbf48a97..b510c064f 100644 --- a/win/win32/mhaskyn.c +++ b/win/win32/mhaskyn.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhaskyn.c $NHDT-Date: 1596498346 2020/08/03 23:45:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index 166af6082..a49578618 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhdlg.c $NHDT-Date: 1596498347 2020/08/03 23:45:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ /* various dialog boxes are defined here */ diff --git a/win/win32/mhfont.c b/win/win32/mhfont.c index 9b6035e34..638fac5aa 100644 --- a/win/win32/mhfont.c +++ b/win/win32/mhfont.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhfont.c $NHDT-Date: 1596498349 2020/08/03 23:45:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.29 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ /* font management and such */ diff --git a/win/win32/mhinput.c b/win/win32/mhinput.c index bc1fc0891..bcf96efab 100644 --- a/win/win32/mhinput.c +++ b/win/win32/mhinput.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhinput.c $NHDT-Date: 1596498350 2020/08/03 23:45:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index a53646a0d..0db49585b 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhmain.c $NHDT-Date: 1596498352 2020/08/03 23:45:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include "winMS.h" @@ -766,8 +766,8 @@ VOID CALLBACK FuzzTimerProc( BOOL gen_alt = (rn2(50) == 0) && isalpha(c); if (!iflags.debug_fuzzer) { - KillTimer(hwnd, IDT_FUZZ_TIMER); - return; + KillTimer(hwnd, IDT_FUZZ_TIMER); + return; } if (!GetFocus()) @@ -775,17 +775,17 @@ VOID CALLBACK FuzzTimerProc( ZeroMemory(input, sizeof(input)); if (gen_alt) { - input[i_pos].type = INPUT_KEYBOARD; - input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE; - input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0); - i_pos++; + input[i_pos].type = INPUT_KEYBOARD; + input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE; + input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0); + i_pos++; } if (HIBYTE(k) & 1) { - input[i_pos].type = INPUT_KEYBOARD; - input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE; - input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0); - i_pos++; + input[i_pos].type = INPUT_KEYBOARD; + input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE; + input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0); + i_pos++; } input[i_pos].type = INPUT_KEYBOARD; @@ -794,16 +794,16 @@ VOID CALLBACK FuzzTimerProc( i_pos++; if (HIBYTE(k) & 1) { - input[i_pos].type = INPUT_KEYBOARD; - input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; - input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0); - i_pos++; + input[i_pos].type = INPUT_KEYBOARD; + input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; + input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0); + i_pos++; } if (gen_alt) { - input[i_pos].type = INPUT_KEYBOARD; - input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; - input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0); - i_pos++; + input[i_pos].type = INPUT_KEYBOARD; + input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; + input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0); + i_pos++; } SendInput(i_pos, input, sizeof(input[0])); } diff --git a/win/win32/mhmsgwnd.c b/win/win32/mhmsgwnd.c index 3f3a48db0..d910ed209 100644 --- a/win/win32/mhmsgwnd.c +++ b/win/win32/mhmsgwnd.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhmsgwnd.c $NHDT-Date: 1596498357 2020/08/03 23:45:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.40 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include "winMS.h" diff --git a/win/win32/mhrip.c b/win/win32/mhrip.c index 0f9591928..ad9541fa4 100644 --- a/win/win32/mhrip.c +++ b/win/win32/mhrip.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhrip.c $NHDT-Date: 1596498358 2020/08/03 23:45:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.24 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include "win10.h" diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index 7e9ab2dca..6d81bd17a 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhsplash.c $NHDT-Date: 1596498360 2020/08/03 23:46:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include "win10.h" diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index 77e0b6900..ab62b6c7a 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhstatus.c $NHDT-Date: 1596498360 2020/08/03 23:46:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.35 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include diff --git a/win/win32/mhtext.c b/win/win32/mhtext.c index 98fe346d6..524462027 100644 --- a/win/win32/mhtext.c +++ b/win/win32/mhtext.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mhtext.c $NHDT-Date: 1596498362 2020/08/03 23:46:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.31 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ #include "winMS.h" diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index efc655f12..f261bd522 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1,5 +1,5 @@ /* NetHack 3.7 mswproc.c $NHDT-Date: 1613292828 2021/02/14 08:53:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.165 $ */ -/* Copyright (C) 2001 by Alex Kompel */ +/* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ /*