From 438deab9daf76511105c8730b4c7f3c4ffccc13f Mon Sep 17 00:00:00 2001 From: gambas Date: Wed, 20 Oct 2021 14:17:22 +0200 Subject: [PATCH] The '!' command does not write on the standard output anymore, but now works like the '?' command. [GB.DEBUG] * NEW: The '!' command does not write on the standard output anymore, but now works like the '?' command. --- main/lib/debug/debug.c | 12 ++++++------ main/lib/debug/print.c | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/main/lib/debug/debug.c b/main/lib/debug/debug.c index 6fbe0f157..34eb4e272 100644 --- a/main/lib/debug/debug.c +++ b/main/lib/debug/debug.c @@ -788,21 +788,22 @@ static void command_eval(char *cmd) init_eval_interface(); - out = *cmd == '!' ? stdout : _out; + //out = *cmd == '!' ? stdout : _out; + out = _out; len = strlen(cmd); for (start = 0; start < len; start++) { if (cmd[start] == '\t') break; - if (*cmd != '!') + //if (*cmd != '!') fputc(cmd[start], _out); } if (start >= len) return; - if (*cmd != '!') + //if (*cmd != '!') fprintf(_out, "\t"); GB_DEBUG.SaveError(&save_error, &save_last); @@ -813,7 +814,7 @@ static void command_eval(char *cmd) if (EVAL.Compile(expr, *cmd == '=')) { - if (*cmd != '!') + //if (*cmd != '!') fprintf(_out, "!"); fputs(expr->error, out); goto __END; @@ -867,8 +868,7 @@ static void command_eval(char *cmd) __ERROR: - if (*cmd != '!') - fprintf(out, "!"); + fprintf(out, "!"); fputs(GB_DEBUG.GetErrorMessage(), out); __END: diff --git a/main/lib/debug/print.c b/main/lib/debug/print.c index ec3f1208a..6d510108f 100644 --- a/main/lib/debug/print.c +++ b/main/lib/debug/print.c @@ -302,7 +302,8 @@ void PRINT_value(FILE *where, VALUE *value, bool format) else { GB_DEBUG.ToString((GB_VALUE *)value, &pval, &lpval); - fwrite(pval, sizeof(char), lpval, where); + print_string(pval, lpval); + //fwrite(pval, sizeof(char), lpval, where); } }