OSDN Git Service

[Refactor] #37353 files.h を追加して宣言を分離。
authordeskull <deskull@users.sourceforge.jp>
Fri, 19 Apr 2019 10:45:47 +0000 (19:45 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Fri, 19 Apr 2019 10:45:47 +0000 (19:45 +0900)
37 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/artifact.c
src/autopick.c
src/birth.c
src/bldg.c
src/cmd-activate.c
src/cmd-basic.c
src/cmd-read.c
src/cmd4.c
src/dungeon-file.c
src/dungeon.c
src/effects.c
src/externs.h
src/files.c
src/files.h [new file with mode: 0644]
src/floor-save.c
src/init.c
src/load.c
src/main-win.c
src/melee1.c
src/monster-process.c
src/monster-status.c
src/monster2.c
src/mutation.c
src/object-flavor.c
src/object1.c
src/report.c
src/rumor.c
src/save.c
src/scores.c
src/spells3.c
src/store.c
src/trap.c
src/view-mainwindow.c
src/wild.c
src/wizard2.c

index 3aa4101..971c061 100644 (file)
     <ClCompile Include="..\..\src\floor-save.c" />\r
     <ClCompile Include="..\..\src\geometry.c" />\r
     <ClCompile Include="..\..\src\history.c" />\r
+    <ClCompile Include="..\..\src\init.c" />\r
     <ClCompile Include="..\..\src\monster-process.c" />\r
     <ClCompile Include="..\..\src\monster-status.c" />\r
     <ClCompile Include="..\..\src\monsterrace-hook.c" />\r
     <ClCompile Include="..\..\src\gameoption.c" />\r
     <ClCompile Include="..\..\src\grid.c" />\r
     <ClCompile Include="..\..\src\inet.c" />\r
-    <ClCompile Include="..\..\src\init2.c" />\r
     <ClCompile Include="..\..\src\japanese.c" />\r
     <ClCompile Include="..\..\src\load.c" />\r
     <ClCompile Include="..\..\src\main-win.c" />\r
     <ClInclude Include="..\..\src\dungeon-file.h" />\r
     <ClInclude Include="..\..\src\externs.h" />\r
     <ClInclude Include="..\..\src\feature.h" />\r
+    <ClInclude Include="..\..\src\files.h" />\r
     <ClInclude Include="..\..\src\floor-events.h" />\r
     <ClInclude Include="..\..\src\floor-generate.h" />\r
     <ClInclude Include="..\..\src\floor-save.h" />\r
index 5c66757..8f496b0 100644 (file)
     <ClCompile Include="..\..\src\realm-sorcery.c" />
     <ClCompile Include="..\..\src\dungeon.c" />
     <ClCompile Include="..\..\src\effects.c" />
-    <ClCompile Include="..\..\src\files.c" />
     <ClCompile Include="..\..\src\gameoption.c" />
     <ClCompile Include="..\..\src\grid.c" />
     <ClCompile Include="..\..\src\inet.c" />
-    <ClCompile Include="..\..\src\init2.c" />
     <ClCompile Include="..\..\src\japanese.c" />
     <ClCompile Include="..\..\src\load.c" />
     <ClCompile Include="..\..\src\main-win.c" />
     <ClCompile Include="..\..\src\dungeon-file.c">
       <Filter>io</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\init.c" />
+    <ClCompile Include="..\..\src\files.c">
+      <Filter>io</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\angband.h" />
     <ClInclude Include="..\..\src\dungeon-file.h">
       <Filter>io</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\files.h">
+      <Filter>io</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\src\angband.rc" />
index 3aadb5a..16398f9 100644 (file)
@@ -20,6 +20,7 @@
 #include "object-flavor.h"
 #include "object-hook.h"
 #include "spells-object.h"
+#include "files.h"
 
 static bool has_extreme_damage_rate(object_type *o_ptr);
 static bool weakening_artifact(object_type *o_ptr);
index 08e58c9..8a980eb 100644 (file)
@@ -18,6 +18,8 @@
 #include "object-flavor.h"
 #include "object-hook.h"
 
+#include "files.h"
+
 #define MAX_LINELEN 1024
 
 /*
index 518f423..fe9c151 100644 (file)
@@ -25,6 +25,7 @@
 #include "floor.h"
 #include "cmd-pet.h"
 #include "dungeon-file.h"
+#include "files.h"
 
 /*!
  * オートローラーの内容を描画する間隔 / 
index 7e2d594..8243e1e 100644 (file)
@@ -38,6 +38,8 @@
 #include "realm-hex.h"
 #include "dungeon-file.h"
 
+#include "files.h"
+
 /*!
  * @brief 闘技場のモンスターID及び報酬アイテムテーブル
  */
index 9d8fd92..902048a 100644 (file)
@@ -22,6 +22,7 @@
 #include "realm-hex.h"
 #include "player-status.h"
 #include "monster-status.h"
+#include "files.h"
 
 /*!
  * @brief アイテムの発動効果テーブル /
index 1d0b73c..4e13057 100644 (file)
@@ -36,6 +36,7 @@
 #include "cmd-basic.h"
 #include "floor-save.h"
 #include "dungeon-file.h"
+#include "files.h"
 
 /*!
  * @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理
index 4bb9ccf..15e0e7a 100644 (file)
@@ -22,6 +22,7 @@
 #include "spells-status.h"
 
 #include "cmd-basic.h"
+#include "files.h"
 
 /*!
  * @brief 巻物を読むコマンドのサブルーチン
index 990b03d..a694d08 100644 (file)
@@ -57,6 +57,7 @@
 #include "floor.h"
 #include "view-mainwindow.h"
 #include "dungeon-file.h"
+#include "files.h"
 
 /*
  */
index 02bf451..e06a985 100644 (file)
@@ -4,6 +4,7 @@
 #include "grid.h"
 #include "quest.h"
 #include "monster.h"
+#include "files.h"
 
 dungeon_grid letter[255];
 
index 76da5a5..0e67003 100644 (file)
@@ -55,6 +55,7 @@
 
 #include "view-mainwindow.h"
 #include "dungeon-file.h"
+#include "files.h"
 
 static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/
 static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)*/
index b2ac9ea..1bc20fe 100644 (file)
@@ -26,6 +26,7 @@
 #include "player-move.h"
 #include "monster-status.h"
 #include "snipe.h"
+#include "files.h"
 
 /*!
  * @brief プレイヤーの継続行動を設定する。
index 5fb6522..c814deb 100644 (file)
@@ -483,44 +483,6 @@ extern void prevent_turn_overflow(void);
 extern void close_game(void);
 
 
-/* files.c */
-extern void safe_setuid_drop(void);
-extern void safe_setuid_grab(void);
-extern s16b tokenize(char *buf, s16b num, char **tokens, BIT_FLAGS mode);
-extern void display_player(int mode);
-extern errr make_character_dump(FILE *fff);
-extern errr file_character(concptr name);
-extern errr process_pref_file_command(char *buf);
-extern concptr process_pref_file_expr(char **sp, char *fp);
-extern errr process_pref_file(concptr name);
-extern errr process_autopick_file(concptr name);
-extern errr process_histpref_file(concptr name);
-extern void print_equippy(void);
-extern void display_player_equippy(TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode);
-extern errr check_time_init(void);
-extern errr check_load_init(void);
-extern errr check_time(void);
-extern errr check_load(void);
-extern bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
-extern void do_cmd_help(void);
-extern void process_player_name(bool sf);
-extern void get_name(void);
-extern void do_cmd_save_game(int is_autosave);
-extern void do_cmd_save_and_exit(void);
-extern void exit_game_panic(void);
-extern void signals_ignore_tstp(void);
-extern void signals_handle_tstp(void);
-extern void signals_init(void);
-extern errr get_rnd_line(concptr file_name, int entry, char *output);
-extern void print_tomb(void);
-extern void show_info(void);
-extern bool check_score(void);
-
-#ifdef JP
-extern errr get_rnd_line_jonly(concptr file_name, int entry, char *output, int count);
-#endif
-extern errr counts_write(int where, u32b count);
-extern u32b counts_read(int where);
 
 
 /* load.c */
index 14fdc15..6be65c5 100644 (file)
@@ -14,6 +14,8 @@
 
 
 #include "angband.h"
+#include "files.h"
+
 #include "world.h"
 #include "player-status.h"
 #include "sort.h"
diff --git a/src/files.h b/src/files.h
new file mode 100644 (file)
index 0000000..63c10a0
--- /dev/null
@@ -0,0 +1,40 @@
+#pragma once
+
+/* files.c */
+extern void safe_setuid_drop(void);
+extern void safe_setuid_grab(void);
+extern s16b tokenize(char *buf, s16b num, char **tokens, BIT_FLAGS mode);
+extern void display_player(int mode);
+extern errr make_character_dump(FILE *fff);
+extern errr file_character(concptr name);
+extern errr process_pref_file_command(char *buf);
+extern concptr process_pref_file_expr(char **sp, char *fp);
+extern errr process_pref_file(concptr name);
+extern errr process_autopick_file(concptr name);
+extern errr process_histpref_file(concptr name);
+extern void print_equippy(void);
+extern void display_player_equippy(TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode);
+extern errr check_time_init(void);
+extern errr check_load_init(void);
+extern errr check_time(void);
+extern errr check_load(void);
+extern bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode);
+extern void do_cmd_help(void);
+extern void process_player_name(bool sf);
+extern void get_name(void);
+extern void do_cmd_save_game(int is_autosave);
+extern void do_cmd_save_and_exit(void);
+extern void exit_game_panic(void);
+extern void signals_ignore_tstp(void);
+extern void signals_handle_tstp(void);
+extern void signals_init(void);
+extern errr get_rnd_line(concptr file_name, int entry, char *output);
+extern void print_tomb(void);
+extern void show_info(void);
+extern bool check_score(void);
+
+#ifdef JP
+extern errr get_rnd_line_jonly(concptr file_name, int entry, char *output, int count);
+#endif
+extern errr counts_write(int where, u32b count);
+extern u32b counts_read(int where);
index b224c2a..5b0bef7 100644 (file)
@@ -23,6 +23,7 @@
 #include "object-hook.h"
 #include "cmd-pet.h"
 #include "cmd-basic.h"
+#include "files.h"
 
 static FLOOR_IDX new_floor_id;  /*!<次のフロアのID / floor_id of the destination */
 static u32b change_floor_mode;  /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
index 8294867..c1c71eb 100644 (file)
@@ -41,6 +41,7 @@
 #include "store.h"
 #include "wild.h"
 #include "dungeon-file.h"
+#include "files.h"
 
 #ifndef MACINTOSH
 #ifdef CHECK_MODIFICATION_TIME
index 476f028..a294ecc 100644 (file)
@@ -60,6 +60,7 @@
 
 #include "cmd-pet.h"
 #include "dungeon-file.h"
+#include "files.h"
 
 
 /*
index 9608ea0..ce28c3e 100644 (file)
 #include "view-mainwindow.h"
 #include "floor-events.h"
 #include "init.h"
+#include "files.h"
 
 #ifdef WINDOWS
 #include <windows.h>
index 2f6d7c4..56d9258 100644 (file)
@@ -29,6 +29,7 @@
 #include "player-move.h"
 #include "floor.h"
 #include "spells.h"
+#include "files.h"
 
 
 
index 61ae0eb..c1b6443 100644 (file)
@@ -31,6 +31,7 @@
 #include "monster-process.h"
 #include "monsterrace-hook.h"
 #include "floor.h"
+#include "files.h"
 
 
 /*!
index 633a3ef..ff3c24c 100644 (file)
@@ -10,6 +10,7 @@
 #include "object-curse.h"
 #include "artifact.h"
 #include "avatar.h"
+#include "files.h"
 
 
 /*!
index c8bf1fb..2c2377a 100644 (file)
@@ -26,6 +26,7 @@
 #include "warning.h"
 #include "player-status.h"
 #include "monster-spell.h"
+#include "files.h"
 
 #define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
 #define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
index b1fde4e..f1885ed 100644 (file)
@@ -22,6 +22,7 @@
 #include "object-hook.h"
 #include "spells.h"
 #include "cmd-basic.h"
+#include "files.h"
 
 /*!
  * @brief プレイヤーに突然変異を与える
index c61e3ef..4a54e86 100644 (file)
@@ -17,6 +17,7 @@
 #include "object-flavor.h"
 #include "trap.h"
 #include "snipe.h"
+#include "files.h"
 
 /*!
  * @brief 最初から簡易な名称が明らかになるベースアイテムの判定。 /  Certain items, if aware, are known instantly 
index ca6d2da..563b1e8 100644 (file)
@@ -19,6 +19,7 @@
 #include "object-hook.h"
 #include "player-move.h"
 #include "monster.h"
+#include "files.h"
 
 #if defined(MACINTOSH) || defined(MACH_O_CARBON)
 #ifdef verify
index 9b103b1..730c04d 100644 (file)
@@ -9,6 +9,7 @@
 #include "angband.h"
 #include "floor.h"
 #include "player-status.h"
+#include "files.h"
 
 #ifdef WORLD_SCORE
 
index 440713a..5579e5c 100644 (file)
@@ -1,4 +1,5 @@
 #include "angband.h"
+#include "files.h"
 #include "object-flavor.h"
 
 /*
index 0376a8d..6f83675 100644 (file)
@@ -18,6 +18,7 @@
 #include "wild.h"
 #include "floor-events.h"
 #include "floor-save.h"
+#include "files.h"
 
 
 
index 5cd14b9..53e9923 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "angband.h"
 #include "player-status.h"
+#include "files.h"
 
 /*!
  * @brief i番目のスコア情報にバッファ位置をシークする / Seek score 'i' in the highscore file
index 7c5415c..4321320 100644 (file)
@@ -32,6 +32,7 @@
 #include "cmd-spell.h"
 #include "snipe.h"
 #include "floor-save.h"
+#include "files.h"
 
 
 /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */
index 889cbb4..83a5fea 100644 (file)
@@ -25,6 +25,7 @@
 #include "object-hook.h"
 #include "floor-events.h"
 #include "snipe.h"
+#include "files.h"
 
 #define MIN_STOCK 12
 
index 5720a09..496d7f4 100644 (file)
@@ -12,6 +12,7 @@
 #include "floor.h"
 #include "floor-save.h"
 #include "init.h"
+#include "files.h"
 
 static s16b normal_traps[MAX_NORMAL_TRAPS];
 
index 14562b2..41594b9 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "angband.h"
+#include "files.h"
 #include "world.h"
 #include "quest.h"
 #include "artifact.h"
index 1afcd44..0eb7a97 100644 (file)
@@ -21,6 +21,7 @@
 #include "monster-status.h"
 #include "quest.h"
 #include "dungeon-file.h"
+#include "files.h"
 
  /*
   * Wilderness
index e9eab7f..663c6c0 100644 (file)
@@ -33,6 +33,7 @@
 #include "floor-save.h"
 #include "grid.h"
 #include "dungeon-file.h"
+#include "files.h"
 
 #ifdef ALLOW_WIZARD