From b76bfedf4bdbdc52dcfcaad7b060901439b7ef66 Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 14 Aug 2022 05:26:56 -0700 Subject: [PATCH] Remove unnecessary linefeeds from log To remove blank lines in the dingusppc.log file or in the console output when -d is used. --- cpu/ppc/ppcexec.cpp | 8 ++++---- cpu/ppc/ppcmmu.cpp | 22 +++++++++++----------- cpu/ppc/ppcopcodes.cpp | 8 ++++---- devices/common/nvram.cpp | 2 +- devices/common/pci/bandit.cpp | 8 ++++---- devices/common/viacuda.cpp | 4 ++-- devices/floppy/floppyimg.cpp | 2 +- devices/ioctrl/heathrow.cpp | 22 +++++++++++----------- devices/memctrl/mpc106.cpp | 18 +++++++++--------- devices/sound/awacs.cpp | 2 +- devices/video/videoctrl.cpp | 6 +++--- machines/machinecatalyst.cpp | 2 +- machines/machinefactory.cpp | 6 +++--- machines/machinegossamer.cpp | 2 +- machines/machinepdm.cpp | 6 +++--- machines/machinetnt.cpp | 2 +- thirdparty/loguru/loguru.cpp | 2 +- 17 files changed, 61 insertions(+), 61 deletions(-) diff --git a/cpu/ppc/ppcexec.cpp b/cpu/ppc/ppcexec.cpp index bb7d7af..570c380 100644 --- a/cpu/ppc/ppcexec.cpp +++ b/cpu/ppc/ppcexec.cpp @@ -191,7 +191,7 @@ void ppc_opcode19() { #ifdef EXHAUSTIVE_DEBUG uint32_t regrab = (uint32_t)subop_grab; - LOG_F(INFO, "Executing Opcode 19 table subopcode entry \n", regrab); + LOG_F(INFO, "Executing Opcode 19 table subopcode entry", regrab); #endif // EXHAUSTIVE_DEBUG if (subop_grab == 32) { @@ -251,7 +251,7 @@ void ppc_opcode31() { oe_flag = ppc_cur_instruction & 0x400; #ifdef EXHAUSTIVE_DEBUG - LOG_F(INFO, "Executing Opcode 31 table subopcode entry %n \n", (uint32_t)subop_grab); + LOG_F(INFO, "Executing Opcode 31 table subopcode entry %n", (uint32_t)subop_grab); #endif // EXHAUSTIVE_DEBUG SubOpcode31Grabber[subop_grab](); @@ -261,7 +261,7 @@ void ppc_opcode59() { uint16_t subop_grab = (ppc_cur_instruction >> 1) & 0x1F; rc_flag = ppc_cur_instruction & 1; #ifdef EXHAUSTIVE_DEBUG - LOG_F(INFO, "Executing Opcode 59 table subopcode entry %n \n", (uint32_t)subop_grab); + LOG_F(INFO, "Executing Opcode 59 table subopcode entry %n", (uint32_t)subop_grab); #endif // EXHAUSTIVE_DEBUG SubOpcode59Grabber[subop_grab](); } @@ -270,7 +270,7 @@ void ppc_opcode63() { uint16_t subop_grab = (ppc_cur_instruction >> 1) & 0x3FF; rc_flag = ppc_cur_instruction & 1; #ifdef EXHAUSTIVE_DEBUG - LOG_F(INFO, "Executing Opcode 63 table subopcode entry %n \n", (uint32_t)subop_grab); + LOG_F(INFO, "Executing Opcode 63 table subopcode entry %n", (uint32_t)subop_grab); #endif // EXHAUSTIVE_DEBUG SubOpcode63Grabber[subop_grab](); } diff --git a/cpu/ppc/ppcmmu.cpp b/cpu/ppc/ppcmmu.cpp index f61b4a5..dc29fb6 100644 --- a/cpu/ppc/ppcmmu.cpp +++ b/cpu/ppc/ppcmmu.cpp @@ -615,7 +615,7 @@ static TLBEntry* dtlb2_refill(uint32_t guest_va, int is_write) } return tlb_entry; } else { - LOG_F(WARNING, "Access to unmapped physical memory, phys_addr=0x%08X\n", phys_addr); + LOG_F(WARNING, "Access to unmapped physical memory, phys_addr=0x%08X", phys_addr); return &UnmappedMem; } } @@ -947,7 +947,7 @@ void mmu_pat_ctx_changed() void mmu_print_regs() { LOG_SCOPE_FUNCTION(INFO); - LOG_F(INFO, "MSR = 0x%X\n", ppc_state.msr); + LOG_F(INFO, "MSR = 0x%X", ppc_state.msr); LOG_F(INFO, "BAT registers:"); @@ -966,7 +966,7 @@ void mmu_print_regs() } LOG_F(INFO, ""); - LOG_F(INFO, "SDR1 = 0x%X\n", ppc_state.spr[SPR::SDR1]); + LOG_F(INFO, "SDR1 = 0x%X", ppc_state.spr[SPR::SDR1]); LOG_F(INFO, "Segment registers:"); for (int i = 0; i < 16; i++) { @@ -1372,7 +1372,7 @@ static inline T read_phys_mem(AddressMapEntry *mru_rgn, uint32_t addr) if (entry) { *mru_rgn = *entry; } else { - LOG_F(ERROR, "Read from unmapped memory at 0x%08X!\n", addr); + LOG_F(ERROR, "Read from unmapped memory at 0x%08X!", addr); return (-1ULL ? sizeof(T) == 8 : -1UL); } } @@ -1402,7 +1402,7 @@ static inline T read_phys_mem(AddressMapEntry *mru_rgn, uint32_t addr) return READ_QWORD_BE_A(mru_rgn->mem_ptr + (addr - mru_rgn->start)); } default: - LOG_F(ERROR, "READ_PHYS: invalid size %lu passed\n", sizeof(T)); + LOG_F(ERROR, "READ_PHYS: invalid size %lu passed", sizeof(T)); return (-1ULL ? sizeof(T) == 8 : -1UL); } } else if (mru_rgn->type & RT_MMIO) { @@ -1413,7 +1413,7 @@ static inline T read_phys_mem(AddressMapEntry *mru_rgn, uint32_t addr) return (mru_rgn->devobj->read(mru_rgn->start, addr - mru_rgn->start, sizeof(T))); } else { - LOG_F(ERROR, "READ_PHYS: invalid region type!\n"); + LOG_F(ERROR, "READ_PHYS: invalid region type!"); return (-1ULL ? sizeof(T) == 8 : -1UL); } } @@ -1426,7 +1426,7 @@ static inline void write_phys_mem(AddressMapEntry *mru_rgn, uint32_t addr, T val if (entry) { *mru_rgn = *entry; } else { - LOG_F(ERROR, "Write to unmapped memory at 0x%08X!\n", addr); + LOG_F(ERROR, "Write to unmapped memory at 0x%08X!", addr); return; } } @@ -1460,7 +1460,7 @@ static inline void write_phys_mem(AddressMapEntry *mru_rgn, uint32_t addr, T val } break; default: - LOG_F(ERROR, "WRITE_PHYS: invalid size %lu passed\n", sizeof(T)); + LOG_F(ERROR, "WRITE_PHYS: invalid size %lu passed", sizeof(T)); return; } } else if (mru_rgn->type & RT_MMIO) { @@ -1471,7 +1471,7 @@ static inline void write_phys_mem(AddressMapEntry *mru_rgn, uint32_t addr, T val mru_rgn->devobj->write(mru_rgn->start, addr - mru_rgn->start, value, sizeof(T)); } else { - LOG_F(ERROR, "WRITE_PHYS: invalid region type!\n"); + LOG_F(ERROR, "WRITE_PHYS: invalid region type!"); } } @@ -1525,7 +1525,7 @@ static uint32_t ppc_mmu_addr_translate(uint32_t la, int is_write) static void mem_write_unaligned(uint32_t addr, uint32_t value, uint32_t size) { #ifdef MMU_DEBUG - LOG_F(WARNING, "Attempt to write unaligned %d bytes to 0x%08X\n", size, addr); + LOG_F(WARNING, "Attempt to write unaligned %d bytes to 0x%08X", size, addr); #endif if (((addr & 0xFFF) + size) > 0x1000) { @@ -1627,7 +1627,7 @@ static uint32_t mem_grab_unaligned(uint32_t addr, uint32_t size) { uint32_t ret = 0; #ifdef MMU_DEBUG - LOG_F(WARNING, "Attempt to read unaligned %d bytes from 0x%08X\n", size, addr); + LOG_F(WARNING, "Attempt to read unaligned %d bytes from 0x%08X", size, addr); #endif if (((addr & 0xFFF) + size) > 0x1000) { diff --git a/cpu/ppc/ppcopcodes.cpp b/cpu/ppc/ppcopcodes.cpp index 6612a8d..556cc209 100644 --- a/cpu/ppc/ppcopcodes.cpp +++ b/cpu/ppc/ppcopcodes.cpp @@ -1199,7 +1199,7 @@ void dppc_interpreter::ppc_bclrl() { void dppc_interpreter::ppc_cmp() { #ifdef CHECK_INVALID if (ppc_cur_instruction & 0x200000) { - LOG_F(WARNING, "Invalid CMP instruction form (L=1)!\n"); + LOG_F(WARNING, "Invalid CMP instruction form (L=1)!"); return; } #endif @@ -1216,7 +1216,7 @@ void dppc_interpreter::ppc_cmp() { void dppc_interpreter::ppc_cmpi() { #ifdef CHECK_INVALID if (ppc_cur_instruction & 0x200000) { - LOG_F(WARNING, "Invalid CMPI instruction form (L=1)!\n"); + LOG_F(WARNING, "Invalid CMPI instruction form (L=1)!"); return; } #endif @@ -1233,7 +1233,7 @@ void dppc_interpreter::ppc_cmpi() { void dppc_interpreter::ppc_cmpl() { #ifdef CHECK_INVALID if (ppc_cur_instruction & 0x200000) { - LOG_F(WARNING, "Invalid CMPL instruction form (L=1)!\n"); + LOG_F(WARNING, "Invalid CMPL instruction form (L=1)!"); return; } #endif @@ -1250,7 +1250,7 @@ void dppc_interpreter::ppc_cmpl() { void dppc_interpreter::ppc_cmpli() { #ifdef CHECK_INVALID if (ppc_cur_instruction & 0x200000) { - LOG_F(WARNING, "Invalid CMPLI instruction form (L=1)!\n"); + LOG_F(WARNING, "Invalid CMPLI instruction form (L=1)!"); return; } #endif diff --git a/devices/common/nvram.cpp b/devices/common/nvram.cpp index 648adbb..0186c0e 100644 --- a/devices/common/nvram.cpp +++ b/devices/common/nvram.cpp @@ -75,7 +75,7 @@ void NVram::init() { !f.read((char*)&data_size, sizeof(data_size)) || memcmp(sig, NVRAM_FILE_ID, sizeof(NVRAM_FILE_ID)) || data_size != this->ram_size || !f.read((char*)this->storage, this->ram_size)) { - LOG_F(WARNING, "Could not restore NVRAM content from the given file. \n"); + LOG_F(WARNING, "Could not restore NVRAM content from the given file."); memset(this->storage, 0, sizeof(this->ram_size)); } diff --git a/devices/common/pci/bandit.cpp b/devices/common/pci/bandit.cpp index d468764..9ecc6b6 100644 --- a/devices/common/pci/bandit.cpp +++ b/devices/common/pci/bandit.cpp @@ -131,7 +131,7 @@ uint32_t Bandit::read(uint32_t reg_start, uint32_t offset, int size) } else { LOG_F( ERROR, - "%s err: read attempt from non-existing PCI device %d \n", + "%s err: read attempt from non-existing PCI device %d", this->name.c_str(), idsel); result = 0; @@ -187,7 +187,7 @@ void Bandit::write(uint32_t reg_start, uint32_t offset, uint32_t value, int size } else { LOG_F( ERROR, - "%s err: write attempt to non-existing PCI device %d \n", + "%s err: write attempt to non-existing PCI device %d", this->name.c_str(), idsel); } @@ -269,7 +269,7 @@ uint32_t Chaos::read(uint32_t reg_start, uint32_t offset, int size) } else { LOG_F( ERROR, - "%s err: read attempt from non-existing VCI device %d \n", + "%s err: read attempt from non-existing VCI device %d", this->name.c_str(), idsel); result = 0; @@ -312,7 +312,7 @@ void Chaos::write(uint32_t reg_start, uint32_t offset, uint32_t value, int size) } else { LOG_F( ERROR, - "%s err: write attempt to non-existing VCI device %d \n", + "%s err: write attempt to non-existing VCI device %d", this->name.c_str(), idsel); } diff --git a/devices/common/viacuda.cpp b/devices/common/viacuda.cpp index 90c1fc4..95032d7 100644 --- a/devices/common/viacuda.cpp +++ b/devices/common/viacuda.cpp @@ -435,7 +435,7 @@ void ViaCuda::process_packet() { switch (this->in_buf[0]) { case CUDA_PKT_ADB: - LOG_F(9, "Cuda: ADB packet received \n"); + LOG_F(9, "Cuda: ADB packet received"); process_adb_command(this->in_buf[1], this->in_count - 2); break; case CUDA_PKT_PSEUDO: @@ -624,7 +624,7 @@ void ViaCuda::pseudo_command(int cmd, int data_count) { case CUDA_MONO_STABLE_RESET: case CUDA_RESTART_SYSTEM: /* really kludge temp code */ - LOG_F(INFO, "Cuda: Restart/Shutdown signal sent with command 0x%x! \n", cmd); + LOG_F(INFO, "Cuda: Restart/Shutdown signal sent with command 0x%x!", cmd); //exit(0); break; default: diff --git a/devices/floppy/floppyimg.cpp b/devices/floppy/floppyimg.cpp index 9a0d2d5..47e1db3 100644 --- a/devices/floppy/floppyimg.cpp +++ b/devices/floppy/floppyimg.cpp @@ -242,7 +242,7 @@ FloppyImgConverter* open_floppy_image(std::string& img_path) break; case FlopImgType::WOZ1: case FlopImgType::WOZ2: - LOG_F(INFO, "WOZ v%s image\n", (itype == FlopImgType::WOZ2) ? "2" : "1"); + LOG_F(INFO, "WOZ v%s image", (itype == FlopImgType::WOZ2) ? "2" : "1"); break; default: LOG_F(ERROR, "Unknown/unsupported image format!"); diff --git a/devices/ioctrl/heathrow.cpp b/devices/ioctrl/heathrow.cpp index fe46207..ea98d80 100644 --- a/devices/ioctrl/heathrow.cpp +++ b/devices/ioctrl/heathrow.cpp @@ -131,7 +131,7 @@ void HeathrowIC::dma_write(uint32_t offset, uint32_t value, int size) { uint32_t HeathrowIC::read(uint32_t reg_start, uint32_t offset, int size) { uint32_t res = 0; - LOG_F(9, "%s: reading from offset %x \n", this->name.c_str(), offset); + LOG_F(9, "%s: reading from offset %x", this->name.c_str(), offset); unsigned sub_addr = (offset >> 12) & 0x7F; @@ -165,7 +165,7 @@ uint32_t HeathrowIC::read(uint32_t reg_start, uint32_t offset, int size) { if (sub_addr >= 0x60) { res = this->nvram->read_byte((offset - 0x60000) >> 4); } else { - LOG_F(WARNING, "Attempting to read unmapped I/O space: %x \n", offset); + LOG_F(WARNING, "Attempting to read unmapped I/O space: %x", offset); } } @@ -173,7 +173,7 @@ uint32_t HeathrowIC::read(uint32_t reg_start, uint32_t offset, int size) { } void HeathrowIC::write(uint32_t reg_start, uint32_t offset, uint32_t value, int size) { - LOG_F(9, "%s: writing to offset %x \n", this->name.c_str(), offset); + LOG_F(9, "%s: writing to offset %x", this->name.c_str(), offset); unsigned sub_addr = (offset >> 12) & 0x7F; @@ -210,7 +210,7 @@ void HeathrowIC::write(uint32_t reg_start, uint32_t offset, uint32_t value, int if (sub_addr >= 0x60) { this->nvram->write_byte((offset - 0x60000) >> 4, value); } else { - LOG_F(WARNING, "Attempting to write to unmapped I/O space: %x \n", offset); + LOG_F(WARNING, "Attempting to write to unmapped I/O space: %x", offset); } } } @@ -238,16 +238,16 @@ uint32_t HeathrowIC::mio_ctrl_read(uint32_t offset, int size) { res = this->int_levels1; break; case MIO_HEAT_ID: - LOG_F(9, "read from MIO:ID register at Address %x \n", ppc_state.pc); + LOG_F(9, "read from MIO:ID register at Address %x", ppc_state.pc); res = (this->fp_id << 24) | (this->mon_id << 16) | (this->mb_id << 8) | (this->cpu_id | (this->emmo_pin << 4)); break; case MIO_HEAT_FEAT_CTRL: - LOG_F(9, "read from MIO:Feat_Ctrl register \n"); + LOG_F(9, "read from MIO:Feat_Ctrl register"); res = this->feat_ctrl; break; default: - LOG_F(WARNING, "read from unknown MIO register at %x \n", offset); + LOG_F(WARNING, "read from unknown MIO register at %x", offset); break; } @@ -279,24 +279,24 @@ void HeathrowIC::mio_ctrl_write(uint32_t offset, uint32_t value, int size) { } break; case MIO_HEAT_ID: - LOG_F(WARNING, "Attempted to write %x to MIO:ID at %x; Address : %x \n", value, offset, ppc_state.pc); + LOG_F(WARNING, "Attempted to write %x to MIO:ID at %x; Address : %x", value, offset, ppc_state.pc); break; case MIO_HEAT_FEAT_CTRL: this->feature_control(BYTESWAP_32(value)); break; case 0x3C: - LOG_F(9, "write %x to MIO:Aux_Ctrl register \n", value); + LOG_F(9, "write %x to MIO:Aux_Ctrl register", value); this->aux_ctrl = value; break; default: - LOG_F(WARNING, "write %x to unknown MIO register at %x \n", value, offset); + LOG_F(WARNING, "write %x to unknown MIO register at %x", value, offset); break; } } void HeathrowIC::feature_control(const uint32_t value) { - LOG_F(9, "write %x to MIO:Feat_Ctrl register \n", value); + LOG_F(9, "write %x to MIO:Feat_Ctrl register", value); this->feat_ctrl = value; diff --git a/devices/memctrl/mpc106.cpp b/devices/memctrl/mpc106.cpp index 014284b..14e8e91 100644 --- a/devices/memctrl/mpc106.cpp +++ b/devices/memctrl/mpc106.cpp @@ -107,7 +107,7 @@ uint32_t MPC106::pci_read(uint32_t size) { if (bus_num) { LOG_F( ERROR, - "%s err: read attempt from non-local PCI bus, config_addr = %x \n", + "%s err: read attempt from non-local PCI bus, config_addr = %x", this->name.c_str(), this->config_addr); return 0; @@ -125,7 +125,7 @@ uint32_t MPC106::pci_read(uint32_t size) { } else { LOG_F( ERROR, - "%s err: read attempt from non-existing PCI device %d \n", + "%s err: read attempt from non-existing PCI device %d", this->name.c_str(), dev_num); return 0; @@ -142,7 +142,7 @@ void MPC106::pci_write(uint32_t value, uint32_t size) { if (bus_num) { LOG_F( ERROR, - "%s err: write attempt to non-local PCI bus, config_addr = %x \n", + "%s err: write attempt to non-local PCI bus, config_addr = %x", this->name.c_str(), this->config_addr); return; @@ -160,7 +160,7 @@ void MPC106::pci_write(uint32_t value, uint32_t size) { } else { LOG_F( ERROR, - "%s err: write attempt to non-existing PCI device %d \n", + "%s err: write attempt to non-existing PCI device %d", this->name.c_str(), dev_num); } @@ -169,7 +169,7 @@ void MPC106::pci_write(uint32_t value, uint32_t size) { uint32_t MPC106::pci_cfg_read(uint32_t reg_offs, uint32_t size) { #ifdef MPC106_DEBUG - LOG_F(9, "read from Grackle register %08X\n", reg_offs); + LOG_F(9, "read from Grackle register %08X", reg_offs); #endif if (reg_offs < 64) { @@ -181,7 +181,7 @@ uint32_t MPC106::pci_cfg_read(uint32_t reg_offs, uint32_t size) { void MPC106::pci_cfg_write(uint32_t reg_offs, uint32_t value, uint32_t size) { #ifdef MPC106_DEBUG - LOG_F(9, "write %08X to Grackle register %08X\n", value, reg_offs); + LOG_F(9, "write %08X to Grackle register %08X", value, reg_offs); #endif if (reg_offs < 64) { @@ -195,7 +195,7 @@ void MPC106::pci_cfg_write(uint32_t reg_offs, uint32_t value, uint32_t size) { if (this->my_pci_cfg_hdr[0xF2] & 8) { #ifdef MPC106_DEBUG - LOG_F(9, "MPC106: MCCR1[MEMGO] was set! \n"); + LOG_F(9, "MPC106: MCCR1[MEMGO] was set!"); #endif setup_ram(); } @@ -225,13 +225,13 @@ void MPC106::setup_ram() { bank_end = (((ext_mem_end >> bank * 8) & 3) << 30) | (((mem_end >> bank * 8) & 0xFF) << 20) | 0xFFFFFUL; if (bank && bank_start != ram_size) - LOG_F(WARNING, "MPC106: RAM not contiguous! \n"); + LOG_F(WARNING, "MPC106: RAM not contiguous!"); ram_size += bank_end - bank_start + 1; } } if (!this->add_ram_region(0, ram_size)) { - LOG_F(ERROR, "MPC106 RAM allocation failed! \n"); + LOG_F(ERROR, "MPC106 RAM allocation failed!"); } } diff --git a/devices/sound/awacs.cpp b/devices/sound/awacs.cpp index e49b8df..fa6c825 100644 --- a/devices/sound/awacs.cpp +++ b/devices/sound/awacs.cpp @@ -156,7 +156,7 @@ void AwacsScreamer::snd_ctrl_write(uint32_t offset, uint32_t value, int size) subframe = (value >> 14) & 3; reg_num = (value >> 20) & 7; data = ((value >> 8) & 0xF00) | ((value >> 24) & 0xFF); - LOG_F(9, "Screamer subframe = %d, reg = %d, data = %08X\n", + LOG_F(9, "Screamer subframe = %d, reg = %d, data = %08X", subframe, reg_num, data); if (!subframe) this->control_regs[reg_num] = data; diff --git a/devices/video/videoctrl.cpp b/devices/video/videoctrl.cpp index e7f93f5..fd7a561 100644 --- a/devices/video/videoctrl.cpp +++ b/devices/video/videoctrl.cpp @@ -46,12 +46,12 @@ VideoCtrlBase::VideoCtrlBase(int width, int height) ); if (this->display_wnd == NULL) { - LOG_F(ERROR, "Display: SDL_CreateWindow failed with %s\n", SDL_GetError()); + LOG_F(ERROR, "Display: SDL_CreateWindow failed with %s", SDL_GetError()); } this->renderer = SDL_CreateRenderer(this->display_wnd, -1, SDL_RENDERER_ACCELERATED); if (this->renderer == NULL) { - LOG_F(ERROR, "Display: SDL_CreateRenderer failed with %s\n", SDL_GetError()); + LOG_F(ERROR, "Display: SDL_CreateRenderer failed with %s", SDL_GetError()); } SDL_SetRenderDrawColor(this->renderer, 0, 0, 0, 255); @@ -73,7 +73,7 @@ VideoCtrlBase::VideoCtrlBase(int width, int height) ); if (this->disp_texture == NULL) { - LOG_F(ERROR, "Display: SDL_CreateTexture failed with %s\n", SDL_GetError()); + LOG_F(ERROR, "Display: SDL_CreateTexture failed with %s", SDL_GetError()); } } diff --git a/machines/machinecatalyst.cpp b/machines/machinecatalyst.cpp index e0a0292..ae0ddf7 100644 --- a/machines/machinecatalyst.cpp +++ b/machines/machinecatalyst.cpp @@ -49,7 +49,7 @@ int initialize_catalyst(std::string& id) // allocate ROM region if (!platinum_obj->add_rom_region(0xFFC00000, 0x400000)) { - LOG_F(ERROR, "Could not allocate ROM region!\n"); + LOG_F(ERROR, "Could not allocate ROM region!"); return -1; } diff --git a/machines/machinefactory.cpp b/machines/machinefactory.cpp index 3914156..2db5586 100644 --- a/machines/machinefactory.cpp +++ b/machines/machinefactory.cpp @@ -141,11 +141,11 @@ int MachineFactory::create(string& mach_id) // post-initialize all devices if (gMachineObj->postinit_devices()) { - LOG_F(ERROR, "Could not post-initialize devices!\n"); + LOG_F(ERROR, "Could not post-initialize devices!"); return -1; } - LOG_F(INFO, "Initialization completed.\n"); + LOG_F(INFO, "Initialization completed."); return 0; } @@ -302,7 +302,7 @@ string MachineFactory::machine_name_from_rom(string& rom_filepath) { rom_id = (rom_id_str[5] << 24) | (rom_id_str[6] << 16) | (rom_id_str[7] << 8) | rom_id_str[8]; - LOG_F(INFO, "The machine is identified as... %s\n", + LOG_F(INFO, "The machine is identified as... %s", std::get<1>(rom_identity.at(rom_id))); machine_name = std::get<0>(rom_identity.at(rom_id)); diff --git a/machines/machinegossamer.cpp b/machines/machinegossamer.cpp index 453855d..646508e 100644 --- a/machines/machinegossamer.cpp +++ b/machines/machinegossamer.cpp @@ -71,7 +71,7 @@ int initialize_gossamer(std::string& id) // allocate ROM region if (!grackle_obj->add_rom_region(0xFFC00000, 0x400000)) { - LOG_F(ERROR, "Could not allocate ROM region!\n"); + LOG_F(ERROR, "Could not allocate ROM region!"); return -1; } diff --git a/machines/machinepdm.cpp b/machines/machinepdm.cpp index 237820a..3681e57 100644 --- a/machines/machinepdm.cpp +++ b/machines/machinepdm.cpp @@ -62,19 +62,19 @@ int initialize_pdm(std::string& id) // allocate ROM region if (!hmc_obj->add_rom_region(0x40000000, 0x400000)) { - LOG_F(ERROR, "Could not allocate ROM region!\n"); + LOG_F(ERROR, "Could not allocate ROM region!"); return -1; } // mirror ROM to 0xFFC00000 for a PowerPC CPU to start if (!hmc_obj->add_mem_mirror(0xFFC00000, 0x40000000)) { - LOG_F(ERROR, "Could not create ROM mirror!\n"); + LOG_F(ERROR, "Could not create ROM mirror!"); return -1; } // add 8MB of soldered on-board RAM if (!hmc_obj->add_ram_region(0x00000000, 0x800000)) { - LOG_F(ERROR, "Could not allocate built-in RAM region!\n"); + LOG_F(ERROR, "Could not allocate built-in RAM region!"); return -1; } diff --git a/machines/machinetnt.cpp b/machines/machinetnt.cpp index a6c7a0e..64407f6 100644 --- a/machines/machinetnt.cpp +++ b/machines/machinetnt.cpp @@ -56,7 +56,7 @@ int initialize_tnt(std::string& id) // allocate ROM region if (!memctrl_obj->add_rom_region(0xFFC00000, 0x400000)) { - LOG_F(ERROR, "Could not allocate ROM region!\n"); + LOG_F(ERROR, "Could not allocate ROM region!"); return -1; } diff --git a/thirdparty/loguru/loguru.cpp b/thirdparty/loguru/loguru.cpp index a852bb7..c363830 100644 --- a/thirdparty/loguru/loguru.cpp +++ b/thirdparty/loguru/loguru.cpp @@ -1248,7 +1248,7 @@ namespace loguru if (message.verbosity == Verbosity_FATAL) { auto st = loguru::stacktrace(stack_trace_skip + 2); if (!st.empty()) { - RAW_LOG_F(ERROR, "Stack trace:\n" LOGURU_FMT(s) "", st.c_str()); + RAW_LOG_F(ERROR, "Stack trace:" LOGURU_FMT(s) "", st.c_str()); } auto ec = loguru::get_error_context();