Skip to content

Commit

Permalink
some tabs to spaces
Browse files Browse the repository at this point in the history
    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
  • Loading branch information
nhmall committed Oct 26, 2022
1 parent 1cf4f9f commit 88f6df2
Show file tree
Hide file tree
Showing 81 changed files with 368 additions and 368 deletions.
2 changes: 1 addition & 1 deletion include/align.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions include/attrib.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 15 additions & 15 deletions include/decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */

Expand Down
8 changes: 4 additions & 4 deletions include/dgn_file.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -43,15 +43,15 @@ 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 */
#define TBR_NO_DOWN 2 /* connection with no down staircase */
#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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/extern.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions include/flag.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions include/monattk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand All @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion include/mondata.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/monflag.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/monst.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions include/pcconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 */
Expand All @@ -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 */
Expand All @@ -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
Expand All @@ -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 */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -288,7 +288,7 @@
*/
#endif
#else
/* djgpp C compiler */
/* djgpp C compiler */
#if defined(SCREEN_BIOS)
#undef SCREEN_BIOS
#endif
Expand Down
24 changes: 12 additions & 12 deletions include/permonst.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@
#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 {
uchar aatyp;
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/prop.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/quest.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/rect.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/region.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/rm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/sp_lev.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/spell.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/timeout.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 8 additions & 8 deletions include/vision.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand All @@ -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))

Expand Down
Loading

0 comments on commit 88f6df2

Please sign in to comment.