-/* File: h-config.h */
-
-#ifndef INCLUDED_H_CONFIG_H
-#define INCLUDED_H_CONFIG_H
-
-/*
+/*!
+ * @file h-config.h
+ * @brief 主に変愚/Zang時追加された基本事項のヘッダーファイル /
+ * 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
- */
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
+ *
+ * This software may be copied and distributed for educational, research,
+ * and not for profit purposes provided that this copyright and statement
+ * are included in all such copies. Other copyrights may also apply.
+*/
-/*
- * OPTION: Compile on a Macintosh (see "A-mac-h" or "A-mac-pch")
- */
-#ifndef MACINTOSH
-/* #define MACINTOSH */
-#endif
+#ifndef INCLUDED_H_CONFIG_H
+#define INCLUDED_H_CONFIG_H
/*
* OPTION: Compile on Windows (automatic)
/* #define WINDOWS */
#endif
-#ifdef USE_IBM
-
- /*
- * OPTION: Compile on an IBM (automatic)
- */
- #ifndef MSDOS
- #define MSDOS
- #endif
-
-
- /* Use the new SVGA code */
- #ifndef USE_IBM_SVGA
- #define USE_IBM_SVGA
- #endif
-
-
-#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
-/* #define HPUX */
-#endif
-
-/*
- * OPTION: Compile on an SGI running IRIX
- */
-#ifndef SGI
-/* #define SGI */
-#endif
-
-/*
- * OPTION: Compile on a SunOS machine
- */
-#ifndef SUNOS
-/* #define SUNOS */
-#endif
-
-/*
- * OPTION: Compile on a Solaris machine
- */
-#ifndef SOLARIS
-/* #define SOLARIS */
-#endif
-
-/*
- * OPTION: Compile on an ultrix/4.2BSD/Dynix/etc. version of UNIX,
- * Do not define this if you are on any kind of SunOS.
- */
-#ifndef ULTRIX
-/* #define ULTRIX */
-#endif
-
-
-
-/*
- * Extract the "SUNOS" flag from the compiler
- */
-#if defined(sun)
-# ifndef SUNOS
-# define SUNOS
-# endif
-#endif
-
-/*
- * Extract the "ULTRIX" flag from the compiler
- */
-#if defined(ultrix) || defined(Pyramid)
-# ifndef ULTRIX
-# define ULTRIX
-# endif
-#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
-# ifndef ACORN
-# define ACORN
-# endif
-#endif
-
-/*
- * Extract the "SGI" flag from the compiler
- */
-#ifdef sgi
-# ifndef SGI
-# define SGI
-# endif
-#endif
-
-/*
- * Extract the "MSDOS" flag from the compiler
- */
-#ifdef __MSDOS__
-# ifndef MSDOS
-# define MSDOS
-# endif
-#endif
-
/*
* Extract the "WINDOWS" flag from the compiler
*/
* Basically, SET_UID should *only* be set for "Unix" machines,
* 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)
+#if !defined(WINDOWS) && !defined(VM)
# define SET_UID
#endif
/*
- * OPTION: Set "USG" for "System V" versions of Unix
- * This is used to choose a "lock()" function, and to choose
- * which header files ("string.h" vs "strings.h") to include.
- * It is also used to allow certain other options, such as options
- * 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)
-# ifndef USG
-# define USG
-# endif
-# endif
-#endif
-
-
-/*
* Every system seems to use its own symbol as a path separator.
* Default to the standard Unix slash, but attempt to change this
* for various other systems. Note that any system that uses the
- * "period" as a separator (i.e. ACORN) will have to pretend that
- * it uses the slash, and do its own mapping of period <-> slash.
+ * "period" as a separator will have to pretend that it uses the
+ * slash, and do its own mapping of period <-> slash.
* Note that the VM system uses a "flat" directory, and thus uses
* the empty string for "PATH_SEP".
*/
#undef PATH_SEP
#define PATH_SEP "/"
-#ifdef MACINTOSH
-# undef PATH_SEP
-# define PATH_SEP ":"
-#endif
#if defined(WINDOWS) || defined(WINNT)
# 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(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"
+ * OPTION: Define "HAVE_USLEEP" only if "usleep()" exists.
+ *
+ * Note that this is only relevant for "SET_UID" machines.
*/
-#define HAS_MEMSET
+#if defined(SET_UID) && !defined(HAVE_CONFIG_H)
+# if !defined(ISC)
+# define HAVE_USLEEP
+# endif
+#endif
+#ifdef JP
+# if defined(EUC)
+# 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 <= (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
+#endif
+
+#endif /* INCLUDED_H_CONFIG_H */
+
+#ifndef HAVE_CONFIG_H
/*
- * OPTION: Define "HAS_USLEEP" only if "usleep()" exists.
- *
- * Note that this is only relevant for "SET_UID" machines.
- * Note that new "SOLARIS" and "SGI" machines have "usleep()".
+ * USE_FONTSET and/or USE_XIM can be commented out
+ * when you don't want to use it.
*/
-#ifdef SET_UID
-# if !defined(HPUX) && !defined(ULTRIX) && !defined(ISC)
-# define HAS_USLEEP
-# endif
+#define USE_FONTSET
+
+#ifdef JP
+#define USE_XIM
+#endif
+
+#if defined(USE_FONTSET) || defined(USE_XIM)
+#define USE_LOCALE
#endif
-#ifdef USE_IBM
- #ifndef HAS_USLEEP
- #define HAS_USLEEP /* Set for gcc (djgpp-v2), TY */
- #endif
+#if defined(JP) && !defined(USE_FONTSET)
+#define USE_JP_FONTSTRUCT
#endif
+#endif /* HAVE_CONFIG_H */
+
+
/*
- * Try to use save tempfile handling on multi-user machines.
+ * Look through the following lines, and where a comment includes the
+ * tag "OPTION:", examine the associated "#define" statements, and decide
+ * whether you wish to keep, comment, or uncomment them. You should not
+ * have to modify any lines not indicated by "OPTION".
*
- * Comment this out if you don't have mkstemp()
+ * Note: Also examine the "system" configuration file "h-config.h"
+ * and the variable initialization file "variable.c". If you change
+ * anything in "variable.c", you only need to recompile that file.
*
- * 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.
+ * And finally, remember that the "Makefile" will specify some rather
+ * important compile time options, like what visual module to use.
*/
-#ifdef SET_UID
-#define HAVE_MKSTEMP
+
+
+/*
+ * OPTION: define "SPECIAL_BSD" for using certain versions of UNIX
+ * that use the 4.4BSD Lite version of Curses in "main-gcu.c"
+ */
+/* #define SPECIAL_BSD */
+
+
+/*
+ * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
+ */
+/* #define USE_TPOSIX */
+
+/*
+ * OPTION: Use the "termio" methods in "main-gcu.c"
+ */
+/* #define USE_TERMIO */
+
+/*
+ * OPTION: Use the icky BSD "tchars" methods in "main-gcu.c"
+ */
+/* #define USE_TCHARS */
+
+/*
+ * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c"
+ */
+/* #define USE_NCURSES */
+
+
+/*
+ * OPTION: for multi-user machines running the game setuid to some other
+ * user (like 'games') this SAFE_SETUID option allows the program to drop
+ * its privileges when saving files that allow for user specified pathnames.
+ * This lets the game be installed system wide without major security
+ * concerns. There should not be any side effects on any machines.
+ *
+ * This will handle "gids" correctly once the permissions are set right.
+ */
+#define SAFE_SETUID
+
+
+/*
+ * This flag enables the "POSIX" methods for "SAFE_SETUID".
+ */
+#ifdef _POSIX_SAVED_IDS
+# define SAFE_SETUID_POSIX
+#endif
+
+
+/*
+ * OPTION: Forbid the "savefile over-write" cheat, in which you simply
+ * run another copy of the game, loading a previously saved savefile,
+ * and let that copy over-write the "dead" savefile later. This option
+ * either locks the savefile, or creates a fake "xxx.lok" file to prevent
+ * the use of the savefile until the file is deleted. Not ready yet.
+ */
+/* #define VERIFY_SAVEFILE */
+
+ /*
+ * OPTION: Handle signals
+ */
+#define HANDLE_SIGNALS
+
+/*
+ * OPTION: Set the "default" path to the angband "lib" directory.
+ *
+ * See "main.c" for usage, and note that this value is only used on
+ * certain machines, primarily Unix machines. If this value is used,
+ * it will be over-ridden by the "ANGBAND_PATH" environment variable,
+ * if that variable is defined and accessable. The final slash is
+ * optional, but it may eventually be required.
+ *
+ * Using the value "./lib/" below tells Angband that, by default,
+ * the user will run "angband" from the same directory that contains
+ * the "lib" directory. This is a reasonable (but imperfect) default.
+ *
+ * If at all possible, you should change this value to refer to the
+ * actual location of the "lib" folder, for example, "/tmp/angband/lib/"
+ * or "/usr/games/lib/angband/", or "/pkg/angband/lib".
+ */
+#ifndef DEFAULT_PATH
+# define DEFAULT_PATH "./lib/"
#endif
+
+/*
+ * OPTION: Create and use a hidden directory in the users home directory
+ * for storing pref-files and character-dumps.
+ */
+#ifdef SET_UID
+#define PRIVATE_USER_PATH "~/.angband"
+#endif /* SET_UID */
+
+/*
+ * On multiuser systems, add the "uid" to savefile names
+ */
+#ifdef SET_UID
+# define SAVEFILE_USE_UID
#endif
+/*
+ * OPTION: Person to bother if something goes wrong.
+ */
+/* #define MAINTAINER "rr9@angband.org" */
+#define MAINTAINER "echizen@users.sourceforge.jp"
+
+
#ifdef JP
-# if defined(EUC)
-# define iskanji(x) ((((int)(x) & 0xff) >= 0xa1 && ((int)(x) & 0xff) <= 0xfe) || ((int)(x) & 0xff) == 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>
-# else
-# error Oops! Please define "EUC" or "SJIS" for kanji-code of your system.
-# endif /* MSDOS */
+#ifndef USE_FONTSET
+/*
+ * OPTION: Default font (when using X11).
+ */
+#define DEFAULT_X11_FONT "a24"
+#define DEFAULT_X11_KFONT "kanji24"
+#define DEFAULT_X11_FONT_SUB "a16"
+#define DEFAULT_X11_KFONT_SUB "kanji16"
+
+
+/*
+ * OPTION: Default fonts (when using X11)
+ */
+#define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
+#define DEFAULT_X11_KFONT_0 DEFAULT_X11_KFONT
+#define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_KFONT_1 DEFAULT_X11_KFONT_SUB
+#define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_KFONT_2 DEFAULT_X11_KFONT_SUB
+#define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_KFONT_3 DEFAULT_X11_KFONT_SUB
+#define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_KFONT_4 DEFAULT_X11_KFONT_SUB
+#define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_KFONT_5 DEFAULT_X11_KFONT_SUB
+#define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_KFONT_6 DEFAULT_X11_KFONT_SUB
+#define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_KFONT_7 DEFAULT_X11_KFONT_SUB
+
+#else
+/*
+ * OPTION: Default font (when using X11).
+ */
+#define DEFAULT_X11_FONT \
+ "-*-*-medium-r-normal--24-*-*-*-*-*-iso8859-1" \
+ ",-*-*-medium-r-normal--24-*-*-*-*-*-jisx0208.1983-0"
+/* "12x24" \
+ ",kanji24"*/
+#define DEFAULT_X11_FONT_SUB \
+ "-*-*-medium-r-normal--16-*-*-*-*-*-iso8859-1" \
+ ",-*-*-medium-r-normal--16-*-*-*-*-*-jisx0208.1983-0"
+/* "8x16" \
+ ",kanji16"*/
+
+/*
+ * OPTION: Default fonts (when using X11)
+ */
+#define DEFAULT_X11_FONT_0 DEFAULT_X11_FONT
+#define DEFAULT_X11_FONT_1 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_FONT_2 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_FONT_3 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_FONT_4 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_FONT_5 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_FONT_6 DEFAULT_X11_FONT_SUB
+#define DEFAULT_X11_FONT_7 DEFAULT_X11_FONT_SUB
+#endif
+
+#else
+/*
+ * OPTION: Default font (when using X11).
+ */
+#define DEFAULT_X11_FONT "9x15"
+
+/*
+ * OPTION: Default fonts (when using X11)
+ */
+#define DEFAULT_X11_FONT_0 "10x20"
+#define DEFAULT_X11_FONT_1 "9x15"
+#define DEFAULT_X11_FONT_2 "9x15"
+#define DEFAULT_X11_FONT_3 "5x8"
+#define DEFAULT_X11_FONT_4 "5x8"
+#define DEFAULT_X11_FONT_5 "5x8"
+#define DEFAULT_X11_FONT_6 "5x8"
+#define DEFAULT_X11_FONT_7 "5x8"
+#endif
+
+
+/*
+ * Hack -- Mach-O (native binary format of OS X) is basically a Un*x
+ * but has Mac OS/Windows-like user interface
+ */
+#ifdef MACH_O_CARBON
+# ifdef PRIVATE_USER_PATH
+# undef PRIVATE_USER_PATH
+# endif
+# ifdef SAVEFILE_USE_UID
+# undef SAVEFILE_USE_UID
+# endif
+#endif
+
+/*
+ * OPTION: Attempt to prevent all "cheating"
+ */
+/* #define VERIFY_HONOR */
+
+
+/*
+ * React to the "VERIFY_HONOR" flag
+ */
+#ifdef VERIFY_HONOR
+# define VERIFY_SAVEFILE
#endif
+#ifndef HAVE_CONFIG_H
+#define WORLD_SCORE
+#endif /* HAVE_CONFIG_H */