From 18b62c73db9c950d5bec10a77de999a633314c1d Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sun, 24 Nov 2013 13:11:27 -0500 Subject: [PATCH] Replace printf statements with log functions --- src/emuconsole.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/emuconsole.c b/src/emuconsole.c index 79df39a..c068095 100644 --- a/src/emuconsole.c +++ b/src/emuconsole.c @@ -64,7 +64,7 @@ console_exec(char *Address, char *NumberInst) { int NbInst = -1; /* -1 is infinity */ if (strlen(Address) == 0) { - printf("Invalid address\n"); + log_err("Invalid address"); return; } @@ -76,7 +76,7 @@ console_exec(char *Address, char *NumberInst) InitUnixKB(); - printf("Program executing...\n"); + log_info("Program executing..."); do { cpu8051_Exec(); @@ -85,12 +85,12 @@ console_exec(char *Address, char *NumberInst) } while (!IsBreakpoint(cpu8051.pc) && (NbInst != 0) && !kbhit()); if (kbhit()) { (void) getch(); /* Flush key */ - printf("Caught break signal!\n"); + log_info("Caught break signal!"); } if (NbInst == 0) - printf("Number of instructions reached! Stopping!\n"); + log_info("Number of instructions reached! Stopping!"); if (IsBreakpoint(cpu8051.pc)) - printf("Breakpoint hit at %.4X! Stopping!\n", cpu8051.pc); + log_info("Breakpoint hit at %.4X! Stopping!", cpu8051.pc); ResetUnixKB(); } @@ -188,9 +188,9 @@ console_show_registers(void) static void console_reset(void) { - printf("Resetting... "); + log_info("Resetting..."); cpu8051_Reset(); - printf("Done.\n"); + log_info("Done"); console_show_registers(); } -- 2.20.1