変愚蛮怒のメインリポジトリです
Revision | 876225d887bd62ffdf72b3efa8891663b236b530 (tree) |
---|---|
Time | 2017-06-22 23:32:15 |
Author | Deskull <desull@user...> |
Commiter | Deskull |
(2.2.0.8) #37304 デバッグスポイラー出力時のisctype.cでのAssertionによるランタイムエラーを対策。 / Fix runtime error in output of debug spoiler by isctype.c assertion.
@@ -53,7 +53,7 @@ | ||
53 | 53 | #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */ |
54 | 54 | #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */ |
55 | 55 | #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */ |
56 | -#define FAKE_VER_EXTRA 7 /*!< ゲームのバージョン番号定義(エクストラ番号) */ | |
56 | +#define FAKE_VER_EXTRA 8 /*!< ゲームのバージョン番号定義(エクストラ番号) */ | |
57 | 57 | |
58 | 58 | /*! |
59 | 59 | * @brief セーブファイル上のバージョン定義(メジャー番号) / "Savefile Version Number" for Hengband 1.1.1 and later |
@@ -71,7 +71,7 @@ | ||
71 | 71 | #define H_VER_MAJOR 2 /*!< セーブファイル上のバージョン定義(メジャー番号) */ |
72 | 72 | #define H_VER_MINOR 2 /*!< セーブファイル上のバージョン定義(マイナー番号) */ |
73 | 73 | #define H_VER_PATCH 0 /*!< セーブファイル上のバージョン定義(パッチ番号) */ |
74 | -#define H_VER_EXTRA 7 /*!< セーブファイル上のバージョン定義(エクストラ番号) */ | |
74 | +#define H_VER_EXTRA 8 /*!< セーブファイル上のバージョン定義(エクストラ番号) */ | |
75 | 75 | |
76 | 76 | #define ANGBAND_2_8_1 /*!< Angband 2.8.1以降から有効な処理分岐を定義 */ |
77 | 77 | #define ZANGBAND /*!< Zangband 以降から有効な処理分岐を定義 */ |
@@ -40,10 +40,11 @@ | ||
40 | 40 | #include <stdint.h> |
41 | 41 | #endif |
42 | 42 | |
43 | -/*** Special 4 letter names for some standard types ***/ | |
43 | +/*** Special 4-5 letter names for some standard types ***/ | |
44 | 44 | |
45 | 45 | typedef void *vptr; /*!< void型ポインタ定義 / A standard pointer (to "void" because ANSI C says so) */ |
46 | 46 | typedef const char *cptr; /*!< 文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings) */ |
47 | +typedef const unsigned char *ucptr; /*!< 非負文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings) */ | |
47 | 48 | typedef double real; /*!< doubleをreal型として定義 / Since float's are silly, hard code real numbers as doubles */ |
48 | 49 | |
49 | 50 |
@@ -1921,19 +1921,19 @@ static void spoil_out(cptr str) | ||
1921 | 1921 | cptr r; |
1922 | 1922 | |
1923 | 1923 | /* Line buffer */ |
1924 | - static char roff_buf[256]; | |
1924 | + static unsigned char roff_buf[256]; | |
1925 | 1925 | |
1926 | 1926 | /* Delay buffer */ |
1927 | - static char roff_waiting_buf[256]; | |
1927 | + static unsigned char roff_waiting_buf[256]; | |
1928 | 1928 | |
1929 | 1929 | #ifdef JP |
1930 | 1930 | bool iskanji_flag = FALSE; |
1931 | 1931 | #endif |
1932 | 1932 | /* Current pointer into line roff_buf */ |
1933 | - static char *roff_p = roff_buf; | |
1933 | + static unsigned char *roff_p = roff_buf; | |
1934 | 1934 | |
1935 | 1935 | /* Last space saved into roff_buf */ |
1936 | - static char *roff_s = NULL; | |
1936 | + static unsigned char *roff_s = NULL; | |
1937 | 1937 | |
1938 | 1938 | /* Mega-Hack -- Delayed output */ |
1939 | 1939 | static bool waiting_output = FALSE; |
@@ -1967,10 +1967,10 @@ static void spoil_out(cptr str) | ||
1967 | 1967 | for (; *str; str++) |
1968 | 1968 | { |
1969 | 1969 | #ifdef JP |
1970 | - char cbak; | |
1970 | + unsigned char cbak; | |
1971 | 1971 | bool k_flag = iskanji((unsigned char)(*str)); |
1972 | 1972 | #endif |
1973 | - char ch = *str; | |
1973 | + unsigned char ch = *str; | |
1974 | 1974 | bool wrap = (ch == '\n'); |
1975 | 1975 | |
1976 | 1976 | #ifdef JP |
@@ -2002,9 +2002,9 @@ static void spoil_out(cptr str) | ||
2002 | 2002 | #ifdef JP |
2003 | 2003 | bool k_flag_local; |
2004 | 2004 | bool iskanji_flag_local = FALSE; |
2005 | - cptr tail = str + (k_flag ? 2 : 1); | |
2005 | + ucptr tail = str + (k_flag ? 2 : 1); | |
2006 | 2006 | #else |
2007 | - cptr tail = str + 1; | |
2007 | + ucptr tail = str + 1; | |
2008 | 2008 | #endif |
2009 | 2009 | |
2010 | 2010 | for (; *tail; tail++) |