ヘッダーファイル呼び出しの整理
authorj8takagi <j8takagi@nifty.com>
Fri, 29 Jun 2018 01:07:26 +0000 (10:07 +0900)
committerj8takagi <j8takagi@nifty.com>
Fri, 29 Jun 2018 01:07:26 +0000 (10:07 +0900)
include/assemble.h
include/cerr.h
include/cmem.h
include/exec.h
include/struct.h
src/assemble.c
src/cerr.c
src/cmem.c
src/exec.c
src/label.c
src/struct.c

index 09949d6..468f082 100644 (file)
@@ -1,7 +1,16 @@
 #ifndef YACASL2_ASSEMBLE_INCLUDED
 #define YACASL2_ASSEMBLE_INCLUDED
 
 #ifndef YACASL2_ASSEMBLE_INCLUDED
 #define YACASL2_ASSEMBLE_INCLUDED
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <stdbool.h>
 #include <stdbool.h>
+#include <ctype.h>
+#include <assert.h>
+#include <errno.h>
+#include "cerr.h"
+#include "cmem.h"
+#include "hash.h"
 #include "struct.h"
 #include "word.h"
 
 #include "struct.h"
 #include "word.h"
 
index 810bf3c..9549de6 100644 (file)
@@ -1,6 +1,11 @@
 #ifndef YACASL2_CERR_H_INCLUDED
 #define YACASL2_CERR_H_INCLUDED
 
 #ifndef YACASL2_CERR_H_INCLUDED
 #define YACASL2_CERR_H_INCLUDED
 
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
 #include <stdbool.h>
 #include "cmem.h"
 
 #include <stdbool.h>
 #include "cmem.h"
 
index 85cb720..c5bb6e8 100644 (file)
@@ -1,6 +1,11 @@
 #ifndef YACASL2_CMEM_H_INCLUDED
 #define YACASL2_CMEM_H_INCLUDED
 #ifndef YACASL2_CMEM_H_INCLUDED
 #define YACASL2_CMEM_H_INCLUDED
+
+#include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stdbool.h>
 
 /**
  * @brief 配列のサイズを返すマクロ
 
 /**
  * @brief 配列のサイズを返すマクロ
index f081089..ce729c0 100644 (file)
@@ -3,9 +3,13 @@
 
 #include <stdbool.h>
 #include <stdio.h>
 
 #include <stdbool.h>
 #include <stdio.h>
+#include <assert.h>
+#include <time.h>
 #include "struct.h"
 #include "word.h"
 #include "cmem.h"
 #include "struct.h"
 #include "word.h"
 #include "cmem.h"
+#include "cerr.h"
+#include "monitor.h"
 
 enum {
     INSIZE = 256    /**<IN命令の、入力領域 */
 
 enum {
     INSIZE = 256    /**<IN命令の、入力領域 */
@@ -390,10 +394,10 @@ void dspregister();
 bool disassemble_file(const char *file);
 
 /**
 bool disassemble_file(const char *file);
 
 /**
- * @brief COMET IIã\83\87ã\83\90ã\83\83ã\82¬ーを起動する
+ * @brief COMET IIã\83¢ã\83\8bã\82¿ーを起動する
  *
  * @return なし
  */
  *
  * @return なし
  */
-void debugger();
+void monitor();
 
 #endif            /* YACASL2_EXEC_INCLUDEDの終端 */
 
 #endif            /* YACASL2_EXEC_INCLUDEDの終端 */
index ee59634..9064d5f 100644 (file)
@@ -1,8 +1,13 @@
 #ifndef YACASL2_CASL2_INCLUDED
 #define YACASL2_CASL2_INCLUDED
 
 #ifndef YACASL2_CASL2_INCLUDED
 #define YACASL2_CASL2_INCLUDED
 
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
 #include <time.h>
 #include "word.h"
 #include <time.h>
 #include "word.h"
+#include "cmem.h"
+#include "hash.h"
 
 /**
  * @brief COMET IIの規格値
 
 /**
  * @brief COMET IIの規格値
index 68a3457..8318d18 100644 (file)
@@ -1,12 +1,4 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-#include <errno.h>
-
 #include "assemble.h"
 #include "assemble.h"
-#include "cerr.h"
 
 /**
  * @brief ファイルストリームの現在行を番号付きで表示する
 
 /**
  * @brief ファイルストリームの現在行を番号付きで表示する
index f1cb09c..cd2ace9 100644 (file)
@@ -1,8 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdbool.h>
 #include "cerr.h"
 
 void cerr_init()
 #include "cerr.h"
 
 void cerr_init()
index 6c6ae12..fb29a71 100644 (file)
@@ -1,8 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdbool.h>
 #include "cmem.h"
 
 void *malloc_chk(size_t size, char *tag)
 #include "cmem.h"
 
 void *malloc_chk(size_t size, char *tag)
index b920fb1..ca1dfe0 100644 (file)
@@ -1,10 +1,4 @@
-#include <stdio.h>
-#include <assert.h>
-#include <time.h>
-
 #include "exec.h"
 #include "exec.h"
-#include "cerr.h"
-#include "debugger.h"
 
 /**
  * @brief プログラムレジスタ(PR)を表すWORD値を文字列に変換
 
 /**
  * @brief プログラムレジスタ(PR)を表すWORD値を文字列に変換
@@ -813,7 +807,7 @@ void exec()
         }
         /* デバッガーモードの場合、デバッガーを起動 */
         if(execmode.step == true || getbps(sys->cpu->pr) == true) {
         }
         /* デバッガーモードの場合、デバッガーを起動 */
         if(execmode.step == true || getbps(sys->cpu->pr) == true) {
-            debugger();
+            monitor();
         }
         /* プログラムレジスタをチェック */
         if(sys->cpu->pr >= sys->memsize) {
         }
         /* プログラムレジスタをチェック */
         if(sys->cpu->pr >= sys->memsize) {
index de37b94..cbb27b8 100644 (file)
@@ -1,10 +1,3 @@
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#include "cerr.h"
-#include "cmem.h"
-#include "hash.h"
 #include "assemble.h"
 
 /**
 #include "assemble.h"
 
 /**
index f0f705b..0f0ae43 100644 (file)
@@ -1,9 +1,4 @@
-#include <stdio.h>
-#include <assert.h>
-#include <string.h>
-#include "hash.h"
 #include "struct.h"
 #include "struct.h"
-#include "cmem.h"
 #include "exec.h"
 
 /**
 #include "exec.h"
 
 /**