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
+11 -18
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 */
+5 -6
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 mactty.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* 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. */
@@ -72,9 +72,9 @@
#define CHAR_BLANK ((char) 32)
#define CHAR_DELETE ((char) 127)
extern char
game_active; /* flag to window rendering routines not to use ppat */
/*
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
@@ -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))
+3 -2
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)
+5 -5
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. */
@@ -153,14 +153,14 @@ extern NEARDATA struct objdescr obj_descr[];
#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_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 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 const struct class_sym
def_oc_syms[MAXOCLASSES]; /* default class symbols */
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
#endif
+14 -8
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. */
@@ -32,7 +32,7 @@
*/
/* #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
@@ -109,7 +115,7 @@
/* Version 3.4 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.3.x */
/* Patch 1, August 9, 2000
@@ -150,7 +156,7 @@
/* Version 3.3 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.2.x */
/* Patch 3, December 10, 1999
@@ -228,7 +234,7 @@
/* Version 3.2 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.1.x */
/*
@@ -282,7 +288,7 @@
/* Version 3.1 */
/*****************************************************************************/
/****************************************************************************/
/* Version 3.0 */
/*
@@ -405,6 +411,6 @@
/* Version 3.0 */
/*****************************************************************************/
/****************************************************************************/
/*patchlevel.h*/
+3 -2
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();
+12 -4
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. */
@@ -64,7 +64,7 @@
#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
@@ -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)
+7 -10
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. */
@@ -52,12 +52,11 @@
* 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 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
@@ -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,7 +147,6 @@
* (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)
*/
@@ -158,7 +156,6 @@
/* 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
*/