1 /* NetHack 3.6 macconf.h $NHDT-Date: 1432512782 2015/05/25 00:13:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /*-Copyright (c) Kevin Hugo, 2004. */
4 /* NetHack may be freely redistributed. See license for details. */
11 * Compiler selection is based on the following symbols:
13 * __SC__ sc, a MPW 68k compiler
14 * __MRC__ mrc, a MPW PowerPC compiler
15 * THINK_C Think C compiler
16 * __MWERKS__ Metrowerks' Codewarrior compiler
18 * We use these early in config.h to define some needed symbols,
21 # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses
22 # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and
27 #define MAC68K /* 68K mac (non-powerpc) */
29 #ifndef TARGET_API_MAC_CARBON
30 #define TARGET_API_MAC_CARBON 0
36 #define NO_SIGNAL /* You wouldn't believe our signals ... */
38 #define NO_TERMS /* For tty port (see wintty.h) */
40 #define TEXTCOLOR /* For Mac TTY interface */
43 /* Use these two includes instead of system.h. */
47 /* Uncomment this line if your headers don't already define off_t */
48 /*typedef long off_t;*/
49 #include <time.h> /* for time_t */
52 * Try and keep the number of files here to an ABSOLUTE minimum !
53 * include the relevant files in the relevant .c files instead !
55 #if TARGET_API_MAC_CARBON
57 /* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
59 #include <Carbon/Carbon.h>
61 /* Avoid including <fenv.h> -- it uses GENERATINGPOWERPC */
63 #include <machine/types.h>
71 * We could use the PSN under sys 7 here ...
72 * ...but it wouldn't matter...
77 #define rindex strrchr
80 extern void error(const char *, ...);
82 #if !defined(O_WRONLY)
83 #if defined(__MWERKS__) && !TARGET_API_MAC_CARBON
90 * Don't redefine these Unix IO functions when making LevComp or DgnComp for
91 * MPW. With MPW, we make them into MPW tools, which use unix IO. SPEC_LEV
92 * and DGN_COMP are defined when compiling for LevComp and DgnComp
95 #if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) \
96 && (defined(SPEC_LEV) || defined(DGN_COMP)))
97 #define creat maccreat
99 #define close macclose
101 #define write macwrite
102 #define lseek macseek
104 #define unlink _unlink
108 #define YY_NEVER_INTERACTIVE 1
110 #define TEXT_TYPE 'TEXT'
111 #define LEVL_TYPE 'LEVL'
112 #define BONE_TYPE 'BONE'
113 #define SAVE_TYPE 'SAVE'
114 #define PREF_TYPE 'PREF'
115 #define DATA_TYPE 'DATA'
116 #define MAC_CREATOR 'nh31' /* Registered with DTS ! */
117 #define TEXT_CREATOR 'ttxt' /* Something the user can actually edit */
120 * Define PORT_HELP to be the name of the port-specfic help file.
121 * This file is included into the resource fork of the application.
123 #define PORT_HELP "MacHelp"
125 #define MAC_GRAPHICS_ENV
127 #endif /* ! MACCONF_H */