コマンドファイル共通のヘッダファイル設定をpackage.hに整理
[YACASL2.git] / src / comet2.c
index 36060d3..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コマンドのオプション
@@ -24,7 +17,12 @@ static struct option longopts[] = {
 };
 
 /**
- * comet2コマンドのメイン
+ * @brief comet2コマンドのメイン
+ *
+ * @return 正常終了時は0、異常終了時は1
+ *
+ * @param argc コマンドライン引数の数
+ * @param *argv[] コマンドライン引数の配列
  */
 int main(int argc, char *argv[])
 {
@@ -80,7 +78,7 @@ int main(int argc, char *argv[])
     }
     /* COMET II仮想マシンのシャットダウン */
     shutdown();
-    stat = (cerr->num == 0) ? 0 : -1;
+    stat = (cerr->num == 0) ? 0 : 1;
     /* エラーの解放 */
     freecerr();
     return stat;