From 2275447be6316579d5daf8dea0dff55da53578d4 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sun, 26 May 2024 13:37:25 +0300 Subject: Fix newlines in logging, drop puts usage --- emulator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emulator.cpp b/emulator.cpp index 7dab3af..3cd96e9 100644 --- a/emulator.cpp +++ b/emulator.cpp @@ -526,7 +526,7 @@ static int emulator(M68KDebuggingControl& m68k_debug, Graphics& graphics, CharDe RunSingleVideoCycle(m68k_debug, graphics); if (m68k_debug.HasBreakpoint()) { m68k_debug.SetRunning(false); - puts("ResetPendingBreakpoint"); + printf("ResetPendingBreakpoint\n"); m68k_debug.ResetPendingBreakpoint(); } } else { @@ -543,7 +543,7 @@ static int emulator(M68KDebuggingControl& m68k_debug, Graphics& graphics, CharDe close(socket_fd); return EXIT_FAILURE; } - puts("Connection accepted"); + printf("Connection accepted\n"); // Set O_NONBLOCK for connection const int ret = SetNonblock(conn_fd); if (ret == -1) { @@ -558,7 +558,7 @@ static int emulator(M68KDebuggingControl& m68k_debug, Graphics& graphics, CharDe ParseAndReact(conn_fd, exchange_ctx, m68k_debug, msg_buf, read_size); continue; } else if (read_size == 0) { - puts("Client disconnected"); + printf("Client disconnected\n"); break; } else if (read_size == -1 && err != EWOULDBLOCK) { perror("Recv failed"); @@ -568,7 +568,7 @@ static int emulator(M68KDebuggingControl& m68k_debug, Graphics& graphics, CharDe RunSingleVideoCycle(m68k_debug, graphics); if (m68k_debug.HasBreakpoint()) { m68k_debug.SetRunning(false); - printf("ResetPendingBreakpoint"); + printf("ResetPendingBreakpoint\n"); m68k_debug.ResetPendingBreakpoint(); const auto response = exchange_ctx.WrapDataToSend("S05"); -- cgit v1.2.3