Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting using the /* clang-format off */ and /* clang-format on */ tags. Probably some that shouldn't have been formatted were anyway; if you encounter them, please fix. The clang-format tags were left in on the basis that it's much easier to prune those out later than to put them back in, and it means that, modulo my custom version of clang-format, I should be able to run clang-format on the source tree again without changing anything, now that Pat has fixed the VA_DECL issues.
This commit is contained in:
@@ -14,82 +14,81 @@
|
||||
* DJGPP auto-defines MSDOS.
|
||||
*/
|
||||
|
||||
/* #define MSDOS */ /* use if not defined by compiler or cases below */
|
||||
/* #define MSDOS */ /* use if not defined by compiler or cases below */
|
||||
|
||||
#ifdef __MSDOS__ /* for Borland C */
|
||||
# ifndef MSDOS
|
||||
# define MSDOS
|
||||
# endif
|
||||
#ifdef __MSDOS__ /* for Borland C */
|
||||
#ifndef MSDOS
|
||||
#define MSDOS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __TURBOC__
|
||||
# define __MSC /* increase Borland C compatibility in libraries */
|
||||
#define __MSC /* increase Borland C compatibility in libraries */
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
# undef UNIX
|
||||
#undef UNIX
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Mac Stuff.
|
||||
*/
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
# define MACOSX
|
||||
#define MACOSX
|
||||
#endif
|
||||
|
||||
#ifdef macintosh /* Auto-defined symbol for MPW compilers (sc and mrc) */
|
||||
# define MAC
|
||||
#ifdef macintosh /* Auto-defined symbol for MPW compilers (sc and mrc) */
|
||||
#define MAC
|
||||
#endif
|
||||
|
||||
#ifdef THINK_C /* Think C auto-defined symbol */
|
||||
# define MAC
|
||||
# define NEED_VARARGS
|
||||
#ifdef THINK_C /* Think C auto-defined symbol */
|
||||
#define MAC
|
||||
#define NEED_VARARGS
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__ /* defined by Metrowerks' Codewarrior compiler */
|
||||
# ifndef __BEOS__ /* BeOS */
|
||||
# define MAC
|
||||
# endif
|
||||
# define NEED_VARARGS
|
||||
# define USE_STDARG
|
||||
#ifdef __MWERKS__ /* defined by Metrowerks' Codewarrior compiler */
|
||||
#ifndef __BEOS__ /* BeOS */
|
||||
#define MAC
|
||||
#endif
|
||||
#define NEED_VARARGS
|
||||
#define USE_STDARG
|
||||
#endif
|
||||
|
||||
#if defined(MAC) || defined(__BEOS__)
|
||||
# define DLB
|
||||
# undef UNIX
|
||||
#define DLB
|
||||
#undef UNIX
|
||||
#endif
|
||||
|
||||
#ifdef __BEOS__
|
||||
# define NEED_VARARGS
|
||||
#define NEED_VARARGS
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Amiga setup.
|
||||
*/
|
||||
#ifdef AZTEC_C /* Manx auto-defines this */
|
||||
# ifdef MCH_AMIGA /* Manx auto-defines this for AMIGA */
|
||||
# ifndef AMIGA
|
||||
#define AMIGA /* define for Commodore-Amiga */
|
||||
# endif /* (SAS/C auto-defines AMIGA) */
|
||||
#define AZTEC_50 /* define for version 5.0 of manx */
|
||||
# endif
|
||||
#ifdef AZTEC_C /* Manx auto-defines this */
|
||||
#ifdef MCH_AMIGA /* Manx auto-defines this for AMIGA */
|
||||
#ifndef AMIGA
|
||||
#define AMIGA /* define for Commodore-Amiga */
|
||||
#endif /* (SAS/C auto-defines AMIGA) */
|
||||
#define AZTEC_50 /* define for version 5.0 of manx */
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __SASC_60
|
||||
# define NEARDATA __near /* put some data close */
|
||||
#define NEARDATA __near /* put some data close */
|
||||
#else
|
||||
# ifdef _DCC
|
||||
# define NEARDATA __near /* put some data close */
|
||||
# else
|
||||
# define NEARDATA
|
||||
# endif
|
||||
#ifdef _DCC
|
||||
#define NEARDATA __near /* put some data close */
|
||||
#else
|
||||
#define NEARDATA
|
||||
#endif
|
||||
#endif
|
||||
#ifdef AMIGA
|
||||
# define NEED_VARARGS
|
||||
# undef UNIX
|
||||
# define DLB
|
||||
# define HACKDIR "NetHack:"
|
||||
# define NO_MACRO_CPATH
|
||||
#define NEED_VARARGS
|
||||
#undef UNIX
|
||||
#define DLB
|
||||
#define HACKDIR "NetHack:"
|
||||
#define NO_MACRO_CPATH
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -97,17 +96,17 @@
|
||||
*/
|
||||
|
||||
#ifdef atarist
|
||||
# undef UNIX
|
||||
# ifndef TOS
|
||||
# define TOS
|
||||
# endif
|
||||
#undef UNIX
|
||||
#ifndef TOS
|
||||
#define TOS
|
||||
#endif
|
||||
#else
|
||||
# ifdef __MINT__
|
||||
# undef UNIX
|
||||
# ifndef TOS
|
||||
# define TOS
|
||||
# endif
|
||||
# endif
|
||||
#ifdef __MINT__
|
||||
#undef UNIX
|
||||
#ifndef TOS
|
||||
#define TOS
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -115,9 +114,9 @@
|
||||
*/
|
||||
#ifdef _WIN32_WCE
|
||||
#define WIN_CE
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(WIN32)
|
||||
@@ -125,80 +124,79 @@
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# undef UNIX
|
||||
# undef MSDOS
|
||||
# define NHSTDC
|
||||
# define USE_STDARG
|
||||
# define NEED_VARARGS
|
||||
#undef UNIX
|
||||
#undef MSDOS
|
||||
#define NHSTDC
|
||||
#define USE_STDARG
|
||||
#define NEED_VARARGS
|
||||
|
||||
#ifndef WIN_CE
|
||||
# define STRNCMPI
|
||||
# define STRCMPI
|
||||
#define STRNCMPI
|
||||
#define STRCMPI
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__linux__) && defined(__GNUC__) && !defined(_GNU_SOURCE)
|
||||
/* ensure _GNU_SOURCE is defined before including any system headers */
|
||||
# define _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#ifdef VMS /* really old compilers need special handling, detected here */
|
||||
# undef UNIX
|
||||
# ifdef __DECC
|
||||
# ifndef __DECC_VER /* buggy early versions want widened prototypes */
|
||||
# define NOTSTDC /* except when typedefs are involved */
|
||||
# define USE_VARARGS
|
||||
# else
|
||||
# define NHSTDC
|
||||
# define USE_STDARG
|
||||
# define POSIX_TYPES
|
||||
# define _DECC_V4_SOURCE /* avoid some incompatible V5.x changes */
|
||||
# endif
|
||||
# undef __HIDE_FORBIDDEN_NAMES /* need non-ANSI library support functions */
|
||||
# ifdef VAXC /* DEC C in VAX C compatability mode; 'signed' works */
|
||||
# define signed /* but causes diagnostic about VAX C not supporting it */
|
||||
# endif
|
||||
# else
|
||||
# ifdef VAXC /* must use CC/DEFINE=ANCIENT_VAXC for vaxc v2.2 or older */
|
||||
# define signed
|
||||
# ifdef ANCIENT_VAXC /* vaxc v2.2 and earlier [lots of warnings to come] */
|
||||
# define KR1ED /* simulate defined() */
|
||||
# define USE_VARARGS
|
||||
# else /* vaxc v2.3,2.4,or 3.x, or decc in vaxc mode */
|
||||
# if defined(USE_PROTOTYPES) /* this breaks 2.2 (*forces* use of ANCIENT)*/
|
||||
# define __STDC__ 0 /* vaxc is not yet ANSI compliant, but close enough */
|
||||
#ifdef VMS /* really old compilers need special handling, detected here */
|
||||
#undef UNIX
|
||||
#ifdef __DECC
|
||||
#ifndef __DECC_VER /* buggy early versions want widened prototypes */
|
||||
#define NOTSTDC /* except when typedefs are involved */
|
||||
#define USE_VARARGS
|
||||
#else
|
||||
#define NHSTDC
|
||||
#define USE_STDARG
|
||||
#define POSIX_TYPES
|
||||
#define _DECC_V4_SOURCE /* avoid some incompatible V5.x changes */
|
||||
#endif
|
||||
#undef __HIDE_FORBIDDEN_NAMES /* need non-ANSI library support functions */
|
||||
#ifdef VAXC /* DEC C in VAX C compatability mode; 'signed' works */
|
||||
#define signed /* but causes diagnostic about VAX C not supporting it */
|
||||
#endif
|
||||
#else
|
||||
#ifdef VAXC /* must use CC/DEFINE=ANCIENT_VAXC for vaxc v2.2 or older */
|
||||
#define signed
|
||||
#ifdef ANCIENT_VAXC /* vaxc v2.2 and earlier [lots of warnings to come] */
|
||||
#define KR1ED /* simulate defined() */
|
||||
#define USE_VARARGS
|
||||
#else /* vaxc v2.3,2.4,or 3.x, or decc in vaxc mode */
|
||||
#if defined(USE_PROTOTYPES) /* this breaks 2.2 (*forces* use of ANCIENT)*/
|
||||
#define __STDC__ 0 /* vaxc is not yet ANSI compliant, but close enough */
|
||||
#include <stddef.h>
|
||||
# define UNWIDENED_PROTOTYPES
|
||||
# endif
|
||||
# define USE_STDARG
|
||||
# endif
|
||||
# endif /*VAXC*/
|
||||
# endif /*__DECC*/
|
||||
# ifdef VERYOLD_VMS /* v4.5 or earlier; no longer available for testing */
|
||||
# define USE_OLDARGS /* <varargs.h> is there, vprintf & vsprintf aren't */
|
||||
# ifdef USE_VARARGS
|
||||
# undef USE_VARARGS
|
||||
# endif
|
||||
# ifdef USE_STDARG
|
||||
# undef USE_STDARG
|
||||
# endif
|
||||
# endif
|
||||
#define UNWIDENED_PROTOTYPES
|
||||
#endif
|
||||
#define USE_STDARG
|
||||
#endif
|
||||
#endif /*VAXC*/
|
||||
#endif /*__DECC*/
|
||||
#ifdef VERYOLD_VMS /* v4.5 or earlier; no longer available for testing */
|
||||
#define USE_OLDARGS /* <varargs.h> is there, vprintf & vsprintf aren't */
|
||||
#ifdef USE_VARARGS
|
||||
#undef USE_VARARGS
|
||||
#endif
|
||||
#ifdef USE_STDARG
|
||||
#undef USE_STDARG
|
||||
#endif
|
||||
#endif
|
||||
#endif /*VMS*/
|
||||
|
||||
#ifdef vax
|
||||
/* just in case someone thinks a DECstation is a vax. It's not, it's a mips */
|
||||
# ifdef ULTRIX_PROTO
|
||||
# undef ULTRIX_PROTO
|
||||
# endif
|
||||
# ifdef ULTRIX_CC20
|
||||
# undef ULTRIX_CC20
|
||||
# endif
|
||||
#ifdef ULTRIX_PROTO
|
||||
#undef ULTRIX_PROTO
|
||||
#endif
|
||||
#ifdef ULTRIX_CC20
|
||||
#undef ULTRIX_CC20
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef KR1ED /* For compilers which cannot handle defined() */
|
||||
#define defined(x) (-x-1 != -1)
|
||||
#ifdef KR1ED /* For compilers which cannot handle defined() */
|
||||
#define defined(x) (-x - 1 != -1)
|
||||
/* Because:
|
||||
* #define FOO => FOO={} => defined( ) => (-1 != - - 1) => 1
|
||||
* #define FOO 1 or on command-line -DFOO
|
||||
@@ -213,4 +211,4 @@
|
||||
*/
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG1_H */
|
||||
#endif /* CONFIG1_H */
|
||||
|
||||
Reference in New Issue
Block a user