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
This commit is contained in:
nhmall
2022-10-26 14:21:23 -04:00
parent 1cf4f9f7f9
commit 88f6df2d8b
81 changed files with 365 additions and 365 deletions
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef ALIGN_H #ifndef ALIGN_H
+2 -2
View File
@@ -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 $ */ /* 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. */ /* 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 #ifndef ATTRIB_H
#define ATTRIB_H #define ATTRIB_H
+1 -1
View File
@@ -287,7 +287,7 @@
* commenting it out. * commenting it out.
*/ */
#define ENHANCED_SYMBOLS /* #define ENHANCED_SYMBOLS */
/* /*
* If COMPRESS is defined, it should contain the full path name of your * If COMPRESS is defined, it should contain the full path name of your
+15 -15
View File
@@ -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 * provides all the subclasses that seem reasonable, and sets up for all
* prefixes being null. Port code can set those that it wants. * prefixes being null. Port code can set those that it wants.
*/ */
#define HACKPREFIX 0 /* shared, RO */ #define HACKPREFIX 0 /* shared, RO */
#define LEVELPREFIX 1 /* per-user, RW */ #define LEVELPREFIX 1 /* per-user, RW */
#define SAVEPREFIX 2 /* per-user, RW */ #define SAVEPREFIX 2 /* per-user, RW */
#define BONESPREFIX 3 /* shared, RW */ #define BONESPREFIX 3 /* shared, RW */
#define DATAPREFIX 4 /* dungeon/dlb; must match value in dlb.c */ #define DATAPREFIX 4 /* dungeon/dlb; must match value in dlb.c */
#define SCOREPREFIX 5 /* shared, RW */ #define SCOREPREFIX 5 /* shared, RW */
#define LOCKPREFIX 6 /* shared, RW */ #define LOCKPREFIX 6 /* shared, RW */
#define SYSCONFPREFIX 7 /* shared, RO */ #define SYSCONFPREFIX 7 /* shared, RO */
#define CONFIGPREFIX 8 #define CONFIGPREFIX 8
#define TROUBLEPREFIX 9 /* shared or per-user, RW (append-only) */ #define TROUBLEPREFIX 9 /* shared or per-user, RW (append-only) */
#define PREFIX_COUNT 10 #define PREFIX_COUNT 10
/* used in files.c; xxconf.h can override if needed */ /* used in files.c; xxconf.h can override if needed */
#ifndef FQN_MAX_FILENAME #ifndef FQN_MAX_FILENAME
#define FQN_MAX_FILENAME 512 #define FQN_MAX_FILENAME 512
@@ -698,7 +698,7 @@ struct enum_dump {
const char *nm; const char *nm;
}; };
typedef long cmdcount_nht; /* Command counts */ typedef long cmdcount_nht; /* Command counts */
enum { enum {
CQ_CANNED = 0, /* internal canned sequence */ CQ_CANNED = 0, /* internal canned sequence */
@@ -1260,9 +1260,9 @@ struct instance_globals {
short corpsenm_digested; /* monster type being digested, set by gulpum */ short corpsenm_digested; /* monster type being digested, set by gulpum */
/* vision.c */ /* vision.c */
seenV **viz_array; /* used in cansee() and couldsee() macros */ seenV **viz_array; /* used in cansee() and couldsee() macros */
coordxy *viz_rmin; /* min could see indices */ coordxy *viz_rmin; /* min could see indices */
coordxy *viz_rmax; /* max could see indices */ coordxy *viz_rmax; /* max could see indices */
boolean vision_full_recalc; boolean vision_full_recalc;
int seethru; /* 'bubble' debugging: clouds and water don't block light */ int seethru; /* 'bubble' debugging: clouds and water don't block light */
+4 -4
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef DGN_FILE_H #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_STAIR 0 /* connection with both ends having a staircase */
#define TBR_NO_UP 1 /* connection with no up staircase */ #define TBR_NO_UP 1 /* connection with no up staircase */
@@ -51,7 +51,7 @@ struct tmpbranch {
#define TBR_PORTAL 3 /* portal connection */ #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 TOWN 1 /* levels only */
#define HELLISH 2 #define HELLISH 2
@@ -66,7 +66,7 @@ struct tmpbranch {
#define D_ALIGN_MASK 0x70 #define D_ALIGN_MASK 0x70
/* /*
* Max number of prototype levels and branches. * Max number of prototype levels and branches.
*/ */
#define LEV_LIMIT 50 #define LEV_LIMIT 50
#define BRANCH_LIMIT 32 #define BRANCH_LIMIT 32
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef EXTERN_H #ifndef EXTERN_H
+3 -3
View File
@@ -378,10 +378,10 @@ struct instance_flags {
boolean wc2_hitpointbar; /* show graphical bar representing hit points */ boolean wc2_hitpointbar; /* show graphical bar representing hit points */
boolean wc2_guicolor; /* allow colours in gui (outside map) */ boolean wc2_guicolor; /* allow colours in gui (outside map) */
int wc_mouse_support; /* allow mouse support */ int wc_mouse_support; /* allow mouse support */
int wc2_term_cols; /* terminal width, in characters */ int wc2_term_cols; /* terminal width, in characters */
int wc2_term_rows; /* terminal height, in characters */ int wc2_term_rows; /* terminal height, in characters */
int wc2_statuslines; /* default = 2, curses can handle 3 */ 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 */ int wc2_petattr; /* text attributes for pet */
#ifdef WIN32 #ifdef WIN32
#define MAX_ALTKEYHANDLING 25 #define MAX_ALTKEYHANDLING 25
+5 -5
View File
@@ -5,8 +5,8 @@
#ifndef MONATTK_H #ifndef MONATTK_H
#define MONATTK_H #define MONATTK_H
/* Add new attack types below - ordering affects experience (exper.c). /* Add new attack types below - ordering affects experience (exper.c).
* Attacks > AT_BUTT are worth extra experience. * Attacks > AT_BUTT are worth extra experience.
*/ */
#define AT_ANY (-1) /* fake attack; dmgtype_fromattack wildcard */ #define AT_ANY (-1) /* fake attack; dmgtype_fromattack wildcard */
#define AT_NONE 0 /* passive monster (ex. acid blob) */ #define AT_NONE 0 /* passive monster (ex. acid blob) */
@@ -33,10 +33,10 @@
|| (atyp) == AT_MAGC \ || (atyp) == AT_MAGC \
|| (atyp) == AT_GAZE) || (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(). * 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. * Please don't disturb the order unless you rewrite the buzz() code.
*/ */
#define AD_ANY (-1) /* fake damage; attacktype_fordmg wildcard */ #define AD_ANY (-1) /* fake damage; attacktype_fordmg wildcard */
#define AD_PHYS 0 /* ordinary physical */ #define AD_PHYS 0 /* ordinary physical */
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef MONDATA_H #ifndef MONDATA_H
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef MONFLAG_H #ifndef MONFLAG_H
+1 -1
View File
@@ -41,7 +41,7 @@ enum wpn_chk_flags {
* PICK_NONE, PICK_ONE, PICK_ANY (wintype.h) 0, 1, 2 * 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_NOLET If set, don't display inventory letters on monster's inventory.
* MINV_ALL If set, display all items in monster's inventory, otherwise * 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_PICKMASK 0x03 /* 1|2 */
#define MINV_NOLET 0x04 #define MINV_NOLET 0x04
+11 -11
View File
@@ -18,7 +18,7 @@
* _MSC_VER is defined automatically by Microsoft C. * _MSC_VER is defined automatically by Microsoft C.
* __BORLANDC__ is defined automatically by Borland C. * __BORLANDC__ is defined automatically by Borland C.
* __SC__ is defined automatically by Symantec 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" #define CONFIG_FILE "defaults.nh"
@@ -43,10 +43,10 @@
* Screen control options * Screen control options
* *
* You may uncomment: * You may uncomment:
* ANSI_DEFAULT * ANSI_DEFAULT
* or TERMLIB * or TERMLIB
* or ANSI_DEFAULT and TERMLIB * or ANSI_DEFAULT and TERMLIB
* or NO_TERMS * or NO_TERMS
*/ */
/* # define TERMLIB */ /* enable use of termcap file /etc/termcap */ /* # define TERMLIB */ /* enable use of termcap file /etc/termcap */
@@ -61,7 +61,7 @@
#ifdef NO_TERMS /* if NO_TERMS select one screen package below */ #ifdef NO_TERMS /* if NO_TERMS select one screen package below */
#define SCREEN_BIOS /* Use bios calls for all screen control */ #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 #endif
/* # define PC9800 */ /* Allows NetHack to run on NEC PC-9800 machines */ /* # define PC9800 */ /* Allows NetHack to run on NEC PC-9800 machines */
@@ -76,7 +76,7 @@
#ifndef SUPPRESS_GRAPHICS #ifndef SUPPRESS_GRAPHICS
#if (defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST)) && !defined(PC9800) #if (defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST)) && !defined(PC9800)
#ifdef USE_TILES #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 #define SCREEN_VESA
#endif #endif
#endif #endif
@@ -96,7 +96,7 @@
#define MAIL /* Allows for fake mail daemon to deliver mail */ #define MAIL /* Allows for fake mail daemon to deliver mail */
/* in the MSDOS version. (For AMIGA MAIL see */ /* 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. */ /* hook for mail reader implementation. */
/* The following is needed for prototypes of certain functions */ /* The following is needed for prototypes of certain functions */
@@ -215,9 +215,9 @@
#define VROOMM /* Borland's VROOMM overlay system */ #define VROOMM /* Borland's VROOMM overlay system */
#endif #endif
#if !defined(STKSIZ) #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 */ /* This macro is used in any file that contains */
/* a main() function. */ /* a main() function. */
#endif #endif
#define PC_LOCKING #define PC_LOCKING
#endif #endif
@@ -288,7 +288,7 @@
*/ */
#endif #endif
#else #else
/* djgpp C compiler */ /* djgpp C compiler */
#if defined(SCREEN_BIOS) #if defined(SCREEN_BIOS)
#undef SCREEN_BIOS #undef SCREEN_BIOS
#endif #endif
+12 -12
View File
@@ -6,16 +6,16 @@
#ifndef PERMONST_H #ifndef PERMONST_H
#define PERMONST_H #define PERMONST_H
/* This structure covers all attack forms. /* This structure covers all attack forms.
* aatyp is the gross attack type (eg. claw, bite, breath, ...) * aatyp is the gross attack type (eg. claw, bite, breath, ...)
* adtyp is the damage type (eg. physical, fire, cold, spell, ...) * adtyp is the damage type (eg. physical, fire, cold, spell, ...)
* damn is the number of hit dice of damage from the attack. * damn is the number of hit dice of damage from the attack.
* damd is the number of sides on each die. * damd is the number of sides on each die.
* *
* Some attacks can do no points of damage. Additionally, some can * Some attacks can do no points of damage. Additionally, some can
* have special effects *and* do damage as well. If damn and damd * have special effects *and* do damage as well. If damn and damd
* are set, they may have a special meaning. For example, if set * are set, they may have a special meaning. For example, if set
* for a blinding attack, they determine the amount of time blinded. * for a blinding attack, they determine the amount of time blinded.
*/ */
struct attack { struct attack {
@@ -23,12 +23,12 @@ struct attack {
uchar adtyp, damn, damd; uchar adtyp, damn, damd;
}; };
/* Max # of attacks for any given monster. /* Max # of attacks for any given monster.
*/ */
#define NATTK 6 #define NATTK 6
/* Weight of a human body /* Weight of a human body
*/ */
#define WT_HUMAN 1450 #define WT_HUMAN 1450
@@ -58,7 +58,7 @@ struct permonst {
unsigned long mflags1, /* boolean bitflags */ unsigned long mflags1, /* boolean bitflags */
mflags2; /* more boolean bitflags */ mflags2; /* more boolean bitflags */
unsigned short mflags3; /* yet 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 #ifdef TEXTCOLOR
uchar mcolor; /* color to use */ uchar mcolor; /* color to use */
#endif #endif
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef PROP_H #ifndef PROP_H
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef QUEST_H #ifndef QUEST_H
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef RECT_H #ifndef RECT_H
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef REGION_H #ifndef REGION_H
+1 -1
View File
@@ -9,7 +9,7 @@
/* /*
* The dungeon presentation graphics code and data structures were rewritten * The dungeon presentation graphics code and data structures were rewritten
* and generalized for NetHack's release 2 by Eric S. Raymond (eric@snark) * 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 code that permits the user to set the contents of the symbol structure.
* *
* The door representation was changed by Ari * The door representation was changed by Ari
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef SP_LEV_H #ifndef SP_LEV_H
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef SPELL_H #ifndef SPELL_H
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef TIMEOUT_H #ifndef TIMEOUT_H
+8 -8
View File
@@ -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 $ */ /* 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. */ /* 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 #ifndef VISION_H
#define VISION_H #define VISION_H
@@ -16,10 +16,10 @@
#define LS_MONSTER 1 #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 * couldsee() - Returns true if the hero has a clear line of sight to
* the location. * the location.
*/ */
#define cansee(x, y) ((g.viz_array[y][x] & IN_SIGHT) != 0) #define cansee(x, y) ((g.viz_array[y][x] & IN_SIGHT) != 0)
#define couldsee(x, y) ((g.viz_array[y][x] & COULD_SEE) != 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. * 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 * 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 * 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 * location and the hero is visible, then monster can see the
* hero. * hero.
*/ */
#define m_cansee(mtmp, x2, y2) clear_path((mtmp)->mx, (mtmp)->my, (x2), (y2)) #define m_cansee(mtmp, x2, y2) clear_path((mtmp)->mx, (mtmp)->my, (x2), (y2))
+2 -2
View File
@@ -5,7 +5,7 @@
#ifndef WINDCONF_H #ifndef WINDCONF_H
#define 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 */ #define TEXTCOLOR /* Color text */
@@ -213,7 +213,7 @@ typedef SSIZE_T ssize_t;
#ifndef M #ifndef M
#define M(c) ((char) (0x80 | (c))) #define M(c) ((char) (0x80 | (c)))
/* #define M(c) ((c) - 128) */ /* #define M(c) ((c) - 128) */
#endif #endif
#ifndef C #ifndef C
+6 -6
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef WINPROCS_H #ifndef WINPROCS_H
@@ -9,9 +9,9 @@
enum wp_ids { wp_tty = 1, wp_X11, wp_Qt, wp_mswin, wp_curses, enum wp_ids { wp_tty = 1, wp_X11, wp_Qt, wp_mswin, wp_curses,
wp_chainin, wp_chainout, wp_safestartup, wp_shim, wp_chainin, wp_chainout, wp_safestartup, wp_shim,
wp_hup, wp_guistubs, wp_ttystubs, wp_hup, wp_guistubs, wp_ttystubs,
#ifdef OUTDATED_STUFF #ifdef OUTDATED_STUFF
, wp_mac, wp_Gem, wp_Gnome, wp_amii, wp_amiv , wp_mac, wp_Gem, wp_Gnome, wp_amii, wp_amiv
#endif #endif
}; };
@@ -317,9 +317,9 @@ struct wc_Opt {
#ifdef WINCHAIN #ifdef WINCHAIN
/* Setup phases for window chain elements. /* Setup phases for window chain elements.
void * rv = X_procs_chain(int, int, void *, void *, void *); void * rv = X_procs_chain(int, int, void *, void *, void *);
Xprivate* ALLOC n 0 0 0 Xprivate* ALLOC n 0 0 0
- INIT n self next nextdata - INIT n self next nextdata
where: where:
Xprivate* is anything window chain entry type X wants back Xprivate* is anything window chain entry type X wants back
n is the link count (starting with 1) n is the link count (starting with 1)
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef WINTTY_H #ifndef WINTTY_H
+35 -35
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef _xwindow_h #ifndef _xwindow_h
@@ -13,44 +13,44 @@
/* Resources: /* Resources:
Name Class RepType Default Value Name Class RepType Default Value
---- ----- ------- ------------- ---- ----- ------- -------------
background Background Pixel XtDefaultBackground background Background Pixel XtDefaultBackground
border BorderColor Pixel XtDefaultForeground border BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1 borderWidth BorderWidth Dimension 1
destroyCallback Callback Pointer NULL destroyCallback Callback Pointer NULL
height Height Dimension 0 height Height Dimension 0
mappedWhenManaged MappedWhenManaged Boolean True mappedWhenManaged MappedWhenManaged Boolean True
sensitive Sensitive Boolean True sensitive Sensitive Boolean True
width Width Dimension 0 width Width Dimension 0
x Position Position 0 x Position Position 0
y Position Position 0 y Position Position 0
rows Width Dimension 21 rows Width Dimension 21
columns Height Dimension 80 columns Height Dimension 80
foreground Color Pixel XtDefaultForeground foreground Color Pixel XtDefaultForeground
black Color Pixel "black" black Color Pixel "black"
red Color Pixel "red" red Color Pixel "red"
green Color Pixel "pale green" green Color Pixel "pale green"
brown Color Pixel "brown" brown Color Pixel "brown"
blue Color Pixel "blue" blue Color Pixel "blue"
magenta Color Pixel "magenta" magenta Color Pixel "magenta"
cyan Color Pixel "light cyan" cyan Color Pixel "light cyan"
gray Color Pixel "gray" gray Color Pixel "gray"
//no color// //no color//
orange Color Pixel "orange" orange Color Pixel "orange"
bright_green Color Pixel "green" bright_green Color Pixel "green"
yellow Color Pixel "yellow" yellow Color Pixel "yellow"
bright_blue Color Pixel "royal blue" bright_blue Color Pixel "royal blue"
bright_magenta Color Pixel "violet" bright_magenta Color Pixel "violet"
bright_cyan Color Pixel "cyan" bright_cyan Color Pixel "cyan"
white Color Pixel "white" white Color Pixel "white"
font Font XFontStruct* XtDefaultFont font Font XFontStruct* XtDefaultFont
exposeCallback Callback Callback NULL exposeCallback Callback Callback NULL
callback Callback Callback NULL callback Callback Callback NULL
resizeCallback Callback Callback NULL resizeCallback Callback Callback NULL
*/ */
/* define any special resource names here that are not in <X11/StringDefs.h> /* define any special resource names here that are not in <X11/StringDefs.h>
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef _xwindowp_h #ifndef _xwindowp_h
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#ifndef YOUPROP_H #ifndef YOUPROP_H
+1 -1
View File
@@ -687,7 +687,7 @@ newgame(void)
* any artifacts */ * any artifacts */
u_init(); 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); reset_glyphmap(gm_newgame);
#ifndef NO_SIGNAL #ifndef NO_SIGNAL
(void) signal(SIGINT, (SIG_RET_TYPE) done1); (void) signal(SIGINT, (SIG_RET_TYPE) done1);
+1 -1
View File
@@ -117,7 +117,7 @@ restore_artifacts(NHFILE *nhfp)
mread(nhfp->fd, (genericptr_t) artiexist, sizeof artiexist); mread(nhfp->fd, (genericptr_t) artiexist, sizeof artiexist);
mread(nhfp->fd, (genericptr_t) artidisco, sizeof artidisco); mread(nhfp->fd, (genericptr_t) artidisco, sizeof artidisco);
} }
hack_artifacts(); /* redo non-saved special cases */ hack_artifacts(); /* redo non-saved special cases */
} }
const char * const char *
+1 -1
View File
@@ -4143,7 +4143,7 @@ wiz_mon_diff(void)
ptr->pmnames[NEUTRAL], cnt, mlev, ptr->pmnames[NEUTRAL], cnt, mlev,
mcalculated, mhardcoded, mdiff); mcalculated, mhardcoded, mdiff);
putstr(win, 0, buf); putstr(win, 0, buf);
} }
} }
if (!trouble) if (!trouble)
putstr(win, 0, "No monster difficulty discrepencies were detected."); putstr(win, 0, "No monster difficulty discrepencies were detected.");
+2 -2
View File
@@ -26,8 +26,8 @@ struct nomakedefs_s nomakedefs = {
comp.sources.games/91SfKYg_xzI/dGnR3JnspFkJ */ comp.sources.games/91SfKYg_xzI/dGnR3JnspFkJ */
"Tue, 28-Jul-87 13:18:57 EDT", "Tue, 28-Jul-87 13:18:57 EDT",
"Version 1.0, built Jul 28 13:18:57 1987.", "Version 1.0, built Jul 28 13:18:57 1987.",
(const char *) 0, /* git_sha */ (const char *) 0, /* git_sha */
(const char *) 0, /* git_branch */ (const char *) 0, /* git_branch */
"1.0.0-0", "1.0.0-0",
"NetHack Version 1.0.0-0 - last build Tue Jul 28 13:18:57 1987.", "NetHack Version 1.0.0-0 - last build Tue Jul 28 13:18:57 1987.",
0x01010000UL, 0x01010000UL,
+3 -3
View File
@@ -204,9 +204,9 @@ const struct instance_globals g_init = {
0, /* mrank_sz */ 0, /* mrank_sz */
{ { { NULL, NULL, 0L, FALSE, FALSE, 0, 0U, { 0 }, NULL, 0, 0, 0 { { { NULL, NULL, 0L, FALSE, FALSE, 0, 0U, { 0 }, NULL, 0, 0, 0
#ifdef STATUS_HILITES #ifdef STATUS_HILITES
, UNDEFINED_PTR, UNDEFINED_PTR , UNDEFINED_PTR, UNDEFINED_PTR
#endif #endif
} } } }
}, /* blstats */ }, /* blstats */
FALSE, /* blinit */ FALSE, /* blinit */
FALSE, /* update_all */ FALSE, /* update_all */
@@ -474,7 +474,7 @@ const struct instance_globals g_init = {
/* mkmaze.c */ /* mkmaze.c */
{ {COLNO, ROWNO, 0, 0}, {COLNO, ROWNO, 0, 0}, { {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, /* bbubbles */
UNDEFINED_PTR, /* ebubbles */ UNDEFINED_PTR, /* ebubbles */
UNDEFINED_PTR, /* wportal */ UNDEFINED_PTR, /* wportal */
+1 -1
View File
@@ -1483,7 +1483,7 @@ extern glyph_map glyphmap[MAX_GLYPH]; /* from tile.c */
glyph_map glyphmap[MAX_GLYPH] = { glyph_map glyphmap[MAX_GLYPH] = {
{ 0U, { 0, 0}, 0 { 0U, { 0, 0}, 0
#ifdef ENHANCED_SYMBOLS #ifdef ENHANCED_SYMBOLS
, 0 , 0
#endif #endif
} }
}; };
+1 -1
View File
@@ -9,7 +9,7 @@
#include <string.h> #include <string.h>
#endif #endif
#define DATAPREFIX 4 /* see decl.h */ #define DATAPREFIX 4 /* see decl.h */
#ifdef DLB #ifdef DLB
/* /*
+1 -1
View File
@@ -753,7 +753,7 @@ init_dungeons(void)
(void) memset(&pd, 0, sizeof (struct proto_dungeon)); (void) memset(&pd, 0, sizeof (struct proto_dungeon));
pd.n_levs = pd.n_brs = 0; 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) { if (!L) {
panic1("'nhl_init' failed; can't continue."); panic1("'nhl_init' failed; can't continue.");
/*NOTREACHED*/ /*NOTREACHED*/
+1 -1
View File
@@ -1385,7 +1385,7 @@ rest_engravings(NHFILE *nhfp)
} }
ep->nxt_engr = head_engr; ep->nxt_engr = head_engr;
head_engr = ep; 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 /* mark as finished for bones levels -- no problem for
* normal levels as the player must have finished engraving * normal levels as the player must have finished engraving
* to be able to move again */ * to be able to move again */
+1 -1
View File
@@ -3245,7 +3245,7 @@ display_pickinv(
sparse = ((wri_info.fromcore.invmode & InvSparse) != 0); sparse = ((wri_info.fromcore.invmode & InvSparse) != 0);
inuse_only = ((wri_info.fromcore.invmode & InvInUse) != 0); inuse_only = ((wri_info.fromcore.invmode & InvInUse) != 0);
doing_perm_invent = TRUE; doing_perm_invent = TRUE;
nhUse(sparse); nhUse(sparse);
} }
/* /*
* Exit early if no inventory -- but keep going if we are doing * Exit early if no inventory -- but keep going if we are doing
+1 -1
View File
@@ -1484,7 +1484,7 @@ validate(NHFILE* nhfp, const char *name)
} else { } else {
if (nhfp->structlevel) if (nhfp->structlevel)
rlen = (readLenType) read(nhfp->fd, (genericptr_t) &sfi, sizeof sfi); rlen = (readLenType) read(nhfp->fd, (genericptr_t) &sfi, sizeof sfi);
minit(); /* ZEROCOMP */ minit(); /* ZEROCOMP */
if (rlen == 0) { if (rlen == 0) {
if (verbose) { if (verbose) {
pline("File \"%s\" is empty during save file feature check?", name); pline("File \"%s\" is empty during save file feature check?", name);
+12 -12
View File
@@ -3443,18 +3443,18 @@ int
lspo_object(lua_State *L) lspo_object(lua_State *L)
{ {
static object zeroobject = { static object zeroobject = {
{ 0 }, /* Str_or_len name */ { 0 }, /* Str_or_len name */
0, /* corpsenm */ 0, /* corpsenm */
0, 0, /* id, spe */ 0, 0, /* id, spe */
0, /* coord */ 0, /* coord */
0, 0, /* coordxy x,y */ 0, 0, /* coordxy x,y */
0, 0, /* class, containment */ 0, 0, /* class, containment */
0, /* curse_state */ 0, /* curse_state */
0, /* quan */ 0, /* quan */
0, /* buried */ 0, /* buried */
0, /* lit */ 0, /* lit */
0, 0, 0, 0, 0, 0, 0, 0, /* eroded, locked, trapped, recharged, 0, 0, 0, 0, 0, 0, 0, 0, /* eroded, locked, trapped, recharged,
invis, greased, broken, achievment */ invis, greased, broken, achievment */
}; };
#if 0 #if 0
int nparams = 0; int nparams = 0;
+2 -2
View File
@@ -43,7 +43,7 @@
*/ */
#define READCHAR 0x00 /* Read Character from Keyboard */ #define READCHAR 0x00 /* Read Character from Keyboard */
#define GETKEYFLAGS 0x02 /* Get Keyboard Flags */ #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 *); void get_cursor(int *, int *);
@@ -201,7 +201,7 @@ static const struct pad {
* Unlike Ctrl-letter, the Alt-letter keystrokes have no specific ASCII * Unlike Ctrl-letter, the Alt-letter keystrokes have no specific ASCII
* meaning unless assigned one by a keyboard conversion table, so the * meaning unless assigned one by a keyboard conversion table, so the
* keyboard BIOS normally does not return a character code when Alt-letter * 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 * scan code table to translate the scan code into a letter, then set the
* "meta" bit for it. -3. * "meta" bit for it. -3.
*/ */
+4 -4
View File
@@ -5,10 +5,10 @@
/* /*
* Edit History: * Edit History:
* *
* Initial Creation M.Allison 93/10/21 * Initial Creation M.Allison 1993/10/21
* ifndef MONITOR_HEAP for heaputil.c P.Winner 94/03/12 * ifndef MONITOR_HEAP for heaputil.c P.Winner 1994/03/12
* added Borland C _stklen variable Y.Sapir 94/05/01 * added Borland C _stklen variable Y.Sapir 1994/05/01
* fixed to use text tiles from win/share M.Allison 95/01/31 * fixed to use text tiles from win/share M.Allison 1995/01/31
* *
*/ */
+43 -43
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* */
/* /*
* video.c - Hardware video support front-ends * video.c - Hardware video support front-ends
* *
*Edit History: *Edit History:
* Initial Creation M. Allison 1993/04/04 * Initial Creation M. Allison 1993/04/04
* Add djgpp support K. Smolkowski 1993/04/26 * Add djgpp support K. Smolkowski 1993/04/26
* Add txt/graphics mode support M. Allison 1993/10/30 * Add txt/graphics mode support M. Allison 1993/10/30
* Add graphics mode cursor sim. M. Allison 1994/02/19 * Add graphics mode cursor sim. M. Allison 1994/02/19
* Add hooks for decals on vga M. Allison 2001/04/07 * Add hooks for decals on vga M. Allison 2001/04/07
@@ -527,25 +527,25 @@ gr_finish(void)
* as those in win/tty). * as those in win/tty).
* *
* xputs - Writes a c null terminated string at the current location. * xputs - Writes a c null terminated string at the current location.
* Depending on compile options, this could just be a series * Depending on compile options, this could just be a series
* of repeated calls to xputc() for each character. * of repeated calls to xputc() for each character.
* *
* xputc - Writes a single character at the current location. Since * xputc - Writes a single character at the current location. Since
* various places in the code assume that control characters * various places in the code assume that control characters
* can be used to control, we are forced to interpret some of * can be used to control, we are forced to interpret some of
* the more common ones, in order to keep things looking correct. * the more common ones, in order to keep things looking correct.
* *
* xputg - If using a graphics mode display mechanism (such as VGA, this * xputg - If using a graphics mode display mechanism (such as VGA, this
* routine is used to display a graphical representation of a * routine is used to display a graphical representation of a
* NetHack glyph at the current location. For more information on * NetHack glyph at the current location. For more information on
* NetHack glyphs refer to the comments in include/display.h. * NetHack glyphs refer to the comments in include/display.h.
* *
* NOTES: * NOTES:
* wintty.h uses macros to redefine common output functions * wintty.h uses macros to redefine common output functions
* such as puts, putc, putchar, so that they get steered into * such as puts, putc, putchar, so that they get steered into
* either xputs (for strings) or xputc (for single characters). * either xputs (for strings) or xputc (for single characters).
* References to puts, putc, and putchar in other source files * References to puts, putc, and putchar in other source files
* (that include wintty.h) are actually using these routines. * (that include wintty.h) are actually using these routines.
*/ */
void void
@@ -683,30 +683,30 @@ HideCursor(void)
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
/* /*
* CLR_BLACK 0 * CLR_BLACK 0
* CLR_RED 1 * CLR_RED 1
* CLR_GREEN 2 * CLR_GREEN 2
* CLR_BROWN 3 low-intensity yellow * CLR_BROWN 3 low-intensity yellow
* CLR_BLUE 4 * CLR_BLUE 4
* CLR_MAGENTA 5 * CLR_MAGENTA 5
* CLR_CYAN 6 * CLR_CYAN 6
* CLR_GRAY 7 low-intensity white * CLR_GRAY 7 low-intensity white
* NO_COLOR 8 * NO_COLOR 8
* CLR_ORANGE 9 * CLR_ORANGE 9
* CLR_BRIGHT_GREEN 10 * CLR_BRIGHT_GREEN 10
* CLR_YELLOW 11 * CLR_YELLOW 11
* CLR_BRIGHT_BLUE 12 * CLR_BRIGHT_BLUE 12
* CLR_BRIGHT_MAGENTA 13 * CLR_BRIGHT_MAGENTA 13
* CLR_BRIGHT_CYAN 14 * CLR_BRIGHT_CYAN 14
* CLR_WHITE 15 * CLR_WHITE 15
* CLR_MAX 16 * CLR_MAX 16
* BRIGHT 8 * BRIGHT 8
*/ */
#ifdef VIDEOSHADES #ifdef VIDEOSHADES
/* assign_videoshades() is prototyped in extern.h */ /* assign_videoshades() is prototyped in extern.h */
/* assign_videocolors() 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 shadeflag; /* shades are initialized */
int colorflag; /* colors are initialized */ int colorflag; /* colors are initialized */
@@ -832,8 +832,8 @@ assign_videoshades(char *choiceptr)
/* /*
* Process defaults.nh OPTIONS=videocolors:xxx * Process defaults.nh OPTIONS=videocolors:xxx
* Left to right assignments for: * Left to right assignments for:
* red green brown blue magenta cyan orange br.green yellow * red green brown blue magenta cyan orange br.green yellow
* br.blue br.mag br.cyan * br.blue br.mag br.cyan
* *
* Default Mapping (BIOS): 4-2-6-1-5-3-12-10-14-9-13-11 * 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: * where (current) legitimate values are:
* *
* autodetect (attempt to determine the adapter type) * autodetect (attempt to determine the adapter type)
* default (force use of the default video method for environment) * default (force use of the default video method for environment)
* vga (use vga adapter code) * vga (use vga adapter code)
*/ */
int int
assign_video(char *sopt) assign_video(char *sopt)
@@ -922,8 +922,8 @@ assign_video(char *sopt)
/* /*
* debug * debug
* *
* printf("video is %s",sopt); * printf("video is %s",sopt);
* getch(); * getch();
*/ */
iflags.grmode = 0; iflags.grmode = 0;
iflags.hasvesa = 0; iflags.hasvesa = 0;
@@ -966,7 +966,7 @@ assign_video(char *sopt)
#endif #endif
/* /*
* Auto-detect Priorities (arbitrary for now): * Auto-detect Priorities (arbitrary for now):
* VESA, VGA * VESA, VGA
*/ */
if (iflags.hasvesa) iflags.usevesa = 1; if (iflags.hasvesa) iflags.usevesa = 1;
else if (iflags.hasvga) { else if (iflags.hasvga) {
+7 -7
View File
@@ -725,7 +725,7 @@ vesa_xputg(const glyph_info *glyphinfo)
* These include: * These include:
* *
* vesa_gotoloc(x,y) - Moves the "cursor" on screen to the specified x * 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 * determines the location where screen writes
* will occur next, it does not change the location * will occur next, it does not change the location
* of the player on the NetHack level. * of the player on the NetHack level.
@@ -862,7 +862,7 @@ vesa_redrawmap(void)
void void
vesa_userpan(enum vga_pan_direction pan) vesa_userpan(enum vga_pan_direction pan)
{ {
/* pline("Into userpan"); */ /* pline("Into userpan"); */
if (iflags.over_view || iflags.traditional_view) if (iflags.over_view || iflags.traditional_view)
return; return;
@@ -918,7 +918,7 @@ vesa_userpan(enum vga_pan_direction pan)
void void
vesa_overview(boolean on) vesa_overview(boolean on)
{ {
/* vesa_HideCursor(); */ /* vesa_HideCursor(); */
if (on) { if (on) {
iflags.over_view = TRUE; iflags.over_view = TRUE;
clipx = 0; clipx = 0;
@@ -951,9 +951,9 @@ vesa_overview(boolean on)
void void
vesa_traditional(boolean on) vesa_traditional(boolean on)
{ {
/* vesa_HideCursor(); */ /* vesa_HideCursor(); */
if (on) { if (on) {
/* switch_symbols(FALSE); */ /* switch_symbols(FALSE); */
iflags.traditional_view = TRUE; iflags.traditional_view = TRUE;
clipx = 0; clipx = 0;
clipxmax = COLNO - 1; clipxmax = COLNO - 1;
@@ -1054,7 +1054,7 @@ vesa_Init(void)
iflags.over_view = FALSE; iflags.over_view = FALSE;
CO = 80; CO = 80;
LI = 25; LI = 25;
/* clear_screen() */ /* not vesa_clear_screen() */ /* clear_screen() */ /* not vesa_clear_screen() */
return; return;
} }
#endif #endif
@@ -1070,7 +1070,7 @@ vesa_Init(void)
iflags.over_view = FALSE; iflags.over_view = FALSE;
CO = 80; CO = 80;
LI = 25; LI = 25;
/* clear_screen() */ /* not vesa_clear_screen() */ /* clear_screen() */ /* not vesa_clear_screen() */
return; return;
} }
+14 -14
View File
@@ -186,7 +186,7 @@ static int viewport_size = 40;
/* static char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; */ /* static char masktable[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; */
/* static char bittable[8]= {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; */ /* static char bittable[8]= {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}; */
#if 0 #if 0
static char defpalette[] = { /* Default VGA palette */ static char defpalette[] = { /* Default VGA palette */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xaa, 0x00, 0x00, 0xaa,
0x00, 0xaa, 0x00, 0x00, 0xaa, 0x00,
@@ -214,7 +214,7 @@ int vp2[SCREENPLANES] = { 1, 2, 4, 8 };
static struct planar_cell_struct planecell; static struct planar_cell_struct planecell;
static struct overview_planar_cell_struct planecell_O; 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 void
vga_get_scr_size(void) vga_get_scr_size(void)
@@ -424,7 +424,7 @@ vga_xputg(const glyph_info *glyphinfo)
* These include: * These include:
* *
* vga_gotoloc(x,y) - Moves the "cursor" on screen to the specified x * 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 * determines the location where screen writes
* will occur next, it does not change the location * will occur next, it does not change the location
* of the player on the NetHack level. * of the player on the NetHack level.
@@ -513,7 +513,7 @@ vga_userpan(enum vga_pan_direction pan)
{ {
int x; int x;
/* pline("Into userpan"); */ /* pline("Into userpan"); */
if (iflags.over_view || iflags.traditional_view) if (iflags.over_view || iflags.traditional_view)
return; return;
if (pan == pan_left) if (pan == pan_left)
@@ -530,7 +530,7 @@ vga_userpan(enum vga_pan_direction pan)
void void
vga_overview(boolean on) vga_overview(boolean on)
{ {
/* vga_HideCursor(); */ /* vga_HideCursor(); */
if (on) { if (on) {
iflags.over_view = TRUE; iflags.over_view = TRUE;
clipx = 0; clipx = 0;
@@ -547,9 +547,9 @@ vga_overview(boolean on)
void void
vga_traditional(boolean on) vga_traditional(boolean on)
{ {
/* vga_HideCursor(); */ /* vga_HideCursor(); */
if (on) { if (on) {
/* switch_symbols(FALSE); */ /* switch_symbols(FALSE); */
iflags.traditional_view = TRUE; iflags.traditional_view = TRUE;
clipx = 0; clipx = 0;
clipxmax = CO - 1; clipxmax = CO - 1;
@@ -762,7 +762,7 @@ vga_Init(void)
iflags.over_view = FALSE; iflags.over_view = FALSE;
CO = 80; CO = 80;
LI = 25; LI = 25;
/* clear_screen() */ /* not vga_clear_screen() */ /* clear_screen() */ /* not vga_clear_screen() */
return; return;
} }
#endif #endif
@@ -918,9 +918,9 @@ vga_detect(void)
/* /*
* debug * debug
* *
* printf("vga_detect returned al=%02x, bh=%02x, bl=%02x\n", * printf("vga_detect returned al=%02x, bh=%02x, bl=%02x\n",
* (int)regs.h.al, (int)regs.h.bh, (int)regs.h.bl); * (int)regs.h.al, (int)regs.h.bh, (int)regs.h.bl);
* getch(); * getch();
*/ */
if ((int) regs.h.al == 0x1a) { if ((int) regs.h.al == 0x1a) {
if (((int) regs.h.bl == 8) || ((int) regs.h.bl == 7)) { 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; int vplane;
unsigned char bitmap[ROWS_PER_CELL]; unsigned char bitmap[ROWS_PER_CELL];
/* if (chr < ' ') chr = ' '; */ /* assumes ASCII set */ /* if (chr < ' ') chr = ' '; */ /* assumes ASCII set */
vga_GetBitmap(chr, bitmap); vga_GetBitmap(chr, bitmap);
x = min(col, (CO - 1)); /* min() used protection from callers */ x = min(col, (CO - 1)); /* min() used protection from callers */
@@ -1312,8 +1312,8 @@ vga_DrawCursor(void)
char __far *tmp1; char __far *tmp1;
char __far *tmp2; char __far *tmp2;
unsigned char first, second; unsigned char first, second;
/* char on[2] = {0xFF,0xFF}; */ /* char on[2] = {0xFF,0xFF}; */
/* char off[2] = {0x00,0x00}; */ /* char off[2] = {0x00,0x00}; */
boolean isrogue = Is_rogue_level(&u.uz); boolean isrogue = Is_rogue_level(&u.uz);
boolean singlebyte = boolean singlebyte =
(isrogue || iflags.over_view || iflags.traditional_view || !inmap); (isrogue || iflags.over_view || iflags.traditional_view || !inmap);
+2 -2
View File
@@ -296,7 +296,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
if (argcheck(argc, argv, ARG_DEBUG) == 1) { if (argcheck(argc, argv, ARG_DEBUG) == 1) {
argc--; argc--;
argv++; argv++;
} }
if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
/* avoid matching "-dec" for DECgraphics; since the man page /* avoid matching "-dec" for DECgraphics; since the man page
@@ -566,7 +566,7 @@ process_options(int argc, char *argv[])
switch_symbols(TRUE); switch_symbols(TRUE);
} }
break; break;
/* case 'D': */ /* case 'D': */
case 'd': case 'd':
if (!strncmpi(argv[0] + 1, "DEC", 3)) { if (!strncmpi(argv[0] + 1, "DEC", 3)) {
load_symset("DECGraphics", PRIMARYSET); load_symset("DECGraphics", PRIMARYSET);
+1 -1
View File
@@ -131,7 +131,7 @@ dosh(void)
#endif /* MICRO */ #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 \ * be room for the \
*/ */
void void
+18 -18
View File
@@ -18,20 +18,20 @@
/* Several minor changes were made for the NetHack distribution to satisfy /* Several minor changes were made for the NetHack distribution to satisfy
* non-BSD compilers (by definition BSD compilers do not need to compile * non-BSD compilers (by definition BSD compilers do not need to compile
* this file for NetHack). These changes consisted of: * this file for NetHack). These changes consisted of:
* - changing the sccsid conditions to nested ifdefs from defined()s * - changing the sccsid conditions to nested ifdefs from defined()s
* to accommodate stupid preprocessors * to accommodate stupid preprocessors
* - giving srandom() type void instead of allowing it to default to int * - giving srandom() type void instead of allowing it to default to int
* - making the first return in initstate() return a value consistent * - making the first return in initstate() return a value consistent
* with its type (instead of no value) * with its type (instead of no value)
* - ANSI function prototyping in extern.h - therefore include hack.h * - ANSI function prototyping in extern.h - therefore include hack.h
* instead of stdio.h and remove separate declaration of random() from * instead of stdio.h and remove separate declaration of random() from
* the beginning of function srandom * the beginning of function srandom
* - moving sccsid after hack.h to allow precompiled headers, which * - moving sccsid after hack.h to allow precompiled headers, which
* means the defined()s would be ok again... * means the defined()s would be ok again...
* - change fprintf(stderr, "x(%d)y\n", z) to impossible("x(%d)y", z) * - change fprintf(stderr, "x(%d)y\n", z) to impossible("x(%d)y", z)
* - remove useless variable `j' from srandom() * - remove useless variable `j' from srandom()
* - cast result of pointer subtraction to long since ptrdiff_t could * - cast result of pointer subtraction to long since ptrdiff_t could
* be bigger than that and trigger warnings when assigning to long * 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 $ * $NHDT-Date: 1432512787 2015/05/25 00:13:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $
*/ */
@@ -42,7 +42,7 @@
#else #else
#ifdef LIBC_SCCS #ifdef LIBC_SCCS
#ifndef lint #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
#endif /* LIBC_SCCS and not lint */ #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 : * 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() * Note that this initialization takes advantage of the fact that srandom()
* advances the front and rear pointers 10*rand_deg times, and hence the * 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 * 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 * element of the state information, which contains info about the current
* position of the rear pointer is just * 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] = { 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 * away with just one pointer, but the code for random() is more efficient
*this *this
* way). The pointers are left positioned as they would be from the call * 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 * (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 * in the initialization of randtbl) because the state table pointer is set
* to point to randtbl[1] (as explained below). * to point to randtbl[1] (as explained below).
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* termcap library implementation */ /* termcap library implementation */
+1 -1
View File
@@ -257,7 +257,7 @@ setftty(void)
/* Should use (ECHO|CRMOD) here instead of ECHO */ /* Should use (ECHO|CRMOD) here instead of ECHO */
if ((unsigned) (curttyb.echoflgs & ECHO) != ef) { if ((unsigned) (curttyb.echoflgs & ECHO) != ef) {
curttyb.echoflgs &= ~ECHO; curttyb.echoflgs &= ~ECHO;
/* curttyb.echoflgs |= ef; */ /* curttyb.echoflgs |= ef; */
change++; change++;
} }
if ((unsigned) (curttyb.cbrkflgs & CBRKMASK) != cf) { if ((unsigned) (curttyb.cbrkflgs & CBRKMASK) != cf) {
+2 -2
View File
@@ -25,7 +25,7 @@
* produces a binary only 6 blocks long, as opposed to the 137-block one * 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 * produced by an ordinary link). To set up the VMS symbol to run the
* program ("run uudecode filename" won't work), do: * 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 * 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 * produced by this program are in VMS "stream-LF" format; this makes no
* difference to VMS when running decoded executables, nor to VMS unzip, * difference to VMS when running decoded executables, nor to VMS unzip,
@@ -45,7 +45,7 @@
*/ */
#ifndef lint #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 */ #endif /* not lint */
#ifdef __MSDOS__ /* For Turbo C */ #ifdef __MSDOS__ /* For Turbo C */
+2 -2
View File
@@ -6,8 +6,8 @@
* will hide privileges from the caller if so desired. * will hide privileges from the caller if so desired.
* *
* Currently supported UNIX variants: * Currently supported UNIX variants:
* Linux version 2.1.44 and above * Linux version 2.1.44 and above
* FreeBSD (versions unknown) * FreeBSD (versions unknown)
* *
* Note: SunOS and Solaris have no mechanism for retrieving the saved id, * Note: SunOS and Solaris have no mechanism for retrieving the saved id,
* so temporarily dropping privileges on these systems is sufficient to * so temporarily dropping privileges on these systems is sufficient to
+2 -2
View File
@@ -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 $ */ /* 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 */ /* VMS NetHack support, not needed for vms 4.6,4.7,5.x,or later */
#ifdef VERYOLD_VMS #ifdef VERYOLD_VMS
@@ -7,7 +7,7 @@
* The following routines are used by NetHack but were not available * The following routines are used by NetHack but were not available
* from the C Run-Time Library (VAXCRTL) prior to VMS V4.6. * 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 * Most of them are implemented here, but others will have to be worked
* around in another fashion [such as '#define USE_OLDARGS' (even though * around in another fashion [such as '#define USE_OLDARGS' (even though
+6 -6
View File
@@ -5,11 +5,11 @@
/* tty.c - (Windows console) version */ /* tty.c - (Windows console) version */
/* /*
* Initial Creation M. Allison 1993/01/31 * Initial Creation M. Allison 1993/01/31
* Switch to low level console output routines M. Allison 2003/10/01 * Switch to low level console output routines M. Allison 2003/10/01
* Restrict cursor movement until input pending M. Lehotay 2003/10/02 * Restrict cursor movement until input pending M. Lehotay 2003/10/02
* Call Unicode version of output API on NT R. Chason 2005/10/28 * 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 * Use of back buffer to improve performance B. House 2018/05/06
* *
*/ */
@@ -1013,7 +1013,7 @@ static BOOL
CtrlHandler(DWORD ctrltype) CtrlHandler(DWORD ctrltype)
{ {
switch (ctrltype) { switch (ctrltype) {
/* case CTRL_C_EVENT: */ /* case CTRL_C_EVENT: */
case CTRL_BREAK_EVENT: case CTRL_BREAK_EVENT:
clear_screen(); clear_screen();
case CTRL_CLOSE_EVENT: case CTRL_CLOSE_EVENT:
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include "win10.h" #include "win10.h"
+2 -2
View File
@@ -679,7 +679,7 @@ attempt_restore:
You("are in non-scoring discovery mode."); You("are in non-scoring discovery mode.");
} }
// iflags.debug_fuzzer = TRUE; // iflags.debug_fuzzer = TRUE;
moveloop(resuming); moveloop(resuming);
nethack_exit(EXIT_SUCCESS); nethack_exit(EXIT_SUCCESS);
@@ -970,7 +970,7 @@ fakeconsole(void)
/* Bool rval; */ /* Bool rval; */
AllocConsole(); AllocConsole();
AttachConsole(GetCurrentProcessId()); AttachConsole(GetCurrentProcessId());
/* rval = SetStdHandle(STD_OUTPUT_HANDLE, hWrite); */ /* rval = SetStdHandle(STD_OUTPUT_HANDLE, hWrite); */
freopen("CON", "w", stdout); freopen("CON", "w", stdout);
freopen("CON", "r", stdin); freopen("CON", "r", stdin);
} }
+2 -2
View File
@@ -180,7 +180,7 @@ void nt_regularize(char* s) /* normalize file name */
char *getxxx(void) char *getxxx(void)
{ {
char szFullPath[MAX_PATH] = ""; 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)); GetModuleFileName(hInst, szFullPath, sizeof(szFullPath));
return &szFullPath[0]; 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 \ * be room for the \
*/ */
void void
+34 -34
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* /*
@@ -130,40 +130,40 @@ Resize(Widget w)
WindowClassRec windowClassRec = { WindowClassRec windowClassRec = {
{ /* core fields */ { /* core fields */
/* superclass */ (WidgetClass) &widgetClassRec, /* superclass */ (WidgetClass) &widgetClassRec,
/* class_name */ nhStr("Window"), /* class_name */ nhStr("Window"),
/* widget_size */ sizeof(WindowRec), /* widget_size */ sizeof(WindowRec),
/* class_initialize */ 0, /* class_initialize */ 0,
/* class_part_initialize */ 0, /* class_part_initialize */ 0,
/* class_inited */ FALSE, /* class_inited */ FALSE,
/* initialize */ 0, /* initialize */ 0,
/* initialize_hook */ 0, /* initialize_hook */ 0,
/* realize */ XtInheritRealize, /* realize */ XtInheritRealize,
/* actions */ actions, /* actions */ actions,
/* num_actions */ XtNumber(actions), /* num_actions */ XtNumber(actions),
/* resources */ resources, /* resources */ resources,
/* num_resources */ XtNumber(resources), /* num_resources */ XtNumber(resources),
/* xrm_class */ NULLQUARK, /* xrm_class */ NULLQUARK,
/* compress_motion */ TRUE, /* compress_motion */ TRUE,
/* compress_exposure */ TRUE, /* compress_exposure */ TRUE,
/* compress_enterleave */ TRUE, /* compress_enterleave */ TRUE,
/* visible_interest */ FALSE, /* visible_interest */ FALSE,
/* destroy */ 0, /* destroy */ 0,
/* resize */ Resize, /* resize */ Resize,
/* expose */ Redisplay, /* expose */ Redisplay,
/* set_values */ 0, /* set_values */ 0,
/* set_values_hook */ 0, /* set_values_hook */ 0,
/* set_values_almost */ XtInheritSetValuesAlmost, /* set_values_almost */ XtInheritSetValuesAlmost,
/* get_values_hook */ 0, /* get_values_hook */ 0,
/* accept_focus */ 0, /* accept_focus */ 0,
/* version */ XtVersion, /* version */ XtVersion,
/* callback_private */ 0, /* callback_private */ 0,
/* tm_table */ translations, /* tm_table */ translations,
/* query_geometry */ XtInheritQueryGeometry, /* query_geometry */ XtInheritQueryGeometry,
/* display_accelerator */ XtInheritDisplayAccelerator, /* display_accelerator */ XtInheritDisplayAccelerator,
/* extension */ 0 }, /* extension */ 0 },
{ /* window fields */ { /* window fields */
/* empty */ 0 } /* empty */ 0 }
}; };
WidgetClass windowWidgetClass = (WidgetClass) &windowClassRec; WidgetClass windowWidgetClass = (WidgetClass) &windowClassRec;
+2 -2
View File
@@ -7,8 +7,8 @@
* by nethack. * by nethack.
* *
* Assumptions: * Assumptions:
* + Two dimensional byte arrays are in row order and are not padded * + Two dimensional byte arrays are in row order and are not padded
* between rows (x11_colormap[][]). * between rows (x11_colormap[][]).
*/ */
#include "hack.h" /* for MAX_GLYPH */ #include "hack.h" /* for MAX_GLYPH */
#include "tile.h" #include "tile.h"
+2 -2
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* /*
* File for creating menus. * 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 #ifndef SYSV
+5 -5
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* /*
* Message window routines. * Message window routines.
* *
* Global functions: * Global functions:
* create_message_window() * create_message_window()
* destroy_message_window() * destroy_message_window()
* display_message_window() * display_message_window()
* append_message() * append_message()
*/ */
#ifndef SYSV #ifndef SYSV
+11 -11
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* /*
@@ -179,7 +179,7 @@ static const char *fancy_status_hilite_colors[] = {
"magenta3", "magenta3",
"dark cyan", "dark cyan",
"web gray", "web gray",
"", /* NO_COLOR */ "", /* NO_COLOR */
"orange", "orange",
"green3", "green3",
"goldenrod", "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. * the other. So only do our update when we update the second line.
* *
* Information on the first line: * Information on the first line:
* name, characteristics, alignment, score * name, characteristics, alignment, score
* *
* Information on the second line: * Information on the second line:
* dlvl, gold, hp, power, ac, {level & exp or HD **}, time, * dlvl, gold, hp, power, ac, {level & exp or HD **}, time,
* status * (stone, slime, strngl, foodpois, termill, * status * (stone, slime, strngl, foodpois, termill,
* hunger, encumbrance, lev, fly, ride, * hunger, encumbrance, lev, fly, ride,
* blind, deaf, stun, conf, hallu) * 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: * There is a possible infinite loop that occurs with:
* *
* impossible->pline->flush_screen->bot->bot{1,2}-> * impossible->pline->flush_screen->bot->bot{1,2}->
* putstr->adjust_status->update_other->impossible * putstr->adjust_status->update_other->impossible
* *
* Break out with this. * Break out with this.
*/ */
@@ -2306,12 +2306,12 @@ static int characteristics_indices[11 - 2] = {
/* /*
* Produce a form that looks like the following: * Produce a form that looks like the following:
* *
* title * title
* location * location
* col1_indices[0] col2_indices[0] col3_indices[0] * col1_indices[0] col2_indices[0] col3_indices[0]
* col1_indices[1] col2_indices[1] col3_indices[1] * 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 * The status conditions are managed separately and appear to the right
* of this form. * of this form.
+3 -3
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* /*
* File for dealing with text windows. * File for dealing with text windows.
* *
* + No global functions. * + No global functions.
*/ */
#ifndef SYSV #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 */ if (width > (Dimension) XtScreen(wp->w)->width) { /* too wide for screen */
/* Back off some amount - we really need to back off the scrollbar */ /* 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; width = XtScreen(wp->w)->width - 20;
} }
XtSetArg(args[num_args], XtNstring, text_info->text.text); XtSetArg(args[num_args], XtNstring, text_info->text.text);
+2 -2
View File
@@ -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 $ */ /* 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. */ /* 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 */ /* 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 void
hilight_value(Widget w) hilight_value(Widget w)
{ {
+5 -5
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* -chainin is an internal processor that changes the flow from window_procs /* -chainin is an internal processor that changes the flow from window_procs
@@ -559,10 +559,10 @@ chainin_status_enablefield(
} }
void chainin_status_update( void chainin_status_update(
int idx, int idx,
genericptr_t ptr, genericptr_t ptr,
int chg, int percent, int color, int chg, int percent, int color,
unsigned long *colormasks) unsigned long *colormasks)
{ {
(*cibase->nprocs->win_status_update)(cibase->ndata, idx, ptr, chg, (*cibase->nprocs->win_status_update)(cibase->ndata, idx, ptr, chg,
percent, color, colormasks); percent, color, colormasks);
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* -chainout is an internal processor that changes the flow from chain_procs /* -chainout is an internal processor that changes the flow from chain_procs
+6 -6
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include "hack.h" #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_display_file(void *,const char *, boolean);
void trace_start_menu(void *,winid, unsigned long); void trace_start_menu(void *,winid, unsigned long);
void trace_add_menu(void *,winid, const glyph_info *, const ANY_P *, void trace_add_menu(void *,winid, const glyph_info *, const ANY_P *,
char, char, int, int, char, char, int, int,
const char *, unsigned int); const char *, unsigned int);
void trace_end_menu(void *,winid, const char *); void trace_end_menu(void *,winid, const char *);
int trace_select_menu(void *,winid, int, MENU_ITEM_P **); int trace_select_menu(void *,winid, int, MENU_ITEM_P **);
char trace_message_menu(void *,char, int, const char *); 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 *); void trace_update_positionbar(void *,char *);
#endif #endif
void trace_print_glyph(void *,winid, coordxy, coordxy, 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(void *,const char *);
void trace_raw_print_bold(void *,const char *); void trace_raw_print_bold(void *,const char *);
int trace_nhgetch(void *); int trace_nhgetch(void *);
@@ -96,9 +96,9 @@ void trace_putmsghistory(void *,const char *, boolean);
void trace_status_init(void *); void trace_status_init(void *);
void trace_status_finish(void *); void trace_status_finish(void *);
void trace_status_enablefield(void *,int, const char *, const char *, void trace_status_enablefield(void *,int, const char *, const char *,
boolean); boolean);
void trace_status_update(void *,int, genericptr_t, int, int, int, void trace_status_update(void *,int, genericptr_t, int, int, int,
unsigned long *); unsigned long *);
boolean trace_can_suspend(void *); boolean trace_can_suspend(void *);
+2 -2
View File
@@ -298,8 +298,8 @@ draw_horizontal(boolean border)
#endif #endif
int i, j, number_of_lines, int i, j, number_of_lines,
cap_and_hunger, exp_points, sho_score, cap_and_hunger, exp_points, sho_score,
/* both height and width get their values set, /* both height and width get their values set,
* but only width gets used in this function */ * but only width gets used in this function */
height UNUSED, width, w, xtra, clen, x, y, t, ex, ey, height UNUSED, width, w, xtra, clen, x, y, t, ex, ey,
condstart = 0, conddummy = 0; condstart = 0, conddummy = 0;
#ifdef STATUS_HILITES #ifdef STATUS_HILITES
+3 -3
View File
@@ -5,8 +5,8 @@
/* /*
* Edit History: * Edit History:
* *
* Initial Creation M.Allison 1994/01/11 * Initial Creation M.Allison 1994/01/11
* 256 colour bmp and statue support M.Allison 2015/04/19 * 256 colour bmp and statue support M.Allison 2015/04/19
* *
*/ */
@@ -258,7 +258,7 @@ main(int argc, char *argv[])
initflag = 1; initflag = 1;
} }
set_grayscale(pass == 3); set_grayscale(pass == 3);
/* printf("Colormap initialized\n"); */ /* printf("Colormap initialized\n"); */
while (read_text_tile(tilepixels)) { while (read_text_tile(tilepixels)) {
build_bmptile(tilepixels); build_bmptile(tilepixels);
tilecount++; tilecount++;
+2 -2
View File
@@ -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. * Return TRUE if we've extended the string at base. Otherwise return FALSE.
* Assumptions: * Assumptions:
* *
* + we don't change the characters that are already in base * + we don't change the characters that are already in base
* + base has enough room to hold our string * + base has enough room to hold our string
*/ */
static boolean static boolean
ext_cmd_getlin_hook(char *base) ext_cmd_getlin_hook(char *base)
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include <assert.h> #include <assert.h>
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* various dialog boxes are defined here */ /* various dialog boxes are defined here */
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* font management and such */ /* font management and such */
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include <assert.h> #include <assert.h>
+19 -19
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include "winMS.h" #include "winMS.h"
@@ -766,8 +766,8 @@ VOID CALLBACK FuzzTimerProc(
BOOL gen_alt = (rn2(50) == 0) && isalpha(c); BOOL gen_alt = (rn2(50) == 0) && isalpha(c);
if (!iflags.debug_fuzzer) { if (!iflags.debug_fuzzer) {
KillTimer(hwnd, IDT_FUZZ_TIMER); KillTimer(hwnd, IDT_FUZZ_TIMER);
return; return;
} }
if (!GetFocus()) if (!GetFocus())
@@ -775,17 +775,17 @@ VOID CALLBACK FuzzTimerProc(
ZeroMemory(input, sizeof(input)); ZeroMemory(input, sizeof(input));
if (gen_alt) { if (gen_alt) {
input[i_pos].type = INPUT_KEYBOARD; input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE; input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE;
input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0); input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0);
i_pos++; i_pos++;
} }
if (HIBYTE(k) & 1) { if (HIBYTE(k) & 1) {
input[i_pos].type = INPUT_KEYBOARD; input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE; input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE;
input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0); input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0);
i_pos++; i_pos++;
} }
input[i_pos].type = INPUT_KEYBOARD; input[i_pos].type = INPUT_KEYBOARD;
@@ -794,16 +794,16 @@ VOID CALLBACK FuzzTimerProc(
i_pos++; i_pos++;
if (HIBYTE(k) & 1) { if (HIBYTE(k) & 1) {
input[i_pos].type = INPUT_KEYBOARD; input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0); input[i_pos].ki.wScan = MapVirtualKey(VK_LSHIFT, 0);
i_pos++; i_pos++;
} }
if (gen_alt) { if (gen_alt) {
input[i_pos].type = INPUT_KEYBOARD; input[i_pos].type = INPUT_KEYBOARD;
input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; input[i_pos].ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0); input[i_pos].ki.wScan = MapVirtualKey(VK_MENU, 0);
i_pos++; i_pos++;
} }
SendInput(i_pos, input, sizeof(input[0])); SendInput(i_pos, input, sizeof(input[0]));
} }
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include "winMS.h" #include "winMS.h"
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include "win10.h" #include "win10.h"
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include "win10.h" #include "win10.h"
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include <assert.h> #include <assert.h>
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
#include "winMS.h" #include "winMS.h"
+1 -1
View File
@@ -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 $ */ /* 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. */ /* NetHack may be freely redistributed. See license for details. */
/* /*