NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / include / macconf.h
blobf2412f344a29b234a329b0ed5ea5dc836448c704
1 /* aNetHack 0.0.1 macconf.h $ANH-Date: 1432512782 2015/05/25 00:13:02 $ $ANH-Branch: master $:$ANH-Revision: 1.12 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* aNetHack may be freely redistributed. See license for details. */
5 #ifdef MAC
6 #ifndef MACCONF_H
7 #define MACCONF_H
9 /*
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,
18 * including MAC.
20 # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses
21 # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and
22 # NHSTDC is defined).
25 #ifndef __powerc
26 #define MAC68K /* 68K mac (non-powerpc) */
27 #endif
28 #ifndef TARGET_API_MAC_CARBON
29 #define TARGET_API_MAC_CARBON 0
30 #endif
32 #ifndef __MACH__
33 #define RANDOM
34 #endif
35 #define NO_SIGNAL /* You wouldn't believe our signals ... */
36 #define FILENAME 256
37 #define NO_TERMS /* For tty port (see wintty.h) */
39 #define TEXTCOLOR /* For Mac TTY interface */
40 #define CHANGE_COLOR
42 /* Use these two includes instead of system.h. */
43 #include <string.h>
44 #include <stdlib.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
55 #ifdef GNUC
56 /* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
57 #define __FP__
58 #include <Carbon/Carbon.h>
59 #else
60 /* Avoid including <fenv.h> -- it uses GENERATINGPOWERPC */
61 #define __FENV__
62 #include <machine/types.h>
63 #include <Carbon.h>
64 #endif
65 #else
66 #include <MacTypes.h>
67 #endif
70 * We could use the PSN under sys 7 here ...
71 * ...but it wouldn't matter...
73 #define getpid() 1
74 #define getuid() 1
75 #define index strchr
76 #define rindex strrchr
78 #define Rand random
79 extern void error(const char *, ...);
81 #if !defined(O_WRONLY)
82 #if defined(__MWERKS__) && !TARGET_API_MAC_CARBON
83 #include <unix.h>
84 #endif
85 #include <fcntl.h>
86 #endif
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
92 * respectively.
94 #if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) \
95 && (defined(SPEC_LEV) || defined(DGN_COMP)))
96 #define creat maccreat
97 #define open macopen
98 #define close macclose
99 #define read macread
100 #define write macwrite
101 #define lseek macseek
102 #ifdef __MWERKS__
103 #define unlink _unlink
104 #endif
105 #endif
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 */
127 #endif /* MAC */