コマンドファイル共通のヘッダファイル設定をpackage.hに整理
authorj8takagi <j8takagi@nifty.com>
Wed, 20 Jun 2018 14:25:35 +0000 (23:25 +0900)
committerj8takagi <j8takagi@nifty.com>
Wed, 20 Jun 2018 14:25:35 +0000 (23:25 +0900)
.gitignore
Makefile
include/.gitignore [deleted file]
include/package.h [new file with mode: 0644]
include/version.h.version [moved from include/package.h.version with 100% similarity]
src/casl2.c
src/casl2rev.c
src/comet2.c
src/dumpword.c

index dfb9c09..a78ba84 100644 (file)
@@ -6,6 +6,7 @@
 *.o.casl
 !as/sample/hello.o
 !as/sample/sum_10.o
+include/version.h
 *~
 GPATH
 GRTAGS
index 7222401..a1921f4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ VERSIONGITREF := $(shell $(GIT) show-ref -s --tags $(VERSION))
 
 MASTERGITREF := $(shell $(GIT) show-ref -s refs/heads/master)
 
-VERSIONFILES = include/package.h \
+VERSIONFILES = include/version.h \
         test/system/casl2_opt/opt_v/0.txt \
         test/system/comet2_opt/opt_v/0.txt \
         test/system/dumpword/opt_v/0.txt
diff --git a/include/.gitignore b/include/.gitignore
deleted file mode 100644 (file)
index 345821b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-package.h
diff --git a/include/package.h b/include/package.h
new file mode 100644 (file)
index 0000000..2b560c5
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef YACASL2_PACKAGE_H_INCLUDED
+#define YACASL2_PACKAGE_H_INCLUDED
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#define _GNU_SOURCE
+#include <getopt.h>
+#include "cmem.h"
+#include "cerr.h"
+#include "version.h"
+
+#endif
index 6a1d76f..a5943c0 100644 (file)
@@ -1,14 +1,6 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-#define _GNU_SOURCE
-#include <getopt.h>
-
-#include "cmem.h"
-#include "cerr.h"
+#include "package.h"
 #include "assemble.h"
 #include "exec.h"
-#include "package.h"
 
 /**
  * @brief CASL IIのエラーをエラーリストに追加
index c849ecb..38bb16c 100644 (file)
@@ -1,14 +1,5 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-#define _GNU_SOURCE
-#include <getopt.h>
-#include <assert.h>
-
-#include "exec.h"
-#include "cmem.h"
-#include "cerr.h"
 #include "package.h"
+#include "exec.h"
 
 char *grstr(WORD word)
 {
index 42ba4ba..1bef35e 100644 (file)
@@ -1,12 +1,5 @@
-#include <stdio.h>
-#include <stdlib.h>
-#define _GNU_SOURCE
-#include <getopt.h>
-
-#include "exec.h"
-#include "cmem.h"
-#include "cerr.h"
 #include "package.h"
+#include "exec.h"
 
 /**
  * comet2コマンドのオプション
index ad3564e..1fca90e 100644 (file)
@@ -1,10 +1,5 @@
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include "word.h"
-#include "cerr.h"
 #include "package.h"
+#include "word.h"
 
 /**
  * @brief dumpwordコマンドのオプション