OSDN Git Service

finalize changelog
[jnethack/source.git] / include / macconf.h
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. */
5
6 #ifdef MAC
7 #ifndef MACCONF_H
8 #define MACCONF_H
9
10 /*
11  * Compiler selection is based on the following symbols:
12  *
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
17  *
18  * We use these early in config.h to define some needed symbols,
19  * including MAC.
20  #
21  # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses
22  # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and
23  # NHSTDC is defined).
24  */
25
26 #ifndef __powerc
27 #define MAC68K /* 68K mac (non-powerpc) */
28 #endif
29 #ifndef TARGET_API_MAC_CARBON
30 #define TARGET_API_MAC_CARBON 0
31 #endif
32
33 #ifndef __MACH__
34 #define RANDOM
35 #endif
36 #define NO_SIGNAL /* You wouldn't believe our signals ... */
37 #define FILENAME 256
38 #define NO_TERMS /* For tty port (see wintty.h) */
39
40 #define TEXTCOLOR /* For Mac TTY interface */
41 #define CHANGE_COLOR
42
43 /* Use these two includes instead of system.h. */
44 #include <string.h>
45 #include <stdlib.h>
46
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 */
50
51 /*
52  * Try and keep the number of files here to an ABSOLUTE minimum !
53  * include the relevant files in the relevant .c files instead !
54  */
55 #if TARGET_API_MAC_CARBON
56 #ifdef GNUC
57 /* Avoid including <CarbonCore/fp.h> -- it has a conflicting expl() */
58 #define __FP__
59 #include <Carbon/Carbon.h>
60 #else
61 /* Avoid including <fenv.h> -- it uses GENERATINGPOWERPC */
62 #define __FENV__
63 #include <machine/types.h>
64 #include <Carbon.h>
65 #endif
66 #else
67 #include <MacTypes.h>
68 #endif
69
70 /*
71  * We could use the PSN under sys 7 here ...
72  * ...but it wouldn't matter...
73  */
74 #define getpid() 1
75 #define getuid() 1
76 #define index strchr
77 #define rindex strrchr
78
79 #define Rand random
80 extern void error(const char *, ...);
81
82 #if !defined(O_WRONLY)
83 #if defined(__MWERKS__) && !TARGET_API_MAC_CARBON
84 #include <unix.h>
85 #endif
86 #include <fcntl.h>
87 #endif
88
89 /*
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
93  * respectively.
94  */
95 #if !((defined(__SC__) || defined(__MRC__) || defined(__MACH__)) \
96       && (defined(SPEC_LEV) || defined(DGN_COMP)))
97 #define creat maccreat
98 #define open macopen
99 #define close macclose
100 #define read macread
101 #define write macwrite
102 #define lseek macseek
103 #ifdef __MWERKS__
104 #define unlink _unlink
105 #endif
106 #endif
107
108 #define YY_NEVER_INTERACTIVE 1
109
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 */
118
119 /*
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.
122  */
123 #define PORT_HELP "MacHelp"
124
125 #define MAC_GRAPHICS_ENV
126
127 #endif /* ! MACCONF_H */
128 #endif /* MAC */