X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcasl2.c;h=75902c33fa7b2a3c51a702cab5cdde7c43c94499;hb=c8548a1d9afb3c175d824d5024d2288941829180;hp=14f372cf4b575f2068b31bc9e8e9ff4d62415606;hpb=a639337a9aa30a059c1695ab1701b8714fd26193;p=YACASL2.git diff --git a/src/casl2.c b/src/casl2.c index 14f372c..75902c3 100644 --- a/src/casl2.c +++ b/src/casl2.c @@ -37,6 +37,14 @@ CERR cerr_casl2[] = { { 126, "no source file" }, }; +/** + * CASL IIのエラーをエラーリストに追加 + */ +void addcerrlist_casl2() +{ + addcerrlist(ARRAYSIZE(cerr_casl2), cerr_casl2); +} + /** * アセンブル結果を書き込むファイルの名前 */ @@ -61,7 +69,7 @@ int main(int argc, char *argv[]) "Usage: %s [-slLaAtTdh] [-oO[]] [-M ] [-C ] FILE1[ FILE2 ...]\n"; cerr_init(); - addcerrlist(ARRAYSIZE(cerr_casl2), cerr_casl2); + addcerrlist_casl2(); addcerrlist_assemble(); addcerrlist_exec(); /* オプションの処理 */ @@ -127,7 +135,7 @@ int main(int argc, char *argv[]) for(pass = FIRST; pass <= SECOND; pass++) { if(pass == FIRST) { create_cmdtype_code(); /* 命令の名前とタイプがキーのハッシュ表を作成 */ - asptr = malloc_chk(sizeof(asptr), "asptr"); /* アセンブル時のプロパティ用の領域確保 */ + asptr = malloc_chk(sizeof(ASPTR), "asptr"); /* アセンブル時のプロパティ用の領域確保 */ } for(i = optind; i < argc; i++) { /* データの格納開始位置 */