From: j8takagi Date: Thu, 28 Feb 2019 06:54:54 +0000 (+0900) Subject: ヘッダーファイルの整理 X-Git-Tag: v0.5p12~2 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7afcf780cbc7d4f2834b9ca42cca1b3754621960;p=YACASL2.git ヘッダーファイルの整理 --- diff --git a/include/assemble.h b/include/assemble.h index e5c1427..3ab7a86 100644 --- a/include/assemble.h +++ b/include/assemble.h @@ -1,5 +1,5 @@ -#ifndef YACASL2_ASSEMBLE_INCLUDED -#define YACASL2_ASSEMBLE_INCLUDED +#ifndef YACASL2_ASSEMBLE_H_INCLUDED +#define YACASL2_ASSEMBLE_H_INCLUDED #include #include @@ -155,4 +155,4 @@ bool assemble(int filec, char *filev[], WORD adr); */ void outassemble(const char *file); -#endif /* YACASL2_ASSEMBLE_INCLUDEDの終端 */ +#endif diff --git a/include/disassemble.h b/include/disassemble.h index 4a56df6..cd71281 100644 --- a/include/disassemble.h +++ b/include/disassemble.h @@ -1,5 +1,5 @@ -#ifndef DISASSEMBLE_INCLUDE -#define DISASSEMBLE_INCLUDE +#ifndef YACASL2_DISASSEMBLE_H_INCLUDE +#define YACASL2_DISASSEMBLE_H_INCLUDE #include "struct.h" @@ -22,4 +22,4 @@ bool disassemble_file(const char *file); */ void disassemble_memory(WORD start, WORD end); -#endif /* end of DISASSEMBLE_INCLUDE */ +#endif diff --git a/include/exec.h b/include/exec.h index 08b4dd1..aef1afd 100644 --- a/include/exec.h +++ b/include/exec.h @@ -1,5 +1,5 @@ -#ifndef YACASL2_EXEC_INCLUDED -#define YACASL2_EXEC_INCLUDED +#ifndef YACASL2_EXEC_H_INCLUDED +#define YACASL2_EXEC_H_INCLUDED #include #include @@ -21,16 +21,6 @@ enum { */ void addcerrlist_exec(); -/** - * @brief 指定されたファイルからアセンブル結果を読み込む - * - * @return 読み込み終了アドレス。読み込めなかった場合は、0 - * - * @param file 読み込むファイル名 - * @param start 読み込み開始アドレス - */ -WORD loadassemble(const char *file, WORD start); - /** * @class Exec * @brief execから関数ポインタで呼び出される関数 @@ -372,4 +362,4 @@ void dumpmemory(WORD start, WORD end); */ void dspregister(); -#endif /* YACASL2_EXEC_INCLUDEDの終端 */ +#endif diff --git a/include/hash.h b/include/hash.h index 817e8e9..e1aa502 100644 --- a/include/hash.h +++ b/include/hash.h @@ -1,5 +1,5 @@ -#ifndef YACASL2_HASH_INCLUDED -#define YACASL2_HASH_INCLUDED +#ifndef YACASL2_HASH_H_INCLUDED +#define YACASL2_HASH_H_INCLUDED /** * @brief ハッシュ共用体の数値 diff --git a/include/monitor.h b/include/monitor.h index e370072..fe7e1cd 100644 --- a/include/monitor.h +++ b/include/monitor.h @@ -1,11 +1,12 @@ -#ifndef MONITOR_INCLUDE -#define MONITOR_INCLUDE +#ifndef YACASL2_MONITOR_H_INCLUDE +#define YACASL2_MONITOR_H_INCLUDE #include #include #include #include "assemble.h" #include "exec.h" +#include "load.h" /** * @brief モニター @@ -134,4 +135,4 @@ void freebps(); */ void monitor(); -#endif /* end of MONITOR_INCLUDE */ +#endif diff --git a/include/struct.h b/include/struct.h index dce1ddf..368e9ae 100644 --- a/include/struct.h +++ b/include/struct.h @@ -1,5 +1,5 @@ -#ifndef YACASL2_CASL2_INCLUDED -#define YACASL2_CASL2_INCLUDED +#ifndef YACASL2_STRUCT_INCLUDED +#define YACASL2_STRUCT_INCLUDED #include #include @@ -8,6 +8,7 @@ #include "word.h" #include "cmem.h" #include "hash.h" +#include "exec.h" /** * @brief COMET IIの規格値 @@ -206,4 +207,4 @@ CMDTYPE getcmdtype(WORD code); */ char *getcmdname(WORD code); -#endif /* YACASL2_CASL2_INCLUDEDの終端 */ +#endif diff --git a/include/token.h b/include/token.h index 0c90936..6e152a4 100644 --- a/include/token.h +++ b/include/token.h @@ -1,5 +1,5 @@ -#ifndef TOKEN_INCLUDE -#define TOKEN_INCLUDE +#ifndef YACASL2_TOKEN_INCLUDE +#define YACASL2_TOKEN_INCLUDE #include #include @@ -60,4 +60,4 @@ void addcerrlist_tok(); */ CMDLINE *linetok(const char *line); -#endif /* end of TOKEN_INCLUDE */ +#endif diff --git a/src/Makefile b/src/Makefile index fbc5ad5..b56c88a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,9 +1,8 @@ # ソースファイル。グループに分類 CMDOBJ := casl2 comet2 dumpword casl2rev comet2monitor COMMONOBJ := word cmem cerr -STRUCTOBJ := struct hash ASOBJ := assemble token label -EXECOBJ := exec dump monitor disassemble +EXECOBJ := exec dump struct hash load disassemble monitor # ヘッダファイル INCLUDEDIR := ../include @@ -24,15 +23,15 @@ all: build tag # casl2、comet2、dumpword、casl2rev、comet2monitorのビルド build: $(CMDOBJ) -casl2: $(addsuffix .o,casl2 $(COMMONOBJ) $(STRUCTOBJ) $(ASOBJ) $(EXECOBJ)) +casl2: $(addsuffix .o,casl2 $(COMMONOBJ) $(ASOBJ) $(EXECOBJ)) -comet2: $(addsuffix .o,comet2 $(COMMONOBJ) $(STRUCTOBJ) $(ASOBJ) $(EXECOBJ)) +comet2: $(addsuffix .o,comet2 $(COMMONOBJ) $(ASOBJ) $(EXECOBJ)) dumpword: $(addsuffix .o,dumpword $(COMMONOBJ)) -casl2rev:$(addsuffix .o,casl2rev $(COMMONOBJ) $(STRUCTOBJ) $(ASOBJ) $(EXECOBJ)) +casl2rev:$(addsuffix .o,casl2rev $(COMMONOBJ) $(ASOBJ) $(EXECOBJ)) -comet2monitor:$(addsuffix .o,comet2monitor $(COMMONOBJ) $(STRUCTOBJ) $(ASOBJ) $(EXECOBJ)) +comet2monitor:$(addsuffix .o,comet2monitor $(COMMONOBJ) $(ASOBJ) $(EXECOBJ)) # .dファイルからヘッダファイルの依存関係を取得する # tags、check、clean、.d で終わるターゲットの場合は除く