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:
Sean Hunt
2015-05-25 09:03:10 +09:00
parent 26ee7dc370
commit 8b57d96fd2
156 changed files with 10712 additions and 10701 deletions

View File

@@ -5,8 +5,8 @@
/* NetHack may be freely redistributed. See license for details. */
#ifdef MAC
# ifndef MACCONF_H
# define MACCONF_H
#ifndef MACCONF_H
#define MACCONF_H
/*
* Compiler selection is based on the following symbols:
@@ -25,21 +25,20 @@
*/
#ifndef __powerc
# define MAC68K /* 68K mac (non-powerpc) */
#define MAC68K /* 68K mac (non-powerpc) */
#endif
#ifndef TARGET_API_MAC_CARBON
# define TARGET_API_MAC_CARBON 0
#define TARGET_API_MAC_CARBON 0
#endif
#ifndef __MACH__
#define RANDOM
#endif
#define NO_SIGNAL /* You wouldn't believe our signals ... */
#define NO_SIGNAL /* You wouldn't believe our signals ... */
#define FILENAME 256
#define NO_TERMS /* For tty port (see wintty.h) */
#define NO_TERMS /* For tty port (see wintty.h) */
#define TEXTCOLOR /* For Mac TTY interface */
#define TEXTCOLOR /* For Mac TTY interface */
#define CHANGE_COLOR
/* Use these two includes instead of system.h. */
@@ -48,25 +47,25 @@
/* Uncomment this line if your headers don't already define off_t */
/*typedef long off_t;*/
#include <time.h> /* for time_t */
#include <time.h> /* for time_t */
/*
* Try and keep the number of files here to an ABSOLUTE minimum !
* include the relevant files in the relevant .c files instead !
*/
#if TARGET_API_MAC_CARBON
# ifdef GNUC
/* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
# define __FP__
# include <Carbon/Carbon.h>
# else
/* Avoid including <fenv.h> -- it uses GENERATINGPOWERPC */
# define __FENV__
# include <machine/types.h>
# include <Carbon.h>
# endif
#ifdef GNUC
/* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
#define __FP__
#include <Carbon/Carbon.h>
#else
# include <MacTypes.h>
/* Avoid including <fenv.h> -- it uses GENERATINGPOWERPC */
#define __FENV__
#include <machine/types.h>
#include <Carbon.h>
#endif
#else
#include <MacTypes.h>
#endif
/*
@@ -79,42 +78,44 @@
#define rindex strrchr
#define Rand random
extern void error(const char *,...);
extern void error(const char *, ...);
#if !defined(O_WRONLY)
# if defined(__MWERKS__) && !TARGET_API_MAC_CARBON
# include <unix.h>
# endif
# include <fcntl.h>
#if defined(__MWERKS__) && !TARGET_API_MAC_CARBON
#include <unix.h>
#endif
#include <fcntl.h>
#endif
/*
* Don't redefine these Unix IO functions when making LevComp or DgnComp for
* MPW. With MPW, we make them into MPW tools, which use unix IO. SPEC_LEV
* and DGN_COMP are defined when compiling for LevComp and DgnComp respectively.
* and DGN_COMP are defined when compiling for LevComp and DgnComp
* respectively.
*/
#if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) && (defined(SPEC_LEV) || defined(DGN_COMP)))
# define creat maccreat
# define open macopen
# define close macclose
# define read macread
# define write macwrite
# define lseek macseek
#if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) \
&& (defined(SPEC_LEV) || defined(DGN_COMP)))
#define creat maccreat
#define open macopen
#define close macclose
#define read macread
#define write macwrite
#define lseek macseek
#ifdef __MWERKS__
# define unlink _unlink
#define unlink _unlink
#endif
#endif
#define YY_NEVER_INTERACTIVE 1
# define TEXT_TYPE 'TEXT'
# define LEVL_TYPE 'LEVL'
# define BONE_TYPE 'BONE'
# define SAVE_TYPE 'SAVE'
# define PREF_TYPE 'PREF'
# define DATA_TYPE 'DATA'
# define MAC_CREATOR 'nh31' /* Registered with DTS ! */
# define TEXT_CREATOR 'ttxt' /* Something the user can actually edit */
#define TEXT_TYPE 'TEXT'
#define LEVL_TYPE 'LEVL'
#define BONE_TYPE 'BONE'
#define SAVE_TYPE 'SAVE'
#define PREF_TYPE 'PREF'
#define DATA_TYPE 'DATA'
#define MAC_CREATOR 'nh31' /* Registered with DTS ! */
#define TEXT_CREATOR 'ttxt' /* Something the user can actually edit */
/*
* Define PORT_HELP to be the name of the port-specfic help file.
@@ -124,5 +125,5 @@ extern void error(const char *,...);
#define MAC_GRAPHICS_ENV
# endif /* ! MACCONF_H */
#endif /* ! MACCONF_H */
#endif /* MAC */