include/*.h formatting

I tracked down the widest lines, which sometimes occur due to mis-indent
of block comments (see tradstdc.h for an example), and fixed those up.
For the files affected, I also converted tabs to spaces.
This commit is contained in:
PatR
2015-11-17 02:26:17 -08:00
parent 1f3253541a
commit 2d284b0907
8 changed files with 149 additions and 144 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dungeon.h $NHDT-Date: 1436065581 2015/07/05 03:06:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.21 $ */
/* NetHack 3.6 dungeon.h $NHDT-Date: 1447755969 2015/11/17 10:26:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -79,12 +79,10 @@ typedef struct branch {
/* branch types */
#define BR_STAIR 0 /* "Regular" connection, 2 staircases. */
#define BR_NO_END1 1 /* "Regular" connection. However, no stair from */
/* end1 to end2. There is a stair from end2 */
/* to end1. */
#define BR_NO_END2 2 /* "Regular" connection. However, no stair from */
/* end2 to end1. There is a stair from end1 */
/* to end2. */
#define BR_NO_END1 1 /* "Regular" connection. However, no stair from
end1 to end2. There is a stair from end2 to end1. */
#define BR_NO_END2 2 /* "Regular" connection. However, no stair from
end2 to end1. There is a stair from end1 to end2. */
#define BR_PORTAL 3 /* Connection by magic portals (traps) */
/* A particular dungeon contains num_dunlevs d_levels with dlevel 1..
@@ -153,11 +151,9 @@ struct linfo {
#define VISITED 0x01 /* hero has visited this level */
#define FORGOTTEN 0x02 /* hero will forget this level when reached */
#define LFILE_EXISTS 0x04 /* a level file exists for this level */
/*
* Note: VISITED and LFILE_EXISTS are currently almost always set at the
* same time. However they _mean_ different things.
*/
/* Note: VISITED and LFILE_EXISTS are currently almost always
* set at the same time. However they _mean_ different things.
*/
#ifdef MFLOPPY
#define FROMPERM 1 /* for ramdisk use */
#define TOPERM 2 /* for ramdisk use */
@@ -171,18 +167,15 @@ struct linfo {
/* types and structures for dungeon map recording
*
* It is designed to eliminate the need for an external notes file for some of
* the more mundane dungeon elements. "Where was the last altar I passed?"
* etc...
* It is designed to eliminate the need for an external notes file for some
* mundane dungeon elements. "Where was the last altar I passed?" etc...
* Presumably the character can remember this sort of thing even if, months
* later in real time picking up an old save game, I can't.
*
* To be consistent, one can assume that this map is in the player's mind and
* has no physical correspondence (eliminating illiteracy/blind/hands/hands
* free
* concerns.) Therefore, this map is not exhaustive nor detailed ("some
* fountains").
* This makes it also subject to player conditions (amnesia).
* free concerns). Therefore, this map is not exhaustive nor detailed ("some
* fountains"). This makes it also subject to player conditions (amnesia).
*/
/* Because clearly Nethack needs more ways to specify alignment */

View File

@@ -1,6 +1,6 @@
/* NetHack 3.6 mactty.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) Jon W{tte 1993. */
/* NetHack may be freely redistributed. See license for details. */
/* NetHack 3.6 mactty.h $NHDT-Date: 1447755970 2015/11/17 10:26:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Jon W{tte 1993. */
/* NetHack may be freely redistributed. See license for details. */
/*
* This header is the supported external interface for the "tty" window
@@ -72,14 +72,14 @@
#define CHAR_BLANK ((char) 32)
#define CHAR_DELETE ((char) 127)
extern char
game_active; /* flag to window rendering routines not to use ppat */
/*
* If you want some fancy operations that not a normal TTY device normally
* supports, use EXTENDED_SUPPORT. For frames, area erases and area scrolls,
* plus bitmap graphics - RESOLUTION DEPENDENT, be sure to call
* get_tty_metrics and use those limits.
*/
extern char game_active; /* flag to window rendering routines
not to use ppat */
/*
* If you want some fancy operations that not a normal TTY device normally
* supports, use EXTENDED_SUPPORT. For frames, area erases and area scrolls,
* plus bitmap graphics - RESOLUTION DEPENDENT, be sure to call
* get_tty_metrics and use those limits.
*/
#define EXTENDED_SUPPORT 0
/*
* if you print a lot of single characters, accumulating each one in a
@@ -174,8 +174,7 @@ typedef enum tty_attrib {
/*
* Use this macro to cast a function pointer to a tty attribute; this will
* help
* portability to systems where a function pointer doesn't fit in a long
* help portability to systems where a function pointer doesn't fit in a long
*/
#define TA_ATTRIB_FUNC(x) ((long) (x))

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 macwin.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
/* NetHack 3.6 macwin.h $NHDT-Date: 1447755970 2015/11/17 10:26:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -27,7 +27,8 @@ typedef pascal void (*UserItemProcPtr)(WindowPtr theWindow, short itemNo);
typedef UserItemProcPtr UserItemUPP;
#define NewUserItemProc(p) (UserItemUPP)(p)
typedef pascal void (*ControlActionProcPtr)(ControlHandle theControl, short partCode);
typedef pascal void (*ControlActionProcPtr)(ControlHandle theControl,
short partCode);
typedef ControlActionProcPtr ControlActionUPP;
#define NewControlActionProc(p) (ControlActionUPP)(p)

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objclass.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */
/* NetHack 3.6 objclass.h $NHDT-Date: 1447755971 2015/11/17 10:26:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -31,8 +31,8 @@ struct objclass {
Bitfield(oc_dir, 2);
#define NODIR 1 /* for wands/spells: non-directional */
#define IMMEDIATE 2 /* directional */
#define RAY 3 /* zap beams */
#define IMMEDIATE 2 /* directional */
#define RAY 3 /* zap beams */
#define PIERCE 1 /* for weapons & tools used as weapons */
#define SLASH 2 /* (latter includes iron ball & chain) */
@@ -151,17 +151,17 @@ extern NEARDATA struct objdescr obj_descr[];
#define VENOM_CLASS 17
#define MAXOCLASSES 18
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
#define ALLOW_NONE (MAXOCLASSES + 3) /* */
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
#define ALLOW_NONE (MAXOCLASSES + 3)
#define BURNING_OIL (MAXOCLASSES + 1) /* Can be used as input to explode. */
#define MON_EXPLODE (MAXOCLASSES + 2) /* Exploding monster (e.g. gas spore) \
*/
#define BURNING_OIL (MAXOCLASSES + 1) /* Can be used as input to explode. */
#define MON_EXPLODE (MAXOCLASSES + 2) /* Exploding monster (e.g. gas spore) */
#if 0 /* moved to decl.h so that makedefs.c won't see them */
extern const struct class_sym def_oc_syms[MAXOCLASSES]; /* default class symbols */
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
extern const struct class_sym
def_oc_syms[MAXOCLASSES]; /* default class symbols */
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
#endif
/* Default definitions of all object-symbols (must match classes above). */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 patchlevel.h $NHDT-Date: 1447653420 2015/11/16 05:57:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.111 $ */
/* NetHack 3.6 patchlevel.h $NHDT-Date: 1447755971 2015/11/17 10:26:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.112 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -25,14 +25,14 @@
* If two or more successive releases have compatible data files, define
* this with the version number of the oldest such release so that the
* new release will accept old save and bones files. The format is
* 0xMMmmPPeeL
* 0xMMmmPPeeL
* 0x = literal prefix "0x", MM = major version, mm = minor version,
* PP = patch level, ee = edit level, L = literal suffix "L",
* with all four numbers specified as two hexadecimal digits.
*/
/* #define VERSION_COMPATIBILITY 0x03050000L */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.6.x */
/*
@@ -40,7 +40,13 @@
*
*/
/*****************************************************************************/
/****************************************************************************/
/* Version 3.5.x */
/* Version 3.5 was never officially released.
*/
/****************************************************************************/
/* Version 3.4.x */
/* Patch 3, December 7, 2003
@@ -86,11 +92,11 @@
*
* Hundreds of general bug fixes including some for sliming, zapping,
*conduct,
* and several more for riding
* and several more for riding
* Eliminated a few potentially fatal bugs including one for stone-to-flesh,
* trouble-fixing during prayer, riding down stairs while punished,
* polyd player demon summoning, throwing digging tools into shops, and
* a couple from having the vision system enabled at inappropriate times
* trouble-fixing during prayer, riding down stairs while punished,
* polyd player demon summoning, throwing digging tools into shops, and
* a couple from having the vision system enabled at inappropriate times
* Corrected some incorrect calculations in final scoring
* Enhanced config file processing and alert to duplication of entries
* Player selection prompt enhancements for TTY and X11
@@ -109,25 +115,25 @@
/* Version 3.4 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.3.x */
/* Patch 1, August 9, 2000
* Many, many general fixes, including a number for riding, twoweapon,
* and invisible monsters
* and invisible monsters
* A security fix for a couple of potentially exploitable buffer overflows
* in previous versions
* in previous versions
* Redo Ranger quest
* Introduction of differentiation between different causes of blindness
* Overhaul of warning
* Functionality restored to Amiga (courtesy Janne Salmijarvi) and Atari
* (courtesy Christian "Marvin" Bressler) ports
* (courtesy Christian "Marvin" Bressler) ports
* Mac: multiple interface fixes
* win32: fixed bug that caused messages to stop displaying after escape
* tty: use ANSI color (AF) over standard color (Sf) when given the choice
* several ports: offer for player selection only choices consistent with
* those already made by config file/command line (e.g., only offer roles
* that are compatible with specified race)
* those already made by config file/command line (e.g., only offer roles
* that are compatible with specified race)
*/
/*
@@ -150,7 +156,7 @@
/* Version 3.3 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.2.x */
/* Patch 3, December 10, 1999
@@ -171,7 +177,7 @@
* fix the `recover' utility
* fix priest/minion name overflow which could cause Astral Plane crashes
* avoid crash when hit by own thrown boomerang
* " " " worn blindfold pushed off by applying cursed towel
* " " " worn blindfold pushed off by applying cursed towel
* handle returning live Wizard correctly in deep dungeon levels
* don't occasionally display unseen areas of new levels during level change
* other minor display fixes
@@ -184,13 +190,13 @@
* tty: support object class characters for 'I' command in menu mode
* Unix: work around several <curses.h> compilation problems
* X11: as tty above, plus implement tty-style count handling in menus;
* better window placement support for old window managers
* better window placement support for old window managers
*/
/* Patch 1, May 28, 1996
* eliminate `#qualifications'; fix weapon proficiency handling for missiles
* keep Medusa from continuing to move after she's been killed by reflection
* of her own gaze (fixes relmon panic)
* of her own gaze (fixes relmon panic)
* make monsters a little smarter; assorted eating and chatting changes
* fix object amnesia for spellbooks; fix Nazgul's sleep gas attack
* fix bullwhip usage for case of having recently been in a trap
@@ -205,11 +211,11 @@
* DLB: avoid excessive fseek calls (major performance hit for MSDOS)
* HPUX: workaround for gcc-2.6.3 bug adversely affecting monster generation
* Mac: avoid MW 68K struct copy optimization bug which caused crashes;
* fix dragging of scrollbar; boost partitions to 2MB minimum
* fix dragging of scrollbar; boost partitions to 2MB minimum
* MSDOS: wasn't safe to enter endgame for MFLOPPY configuration;
* fix re-entry into game after "!" (shell escape) + chdir + EXIT;
* F3/F4/F5 display interface swapping improvements;
* add support for preloading all tiles in protected mode environment
* fix re-entry into game after "!" (shell escape) + chdir + EXIT;
* F3/F4/F5 display interface swapping improvements;
* add support for preloading all tiles in protected mode environment
* TERMINFO: colors were wrong for some systems, such as Linux
* X11: display help files properly
*/
@@ -217,41 +223,41 @@
/*
* NetHack 3.2.0, April 11, 1996
* enhancements to the windowing systems including "tiles" or icons to
* visually represent monsters and objects (courtesy Warwick Allison)
* visually represent monsters and objects (courtesy Warwick Allison)
* window based menu system introduced for inventory and selection
* moving light sources besides the player
* improved #untrap (courtesy Helge Hafting)
* spellcasting logic changes to balance spellcasting towards magic-using
* classes (courtesy Stephen White)
* classes (courtesy Stephen White)
* many, many bug fixes and abuse eliminations
*/
/* Version 3.2 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.1.x */
/*
* Patch 3, July 12, 1993
* further revise Mac windowing and extend to Think C (courtesy
* Barton House)
* Barton House)
* fix confusing black/gray/white display on some MSDOS hardware
* remove fatal bugs dealing with horns of plenty and VMS bones levels,
* as well as more minor ones
* as well as more minor ones
*/
/*
* Patch 2, June 1, 1993
* add tty windowing to Mac and Amiga ports and revise native windowing
* allow direct screen I/O for MS-DOS versions instead of going through
* termcap routines (courtesy Michael Allison and Kevin Smolkowski)
* termcap routines (courtesy Michael Allison and Kevin Smolkowski)
* changes for NEC PC-9800 and various termcap.zip fixes by Yamamoto Keizo
* SYSV 386 music driver ported to 386BSD (courtesy Andrew Chernov) and
* SCO UNIX (courtesy Andreas Arens)
* SCO UNIX (courtesy Andreas Arens)
* enhanced pickup and disclosure options
* removed fatal bugs dealing with cursed bags of holding, renaming
* shopkeepers, objects falling through trapdoors on deep levels,
* and kicking embedded objects loose, and many more minor ones
* shopkeepers, objects falling through trapdoors on deep levels,
* and kicking embedded objects loose, and many more minor ones
*/
/*
@@ -266,11 +272,11 @@
* many, many changes and bugfixes -- some of the highlights include:
* display rewrite using line-of-sight vision
* general window interface, with the ability to use multiple interfaces
* in the same executable
* in the same executable
* intelligent monsters
* enhanced dungeon mythology
* branching dungeons with more special levels, quest dungeons, and
* multi-level endgame
* multi-level endgame
* more artifacts and more uses for artifacts
* generalization to multiple shops with damage repair
* X11 interface
@@ -282,7 +288,7 @@
/* Version 3.1 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.0 */
/*
@@ -303,8 +309,8 @@
* Patch 8, June 3, 1990
* further debug and refine Macintosh port
* refine the overlay manager, rearrange the OVLx breakdown for better
* efficiency, rename the overlay macros, and split off the overlay
* instructions to Install.ovl
* efficiency, rename the overlay macros, and split off the overlay
* instructions to Install.ovl
* introduce NEARDATA for better Amiga efficiency
* support for more VMS versions (courtesy Joshua Delahunty and Pat Rankin)
* more const fixes
@@ -315,17 +321,17 @@
/*
* Patch 7, February 19, 1990
* refine overlay support to handle portions of .c files through OVLx
* (courtesy above plus Kevin Smolkowski)
* (courtesy above plus Kevin Smolkowski)
* update and extend Amiga port and documentation (courtesy Richard Addison,
* Jochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike Passaretti,
* and Gregg Wonderly)
* Jochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike Passaretti,
* and Gregg Wonderly)
* refine and extend Macintosh port and documentation (courtesy Johnny Lee,
* Kevin Sitze, Michael Sokolov, Andy Swanson, Jon Watte, and Tom West)
* Kevin Sitze, Michael Sokolov, Andy Swanson, Jon Watte, and Tom West)
* refine VMS documentation
* continuing ANSIfication, this time of const usage
* teach '/' about differences within monster classes
* smarter eating code (yet again), death messages, and treatment of
* non-animal monsters, monster unconsciousness, and naming
* non-animal monsters, monster unconsciousness, and naming
* extended version command to give compilation options
* and the usual bug fixes and hole plugs
*/
@@ -333,14 +339,14 @@
/*
* Patch 6, November 19, 1989
* add overlay support for MS-DOS (courtesy Pierre Martineau, Stephen
* Spackman, and Norm Meluch)
* Spackman, and Norm Meluch)
* refine Macintosh port
* different door states show as different symbols (courtesy Ari Huttunen)
* smarter drawbridges (courtesy Kevin Darcy)
* add CLIPPING and split INFERNO off HARD
* further refine eating code wrt picking up and resumption
* make first few levels easier, by adding :x monsters and increasing initial
* attribute points and hitting probability
* attribute points and hitting probability
* teach '/' about configurable symbols
*/
@@ -358,9 +364,9 @@
* Patch 4, September 27, 1989
* add support for VMS (courtesy David Gentzel)
* move monster-on-floor references into functions and implement the new
* lookup structure for both objects and monsters
* lookup structure for both objects and monsters
* extend the definitions of objects and monsters to provide "living color"
* in the dungeon, instead of a single monster color
* in the dungeon, instead of a single monster color
* ifdef varargs usage to satisfy ANSI compilers
* standardize on the color 'gray'
* assorted bug fixes
@@ -371,9 +377,9 @@
* add war hammers and revise object prices
* extend prototypes to ANSI compilers in addition to the previous MSDOS ones
* move object-on-floor references into functions in preparation for planned
* data structures to allow faster access and better colors
* data structures to allow faster access and better colors
* fix some more bugs, and extend the portability of things added in earlier
* patches
* patches
*/
/*
@@ -391,9 +397,9 @@
/*
* Patch 1, July 31, 1989
* add support for Atari TOS (courtesy Eric Smith) and Andrew File System
* (courtesy Ralf Brown)
* (courtesy Ralf Brown)
* include the uuencoded version of termcap.arc for the MSDOS versions that
* was included with 2.2 and 2.3
* was included with 2.2 and 2.3
* make a number of simple changes to accommodate various compilers
* fix a handful of bugs, and do some code cleaning elsewhere
* add more instructions for new environments and things commonly done wrong
@@ -405,6 +411,6 @@
/* Version 3.0 */
/*****************************************************************************/
/****************************************************************************/
/*patchlevel.h*/

View File

@@ -1,4 +1,4 @@
// NetHack 3.6 qt_win.h $NHDT-Date: 1433806580 2015/06/08 23:36:20 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $
// NetHack 3.6 qt_win.h $NHDT-Date: 1447755972 2015/11/17 10:26:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $
// Copyright (c) Warwick Allison, 1999.
// NetHack may be freely redistributed. See license for details.
//
@@ -863,7 +863,8 @@ class NetHackQtBind : NetHackQtBindBase
static void qt_cliparound(int x, int y);
static void qt_cliparound_window(winid wid, int x, int y);
static void qt_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, int bkglyph);
static void qt_print_glyph(winid wid, XCHAR_P x, XCHAR_P y,
int glyph, int bkglyph);
static void qt_raw_print(const char *str);
static void qt_raw_print_bold(const char *str);
static int qt_nhgetch();

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1447755973 2015/11/17 10:26:13 $ $NHDT-Branch: master $:$NHDT-Revision: 1.26 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -44,7 +44,7 @@
* USE_STDARG means use the ANSI <stdarg.h> facilities (only ANSI compilers
* should do this, and only if the library supports it).
* USE_VARARGS means use the <varargs.h> facilities. Again, this should only
* be done if the library supports it. ANSI is *not* required for this.
* be done if the library supports it. ANSI is *not* required for this.
* Otherwise, the kludgy old methods are used.
* The defaults are USE_STDARG for ANSI compilers, and USE_OLDARGS for
* others.
@@ -64,24 +64,24 @@
#endif
#ifdef NEED_VARARGS /* only define these if necessary */
/*
* These have changed since 3.4.3. VA_END() now provides an explicit
* closing brace to complement VA_DECL()'s hidden opening brace, so code
* started with VA_DECL() needs an extra opening brace to complement
* the explicit final closing brace. This was done so that the source
* would look less strange, where VA_DECL() appeared to introduce a
* function whose opening brace was missing; there are now visible and
* invisible braces at beginning and end. Sample usage:
void foo VA_DECL(int, arg) --macro expansion has a hidden opening brace
{ --new, explicit opening brace (actually introduces a nested block)
VA_START(bar);
...code for foo...
VA_END(); --expansion now provides a closing brace for the nested block
} --existing closing brace, still pairs with the hidden one in VA_DECL()
* Reading the code--or using source browsing tools which match braces--
* results in seeing a matched set of braces. Usage of VA_END() is
* potentially trickier, but nethack uses it in a straightforward manner.
*/
/*
* These have changed since 3.4.3. VA_END() now provides an explicit
* closing brace to complement VA_DECL()'s hidden opening brace, so code
* started with VA_DECL() needs an extra opening brace to complement
* the explicit final closing brace. This was done so that the source
* would look less strange, where VA_DECL() appeared to introduce a
* function whose opening brace was missing; there are now visible and
* invisible braces at beginning and end. Sample usage:
void foo VA_DECL(int, arg) --macro expansion has a hidden opening brace
{ --new, explicit opening brace (actually introduces a nested block)
VA_START(bar);
...code for foo...
VA_END(); --expansion now provides a closing brace for the nested block
} --existing closing brace, still pairs with the hidden one in VA_DECL()
* Reading the code--or using source browsing tools which match braces--
* results in seeing a matched set of braces. Usage of VA_END() is
* potentially trickier, but nethack uses it in a straightforward manner.
*/
#ifdef USE_STDARG
#include <stdarg.h>
@@ -104,6 +104,7 @@
#define _VA_LIST_ /* prevents multiple def in stdio.h */
#endif
#else
#ifdef USE_VARARGS
#include <varargs.h>
#define VA_DECL(typ1, var1) \
@@ -125,6 +126,8 @@
va_end(the_args); \
}
#else
/*USE_OLDARGS*/
#define VA_ARGS arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
#define VA_DECL(typ1, var1) \
(var1, VA_ARGS) typ1 var1; \
@@ -137,10 +140,15 @@
{
#define VA_START(x)
#define VA_INIT(var1, typ1)
/* this is inherently risky, and should only be attempted as a
/* This is inherently risky, and should only be attempted as a
very last resort; manipulating arguments which haven't actually
been passed may or may not cause severe trouble depending on
the function-calling/argument-passing mechanism being used */
the function-calling/argument-passing mechanism being used.
[nethack's core doesn't use VA_NEXT() so doesn't use VA_SHIFT()
either, and this definition is just retained for completeness.
lev_comp does use VA_NEXT(), but it passes all 'argX' arguments.]
*/
#define VA_SHIFT() \
(arg1 = arg2, arg2 = arg3, arg3 = arg4, arg4 = arg5, arg5 = arg6, \
arg6 = arg7, arg7 = arg8, arg8 = arg9)

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 unixconf.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.23 $ */
/* NetHack 3.6 unixconf.h $NHDT-Date: 1447755973 2015/11/17 10:26:13 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -8,13 +8,13 @@
/*
* Some include files are in a different place under SYSV
* BSD SYSV
* <sys/time.h> <time.h>
* <sgtty.h> <termio.h>
* BSD SYSV
* <sys/time.h> <time.h>
* <sgtty.h> <termio.h>
*
* Some routines are called differently
* index strchr
* rindex strrchr
* index strchr
* rindex strrchr
*
*/
@@ -46,18 +46,17 @@
* job control (note that AIX is SYSV otherwise)
* Also define this for AIX 3.2 */
#define TERMINFO /* uses terminfo rather than termcap */
/* Should be defined for most SYSV, SVR4 (including
* Solaris 2+), HPUX, and Linux systems. In
* particular, it should NOT be defined for the UNIXPC
* unless you remove the use of the shared library in
* the Makefile */
#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
/* and/or ANSI color support on termcap systems */
/* and/or X11 color */
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control \
*/
/* (e.g., VSUSP) */
#define TERMINFO /* uses terminfo rather than termcap */
/* Should be defined for most SYSV, SVR4 (including
* Solaris 2+), HPUX, and Linux systems. In
* particular, it should NOT be defined for the UNIXPC
* unless you remove the use of the shared library in
* the Makefile */
#define TEXTCOLOR /* Use System V r3.2 terminfo color support
* and/or ANSI color support on termcap systems
* and/or X11 color */
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control
* (e.g., VSUSP) */
#define POSIX_TYPES /* use POSIX types for system calls and termios */
/* Define for many recent OS releases, including
* those with specific defines (since types are
@@ -92,7 +91,7 @@
* which does not allow hard links. If NO_FILE_LINKS is defined, lock files
* will be created in LOCKDIR using open() instead of in the playground using
* link().
* Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
* Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
*/
/* #define NO_FILE_LINKS */ /* if no hard links */
@@ -109,8 +108,8 @@
* If defined, it can be overridden by the environment variable PAGER.
* Hack will use its internal pager if DEF_PAGER is not defined.
* (This might be preferable for security reasons.)
* #define DEF_PAGER ".../mydir/mypager"
*/
/* #define DEF_PAGER ".../mydir/mypager" */
/*
* Define PORT_HELP to be the name of the port-specfic help file.
@@ -148,9 +147,8 @@
* (another directory). MAILBOX is the element that will be added on to
* the user's home directory path to generate the Mailbox path - just in
* case other Andrew sites do it differently from CMU.
*
* dan lovinger
* dl2n+@andrew.cmu.edu (dec 19 1989)
* dan lovinger
* dl2n+@andrew.cmu.edu (dec 19 1989)
*/
/* #define AMS */ /* use Andrew message system for mail */
@@ -158,8 +156,7 @@
/* NO_MAILREADER is for kerberos authenticating filesystems where it is
* essentially impossible to securely exec child processes, like mail
* readers, when the game is running under a special token.
*
* dan
* dan
*/
/* #define NO_MAILREADER */ /* have mail daemon just tell player of mail */