X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Fcomet2.c;h=e51b0e0582894781665cd8789f6ed13ac1d4832f;hp=e2a9e3c6ccd23023546536d1197ef24f3802cb0d;hb=3ea92ba68cb320156d5bc7fe92f5e5fa0c150635;hpb=b591284405a5b29213db6250c830e1f63d11a4f0 diff --git a/src/comet2.c b/src/comet2.c index e2a9e3c..e51b0e0 100644 --- a/src/comet2.c +++ b/src/comet2.c @@ -16,7 +16,7 @@ static struct option longopts[] = { }; /* エラー番号とエラーメッセージ */ -CERRARRAY cerr[] = { +CERRARRAY cerr_comet2[] = { { 201, "Load object file - full of COMET II memory" }, { 202, "SVC input - out of Input memory" }, { 203, "SVC output - out of COMET II memory" }, @@ -24,7 +24,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 }, }; /* 指定されたファイルからアセンブル結果を読込 */ @@ -52,14 +51,14 @@ int main(int argc, char *argv[]) while((opt = getopt_long(argc, argv, "tTdM:C:h", longopts, NULL)) != -1) { switch(opt) { case 't': - (&execmode)->trace = true; + execmode.trace = true; break; case 'T': - (&execmode)->trace = true; - (&execmode)->logical = true; + execmode.trace = true; + execmode.logical = true; break; case 'd': - (&execmode)->dump = true; + execmode.dump = true; break; case 'M': memsize = atoi(optarg); @@ -75,6 +74,8 @@ int main(int argc, char *argv[]) exit(-1); } } + /* エラーリストにerr_comet2を追加 */ + addcerrlist(ARRAYSIZE(cerr_comet2), cerr_comet2); reset(); startptr = 0; if(loadassemble(argv[optind]) == true) {