実行時のエラーを整理
[YACASL2.git] / src / comet2.c
index 3d429d1..af4bfb8 100644 (file)
@@ -21,13 +21,6 @@ static struct option longopts[] = {
     {0, 0, 0, 0},
 };
 
-/**
- * comet2コマンドのエラー
- */
-static CERR cerr_comet2[] = {
-    { 208, "object file is not specified" },
-};
-
 /**
  * comet2コマンドのメイン
  */
@@ -38,7 +31,7 @@ int main(int argc, char *argv[])
     const char *usage = "Usage: %s [-tTdh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE\n";
 
     cerr_init();
-    addcerrlist(ARRAYSIZE(cerr_comet2), cerr_comet2);
+    addcerrlist_load();
     addcerrlist_exec();
 
     /* オプションの処理 */
@@ -69,7 +62,7 @@ int main(int argc, char *argv[])
         }
     }
     if(argv[optind] == NULL) {
-        setcerr(208, NULL);    /* object file is not specified */
+        setcerr(211, NULL);    /* object file not specified */
         fprintf(stderr, "comet2 error - %d: %s\n", cerr->num, cerr->msg);
         exit(-1);
     }