OSDN Git Service

It's not currently used in hengband, but bring over the change to mouse event handlin...
[hengbandforosx/hengbandosx.git] / src / h-config.h
index 50951a2..001f2c2 100644 (file)
@@ -1,25 +1,29 @@
-/* File: h-config.h */
-
-#ifndef INCLUDED_H_CONFIG_H
-#define INCLUDED_H_CONFIG_H
-
-/*
+/*!
+ * @file h-config.h
+ * @brief 変愚時追加された基本事項のヘッダーファイル /
+ * The most basic "include" file. This file simply includes other low level header files.
+ * @date 2014/08/15
+ * @author
+ * 不明(変愚蛮怒スタッフ?)
+ * @details
+ * <pre>
  * Choose the hardware, operating system, and compiler.
  * Also, choose various "system level" compilation options.
  * A lot of these definitions take effect in "h-system.h"
- *
  * Note that you may find it simpler to define some of these
  * options in the "Makefile", especially any options describing
  * what "system" is being used.
+ * no system definitions are needed for 4.3BSD, SUN OS, DG/UX
+ * </pre>
  */
 
+#ifndef INCLUDED_H_CONFIG_H
+#define INCLUDED_H_CONFIG_H
 
-/*
- * no system definitions are needed for 4.3BSD, SUN OS, DG/UX
- */
 
 /*
  * OPTION: Compile on a Macintosh (see "A-mac-h" or "A-mac-pch")
+ * Automatic for Mac MPW compilation
  */
 #ifndef MACINTOSH
 /* #define MACINTOSH */
 /* #define WINDOWS */
 #endif
 
-#ifdef USE_IBM
+/*
+ * Extract the "MAC_MPW" flag from the compiler
+ */
+#if defined(__SC__) || defined(__MRC__)
+# ifndef MACINTOSH
+#  define MACINTOSH
+# endif
+# ifndef MAC_MPW
+#  define MAC_MPW
+# endif
+#endif
 
-  /*
-   * OPTION: Compile on an IBM (automatic)
-   */
-  #ifndef MSDOS
-    #define MSDOS
-  #endif
 
+#ifdef USE_IBM
 
   /* Use the new SVGA code */
   #ifndef USE_IBM_SVGA
 #endif
 
 /*
- * OPTION: Compile on a SYS III version of UNIX
- */
-#ifndef SYS_III
-/* #define SYS_III */
-#endif
-
-/*
- * OPTION: Compile on a SYS V version of UNIX (not Solaris)
- */
-#ifndef SYS_V
-/* #define SYS_V */
-#endif
-
-/*
  * OPTION: Compile on a HPUX version of UNIX
  */
 #ifndef HPUX
 #endif
 
 /*
- * OPTION: Compile on a SunOS machine
- */
-#ifndef SUNOS
-/* #define SUNOS */
-#endif
-
-/*
  * OPTION: Compile on a Solaris machine
  */
 #ifndef SOLARIS
 #endif
 
 
-
-/*
- * Extract the "SUNOS" flag from the compiler
- */
-#if defined(sun)
-# ifndef SUNOS
-#   define SUNOS
-# endif
-#endif
-
 /*
  * Extract the "ULTRIX" flag from the compiler
  */
 #endif
 
 /*
- * Extract the "ATARI" flag from the compiler [cjh]
- */
-#if defined(__atarist) || defined(__atarist__)
-# ifndef ATARI
-#  define ATARI
-# endif
-#endif
-
-/*
  * Extract the "ACORN" flag from the compiler
  */
 #ifdef __riscos
 #endif
 
 /*
- * Extract the "MSDOS" flag from the compiler
- */
-#ifdef __MSDOS__
-# ifndef MSDOS
-#  define MSDOS
-# endif
-#endif
-
-/*
  * Extract the "WINDOWS" flag from the compiler
  */
 #if defined(_Windows) || defined(__WINDOWS__) || \
  * or for the "Atari" platform which is Unix-like, apparently
  */
 #if !defined(MACINTOSH) && !defined(WINDOWS) && \
-    !defined(MSDOS) && !defined(USE_EMX) && \
-    !defined(AMIGA) && !defined(ACORN) && !defined(VM)
+    !defined(ACORN) && !defined(VM)
 # define SET_UID
 #endif
 
  * involving userid's, or multiple users on a single machine, etc.
  */
 #ifdef SET_UID
-# if defined(SYS_III) || defined(SYS_V) || defined(SOLARIS) || \
-     defined(HPUX) || defined(SGI) || defined(ATARI)
+# if defined(SOLARIS) || \
+     defined(HPUX) || defined(SGI)
 #  ifndef USG
 #   define USG
 #  endif
 # undef PATH_SEP
 # define PATH_SEP "\\"
 #endif
-#if defined(MSDOS) || defined(OS2) || defined(USE_EMX)
+#if defined(OS2)
 # undef PATH_SEP
 # define PATH_SEP "\\"
 #endif
-#ifdef AMIGA
-# undef PATH_SEP
-# define PATH_SEP "/"
-#endif
 #ifdef __GO32__
 # undef PATH_SEP
 # define PATH_SEP "/"
 #endif
-#ifdef VM
-# undef PATH_SEP
-# define PATH_SEP ""
-#endif
 
 
 /*
  * The Macintosh allows the use of a "file type" when creating a file
  */
-#if defined(MACINTOSH) && !defined(applec)
+#if defined(MACINTOSH) || defined(MACH_O_CARBON)
 # define FILE_TYPE_TEXT 'TEXT'
 # define FILE_TYPE_DATA 'DATA'
 # define FILE_TYPE_SAVE 'SAVE'
 
 
 /*
- * OPTION: Hack -- Make sure "strchr()" and "strrchr()" will work
- */
-#if defined(SYS_III) || defined(SYS_V) || defined(MSDOS)
-# if !defined(__TURBOC__) && !defined(__WATCOMC__) && !defined(__DJGPP__)
-#  define strchr index
-#  define strrchr rindex
-# endif
-#endif
-
-
-/*
  * OPTION: Define "HAS_STRICMP" only if "stricmp()" exists.
  * Note that "stricmp()" is not actually used by Angband.
  */
 
 
 /*
- * OPTION: Define "HAS_MEMSET" only if "memset()" exists.
- * Note that the "memset()" routines are used in "z-virt.h"
- */
-#define HAS_MEMSET
-
-
-/*
- * OPTION: Define "HAS_USLEEP" only if "usleep()" exists.
+ * OPTION: Define "HAVE_USLEEP" only if "usleep()" exists.
  *
  * Note that this is only relevant for "SET_UID" machines.
  * Note that new "SOLARIS" and "SGI" machines have "usleep()".
  */
-#ifdef SET_UID
+#if defined(SET_UID) && !defined(HAVE_CONFIG_H)
 # if !defined(HPUX) && !defined(ULTRIX) && !defined(ISC)
-#  define HAS_USLEEP
+#  define HAVE_USLEEP
 # endif
 #endif
 
 #ifdef USE_IBM
-    #ifndef HAS_USLEEP
-    #define HAS_USLEEP /* Set for gcc (djgpp-v2), TY */
-    #endif
-#endif
-
-/*
- * Try to use save tempfile handling on multi-user machines.
- *
- * Comment this out if you don't have mkstemp()
- *
- * Note - I don't know how widely used this function is.
- * Feedback would be helpful, so we can remove some platforms
- * from this 'catch-all' statement.
- */
-#ifdef SET_UID
-#define HAVE_MKSTEMP
-#endif
-
+# ifndef HAVE_USLEEP
+#  define HAVE_USLEEP /* Set for gcc (djgpp-v2), TY */
+# endif
 #endif
 
 #ifdef JP
 # if defined(EUC)
-#  define iskanji(x) ((((int)(x) & 0xff) >= 0xa1 && ((int)(x) & 0xff) <= 0xfe) || ((int)(x) & 0xff) == 0x8e)
+#  define iskanji(x) (((unsigned char)(x) >= 0xa1 && (unsigned char)(x) <= 0xfe) || (unsigned char)(x) == 0x8e)
 #  define iskana(x)  (0)
 # elif defined(SJIS)
-#  define iskanji(x)  ((0x81<=((int)(x) & 0xff) && ((int)(x) & 0xff)<=0x9f)|| (0xe0<=((int)(x) & 0xff) && ((int)(x) & 0xff)<=0xfc))
-#  define iskana(x)  ((((int)(x) & 0xff) >= 0xA0) && (((int)(x) & 0xff)<= 0xDF))
-# elif defined(MSDOS)
-#  include <jctype.h>
+#  define iskanji(x) ((0x81 <= (unsigned char)(x) && (unsigned char)(x) <= 0x9f) || (0xe0 <= (unsigned char)(x) && (unsigned char)(x) <= 0xfc))
+#  define iskana(x)  (((unsigned char)(x) >= 0xA0) && ((unsigned char)(x) <= 0xDF))
 # else
 #  error Oops! Please define "EUC" or "SJIS" for kanji-code of your system.
-# endif /* MSDOS */
+# endif
 #endif
 
+#endif /* INCLUDED_H_CONFIG_H */