-static struct option longopts[] =
-{
- {"source", no_argument, NULL, 's'},
- {"label", no_argument, NULL, 'l'},
- {"labelonly", no_argument, NULL, 'L'},
- {"assembledetail", no_argument, NULL, 'a'},
- {"assembledetailonly", no_argument, NULL, 'A'},
- {"assembleout", optional_argument, NULL, 'o'},
- {"assembleoutonly", optional_argument, NULL, 'O'},
- {"trace", no_argument, NULL, 't'},
- {"tracearithmetic", no_argument, NULL, 't'},
- {"tracelogical", no_argument, NULL, 'T'},
- {"dump", no_argument, NULL, 'd'},
- {"memorysize", required_argument, NULL, 'M'},
- {"clocks", required_argument, NULL, 'C'},
- {"help", no_argument, NULL, 'h'},
- {0, 0, 0, 0},
+#include "cmem.h"
+#include "cerr.h"
+#include "assemble.h"
+#include "exec.h"
+#include "package.h"
+
+/**
+ * @brief CASL IIのエラーをエラーリストに追加
+ *
+ * @return なし
+ */
+void addcerrlist_casl2();
+
+/**
+ * @brief アセンブル結果を書き込むファイルの名前
+ *
+ * @return ファイル名
+ *
+ * @param *str ファイル名
+ */
+const char *objfile_name(const char *str);
+
+/**
+ * @brief 指定された1つまたは複数のファイルを2回アセンブル
+ *
+ * @return なし
+ *
+ * @param filec アセンブルするファイルの数
+ * @param filev アセンブルするファイル名の配列
+ */
+void assemble(int filec, char *filev[]);
+
+/**
+ * @brief casl2コマンドのオプション
+ */
+static struct option longopts[] = {
+ { "source", no_argument, NULL, 's' },
+ { "label", no_argument, NULL, 'l' },
+ { "labelonly", no_argument, NULL, 'L' },
+ { "assembledetail", no_argument, NULL, 'a' },
+ { "assembledetailonly", no_argument, NULL, 'A' },
+ { "assembleout", optional_argument, NULL, 'o' },
+ { "assembleoutonly", optional_argument, NULL, 'O' },
+ { "trace", no_argument, NULL, 't' },
+ { "tracearithmetic", no_argument, NULL, 't' },
+ { "tracelogical", no_argument, NULL, 'T' },
+ { "dump", no_argument, NULL, 'd' },
+ { "memorysize", required_argument, NULL, 'M' },
+ { "clocks", required_argument, NULL, 'C' },
+ { "version", no_argument, NULL, 'v' },
+ { "help", no_argument, NULL, 'h' },
+ { 0, 0, 0, 0 },