From 76af0228dd7661e7ae80ebe688dcbc6f4d91d869 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 29 Dec 2017 15:15:29 -0500 Subject: [PATCH] Corrects longstanding survival of camel case in the analyser's `loadingCommand`. --- Machines/AmstradCPC/AmstradCPC.cpp | 4 ++-- Machines/Commodore/Vic-20/Vic20.cpp | 4 ++-- Machines/Electron/Electron.cpp | 4 ++-- Machines/Oric/Oric.cpp | 4 ++-- Machines/ZX8081/ZX8081.cpp | 4 ++-- StaticAnalyser/Acorn/StaticAnalyser.cpp | 4 ++-- StaticAnalyser/AmstradCPC/StaticAnalyser.cpp | 12 ++++++------ StaticAnalyser/Commodore/StaticAnalyser.cpp | 2 +- StaticAnalyser/MSX/StaticAnalyser.cpp | 6 +++--- StaticAnalyser/Oric/StaticAnalyser.cpp | 2 +- StaticAnalyser/StaticAnalyser.hpp | 2 +- StaticAnalyser/ZX8081/StaticAnalyser.cpp | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Machines/AmstradCPC/AmstradCPC.cpp b/Machines/AmstradCPC/AmstradCPC.cpp index 0bf059704..c666d295c 100644 --- a/Machines/AmstradCPC/AmstradCPC.cpp +++ b/Machines/AmstradCPC/AmstradCPC.cpp @@ -901,8 +901,8 @@ class ConcreteMachine: read_pointers_[3] = roms_[upper_rom_].data(); // Type whatever is required. - if(target.loadingCommand.length()) { - set_typer_for_string(target.loadingCommand.c_str()); + if(target.loading_command.length()) { + set_typer_for_string(target.loading_command.c_str()); } insert_media(target.media); diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 7555ab1c2..6d8e70ceb 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -347,8 +347,8 @@ class ConcreteMachine: } void configure_as_target(const StaticAnalyser::Target &target) override final { - if(target.loadingCommand.length()) { - set_typer_for_string(target.loadingCommand.c_str()); + if(target.loading_command.length()) { + set_typer_for_string(target.loading_command.c_str()); } switch(target.vic20.memory_model) { diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index 7022e7066..ec56ccc1b 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -114,8 +114,8 @@ class ConcreteMachine: } void configure_as_target(const StaticAnalyser::Target &target) override final { - if(target.loadingCommand.length()) { - set_typer_for_string(target.loadingCommand.c_str()); + if(target.loading_command.length()) { + set_typer_for_string(target.loading_command.c_str()); } if(target.acorn.should_shift_restart) { diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index 03f2c48d6..dc07c1e15 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -261,8 +261,8 @@ class ConcreteMachine: microdisc_.set_delegate(this); } - if(target.loadingCommand.length()) { - set_typer_for_string(target.loadingCommand.c_str()); + if(target.loading_command.length()) { + set_typer_for_string(target.loading_command.c_str()); } if(target.oric.use_atmos_rom) { diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index 8f8674c43..34ae4f312 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -278,8 +278,8 @@ template class ConcreteMachine: } Memory::Fuzz(ram_); - if(target.loadingCommand.length()) { - set_typer_for_string(target.loadingCommand.c_str()); + if(target.loading_command.length()) { + set_typer_for_string(target.loading_command.c_str()); } insert_media(target.media); diff --git a/StaticAnalyser/Acorn/StaticAnalyser.cpp b/StaticAnalyser/Acorn/StaticAnalyser.cpp index 8e0cda62d..588ffff42 100644 --- a/StaticAnalyser/Acorn/StaticAnalyser.cpp +++ b/StaticAnalyser/Acorn/StaticAnalyser.cpp @@ -96,7 +96,7 @@ void StaticAnalyser::Acorn::AddTargets(const Media &media, std::list &de // Inspect first file. If it's protected or doesn't look like BASIC // then the loading command is *RUN. Otherwise it's CHAIN"". - target.loadingCommand = is_basic ? "CHAIN\"\"\n" : "*RUN\n"; + target.loading_command = is_basic ? "CHAIN\"\"\n" : "*RUN\n"; target.media.tapes = media.tapes; } @@ -116,7 +116,7 @@ void StaticAnalyser::Acorn::AddTargets(const Media &media, std::list &de if(bootOption != Catalogue::BootOption::None) target.acorn.should_shift_restart = true; else - target.loadingCommand = "*CAT\n"; + target.loading_command = "*CAT\n"; } } diff --git a/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp b/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp index 07a3ee576..ea2f5c1fd 100644 --- a/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp +++ b/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp @@ -95,7 +95,7 @@ static void InspectCatalogue( // If there's just one file, run that. if(candidate_files.size() == 1) { - target.loadingCommand = RunCommandFor(*candidate_files[0]); + target.loading_command = RunCommandFor(*candidate_files[0]); return; } @@ -126,7 +126,7 @@ static void InspectCatalogue( } if(basic_files == 1 || implicit_suffixed_files == 1) { std::size_t selected_file = (basic_files == 1) ? last_basic_file : last_implicit_suffixed_file; - target.loadingCommand = RunCommandFor(*candidate_files[selected_file]); + target.loading_command = RunCommandFor(*candidate_files[selected_file]); return; } @@ -143,14 +143,14 @@ static void InspectCatalogue( if(name_counts.size() == 2) { for(auto &pair : name_counts) { if(pair.second == 1) { - target.loadingCommand = RunCommandFor(*candidate_files[indices_by_name[pair.first]]); + target.loading_command = RunCommandFor(*candidate_files[indices_by_name[pair.first]]); return; } } } // Desperation. - target.loadingCommand = "cat\n"; + target.loading_command = "cat\n"; } static bool CheckBootSector(const std::shared_ptr &disk, StaticAnalyser::Target &target) { @@ -169,7 +169,7 @@ static bool CheckBootSector(const std::shared_ptr &disk, St // This is a system disk, then launch it as though it were CP/M. if(!matched) { - target.loadingCommand = "|cpm\n"; + target.loading_command = "|cpm\n"; return true; } } @@ -191,7 +191,7 @@ void StaticAnalyser::AmstradCPC::AddTargets(const Media &media, std::list string_stream << "1"; } string_stream << "\nRUN\n"; - target.loadingCommand = string_stream.str(); + target.loading_command = string_stream.str(); // make a first guess based on loading address switch(files.front().starting_address) { diff --git a/StaticAnalyser/MSX/StaticAnalyser.cpp b/StaticAnalyser/MSX/StaticAnalyser.cpp index 9fd288813..797007996 100644 --- a/StaticAnalyser/MSX/StaticAnalyser.cpp +++ b/StaticAnalyser/MSX/StaticAnalyser.cpp @@ -61,9 +61,9 @@ void StaticAnalyser::MSX::AddTargets(const Media &media, std::list &dest std::vector files_on_tape = GetFiles(tape); if(!files_on_tape.empty()) { switch(files_on_tape.front().type) { - case File::Type::ASCII: target.loadingCommand = "RUN\"CAS:\n"; break; - case File::Type::TokenisedBASIC: target.loadingCommand = "CLOAD\nRUN\n"; break; - case File::Type::Binary: target.loadingCommand = "BLOAD\"CAS:\",R\n"; break; + case File::Type::ASCII: target.loading_command = "RUN\"CAS:\n"; break; + case File::Type::TokenisedBASIC: target.loading_command = "CLOAD\nRUN\n"; break; + case File::Type::Binary: target.loading_command = "BLOAD\"CAS:\",R\n"; break; default: break; } target.media.tapes.push_back(tape); diff --git a/StaticAnalyser/Oric/StaticAnalyser.cpp b/StaticAnalyser/Oric/StaticAnalyser.cpp index 55b84b267..cfc8b22ac 100644 --- a/StaticAnalyser/Oric/StaticAnalyser.cpp +++ b/StaticAnalyser/Oric/StaticAnalyser.cpp @@ -97,7 +97,7 @@ void StaticAnalyser::Oric::AddTargets(const Media &media, std::list &des } target.media.tapes.push_back(tape); - target.loadingCommand = "CLOAD\"\"\n"; + target.loading_command = "CLOAD\"\"\n"; } } diff --git a/StaticAnalyser/StaticAnalyser.hpp b/StaticAnalyser/StaticAnalyser.hpp index 84f92c0b8..227d982bf 100644 --- a/StaticAnalyser/StaticAnalyser.hpp +++ b/StaticAnalyser/StaticAnalyser.hpp @@ -115,7 +115,7 @@ struct Target { } amstradcpc; }; - std::string loadingCommand; + std::string loading_command; Media media; }; diff --git a/StaticAnalyser/ZX8081/StaticAnalyser.cpp b/StaticAnalyser/ZX8081/StaticAnalyser.cpp index 8a15493f1..02fe4c37f 100644 --- a/StaticAnalyser/ZX8081/StaticAnalyser.cpp +++ b/StaticAnalyser/ZX8081/StaticAnalyser.cpp @@ -56,9 +56,9 @@ void StaticAnalyser::ZX8081::AddTargets(const Media &media, std::list &d // TODO: how to run software once loaded? Might require a BASIC detokeniser. if(target.zx8081.isZX81) { - target.loadingCommand = "J\"\"\n"; + target.loading_command = "J\"\"\n"; } else { - target.loadingCommand = "W\n"; + target.loading_command = "W\n"; } destination.push_back(target);