From: j8takagi Date: Wed, 27 Feb 2019 07:58:38 +0000 (+0900) Subject: MacOSXの動作に合わせた修正 X-Git-Tag: v0.5p9~3 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfade80c2fe2185948e3bb5626e9b1aa92d5bf11;p=YACASL2.git MacOSXの動作に合わせた修正 --- diff --git a/src/monitor.c b/src/monitor.c index 4fc26e7..d923771 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -396,11 +396,11 @@ void monitor() fprintf(stdout, "%s ", monitor_prompt); buf = malloc_chk(MONINSIZE + 1, "monitor.buf"); fgets(buf, MONINSIZE, stdin); - fprintf(stdout, "%s", buf); if(!buf[0]) { cmdtype = MONQUIT; } strip_end(buf); /* 文字列末尾の改行と空白を削除 */ + fprintf(stdout, "%s\n", buf); if((moncmdl = monlinetok(buf)) != NULL) { cmdtype = monitorcmd(moncmdl->cmd, moncmdl->args); free_moncmdline(moncmdl); diff --git a/src/struct.c b/src/struct.c index bb482f8..1058567 100644 --- a/src/struct.c +++ b/src/struct.c @@ -70,7 +70,7 @@ enum { /** * ハッシュ表 */ -static CMDTAB *cmdtab[HASH_MAX][CMDTABSIZE] = {NULL}; +static CMDTAB *cmdtab[HASH_MAX][CMDTABSIZE] = {{NULL}}; /** * 命令の名前とタイプからハッシュ値を生成する diff --git a/test/system/comet2_smoke/direct/create_a b/test/system/comet2_smoke/direct/create_a index 5cf95fd..d3bf023 100755 Binary files a/test/system/comet2_smoke/direct/create_a and b/test/system/comet2_smoke/direct/create_a differ diff --git a/test/system/comet2_smoke/direct/create_a.c b/test/system/comet2_smoke/direct/create_a.c index 021e430..43c9b99 100644 --- a/test/system/comet2_smoke/direct/create_a.c +++ b/test/system/comet2_smoke/direct/create_a.c @@ -18,6 +18,5 @@ int main() } fwrite(w, sizeof(WORD), ARRAYSIZE(w), fp); fclose(fp); - FREE(fp); return 0; } diff --git a/test/system/comet2monitor/break_help/0.txt b/test/system/comet2monitor/break_help/0.txt index c600c86..69132ee 100644 --- a/test/system/comet2monitor/break_help/0.txt +++ b/test/system/comet2monitor/break_help/0.txt @@ -5,4 +5,4 @@ breakpoint manipulate: b[reak] d[el]
b[reak] l[ist] b[reak] r[eset] -(comet2 monitor) \ No newline at end of file +(comet2 monitor) diff --git a/test/system/comet2monitor/break_help_2/0.txt b/test/system/comet2monitor/break_help_2/0.txt index a4c6974..61ebc52 100644 --- a/test/system/comet2monitor/break_help_2/0.txt +++ b/test/system/comet2monitor/break_help_2/0.txt @@ -5,4 +5,5 @@ breakpoint manipulate: b[reak] d[el]
b[reak] l[ist] b[reak] r[eset] -(comet2 monitor) 1: ignored. +(comet2 monitor) +1: ignored. diff --git a/test/system/comet2monitor/dump_0/0.txt b/test/system/comet2monitor/dump_0/0.txt index 0e8b09b..8bdd4d6 100644 --- a/test/system/comet2monitor/dump_0/0.txt +++ b/test/system/comet2monitor/dump_0/0.txt @@ -7,4 +7,4 @@ COMET II machine code monitor. Type ? for help. #0000: 0010: 1120 0018 7120 7110 8100 0001 000A 0001 0000 0000 0000 0000 0000 0000 0000 0000 #0000: 0020: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 #0000: 0030: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -(comet2 monitor) \ No newline at end of file +(comet2 monitor) diff --git a/test/system/comet2monitor/dump_1/0.txt b/test/system/comet2monitor/dump_1/0.txt index dcc5141..f5ac5ab 100644 --- a/test/system/comet2monitor/dump_1/0.txt +++ b/test/system/comet2monitor/dump_1/0.txt @@ -7,4 +7,4 @@ COMET II machine code monitor. Type ? for help. #0000: 0010: 1120 0018 7120 7110 8100 0001 000A 0001 0000 0000 0000 0000 0000 0000 0000 0000 #0000: 0020: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 #0000: 0030: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -(comet2 monitor) \ No newline at end of file +(comet2 monitor) diff --git a/test/system/comet2monitor/dump_2/0.txt b/test/system/comet2monitor/dump_2/0.txt index f805a00..bc88ef4 100644 --- a/test/system/comet2monitor/dump_2/0.txt +++ b/test/system/comet2monitor/dump_2/0.txt @@ -5,4 +5,4 @@ COMET II machine code monitor. Type ? for help. ------------------------------------------------------------------------------------- #0000: 0000: 7001 0000 7002 0000 3622 1010 0015 2621 2210 0017 4110 0016 6500 0010 6400 0007 #0000: 0010: 1120 0018 7120 7110 8100 0001 000A 0001 0000 0000 0000 0000 0000 0000 0000 0000 -(comet2 monitor) \ No newline at end of file +(comet2 monitor) diff --git a/test/system/comet2monitor/dump_3/0.txt b/test/system/comet2monitor/dump_3/0.txt index 4e9d74a..ee76e21 100644 --- a/test/system/comet2monitor/dump_3/0.txt +++ b/test/system/comet2monitor/dump_3/0.txt @@ -5,4 +5,5 @@ COMET II machine code monitor. Type ? for help. ------------------------------------------------------------------------------------- #0000: 0000: 7001 0000 7002 0000 3622 1010 0015 2621 2210 0017 4110 0016 6500 0010 6400 0007 #0000: 0010: 1120 0018 7120 7110 8100 0001 000A 0001 0000 0000 0000 0000 0000 0000 0000 0000 -(comet2 monitor) #40: ignored. +(comet2 monitor) +#40: ignored. diff --git a/test/system/comet2monitor/dump_plus/0.txt b/test/system/comet2monitor/dump_plus/0.txt index 5a86a4c..79bdbf8 100644 --- a/test/system/comet2monitor/dump_plus/0.txt +++ b/test/system/comet2monitor/dump_plus/0.txt @@ -5,4 +5,4 @@ COMET II machine code monitor. Type ? for help. ------------------------------------------------------------------------------------- #0000: 0000: 7001 0000 7002 0000 3622 1010 0015 2621 2210 0017 4110 0016 6500 0010 6400 0007 #0000: 0010: 1120 0018 7120 7110 8100 0001 000A 0001 0000 0000 0000 0000 0000 0000 0000 0000 -(comet2 monitor) \ No newline at end of file +(comet2 monitor) diff --git a/test/system/comet2monitor/help/0.txt b/test/system/comet2monitor/help/0.txt index cae706c..ed17f9f 100644 --- a/test/system/comet2monitor/help/0.txt +++ b/test/system/comet2monitor/help/0.txt @@ -12,4 +12,4 @@ s[ave] -- Save object from the memory to a file. `s[ave] [