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 /* NetHack may be freely redistributed. See license for details. */
10 * Compiler selection is based on the following symbols:
12 * __SC__ sc, a MPW 68k compiler
13 * __MRC__ mrc, a MPW PowerPC compiler
14 * THINK_C Think C compiler
15 * __MWERKS__ Metrowerks' Codewarrior compiler
17 * We use these early in config.h to define some needed symbols,
20 # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses
21 # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and
26 #define MAC68K /* 68K mac (non-powerpc) */
28 #ifndef TARGET_API_MAC_CARBON
29 #define TARGET_API_MAC_CARBON 0
35 #define NO_SIGNAL /* You wouldn't believe our signals ... */
37 #define NO_TERMS /* For tty port (see wintty.h) */
39 #define TEXTCOLOR /* For Mac TTY interface */
42 /* Use these two includes instead of system.h. */
46 /* Uncomment this line if your headers don't already define off_t */
47 /*typedef long off_t;*/
48 #include <time.h> /* for time_t */
51 * Try and keep the number of files here to an ABSOLUTE minimum !
52 * include the relevant files in the relevant .c files instead !
54 #if TARGET_API_MAC_CARBON
56 /* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
58 #include <Carbon/Carbon.h>
60 /* Avoid including <fenv.h> -- it uses GENERATINGPOWERPC */
62 #include <machine/types.h>
70 * We could use the PSN under sys 7 here ...
71 * ...but it wouldn't matter...
76 #define rindex strrchr
79 extern void error(const char *, ...);
81 #if !defined(O_WRONLY)
82 #if defined(__MWERKS__) && !TARGET_API_MAC_CARBON
89 * Don't redefine these Unix IO functions when making LevComp or DgnComp for
90 * MPW. With MPW, we make them into MPW tools, which use unix IO. SPEC_LEV
91 * and DGN_COMP are defined when compiling for LevComp and DgnComp
94 #if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) \
95 && (defined(SPEC_LEV) || defined(DGN_COMP)))
96 #define creat maccreat
98 #define close macclose
100 #define write macwrite
101 #define lseek macseek
103 #define unlink _unlink
107 #define YY_NEVER_INTERACTIVE 1
109 #define TEXT_TYPE 'TEXT'
110 #define LEVL_TYPE 'LEVL'
111 #define BONE_TYPE 'BONE'
112 #define SAVE_TYPE 'SAVE'
113 #define PREF_TYPE 'PREF'
114 #define DATA_TYPE 'DATA'
115 #define MAC_CREATOR 'nh31' /* Registered with DTS ! */
116 #define TEXT_CREATOR 'ttxt' /* Something the user can actually edit */
119 * Define PORT_HELP to be the name of the port-specfic help file.
120 * This file is included into the resource fork of the application.
122 #define PORT_HELP "MacHelp"
124 #define MAC_GRAPHICS_ENV
126 #endif /* ! MACCONF_H */