OSDN Git Service

[Feature] #37285 追加モンスターのフラグ修正。 / Adjust flag of a added monster.
[hengband/hengband.git] / src / h-config.h
1 /*!
2  * @file h-config.h
3  * @brief 変愚時追加された基本事項のヘッダーファイル /
4  * The most basic "include" file. This file simply includes other low level header files.
5  * @date 2014/08/15
6  * @author
7  * 不明(変愚蛮怒スタッフ?)
8  * @details
9  * <pre>
10  * Choose the hardware, operating system, and compiler.
11  * Also, choose various "system level" compilation options.
12  * A lot of these definitions take effect in "h-system.h"
13  * Note that you may find it simpler to define some of these
14  * options in the "Makefile", especially any options describing
15  * what "system" is being used.
16  * no system definitions are needed for 4.3BSD, SUN OS, DG/UX
17  * </pre>
18  */
19
20 #ifndef INCLUDED_H_CONFIG_H
21 #define INCLUDED_H_CONFIG_H
22
23
24 /*
25  * OPTION: Compile on a Macintosh (see "A-mac-h" or "A-mac-pch")
26  * Automatic for Mac MPW compilation
27  */
28 #ifndef MACINTOSH
29 /* #define MACINTOSH */
30 #endif
31
32 /*
33  * OPTION: Compile on Windows (automatic)
34  */
35 #ifndef WINDOWS
36 /* #define WINDOWS */
37 #endif
38
39 /*
40  * Extract the "MAC_MPW" flag from the compiler
41  */
42 #if defined(__SC__) || defined(__MRC__)
43 # ifndef MACINTOSH
44 #  define MACINTOSH
45 # endif
46 # ifndef MAC_MPW
47 #  define MAC_MPW
48 # endif
49 #endif
50
51
52 #ifdef USE_IBM
53
54   /* Use the new SVGA code */
55   #ifndef USE_IBM_SVGA
56     #define USE_IBM_SVGA
57   #endif
58
59
60 #endif
61
62 /*
63  * OPTION: Compile on a HPUX version of UNIX
64  */
65 #ifndef HPUX
66 /* #define HPUX */
67 #endif
68
69 /*
70  * OPTION: Compile on an SGI running IRIX
71  */
72 #ifndef SGI
73 /* #define SGI */
74 #endif
75
76 /*
77  * OPTION: Compile on a Solaris machine
78  */
79 #ifndef SOLARIS
80 /* #define SOLARIS */
81 #endif
82
83 /*
84  * OPTION: Compile on an ultrix/4.2BSD/Dynix/etc. version of UNIX,
85  * Do not define this if you are on any kind of SunOS.
86  */
87 #ifndef ULTRIX
88 /* #define ULTRIX */
89 #endif
90
91
92 /*
93  * Extract the "ULTRIX" flag from the compiler
94  */
95 #if defined(ultrix) || defined(Pyramid)
96 # ifndef ULTRIX
97 #  define ULTRIX
98 # endif
99 #endif
100
101 /*
102  * Extract the "ACORN" flag from the compiler
103  */
104 #ifdef __riscos
105 # ifndef ACORN
106 #  define ACORN
107 # endif
108 #endif
109
110 /*
111  * Extract the "SGI" flag from the compiler
112  */
113 #ifdef sgi
114 # ifndef SGI
115 #  define SGI
116 # endif
117 #endif
118
119 /*
120  * Extract the "WINDOWS" flag from the compiler
121  */
122 #if defined(_Windows) || defined(__WINDOWS__) || \
123     defined(__WIN32__) || defined(WIN32) || \
124     defined(__WINNT__) || defined(__NT__)
125 # ifndef WINDOWS
126 #  define WINDOWS
127 # endif
128 #endif
129
130
131
132 /*
133  * OPTION: Define "L64" if a "long" is 64-bits.  See "h-types.h".
134  * The only such platform that angband is ported to is currently
135  * DEC Alpha AXP running OSF/1 (OpenVMS uses 32-bit longs).
136  */
137 #if defined(__alpha) && defined(__osf__)
138 # define L64
139 #endif
140
141
142
143 /*
144  * OPTION: set "SET_UID" if the machine is a "multi-user" machine.
145  * This option is used to verify the use of "uids" and "gids" for
146  * various "Unix" calls, and of "pids" for getting a random seed,
147  * and of the "umask()" call for various reasons, and to guess if
148  * the "kill()" function is available, and for permission to use
149  * functions to extract user names and expand "tildes" in filenames.
150  * It is also used for "locking" and "unlocking" the score file.
151  * Basically, SET_UID should *only* be set for "Unix" machines,
152  * or for the "Atari" platform which is Unix-like, apparently
153  */
154 #if !defined(MACINTOSH) && !defined(WINDOWS) && \
155     !defined(ACORN) && !defined(VM)
156 # define SET_UID
157 #endif
158
159
160 /*
161  * OPTION: Set "USG" for "System V" versions of Unix
162  * This is used to choose a "lock()" function, and to choose
163  * which header files ("string.h" vs "strings.h") to include.
164  * It is also used to allow certain other options, such as options
165  * involving userid's, or multiple users on a single machine, etc.
166  */
167 #ifdef SET_UID
168 # if defined(SOLARIS) || \
169      defined(HPUX) || defined(SGI)
170 #  ifndef USG
171 #   define USG
172 #  endif
173 # endif
174 #endif
175
176
177 /*
178  * Every system seems to use its own symbol as a path separator.
179  * Default to the standard Unix slash, but attempt to change this
180  * for various other systems.  Note that any system that uses the
181  * "period" as a separator (i.e. ACORN) will have to pretend that
182  * it uses the slash, and do its own mapping of period <-> slash.
183  * Note that the VM system uses a "flat" directory, and thus uses
184  * the empty string for "PATH_SEP".
185  */
186 #undef PATH_SEP
187 #define PATH_SEP "/"
188 #ifdef MACINTOSH
189 # undef PATH_SEP
190 # define PATH_SEP ":"
191 #endif
192 #if defined(WINDOWS) || defined(WINNT)
193 # undef PATH_SEP
194 # define PATH_SEP "\\"
195 #endif
196 #if defined(OS2)
197 # undef PATH_SEP
198 # define PATH_SEP "\\"
199 #endif
200 #ifdef __GO32__
201 # undef PATH_SEP
202 # define PATH_SEP "/"
203 #endif
204
205
206 /*
207  * The Macintosh allows the use of a "file type" when creating a file
208  */
209 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
210 # define FILE_TYPE_TEXT 'TEXT'
211 # define FILE_TYPE_DATA 'DATA'
212 # define FILE_TYPE_SAVE 'SAVE'
213 # define FILE_TYPE(X) (_ftype = (X))
214 #else
215 # define FILE_TYPE(X) ((void)0)
216 #endif
217
218
219 /*
220  * OPTION: Define "HAS_STRICMP" only if "stricmp()" exists.
221  * Note that "stricmp()" is not actually used by Angband.
222  */
223 /* #define HAS_STRICMP */
224
225 /*
226  * Linux has "stricmp()" with a different name
227  */
228 #if defined(linux)
229 # define HAS_STRICMP
230 # define stricmp strcasecmp
231 #endif
232
233
234 /*
235  * OPTION: Define "HAVE_USLEEP" only if "usleep()" exists.
236  *
237  * Note that this is only relevant for "SET_UID" machines.
238  * Note that new "SOLARIS" and "SGI" machines have "usleep()".
239  */
240 #if defined(SET_UID) && !defined(HAVE_CONFIG_H)
241 # if !defined(HPUX) && !defined(ULTRIX) && !defined(ISC)
242 #  define HAVE_USLEEP
243 # endif
244 #endif
245
246 #ifdef USE_IBM
247 # ifndef HAVE_USLEEP
248 #  define HAVE_USLEEP /* Set for gcc (djgpp-v2), TY */
249 # endif
250 #endif
251
252 #ifdef JP
253 # if defined(EUC)
254 #  define iskanji(x) (((unsigned char)(x) >= 0xa1 && (unsigned char)(x) <= 0xfe) || (unsigned char)(x) == 0x8e)
255 #  define iskana(x)  (0)
256 # elif defined(SJIS)
257 #  define iskanji(x) ((0x81 <= (unsigned char)(x) && (unsigned char)(x) <= 0x9f) || (0xe0 <= (unsigned char)(x) && (unsigned char)(x) <= 0xfc))
258 #  define iskana(x)  (((unsigned char)(x) >= 0xA0) && ((unsigned char)(x) <= 0xDF))
259 # else
260 #  error Oops! Please define "EUC" or "SJIS" for kanji-code of your system.
261 # endif
262 #endif
263
264 #endif /* INCLUDED_H_CONFIG_H */