X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Fcasl2.c;h=9753c8361c8cd872e38f5e93d176b52c14452232;hp=03c61fc47cab12660682e77c95c2f4b0193a1a1f;hb=3ea92ba68cb320156d5bc7fe92f5e5fa0c150635;hpb=b591284405a5b29213db6250c830e1f63d11a4f0 diff --git a/src/casl2.c b/src/casl2.c index 03c61fc..9753c83 100644 --- a/src/casl2.c +++ b/src/casl2.c @@ -24,7 +24,7 @@ static struct option longopts[] = { }; /* エラー番号とエラーメッセージ */ -CERRARRAY cerr[] = { +CERRARRAY cerr_casl2[] = { { 101, "label already defined" }, { 102, "label table is full" }, { 103, "label not found" }, @@ -58,7 +58,6 @@ CERRARRAY cerr[] = { { 205, "Stack Pointer (SP) - cannot allocate stack buffer" }, { 206, "Address - out of COMET II memory" }, { 207, "Stack Pointer (SP) - out of COMET II memory" }, - { 0, NULL }, }; /* 指定されたファイルにアセンブル結果を書込 */ @@ -145,6 +144,8 @@ int main(int argc, char *argv[]) exit(-1); } } + /* エラーリストにerr_casl2を追加 */ + addcerrlist(ARRAYSIZE(cerr_casl2), cerr_casl2); /* ソースファイルが指定されていない場合は終了 */ if(argv[optind] == NULL) { setcerr(126, NULL); /* source file is not specified */ @@ -196,6 +197,6 @@ int main(int argc, char *argv[]) } return 0; casl2err: - fprintf(stderr, "Casl2 error - %d: %s\n", cerrno, cerrmsg); + fprintf(stderr, "CASL2 error - %d: %s\n", cerrno, cerrmsg); exit(-1); }