diff --git a/Editor/ProjectModel.cpp b/Editor/ProjectModel.cpp index 40686f5..de7234d 100644 --- a/Editor/ProjectModel.cpp +++ b/Editor/ProjectModel.cpp @@ -655,7 +655,7 @@ void ProjectModel::importSongsData(const QString& path) amuse::SongConverter::SongToMIDI(song.second.m_data.get(), version, isBig); if (!midiData.empty()) { - QFileInfo fi(m_dir, SysStringToQString(song.first + _S(".mid"))); + QFileInfo fi(m_dir, SysStringToQString(song.first + _SYS_STR(".mid"))); QFile f(fi.filePath()); if (f.open(QFile::WriteOnly)) { diff --git a/Editor/main.cpp b/Editor/main.cpp index 872f567..aad53d8 100644 --- a/Editor/main.cpp +++ b/Editor/main.cpp @@ -45,9 +45,9 @@ public: EPlatformType getPlatformType() const { return EPlatformType::Qt; } int run() { return 0; } - boo::SystemStringView getUniqueName() const { return _S("amuse-gui"sv); } - boo::SystemStringView getFriendlyName() const { return _S("Amuse"sv); } - boo::SystemStringView getProcessName() const { return _S("amuse-gui"sv); } + boo::SystemStringView getUniqueName() const { return _SYS_STR("amuse-gui"sv); } + boo::SystemStringView getFriendlyName() const { return _SYS_STR("Amuse"sv); } + boo::SystemStringView getProcessName() const { return _SYS_STR("amuse-gui"sv); } const std::vector& getArgs() const { return m_args; } /* Constructors/initializers for sub-objects */ diff --git a/driver/amuseconv.cpp b/driver/amuseconv.cpp index 74b2f8e..7a904ba 100644 --- a/driver/amuseconv.cpp +++ b/driver/amuseconv.cpp @@ -19,14 +19,14 @@ static void ReportConvType(ConvType tp) switch (tp) { case ConvN64: - Log.report(logvisor::Info, _S("using N64 format")); + Log.report(logvisor::Info, _SYS_STR("using N64 format")); break; case ConvPC: - Log.report(logvisor::Info, _S("using PC format")); + Log.report(logvisor::Info, _SYS_STR("using PC format")); break; case ConvGCN: default: - Log.report(logvisor::Info, _S("using GameCube format")); + Log.report(logvisor::Info, _SYS_STR("using GameCube format")); break; } } @@ -43,19 +43,19 @@ static bool ExtractAudioGroup(amuse::SystemStringView inPath, amuse::SystemStrin if (groups.size()) { - Log.report(logvisor::Info, _S("Found '%s'"), amuse::ContainerRegistry::TypeToName(type)); + Log.report(logvisor::Info, _SYS_STR("Found '%s'"), amuse::ContainerRegistry::TypeToName(type)); amuse::Mkdir(targetPath.data(), 0755); - Log.report(logvisor::Info, _S("Established directory at %s"), targetPath.data()); + Log.report(logvisor::Info, _SYS_STR("Established directory at %s"), targetPath.data()); for (auto& group : groups) { - Log.report(logvisor::Info, _S("Extracting %s"), group.first.c_str()); + Log.report(logvisor::Info, _SYS_STR("Extracting %s"), group.first.c_str()); } } auto songs = amuse::ContainerRegistry::LoadSongs(inPath.data()); - amuse::SystemString songsDir = amuse::SystemString(targetPath) + _S("/midifiles"); + amuse::SystemString songsDir = amuse::SystemString(targetPath) + _SYS_STR("/midifiles"); bool madeDir = false; for (auto& pair : songs) { @@ -66,11 +66,11 @@ static bool ExtractAudioGroup(amuse::SystemStringView inPath, amuse::SystemStrin madeDir = true; } - amuse::SystemString songPath = songsDir + _S('/') + pair.first + _S(".mid"); - FILE* fp = amuse::FOpen(songPath.c_str(), _S("wb")); + amuse::SystemString songPath = songsDir + _SYS_STR('/') + pair.first + _SYS_STR(".mid"); + FILE* fp = amuse::FOpen(songPath.c_str(), _SYS_STR("wb")); if (fp) { - Log.report(logvisor::Info, _S("Extracting %s"), pair.first.c_str()); + Log.report(logvisor::Info, _SYS_STR("Extracting %s"), pair.first.c_str()); int extractedVersion; bool isBig; std::vector mid = @@ -85,7 +85,7 @@ static bool ExtractAudioGroup(amuse::SystemStringView inPath, amuse::SystemStrin static bool BuildSNG(amuse::SystemStringView inPath, amuse::SystemStringView targetPath, int version, bool big) { - FILE* fp = amuse::FOpen(inPath.data(), _S("rb")); + FILE* fp = amuse::FOpen(inPath.data(), _SYS_STR("rb")); if (!fp) return false; @@ -100,7 +100,7 @@ static bool BuildSNG(amuse::SystemStringView inPath, amuse::SystemStringView tar if (out.empty()) return false; - fp = amuse::FOpen(targetPath.data(), _S("wb")); + fp = amuse::FOpen(targetPath.data(), _SYS_STR("wb")); fwrite(out.data(), 1, out.size(), fp); fclose(fp); @@ -109,7 +109,7 @@ static bool BuildSNG(amuse::SystemStringView inPath, amuse::SystemStringView tar static bool ExtractSNG(amuse::SystemStringView inPath, amuse::SystemStringView targetPath) { - FILE* fp = amuse::FOpen(inPath.data(), _S("rb")); + FILE* fp = amuse::FOpen(inPath.data(), _SYS_STR("rb")); if (!fp) return false; @@ -126,7 +126,7 @@ static bool ExtractSNG(amuse::SystemStringView inPath, amuse::SystemStringView t if (out.empty()) return false; - fp = amuse::FOpen(targetPath.data(), _S("wb")); + fp = amuse::FOpen(targetPath.data(), _SYS_STR("wb")); fwrite(out.data(), 1, out.size(), fp); fclose(fp); @@ -150,35 +150,35 @@ int main(int argc, const amuse::SystemChar** argv) ConvType type = ConvGCN; if (argc >= 4) { - if (!amuse::CompareCaseInsensitive(argv[3], _S("n64"))) + if (!amuse::CompareCaseInsensitive(argv[3], _SYS_STR("n64"))) type = ConvN64; - else if (!amuse::CompareCaseInsensitive(argv[3], _S("gcn"))) + else if (!amuse::CompareCaseInsensitive(argv[3], _SYS_STR("gcn"))) type = ConvGCN; - else if (!amuse::CompareCaseInsensitive(argv[3], _S("pc"))) + else if (!amuse::CompareCaseInsensitive(argv[3], _SYS_STR("pc"))) type = ConvPC; else { - Log.report(logvisor::Error, _S("unrecognized format: %s"), argv[3]); + Log.report(logvisor::Error, _SYS_STR("unrecognized format: %s"), argv[3]); return 1; } } bool good = false; - FILE* fin = amuse::FOpen(argv[1], _S("rb")); + FILE* fin = amuse::FOpen(argv[1], _SYS_STR("rb")); if (fin) { fclose(fin); amuse::SystemString barePath(argv[1]); - size_t dotPos = barePath.rfind(_S('.')); + size_t dotPos = barePath.rfind(_SYS_STR('.')); const amuse::SystemChar* dot = barePath.c_str() + dotPos; if (dotPos != amuse::SystemString::npos) { - if (!amuse::CompareCaseInsensitive(dot, _S(".mid")) || !amuse::CompareCaseInsensitive(dot, _S(".midi"))) + if (!amuse::CompareCaseInsensitive(dot, _SYS_STR(".mid")) || !amuse::CompareCaseInsensitive(dot, _SYS_STR(".midi"))) { ReportConvType(type); good = BuildSNG(barePath, argv[2], 1, true); } - else if (!amuse::CompareCaseInsensitive(dot, _S(".son")) || !amuse::CompareCaseInsensitive(dot, _S(".sng"))) + else if (!amuse::CompareCaseInsensitive(dot, _SYS_STR(".son")) || !amuse::CompareCaseInsensitive(dot, _SYS_STR(".sng"))) { good = ExtractSNG(argv[1], argv[2]); } @@ -194,8 +194,8 @@ int main(int argc, const amuse::SystemChar** argv) if (!amuse::Stat(argv[1], &theStat) && S_ISDIR(theStat.st_mode)) { amuse::SystemString projectPath(argv[1]); - projectPath += _S("/project.yaml"); - fin = amuse::FOpen(projectPath.c_str(), _S("rb")); + projectPath += _SYS_STR("/project.yaml"); + fin = amuse::FOpen(projectPath.c_str(), _SYS_STR("rb")); if (fin) { fclose(fin); @@ -207,7 +207,7 @@ int main(int argc, const amuse::SystemChar** argv) if (!good) { - Log.report(logvisor::Error, _S("unable to convert %s to %s"), argv[1], argv[2]); + Log.report(logvisor::Error, _SYS_STR("unable to convert %s to %s"), argv[1], argv[2]); return 1; } diff --git a/driver/amuseplay.cpp b/driver/amuseplay.cpp index 7aeac2a..8572eae 100644 --- a/driver/amuseplay.cpp +++ b/driver/amuseplay.cpp @@ -624,7 +624,7 @@ struct AppCallback : boo::IApplicationCallback int appMain(boo::IApplication* app) { /* Event window */ - m_win = app->newWindow(_S("amuseplay")); + m_win = app->newWindow(_SYS_STR("amuseplay")); m_win->setCallback(&m_events); m_win->setWindowFrame(100, 100, 100, 100); m_win->setStyle(~boo::EWindowStyle::Resize); @@ -653,7 +653,7 @@ struct AppCallback : boo::IApplicationCallback Log.report(logvisor::Error, "invalid/no data at path argument"); return 1; } - Log.report(logvisor::Info, _S("Found '%s' Audio Group data"), amuse::ContainerRegistry::TypeToName(cType)); + Log.report(logvisor::Info, _SYS_STR("Found '%s' Audio Group data"), amuse::ContainerRegistry::TypeToName(cType)); std::vector> data = amuse::ContainerRegistry::LoadContainer(m_argv[1]); @@ -755,7 +755,7 @@ struct AppCallback : boo::IApplicationCallback break; } } - amuse::Printf(_S(" %d %s (Group %d, Setup %d)\n"), idx++, pair.first.c_str(), grpId, + amuse::Printf(_SYS_STR(" %d %s (Group %d, Setup %d)\n"), idx++, pair.first.c_str(), grpId, setupId); } @@ -825,12 +825,12 @@ struct AppCallback : boo::IApplicationCallback printf("Multiple Audio Groups discovered:\n"); for (const auto& pair : allSFXGroups) { - amuse::Printf(_S(" %d %s (SFXGroup) %" PRISize " sfx-entries\n"), pair.first.id, + amuse::Printf(_SYS_STR(" %d %s (SFXGroup) %" PRISize " sfx-entries\n"), pair.first.id, pair.second.first->first.c_str(), pair.second.second->m_sfxEntries.size()); } for (const auto& pair : allSongGroups) { - amuse::Printf(_S(" %d %s (SongGroup) %" PRISize " normal-pages, %" PRISize + amuse::Printf(_SYS_STR(" %d %s (SongGroup) %" PRISize " normal-pages, %" PRISize " drum-pages, %" PRISize " MIDI-setups\n"), pair.first.id, pair.second.first->first.c_str(), pair.second.second->m_normPages.size(), pair.second.second->m_drumPages.size(), pair.second.second->m_midiSetups.size()); @@ -1034,7 +1034,7 @@ int main(int argc, const boo::SystemChar** argv) logvisor::RegisterStandardExceptions(); AppCallback app(argc, argv); int ret = boo::ApplicationRun(boo::IApplication::EPlatformType::Auto, app, - _S("amuseplay"), _S("Amuse Player"), + _SYS_STR("amuseplay"), _SYS_STR("Amuse Player"), argc, argv, {}, 1, 1, false); printf("IM DYING!!\n"); return ret; diff --git a/driver/amuserender.cpp b/driver/amuserender.cpp index c9ae093..362ac92 100644 --- a/driver/amuserender.cpp +++ b/driver/amuserender.cpp @@ -186,7 +186,7 @@ int main(int argc, const boo::SystemChar** argv) Log.report(logvisor::Error, "invalid/no data at path argument"); return 1; } - Log.report(logvisor::Info, _S("Found '%s' Audio Group data"), amuse::ContainerRegistry::TypeToName(cType)); + Log.report(logvisor::Info, _SYS_STR("Found '%s' Audio Group data"), amuse::ContainerRegistry::TypeToName(cType)); std::vector> data = amuse::ContainerRegistry::LoadContainer(m_args[0].c_str()); @@ -290,7 +290,7 @@ int main(int argc, const boo::SystemChar** argv) break; } } - amuse::Printf(_S(" %d %s (Group %d, Setup %d)\n"), idx++, pair.first.c_str(), grpId, setupId); + amuse::Printf(_SYS_STR(" %d %s (Group %d, Setup %d)\n"), idx++, pair.first.c_str(), grpId, setupId); } int userSel = 0; @@ -370,12 +370,12 @@ int main(int argc, const boo::SystemChar** argv) printf("Multiple Audio Groups discovered:\n"); for (const auto& pair : allSFXGroups) { - amuse::Printf(_S(" %d %s (SFXGroup) %" PRISize " sfx-entries\n"), pair.first, + amuse::Printf(_SYS_STR(" %d %s (SFXGroup) %" PRISize " sfx-entries\n"), pair.first, pair.second.first->first.c_str(), pair.second.second->m_sfxEntries.size()); } for (const auto& pair : allSongGroups) { - amuse::Printf(_S(" %d %s (SongGroup) %" PRISize " normal-pages, %" PRISize " drum-pages, %" PRISize + amuse::Printf(_SYS_STR(" %d %s (SongGroup) %" PRISize " normal-pages, %" PRISize " drum-pages, %" PRISize " MIDI-setups\n"), pair.first, pair.second.first->first.c_str(), pair.second.second->m_normPages.size(), pair.second.second->m_drumPages.size(), pair.second.second->m_midiSetups.size()); @@ -490,8 +490,8 @@ int main(int argc, const boo::SystemChar** argv) /* WAV out path */ amuse::SystemChar pathOut[1024]; - SNPrintf(pathOut, 1024, _S("%s-%s.wav"), m_groupName->c_str(), m_songName->c_str()); - Log.report(logvisor::Info, _S("Writing to %s"), pathOut); + SNPrintf(pathOut, 1024, _SYS_STR("%s-%s.wav"), m_groupName->c_str(), m_songName->c_str()); + Log.report(logvisor::Info, _SYS_STR("Writing to %s"), pathOut); /* Build voice engine */ std::unique_ptr voxEngine = boo::NewWAVAudioVoiceEngine(pathOut, rate, chCount); diff --git a/include/amuse/Common.hpp b/include/amuse/Common.hpp index bc1f666..064d38b 100644 --- a/include/amuse/Common.hpp +++ b/include/amuse/Common.hpp @@ -269,8 +269,8 @@ inline typename std::enable_if_t, ObjToken> Mak using SystemString = std::wstring; using SystemStringView = std::wstring_view; using SystemChar = wchar_t; -#ifndef _S -#define _S(val) L##val +#ifndef _SYS_STR +#define _SYS_STR(val) L##val #endif typedef struct _stat Sstat; static inline int Mkdir(const wchar_t* path, int) { return _wmkdir(path); } @@ -279,8 +279,8 @@ static inline int Stat(const wchar_t* path, Sstat* statout) { return _wstat(path using SystemString = std::string; using SystemStringView = std::string_view; using SystemChar = char; -#ifndef _S -#define _S(val) val +#ifndef _SYS_STR +#define _SYS_STR(val) val #endif typedef struct stat Sstat; static inline int Mkdir(const char* path, mode_t mode) { return mkdir(path, mode); } diff --git a/lib/AudioGroup.cpp b/lib/AudioGroup.cpp index 9e5c926..00eedb7 100644 --- a/lib/AudioGroup.cpp +++ b/lib/AudioGroup.cpp @@ -45,10 +45,10 @@ const SampleEntry* AudioGroup::getSample(SampleId sfxId) const SystemString AudioGroup::getSampleBasePath(SampleId sfxId) const { #if _WIN32 - return m_groupPath + _S('/') + + return m_groupPath + _SYS_STR('/') + athena::utility::utf8ToWide(SampleId::CurNameDB->resolveNameFromId(sfxId)); #else - return m_groupPath + _S('/') + + return m_groupPath + _SYS_STR('/') + SampleId::CurNameDB->resolveNameFromId(sfxId).data(); #endif } @@ -112,24 +112,24 @@ void AudioGroupDatabase::renameSample(SampleId id, std::string_view str) SystemString oldBasePath = getSampleBasePath(id); SampleId::CurNameDB->rename(id, str); SystemString newBasePath = getSampleBasePath(id); - Rename((oldBasePath + _S(".wav")).c_str(), (newBasePath + _S(".wav")).c_str()); - Rename((oldBasePath + _S(".dsp")).c_str(), (newBasePath + _S(".dsp")).c_str()); - Rename((oldBasePath + _S(".vadpcm")).c_str(), (newBasePath + _S(".vadpcm")).c_str()); + Rename((oldBasePath + _SYS_STR(".wav")).c_str(), (newBasePath + _SYS_STR(".wav")).c_str()); + Rename((oldBasePath + _SYS_STR(".dsp")).c_str(), (newBasePath + _SYS_STR(".dsp")).c_str()); + Rename((oldBasePath + _SYS_STR(".vadpcm")).c_str(), (newBasePath + _SYS_STR(".vadpcm")).c_str()); } void AudioGroupDatabase::deleteSample(SampleId id) { SystemString basePath = getSampleBasePath(id); - Unlink((basePath + _S(".wav")).c_str()); - Unlink((basePath + _S(".dsp")).c_str()); - Unlink((basePath + _S(".vadpcm")).c_str()); + Unlink((basePath + _SYS_STR(".wav")).c_str()); + Unlink((basePath + _SYS_STR(".dsp")).c_str()); + Unlink((basePath + _SYS_STR(".vadpcm")).c_str()); } void AudioGroupDatabase::copySampleInto(const SystemString& basePath, const SystemString& newBasePath) { - Copy((basePath + _S(".wav")).c_str(), (newBasePath + _S(".wav")).c_str()); - Copy((basePath + _S(".dsp")).c_str(), (newBasePath + _S(".dsp")).c_str()); - Copy((basePath + _S(".vadpcm")).c_str(), (newBasePath + _S(".vadpcm")).c_str()); + Copy((basePath + _SYS_STR(".wav")).c_str(), (newBasePath + _SYS_STR(".wav")).c_str()); + Copy((basePath + _SYS_STR(".dsp")).c_str(), (newBasePath + _SYS_STR(".dsp")).c_str()); + Copy((basePath + _SYS_STR(".vadpcm")).c_str(), (newBasePath + _SYS_STR(".vadpcm")).c_str()); } void AudioGroupDatabase::_recursiveRenameMacro(SoundMacroId id, std::string_view str, int& macroIdx, diff --git a/lib/AudioGroupPool.cpp b/lib/AudioGroupPool.cpp index f8e2547..e96dce5 100644 --- a/lib/AudioGroupPool.cpp +++ b/lib/AudioGroupPool.cpp @@ -233,7 +233,7 @@ AudioGroupPool AudioGroupPool::CreateAudioGroupPool(SystemStringView groupPath) { AudioGroupPool ret; SystemString poolPath(groupPath); - poolPath += _S("/!pool.yaml"); + poolPath += _SYS_STR("/!pool.yaml"); athena::io::FileReader fi(poolPath, 32 * 1024, false); if (!fi.hasError()) diff --git a/lib/AudioGroupProject.cpp b/lib/AudioGroupProject.cpp index cffba0e..898969c 100644 --- a/lib/AudioGroupProject.cpp +++ b/lib/AudioGroupProject.cpp @@ -422,7 +422,7 @@ AudioGroupProject AudioGroupProject::CreateAudioGroupProject(SystemStringView gr { AudioGroupProject ret; SystemString projPath(groupPath); - projPath += _S("/!project.yaml"); + projPath += _SYS_STR("/!project.yaml"); athena::io::FileReader fi(projPath, 32 * 1024, false); if (!fi.hasError()) diff --git a/lib/AudioGroupSampleDirectory.cpp b/lib/AudioGroupSampleDirectory.cpp index 3019cdd..30b7a0c 100644 --- a/lib/AudioGroupSampleDirectory.cpp +++ b/lib/AudioGroupSampleDirectory.cpp @@ -284,9 +284,9 @@ void AudioGroupSampleDirectory::EntryData::loadLooseWAV(SystemStringView wavPath void AudioGroupSampleDirectory::Entry::loadLooseData(SystemStringView basePath) { - SystemString wavPath = SystemString(basePath) + _S(".wav"); - SystemString dspPath = SystemString(basePath) + _S(".dsp"); - SystemString vadpcmPath = SystemString(basePath) + _S(".vadpcm"); + SystemString wavPath = SystemString(basePath) + _SYS_STR(".wav"); + SystemString dspPath = SystemString(basePath) + _SYS_STR(".dsp"); + SystemString vadpcmPath = SystemString(basePath) + _SYS_STR(".vadpcm"); Sstat wavStat, dspStat, vadpcmStat; bool wavValid = !Stat(wavPath.c_str(), &wavStat) && S_ISREG(wavStat.st_mode); bool dspValid = !Stat(dspPath.c_str(), &dspStat) && S_ISREG(dspStat.st_mode); @@ -338,9 +338,9 @@ void AudioGroupSampleDirectory::Entry::loadLooseData(SystemStringView basePath) SampleFileState AudioGroupSampleDirectory::Entry::getFileState(SystemStringView basePath, SystemString* pathOut) const { - SystemString wavPath = SystemString(basePath) + _S(".wav"); - SystemString dspPath = SystemString(basePath) + _S(".dsp"); - SystemString vadpcmPath = SystemString(basePath) + _S(".vadpcm"); + SystemString wavPath = SystemString(basePath) + _SYS_STR(".wav"); + SystemString dspPath = SystemString(basePath) + _SYS_STR(".dsp"); + SystemString vadpcmPath = SystemString(basePath) + _SYS_STR(".vadpcm"); Sstat wavStat, dspStat, vadpcmStat; bool wavValid = !Stat(wavPath.c_str(), &wavStat) && S_ISREG(wavStat.st_mode); bool dspValid = !Stat(dspPath.c_str(), &dspStat) && S_ISREG(dspStat.st_mode); @@ -623,9 +623,9 @@ static void SetAudioFileTime(const SystemString& path, const Sstat& stat) void AudioGroupSampleDirectory::Entry::patchSampleMetadata(SystemStringView basePath) const { - SystemString wavPath = SystemString(basePath) + _S(".wav"); - SystemString dspPath = SystemString(basePath) + _S(".dsp"); - SystemString vadpcmPath = SystemString(basePath) + _S(".vadpcm"); + SystemString wavPath = SystemString(basePath) + _SYS_STR(".wav"); + SystemString dspPath = SystemString(basePath) + _SYS_STR(".dsp"); + SystemString vadpcmPath = SystemString(basePath) + _SYS_STR(".vadpcm"); Sstat wavStat, dspStat, vadpcmStat; bool wavValid = !Stat(wavPath.c_str(), &wavStat) && S_ISREG(wavStat.st_mode); bool dspValid = !Stat(dspPath.c_str(), &dspStat) && S_ISREG(dspStat.st_mode); @@ -663,14 +663,14 @@ AudioGroupSampleDirectory AudioGroupSampleDirectory::CreateAudioGroupSampleDirec continue; SystemString baseName; SystemString basePath; - if (!CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _S(".dsp")) || - !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _S(".wav"))) + if (!CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _SYS_STR(".dsp")) || + !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _SYS_STR(".wav"))) { baseName = SystemString(ent.m_name.begin(), ent.m_name.begin() + ent.m_name.size() - 4); basePath = SystemString(ent.m_path.begin(), ent.m_path.begin() + ent.m_path.size() - 4); } else if (ent.m_name.size() > 7 && - !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 7, _S(".vadpcm"))) + !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 7, _SYS_STR(".vadpcm"))) { baseName = SystemString(ent.m_name.begin(), ent.m_name.begin() + ent.m_name.size() - 7); basePath = SystemString(ent.m_path.begin(), ent.m_path.begin() + ent.m_path.size() - 7); @@ -697,15 +697,15 @@ void AudioGroupSampleDirectory::_extractWAV(SampleId id, const EntryData& ent, amuse::SystemStringView destDir, const unsigned char* samp) { SystemString path(destDir); - path += _S("/"); + path += _SYS_STR("/"); #ifdef _WIN32 path += athena::utility::utf8ToWide(SampleId::CurNameDB->resolveNameFromId(id)); #else path += SampleId::CurNameDB->resolveNameFromId(id); #endif SystemString dspPath = path; - path += _S(".wav"); - dspPath += _S(".dsp"); + path += _SYS_STR(".wav"); + dspPath += _SYS_STR(".dsp"); athena::io::FileWriter w(path); SampleFormat fmt = SampleFormat(ent.m_numSamples >> 24); @@ -829,7 +829,7 @@ void AudioGroupSampleDirectory::_extractCompressed(SampleId id, const EntryData& } amuse::SystemString path(destDir); - path += _S("/"); + path += _SYS_STR("/"); #ifdef _WIN32 path += athena::utility::utf8ToWide(SampleId::CurNameDB->resolveNameFromId(id)); #else @@ -859,7 +859,7 @@ void AudioGroupSampleDirectory::_extractCompressed(SampleId id, const EntryData& header.x44_loop_ps = ent.m_ADPCMParms.dsp.m_lps; header.m_pitch = ent.m_pitch; - path += _S(".dsp"); + path += _SYS_STR(".dsp"); athena::io::FileWriter w(path); header.write(w); dataLen = (header.x4_num_nibbles + 1) / 2; @@ -867,7 +867,7 @@ void AudioGroupSampleDirectory::_extractCompressed(SampleId id, const EntryData& } else if (fmt == SampleFormat::N64) { - path += _S(".vadpcm"); + path += _SYS_STR(".vadpcm"); athena::io::FileWriter w(path); VADPCMHeader header; header.m_pitchSampleRate = ent.m_pitch << 24; @@ -907,7 +907,7 @@ void AudioGroupSampleDirectory::_extractCompressed(SampleId id, const EntryData& } DSPCorrelateCoefs(samps, numSamples, header.x1c_coef); - path += _S(".dsp"); + path += _SYS_STR(".dsp"); athena::io::FileWriter w(path); header.write(w); @@ -984,14 +984,14 @@ void AudioGroupSampleDirectory::reloadSampleData(SystemStringView groupPath) continue; SystemString baseName; SystemString basePath; - if (!CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _S(".dsp")) || - !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _S(".wav"))) + if (!CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _SYS_STR(".dsp")) || + !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 4, _SYS_STR(".wav"))) { baseName = SystemString(ent.m_name.begin(), ent.m_name.begin() + ent.m_name.size() - 4); basePath = SystemString(ent.m_path.begin(), ent.m_path.begin() + ent.m_path.size() - 4); } else if (ent.m_name.size() > 7 && - !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 7, _S(".vadpcm"))) + !CompareCaseInsensitive(ent.m_name.data() + ent.m_name.size() - 7, _SYS_STR(".vadpcm"))) { baseName = SystemString(ent.m_name.begin(), ent.m_name.begin() + ent.m_name.size() - 7); basePath = SystemString(ent.m_path.begin(), ent.m_path.begin() + ent.m_path.size() - 7); @@ -1033,7 +1033,7 @@ AudioGroupSampleDirectory::toGCNData(const AudioGroupDatabase& group) const for (const auto& ent : SortUnorderedMap(m_entries)) { amuse::SystemString path = group.getSampleBasePath(ent.first); - path += _S(".dsp"); + path += _SYS_STR(".dsp"); SampleFileState state = group.getSampleFileState(ent.first, ent.second.get().get(), &path); switch (state) { diff --git a/lib/ContainerRegistry.cpp b/lib/ContainerRegistry.cpp index 4f6f654..af782cd 100644 --- a/lib/ContainerRegistry.cpp +++ b/lib/ContainerRegistry.cpp @@ -120,21 +120,21 @@ const SystemChar* ContainerRegistry::TypeToName(Type tp) default: return nullptr; case Type::Raw4: - return _S("4 RAW Chunks"); + return _SYS_STR("4 RAW Chunks"); case Type::MetroidPrime: - return _S("Metroid Prime (GCN)"); + return _SYS_STR("Metroid Prime (GCN)"); case Type::MetroidPrime2: - return _S("Metroid Prime 2 (GCN)"); + return _SYS_STR("Metroid Prime 2 (GCN)"); case Type::RogueSquadronPC: - return _S("Star Wars - Rogue Squadron (PC)"); + return _SYS_STR("Star Wars - Rogue Squadron (PC)"); case Type::RogueSquadronN64: - return _S("Star Wars - Rogue Squadron (N64)"); + return _SYS_STR("Star Wars - Rogue Squadron (N64)"); case Type::Factor5N64Rev: - return _S("Factor5 Revision ROM (N64)"); + return _SYS_STR("Factor5 Revision ROM (N64)"); case Type::RogueSquadron2: - return _S("Star Wars - Rogue Squadron 2 (GCN)"); + return _SYS_STR("Star Wars - Rogue Squadron 2 (GCN)"); case Type::RogueSquadron3: - return _S("Star Wars - Rogue Squadron 3 (GCN)"); + return _SYS_STR("Star Wars - Rogue Squadron 3 (GCN)"); } } @@ -157,13 +157,13 @@ static SystemString ReadString(FILE* fp) static bool IsChunkExtension(const SystemChar* path, const SystemChar*& dotOut) { - const SystemChar* ext = StrRChr(path, _S('.')); + const SystemChar* ext = StrRChr(path, _SYS_STR('.')); if (ext) { - if (!CompareCaseInsensitive(ext, _S(".poo")) || !CompareCaseInsensitive(ext, _S(".pool")) || - !CompareCaseInsensitive(ext, _S(".pro")) || !CompareCaseInsensitive(ext, _S(".proj")) || - !CompareCaseInsensitive(ext, _S(".sdi")) || !CompareCaseInsensitive(ext, _S(".sdir")) || - !CompareCaseInsensitive(ext, _S(".sam")) || !CompareCaseInsensitive(ext, _S(".samp"))) + if (!CompareCaseInsensitive(ext, _SYS_STR(".poo")) || !CompareCaseInsensitive(ext, _SYS_STR(".pool")) || + !CompareCaseInsensitive(ext, _SYS_STR(".pro")) || !CompareCaseInsensitive(ext, _SYS_STR(".proj")) || + !CompareCaseInsensitive(ext, _SYS_STR(".sdi")) || !CompareCaseInsensitive(ext, _SYS_STR(".sdir")) || + !CompareCaseInsensitive(ext, _SYS_STR(".sam")) || !CompareCaseInsensitive(ext, _SYS_STR(".samp"))) { dotOut = ext; return true; @@ -174,11 +174,11 @@ static bool IsChunkExtension(const SystemChar* path, const SystemChar*& dotOut) static bool IsSongExtension(const SystemChar* path, const SystemChar*& dotOut) { - const SystemChar* ext = StrRChr(path, _S('.')); + const SystemChar* ext = StrRChr(path, _SYS_STR('.')); if (ext) { - if (!CompareCaseInsensitive(ext, _S(".son")) || !CompareCaseInsensitive(ext, _S(".sng")) || - !CompareCaseInsensitive(ext, _S(".song"))) + if (!CompareCaseInsensitive(ext, _SYS_STR(".son")) || !CompareCaseInsensitive(ext, _SYS_STR(".sng")) || + !CompareCaseInsensitive(ext, _SYS_STR(".song"))) { dotOut = ext; return true; @@ -466,7 +466,7 @@ static std::vector> LoadMP1 else { SystemChar name[128]; - SNPrintf(name, 128, _S("%08X"), id); + SNPrintf(name, 128, _SYS_STR("%08X"), id); ret.emplace_back(name, ContainerRegistry::SongData(std::move(song), sonLength, groupId, midiSetup)); } @@ -618,7 +618,7 @@ static std::vector> LoadMP2(FIL rem -= dsz; } - fp = FOpen(_S("amuse_tmp.dat"), _S("rw")); + fp = FOpen(_SYS_STR("amuse_tmp.dat"), _SYS_STR("rw")); rewind(fp); fwrite(buf, 1, decompSz, fp); rewind(fp); @@ -671,7 +671,7 @@ static std::vector> LoadMP2(FIL if (compressed) { fclose(fp); - Unlink(_S("amuse_tmp.dat")); + Unlink(_SYS_STR("amuse_tmp.dat")); } fp = old_fp; FSeek(fp, origPos, SEEK_SET); @@ -926,7 +926,7 @@ static std::vector> LoadRS1PC(F } } - ret.emplace_back(_S("Group"), + ret.emplace_back(_SYS_STR("Group"), IntrusiveAudioGroupData{proj.release(), projSz, pool.release(), poolSz, sdir.release(), sdirSz, samp.release(), sampSz, false, PCDataTag{}}); } @@ -1128,7 +1128,7 @@ static std::vector> LoadRS1N64( } } - ret.emplace_back(_S("Group"), + ret.emplace_back(_SYS_STR("Group"), IntrusiveAudioGroupData{proj.release(), projSz, pool.release(), poolSz, sdir.release(), sdirSz, samp.release(), sampSz, false, N64DataTag{}}); } @@ -1349,7 +1349,7 @@ static std::vector> LoadFactor5 } } - ret.emplace_back(_S("Group"), + ret.emplace_back(_SYS_STR("Group"), IntrusiveAudioGroupData{proj.release(), projSz, pool.release(), poolSz, sdir.release(), sdirSz, samp.release(), sampSz, true, N64DataTag{}}); } @@ -1566,7 +1566,7 @@ static std::vector> LoadRS2(FIL if (head.projLen && head.poolLen && head.sdirLen && head.sampLen) { SystemChar name[128]; - SNPrintf(name, 128, _S("GroupFile%02u"), j); + SNPrintf(name, 128, _SYS_STR("GroupFile%02u"), j); ret.emplace_back(name, IntrusiveAudioGroupData{proj.release(), head.projLen, pool.release(), head.poolLen, sdir.release(), head.sdirLen, samp.release(), head.sampLen, GCNDataTag{}}); @@ -1627,7 +1627,7 @@ static std::vector> LoadRS2 sonHead.swapBig(); SystemChar name[128]; - SNPrintf(name, 128, _S("GroupFile%02u-%u"), j, s); + SNPrintf(name, 128, _SYS_STR("GroupFile%02u-%u"), j, s); std::unique_ptr song(new uint8_t[sonHead.length]); memmove(song.get(), audData.get() + sonHead.offset, sonHead.length); ret.emplace_back(name, ContainerRegistry::SongData(std::move(song), sonHead.length, sonHead.groupId, @@ -1740,7 +1740,7 @@ static std::vector> LoadRS3(FIL if (head.projLen && head.poolLen && head.sdirLen && head.sampLen) { SystemChar name[128]; - SNPrintf(name, 128, _S("GroupFile%02u"), j); + SNPrintf(name, 128, _SYS_STR("GroupFile%02u"), j); ret.emplace_back(name, IntrusiveAudioGroupData{proj.release(), head.projLen, pool.release(), head.poolLen, sdir.release(), head.sdirLen, samp.release(), head.sampLen, GCNDataTag{}}); @@ -1808,7 +1808,7 @@ static std::vector> LoadSta break; SystemChar name[128]; - SNPrintf(name, 128, _S("Song%u"), i); + SNPrintf(name, 128, _SYS_STR("Song%u"), i); std::unique_ptr song(new uint8_t[len]); memmove(song.get(), data.get() + cur, len); ret.emplace_back(name, ContainerRegistry::SongData(std::move(song), len, -1, i)); @@ -1898,48 +1898,48 @@ ContainerRegistry::Type ContainerRegistry::DetectContainerType(const SystemChar* SystemChar newpath[1024]; /* Project */ - SNPrintf(newpath, 1024, _S("%.*s.pro"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.pro"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) { - SNPrintf(newpath, 1024, _S("%.*s.proj"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.proj"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) return Type::Invalid; } fclose(fp); /* Pool */ - SNPrintf(newpath, 1024, _S("%.*s.poo"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.poo"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) { - SNPrintf(newpath, 1024, _S("%.*s.pool"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.pool"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) return Type::Invalid; } fclose(fp); /* Sample Directory */ - SNPrintf(newpath, 1024, _S("%.*s.sdi"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.sdi"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) { - SNPrintf(newpath, 1024, _S("%.*s.sdir"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.sdir"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) return Type::Invalid; } fclose(fp); /* Sample */ - SNPrintf(newpath, 1024, _S("%.*s.sam"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.sam"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) { - SNPrintf(newpath, 1024, _S("%.*s.samp"), int(dot - path), path); - fp = FOpen(newpath, _S("rb")); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.samp"), int(dot - path), path); + fp = FOpen(newpath, _SYS_STR("rb")); if (!fp) return Type::Invalid; } @@ -1949,7 +1949,7 @@ ContainerRegistry::Type ContainerRegistry::DetectContainerType(const SystemChar* } /* Now attempt single-file case */ - fp = FOpen(path, _S("rb")); + fp = FOpen(path, _SYS_STR("rb")); if (fp) { if (ValidateMP1(fp)) @@ -2019,19 +2019,19 @@ std::vector> ContainerRegistry: std::vector> ret; SystemString baseName; - if (const SystemChar* sep = std::max(StrRChr(path, _S('/')), StrRChr(path, _S('\\')))) + if (const SystemChar* sep = std::max(StrRChr(path, _SYS_STR('/')), StrRChr(path, _SYS_STR('\\')))) baseName = SystemString(sep + 1, dot - sep - 1); else baseName = SystemString(path, dot - path); /* Project */ SystemChar projPath[1024]; - SNPrintf(projPath, 1024, _S("%.*s.pro"), int(dot - path), path); - fp = FOpen(projPath, _S("rb")); + SNPrintf(projPath, 1024, _SYS_STR("%.*s.pro"), int(dot - path), path); + fp = FOpen(projPath, _SYS_STR("rb")); if (!fp) { - SNPrintf(projPath, 1024, _S("%.*s.proj"), int(dot - path), path); - fp = FOpen(projPath, _S("rb")); + SNPrintf(projPath, 1024, _SYS_STR("%.*s.proj"), int(dot - path), path); + fp = FOpen(projPath, _SYS_STR("rb")); if (!fp) return ret; } @@ -2039,12 +2039,12 @@ std::vector> ContainerRegistry: /* Pool */ SystemChar poolPath[1024]; - SNPrintf(poolPath, 1024, _S("%.*s.poo"), int(dot - path), path); - fp = FOpen(poolPath, _S("rb")); + SNPrintf(poolPath, 1024, _SYS_STR("%.*s.poo"), int(dot - path), path); + fp = FOpen(poolPath, _SYS_STR("rb")); if (!fp) { - SNPrintf(poolPath, 1024, _S("%.*s.pool"), int(dot - path), path); - fp = FOpen(poolPath, _S("rb")); + SNPrintf(poolPath, 1024, _SYS_STR("%.*s.pool"), int(dot - path), path); + fp = FOpen(poolPath, _SYS_STR("rb")); if (!fp) return ret; } @@ -2052,12 +2052,12 @@ std::vector> ContainerRegistry: /* Sample Directory */ SystemChar sdirPath[1024]; - SNPrintf(sdirPath, 1024, _S("%.*s.sdi"), int(dot - path), path); - fp = FOpen(sdirPath, _S("rb")); + SNPrintf(sdirPath, 1024, _SYS_STR("%.*s.sdi"), int(dot - path), path); + fp = FOpen(sdirPath, _SYS_STR("rb")); if (!fp) { - SNPrintf(sdirPath, 1024, _S("%.*s.sdir"), int(dot - path), path); - fp = FOpen(sdirPath, _S("rb")); + SNPrintf(sdirPath, 1024, _SYS_STR("%.*s.sdir"), int(dot - path), path); + fp = FOpen(sdirPath, _SYS_STR("rb")); if (!fp) return ret; } @@ -2065,39 +2065,39 @@ std::vector> ContainerRegistry: /* Sample */ SystemChar sampPath[1024]; - SNPrintf(sampPath, 1024, _S("%.*s.sam"), int(dot - path), path); - fp = FOpen(sampPath, _S("rb")); + SNPrintf(sampPath, 1024, _SYS_STR("%.*s.sam"), int(dot - path), path); + fp = FOpen(sampPath, _SYS_STR("rb")); if (!fp) { - SNPrintf(sampPath, 1024, _S("%.*s.samp"), int(dot - path), path); - fp = FOpen(sampPath, _S("rb")); + SNPrintf(sampPath, 1024, _SYS_STR("%.*s.samp"), int(dot - path), path); + fp = FOpen(sampPath, _SYS_STR("rb")); if (!fp) return ret; } fclose(fp); - fp = FOpen(projPath, _S("rb")); + fp = FOpen(projPath, _SYS_STR("rb")); size_t projLen = FileLength(fp); if (!projLen) return ret; std::unique_ptr proj(new uint8_t[projLen]); fread(proj.get(), 1, projLen, fp); - fp = FOpen(poolPath, _S("rb")); + fp = FOpen(poolPath, _SYS_STR("rb")); size_t poolLen = FileLength(fp); if (!poolLen) return ret; std::unique_ptr pool(new uint8_t[poolLen]); fread(pool.get(), 1, poolLen, fp); - fp = FOpen(sdirPath, _S("rb")); + fp = FOpen(sdirPath, _SYS_STR("rb")); size_t sdirLen = FileLength(fp); if (!sdirLen) return ret; std::unique_ptr sdir(new uint8_t[sdirLen]); fread(sdir.get(), 1, sdirLen, fp); - fp = FOpen(sampPath, _S("rb")); + fp = FOpen(sampPath, _SYS_STR("rb")); size_t sampLen = FileLength(fp); if (!sampLen) return ret; @@ -2125,7 +2125,7 @@ std::vector> ContainerRegistry: } /* Now attempt single-file case */ - fp = FOpen(path, _S("rb")); + fp = FOpen(path, _SYS_STR("rb")); if (fp) { if (ValidateMP1(fp)) @@ -2198,7 +2198,7 @@ std::vector> ContainerRegis const SystemChar* dot = nullptr; if (IsSongExtension(path, dot)) { - fp = FOpen(path, _S("rb")); + fp = FOpen(path, _SYS_STR("rb")); size_t fLen = FileLength(fp); if (!fLen) { @@ -2210,12 +2210,12 @@ std::vector> ContainerRegis fclose(fp); std::vector> ret; - ret.emplace_back(_S("Song"), SongData(std::move(song), fLen, -1, -1)); + ret.emplace_back(_SYS_STR("Song"), SongData(std::move(song), fLen, -1, -1)); return ret; } /* Now attempt archive-file case */ - fp = FOpen(path, _S("rb")); + fp = FOpen(path, _SYS_STR("rb")); if (fp) { if (ValidateMP1Songs(fp)) @@ -2264,9 +2264,9 @@ std::vector> ContainerRegis { /* Song Description */ SystemChar newpath[1024]; - dot = StrRChr(path, _S('.')); - SNPrintf(newpath, 1024, _S("%.*s.stbl"), int(dot - path), path); - FILE* descFp = FOpen(newpath, _S("rb")); + dot = StrRChr(path, _SYS_STR('.')); + SNPrintf(newpath, 1024, _SYS_STR("%.*s.stbl"), int(dot - path), path); + FILE* descFp = FOpen(newpath, _SYS_STR("rb")); if (descFp) { auto ret = LoadPaperMarioTTYDSongs(fp, descFp); diff --git a/lib/DirectoryEnumerator.cpp b/lib/DirectoryEnumerator.cpp index 4edd99d..8cecc6d 100644 --- a/lib/DirectoryEnumerator.cpp +++ b/lib/DirectoryEnumerator.cpp @@ -30,7 +30,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool #if _WIN32 SystemString wc(path); - wc += _S("/*"); + wc += _SYS_STR("/*"); WIN32_FIND_DATAW d; HANDLE dir = FindFirstFileW(wc.c_str(), &d); if (dir == INVALID_HANDLE_VALUE) @@ -40,12 +40,12 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool case Mode::Native: do { - if (!wcscmp(d.cFileName, _S(".")) || !wcscmp(d.cFileName, _S(".."))) + if (!wcscmp(d.cFileName, _SYS_STR(".")) || !wcscmp(d.cFileName, _SYS_STR(".."))) continue; if (noHidden && (d.cFileName[0] == L'.' || (d.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0)) continue; SystemString fp(path); - fp += _S('/'); + fp += _SYS_STR('/'); fp += d.cFileName; Sstat st; if (Stat(fp.c_str(), &st)) @@ -69,12 +69,12 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool std::map sort; do { - if (!wcscmp(d.cFileName, _S(".")) || !wcscmp(d.cFileName, _S(".."))) + if (!wcscmp(d.cFileName, _SYS_STR(".")) || !wcscmp(d.cFileName, _SYS_STR(".."))) continue; if (noHidden && (d.cFileName[0] == L'.' || (d.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0)) continue; SystemString fp(path); - fp += _S('/'); + fp += _SYS_STR('/'); fp += d.cFileName; Sstat st; if (Stat(fp.c_str(), &st) || !S_ISDIR(st.st_mode)) @@ -105,12 +105,12 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool std::multimap sort; do { - if (!wcscmp(d.cFileName, _S(".")) || !wcscmp(d.cFileName, _S(".."))) + if (!wcscmp(d.cFileName, _SYS_STR(".")) || !wcscmp(d.cFileName, _SYS_STR(".."))) continue; if (noHidden && (d.cFileName[0] == L'.' || (d.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0)) continue; SystemString fp(path); - fp += _S('/'); + fp += _SYS_STR('/'); fp += d.cFileName; Sstat st; if (Stat(fp.c_str(), &st) || !S_ISREG(st.st_mode)) @@ -131,12 +131,12 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool std::map sort; do { - if (!wcscmp(d.cFileName, _S(".")) || !wcscmp(d.cFileName, _S(".."))) + if (!wcscmp(d.cFileName, _SYS_STR(".")) || !wcscmp(d.cFileName, _SYS_STR(".."))) continue; if (noHidden && (d.cFileName[0] == L'.' || (d.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0)) continue; SystemString fp(path); - fp += _S('/'); + fp += _SYS_STR('/'); fp += d.cFileName; Sstat st; if (Stat(fp.c_str(), &st) || !S_ISREG(st.st_mode))