This commit is contained in:
2026-05-23 11:18:34 +03:00
parent 8fb8851c72
commit a304f330fb
2 changed files with 1 additions and 43 deletions

View File

@@ -326,48 +326,6 @@ public:
if (!std::regex_match(buffer, headerRx)) {
nskip = 0;
}
// auto lines = std::views::split(buffer, DEFAULT_RECORD_DELIMITER);
// if (std::ranges::distance(lines.begin(), lines.end()) >= 5) {
// bool head_exists = true;
// std::vector<std::string_view> tl;
// for (auto const& l : lines) { // lines must start with COMMENT_SEQ
// tl.emplace_back(mcc::utils::trimSpaces(l));
// if (tl.back().size() >= COMMENT_SEQ.size()) {
// auto found = std::ranges::search(tl.back(), COMMENT_SEQ);
// if (tl.back().begin() != found.begin()) {
// head_exists = false;
// break;
// }
// } else {
// head_exists = false;
// break;
// }
// }
// if (head_exists) {
// // the first and last lines must contain only a comment sequence and possible spaces
// if (tl[0].size() != COMMENT_SEQ.size() || tl[3].size() != COMMENT_SEQ.size()) {
// head_exists = false;
// } else {
// if (tl[1] != "# ASTROSIB FM-700 MOUNT CONFIGURATION") {
// head_exists = false;
// } else {
// std::regex rx{
// "# \\(created at "
// "20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9] "
// "UTC\\)"};
// if (!std::regex_match(std::string{tl[2]}, rx)) {
// head_exists = false;
// }
// }
// }
// }
// if (!head_exists) { // delete the first N lines
// nskip = 0;
// }
// }
ec = base_t::fromCharRange(buffer, nskip);
if (!ec) {
// remove possible spaces in filenames

View File

@@ -40,7 +40,7 @@ int main(int argc, char* argv[])
asibfm700::Asibfm700MountConfig mount_cfg;
asibfm700::Asibfm700MountConfiguration cfg;
cfg.dumpDefaultsToFile("eecc.cfg");
// cfg.dumpDefaultsToFile("eecc.cfg");
cfg.load("eecc.cfg");
cfg.save("eecc.cfg1");