1    | /*	SCCS Id: @(#)macconf.h	3.3	99/10/25	*/
2    | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3    | /* NetHack may be freely redistributed.  See license for details. */
4    | 
5    | #ifdef MAC
6    | # ifndef MACCONF_H
7    | #  define MACCONF_H
8    | 
9    | /*
10   |  * Compiler selection is based on the following symbols:
11   |  *
12   |  *	applec			MPW compiler
13   |  *	THINK_C			Think C compiler
14   |  *	__MWERKS__		Metrowerks compiler
15   |  *
16   |  * We use these early in config.h to define some needed symbols,
17   |  * including MAC.
18   |  #
19   |  # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses
20   |  # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and
21   |  # NHSTDC is defined).
22   |  */
23   | #  ifdef applec
24   | #   define MAC_MPW32		/* Headers, and for avoiding a bug */
25   | #  endif
26   | 
27   | #  ifndef __powerc
28   | #   define MAC68K		/* 68K mac (non-powerpc) */
29   | #  endif
30   | 
31   | #  define RANDOM
32   | #  define NO_SIGNAL		/* You wouldn't believe our signals ... */
33   | #  define FILENAME 256
34   | #  define NO_TERMS		/* For tty port (see wintty.h) */
35   | 
36   | #  define TEXTCOLOR		/* For Mac TTY interface */
37   | #  define CHANGE_COLOR
38   | 
39   | /* Use these two includes instead of system.h. */
40   | #include <string.h>
41   | #include <stdlib.h>
42   | 
43   | /* Uncomment this line if your headers don't already define off_t */
44   | /*typedef long off_t;*/
45   | 
46   | /*
47   |  * Try and keep the number of files here to an ABSOLUTE minimum !
48   |  * include the relevant files in the relevant .c files instead !
49   |  */
50   | #include <MacTypes.h>
51   | /*
52   |  * Turn off the Macsbug calls for the production version.
53   |  */
54   | #if 0
55   | #  undef Debugger
56   | #  undef DebugStr
57   | #  define Debugger()
58   | #  define DebugStr(aStr)
59   | #endif
60   | 
61   | /*
62   |  * We could use the PSN under sys 7 here ...
63   |  */
64   | #ifndef __CONDITIONALMACROS__	/* universal headers */
65   | #  define getpid() 1
66   | #  define getuid() 1
67   | #endif
68   | #  define index strchr
69   | #  define rindex strrchr
70   | 
71   | #  define Rand random
72   | extern void error(const char *,...);
73   | 
74   | # if !defined(O_WRONLY)
75   | #  ifdef __MWERKS__
76   | #include <unix.h>
77   | #   ifndef O_EXCL
78   |      /* MW 4.5 doesn't have this, so just use a bogus value */
79   | #    define O_EXCL 0x80000000
80   | #   endif
81   | #  else
82   | #include <fcntl.h>
83   | #  endif
84   | # endif
85   | 
86   | /*
87   |  * Don't redefine these Unix IO functions when making LevComp or DgnComp for
88   |  * MPW.  With MPW, we make them into MPW tools, which use unix IO.  SPEC_LEV
89   |  * and DGN_COMP are defined when compiling for LevComp and DgnComp respectively.
90   |  */
91   | #if !(defined(applec) && (defined(SPEC_LEV) || defined(DGN_COMP)))
92   | # define creat maccreat
93   | # define open macopen
94   | # define close macclose
95   | # define read macread
96   | # define write macwrite
97   | # define lseek macseek
98   | #endif
99   | 
100  | # define TEXT_TYPE 'TEXT'
101  | # define LEVL_TYPE 'LEVL'
102  | # define BONE_TYPE 'BONE'
103  | # define SAVE_TYPE 'SAVE'
104  | # define PREF_TYPE 'PREF'
105  | # define DATA_TYPE 'DATA'
106  | # define MAC_CREATOR 'nh31' /* Registered with DTS ! */
107  | 
108  | /*
109  |  * Define PORT_HELP to be the name of the port-specfic help file.
110  |  * This file is included into the resource fork of the application.
111  |  */
112  | #define PORT_HELP "MacHelp"
113  | 
114  | #define MAC_GRAPHICS_ENV
115  | 
116  | # endif /* ! MACCONF_H */
117  | #endif /* MAC */