You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(72) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2025-03-10 14:46:46
|
Author: manx Date: Mon Mar 10 15:46:30 2025 New Revision: 23021 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23021 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.28/libopenmpt/dox/changelog.md Modified: branches/OpenMPT-1.28/libopenmpt/dox/changelog.md ============================================================================== --- branches/OpenMPT-1.28/libopenmpt/dox/changelog.md Mon Mar 10 15:46:13 2025 (r23020) +++ branches/OpenMPT-1.28/libopenmpt/dox/changelog.md Mon Mar 10 15:46:30 2025 (r23021) @@ -7,6 +7,10 @@ ### libopenmpt 0.4.49-pre + * [**Bug**] `openmpt::string::get("source_has_mixed_revisions")` and + `openmpt_get_string("source_has_mixed_revisions")` always returned an empty + string. + ### libopenmpt 0.4.48 (2025-01-06) * The internal LFO plugin could misbehave in Tempo Sync mode when rows per |
From: <sv...@op...> - 2025-03-10 14:46:35
|
Author: manx Date: Mon Mar 10 15:46:13 2025 New Revision: 23020 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23020 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.29/libopenmpt/dox/changelog.md Modified: branches/OpenMPT-1.29/libopenmpt/dox/changelog.md ============================================================================== --- branches/OpenMPT-1.29/libopenmpt/dox/changelog.md Mon Mar 10 15:45:57 2025 (r23019) +++ branches/OpenMPT-1.29/libopenmpt/dox/changelog.md Mon Mar 10 15:46:13 2025 (r23020) @@ -7,6 +7,10 @@ ### libopenmpt 0.5.37-pre + * [**Bug**] `openmpt::string::get("source_has_mixed_revisions")` and + `openmpt_get_string("source_has_mixed_revisions")` always returned an empty + string. + * pugixml: Update to v1.15 (2025-01-10). ### libopenmpt 0.5.36 (2025-01-06) |
From: <sv...@op...> - 2025-03-10 14:46:25
|
Author: manx Date: Mon Mar 10 15:45:57 2025 New Revision: 23019 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23019 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.30/libopenmpt/dox/changelog.md Modified: branches/OpenMPT-1.30/libopenmpt/dox/changelog.md ============================================================================== --- branches/OpenMPT-1.30/libopenmpt/dox/changelog.md Mon Mar 10 15:45:32 2025 (r23018) +++ branches/OpenMPT-1.30/libopenmpt/dox/changelog.md Mon Mar 10 15:45:57 2025 (r23019) @@ -7,6 +7,10 @@ ### libopenmpt 0.6.23-pre + * [**Bug**] `openmpt::string::get("source_has_mixed_revisions")` and + `openmpt_get_string("source_has_mixed_revisions")` always returned an empty + string. + * pugixml: Update to v1.15 (2025-01-10). ### libopenmpt 0.6.22 (2025-01-06) |
From: <sv...@op...> - 2025-03-10 14:45:46
|
Author: manx Date: Mon Mar 10 15:45:32 2025 New Revision: 23018 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23018 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Modified: branches/OpenMPT-1.31/doc/libopenmpt/changelog.md ============================================================================== --- branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Mon Mar 10 15:43:33 2025 (r23017) +++ branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Mon Mar 10 15:45:32 2025 (r23018) @@ -7,6 +7,10 @@ ### libopenmpt 0.7.14-pre + * [**Bug**] `openmpt::string::get("source_has_mixed_revisions")` and + `openmpt_get_string("source_has_mixed_revisions")` always returned an empty + string. + * pugixml: Update to v1.15 (2025-01-10). ### libopenmpt 0.7.13 (2025-01-06) |
From: <sv...@op...> - 2025-03-10 14:43:44
|
Author: manx Date: Mon Mar 10 15:43:33 2025 New Revision: 23017 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23017 Log: Merged revision(s) 23013 from trunk/OpenMPT: [Fix] libopenmpt: Fix typo in openmpt::string::get("source_has_mixed_revisions") implementation resulting in always an empty string getting returned. ........ Modified: branches/OpenMPT-1.28/ (props changed) branches/OpenMPT-1.28/libopenmpt/ (props changed) branches/OpenMPT-1.28/libopenmpt/libopenmpt_impl.cpp Modified: branches/OpenMPT-1.28/libopenmpt/libopenmpt_impl.cpp ============================================================================== --- branches/OpenMPT-1.28/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:43:15 2025 (r23016) +++ branches/OpenMPT-1.28/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:43:33 2025 (r23017) @@ -248,7 +248,7 @@ return get_source_revision_string(); } else if ( key == "source_is_modified" ) { return SourceInfo::Current().IsDirty() ? "1" : "0"; - } else if ( key == "source_has_mixed_revision" ) { + } else if ( key == "source_has_mixed_revisions" ) { return SourceInfo::Current().HasMixedRevisions() ? "1" : "0"; } else if ( key == "source_is_package" ) { return SourceInfo::Current().IsPackage() ? "1" : "0"; |
From: <sv...@op...> - 2025-03-10 14:43:26
|
Author: manx Date: Mon Mar 10 15:43:15 2025 New Revision: 23016 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23016 Log: Merged revision(s) 23013 from trunk/OpenMPT: [Fix] libopenmpt: Fix typo in openmpt::string::get("source_has_mixed_revisions") implementation resulting in always an empty string getting returned. ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/libopenmpt/ (props changed) branches/OpenMPT-1.29/libopenmpt/libopenmpt_impl.cpp Modified: branches/OpenMPT-1.29/libopenmpt/libopenmpt_impl.cpp ============================================================================== --- branches/OpenMPT-1.29/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:42:57 2025 (r23015) +++ branches/OpenMPT-1.29/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:43:15 2025 (r23016) @@ -224,7 +224,7 @@ return get_source_revision_string(); } else if ( key == "source_is_modified" ) { return SourceInfo::Current().IsDirty() ? "1" : "0"; - } else if ( key == "source_has_mixed_revision" ) { + } else if ( key == "source_has_mixed_revisions" ) { return SourceInfo::Current().HasMixedRevisions() ? "1" : "0"; } else if ( key == "source_is_package" ) { return SourceInfo::Current().IsPackage() ? "1" : "0"; |
From: <sv...@op...> - 2025-03-10 14:43:18
|
Author: manx Date: Mon Mar 10 15:42:57 2025 New Revision: 23015 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23015 Log: Merged revision(s) 23013 from trunk/OpenMPT: [Fix] libopenmpt: Fix typo in openmpt::string::get("source_has_mixed_revisions") implementation resulting in always an empty string getting returned. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/libopenmpt/ (props changed) branches/OpenMPT-1.30/libopenmpt/libopenmpt_impl.cpp Modified: branches/OpenMPT-1.30/libopenmpt/libopenmpt_impl.cpp ============================================================================== --- branches/OpenMPT-1.30/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:42:38 2025 (r23014) +++ branches/OpenMPT-1.30/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:42:57 2025 (r23015) @@ -242,7 +242,7 @@ return get_source_revision_string(); } else if ( key == "source_is_modified" ) { return OpenMPT::SourceInfo::Current().IsDirty() ? "1" : "0"; - } else if ( key == "source_has_mixed_revision" ) { + } else if ( key == "source_has_mixed_revisions" ) { return OpenMPT::SourceInfo::Current().HasMixedRevisions() ? "1" : "0"; } else if ( key == "source_is_package" ) { return OpenMPT::SourceInfo::Current().IsPackage() ? "1" : "0"; |
From: <sv...@op...> - 2025-03-10 14:42:54
|
Author: manx Date: Mon Mar 10 15:42:38 2025 New Revision: 23014 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23014 Log: Merged revision(s) 23013 from trunk/OpenMPT: [Fix] libopenmpt: Fix typo in openmpt::string::get("source_has_mixed_revisions") implementation resulting in always an empty string getting returned. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/libopenmpt/libopenmpt_impl.cpp Modified: branches/OpenMPT-1.31/libopenmpt/libopenmpt_impl.cpp ============================================================================== --- branches/OpenMPT-1.31/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:42:13 2025 (r23013) +++ branches/OpenMPT-1.31/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:42:38 2025 (r23014) @@ -224,7 +224,7 @@ return get_source_revision_string(); } else if ( key == "source_is_modified" ) { return OpenMPT::SourceInfo::Current().IsDirty() ? "1" : "0"; - } else if ( key == "source_has_mixed_revision" ) { + } else if ( key == "source_has_mixed_revisions" ) { return OpenMPT::SourceInfo::Current().HasMixedRevisions() ? "1" : "0"; } else if ( key == "source_is_package" ) { return OpenMPT::SourceInfo::Current().IsPackage() ? "1" : "0"; |
From: <sv...@op...> - 2025-03-10 14:42:20
|
Author: manx Date: Mon Mar 10 15:42:13 2025 New Revision: 23013 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23013 Log: [Fix] libopenmpt: Fix typo in openmpt::string::get("source_has_mixed_revisions") implementation resulting in always an empty string getting returned. Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp ============================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:40:34 2025 (r23012) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:42:13 2025 (r23013) @@ -232,7 +232,7 @@ return get_source_revision_string(); } else if ( key == "source_is_modified" ) { return OpenMPT::SourceInfo::Current().IsDirty() ? "1" : "0"; - } else if ( key == "source_has_mixed_revision" ) { + } else if ( key == "source_has_mixed_revisions" ) { return OpenMPT::SourceInfo::Current().HasMixedRevisions() ? "1" : "0"; } else if ( key == "source_is_package" ) { return OpenMPT::SourceInfo::Current().IsPackage() ? "1" : "0"; |
From: <sv...@op...> - 2025-03-10 14:40:52
|
Author: manx Date: Mon Mar 10 15:40:34 2025 New Revision: 23012 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23012 Log: [Mod] Test: Display libopenmpt version and source information when running test suite. This makes use of the public API, ensuring that libopenmpt_impl.cpp and wrappers get included in the libopenmpt-test build. Modified: trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/test/test.cpp ============================================================================== --- trunk/OpenMPT/test/test.cpp Mon Mar 10 15:27:09 2025 (r23011) +++ trunk/OpenMPT/test/test.cpp Mon Mar 10 15:40:34 2025 (r23012) @@ -117,6 +117,10 @@ #include "TestTools.h" +#if defined(LIBOPENMPT_BUILD) +#include "../libopenmpt/libopenmpt.hpp" +#endif + // enable tests which may fail spuriously //#define FLAKY_TESTS @@ -171,6 +175,19 @@ { #ifdef LIBOPENMPT_BUILD std::cout << "libopenmpt test suite starting." << std::endl; + std::cout << "libopenmpt library version: " << std::hex << std::setfill('0') << std::setw(8) << openmpt::get_library_version() << std::endl; + std::cout << "libopenmpt core version: " << std::hex << std::setfill('0') << std::setw(8) << openmpt::get_core_version() << std::endl; + std::cout << "libopenmpt library_version: " << openmpt::string::get("library_version") << std::endl; + std::cout << "libopenmpt library_features: " << openmpt::string::get("library_features") << std::endl; + std::cout << "libopenmpt core_version: " << openmpt::string::get("core_version") << std::endl; + std::cout << "libopenmpt source_url: " << openmpt::string::get("source_url") << std::endl; + std::cout << "libopenmpt source_date: " << openmpt::string::get("source_date") << std::endl; + std::cout << "libopenmpt source_revision: " << openmpt::string::get("source_revision") << std::endl; + std::cout << "libopenmpt source_is_modified: " << openmpt::string::get("source_is_modified") << std::endl; + std::cout << "libopenmpt source_has_mixed_revisions: " << openmpt::string::get("source_has_mixed_revisions") << std::endl; + std::cout << "libopenmpt source_is_package: " << openmpt::string::get("source_is_package") << std::endl; + std::cout << "libopenmpt build: " << openmpt::string::get("build") << std::endl; + std::cout << "libopenmpt build_compiler: " << openmpt::string::get("build_compiler") << std::endl; #endif } |
From: <sv...@op...> - 2025-03-10 14:27:31
|
Author: manx Date: Mon Mar 10 15:27:09 2025 New Revision: 23011 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23011 Log: [Ref] libopenmpt: Check ENABLE_TESTS instead of MPT_ENABLE_FILEIO for compile-time warning. Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp ============================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:25:30 2025 (r23010) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp Mon Mar 10 15:27:09 2025 (r23011) @@ -77,13 +77,13 @@ MPT_WARNING("Warning: libopenmpt is known to trigger bad code generation with Clang 5..10 on powerpc (32bit) when using -O3. See <https://bugs.llvm.org/show_bug.cgi?id=46683>.") #endif -#if defined(MPT_ENABLE_FILEIO) +#if defined(ENABLE_TESTS) #if defined(MPT_COMPILER_QUIRK_WINDOWS_FSTREAM_NO_WCHAR) #if MPT_GCC_BEFORE(9,1,0) MPT_WARNING("Warning: MinGW with GCC earlier than 9.1 detected. Standard library does neither provide std::fstream wchar_t overloads nor std::filesystem with wchar_t support. Unicode filename support is thus unavailable.") #endif // MPT_GCC_AT_LEAST(9,1,0) #endif // MPT_COMPILER_QUIRK_WINDOWS_FSTREAM_NO_WCHAR -#endif // MPT_ENABLE_FILEIO +#endif // ENABLE_TESTS #endif // !MPT_BUILD_SILENCE_LIBOPENMPT_CONFIGURATION_WARNINGS |
From: <sv...@op...> - 2025-03-10 14:25:56
|
Author: manx Date: Mon Mar 10 15:25:30 2025 New Revision: 23010 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23010 Log: Merged revision(s) 23009 from trunk/OpenMPT: [Fix] build: Makefile: Add libopenmpt API source to libopenmpt-test. They are already built in libopenmpt-test with MSVC and Autotools build systems. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/Makefile Modified: branches/OpenMPT-1.31/Makefile ============================================================================== --- branches/OpenMPT-1.31/Makefile Mon Mar 10 15:24:53 2025 (r23009) +++ branches/OpenMPT-1.31/Makefile Mon Mar 10 15:25:30 2025 (r23010) @@ -1256,6 +1256,7 @@ LIBOPENMPTTEST_CXX_SOURCES += \ test/libopenmpt_test.cpp \ + $(sort $(wildcard libopenmpt/*.cpp)) \ $(SOUNDLIB_CXX_SOURCES) \ test/mpt_tests_base.cpp \ test/mpt_tests_binary.cpp \ |
From: <sv...@op...> - 2025-03-10 14:25:10
|
Author: manx Date: Mon Mar 10 15:24:53 2025 New Revision: 23009 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23009 Log: [Fix] build: Makefile: Add libopenmpt API source to libopenmpt-test. They are already built in libopenmpt-test with MSVC and Autotools build systems. Modified: trunk/OpenMPT/Makefile Modified: trunk/OpenMPT/Makefile ============================================================================== --- trunk/OpenMPT/Makefile Mon Mar 10 15:17:35 2025 (r23008) +++ trunk/OpenMPT/Makefile Mon Mar 10 15:24:53 2025 (r23009) @@ -1669,6 +1669,7 @@ LIBOPENMPTTEST_CXX_SOURCES += \ libopenmpt/libopenmpt_test/libopenmpt_test.cpp \ + $(sort $(wildcard libopenmpt/*.cpp)) \ $(SOUNDLIB_CXX_SOURCES) \ $(SOUNDLIB_TEST_CXX_SOURCES) \ test/mpt_tests_base.cpp \ |
From: <sv...@op...> - 2025-03-10 14:17:57
|
Author: manx Date: Mon Mar 10 15:17:35 2025 New Revision: 23008 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23008 Log: [Ref] Remove bogus MPT_ENABLE_FILEIO checks. Modified: trunk/OpenMPT/misc/mptFileCompression.cpp trunk/OpenMPT/misc/mptFileCompression.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/misc/mptFileCompression.cpp ============================================================================== --- trunk/OpenMPT/misc/mptFileCompression.cpp Mon Mar 10 14:27:20 2025 (r23007) +++ trunk/OpenMPT/misc/mptFileCompression.cpp Mon Mar 10 15:17:35 2025 (r23008) @@ -23,8 +23,6 @@ OPENMPT_NAMESPACE_BEGIN -#if defined(MPT_ENABLE_FILEIO) - #ifdef MODPLUG_TRACKER #if MPT_OS_WINDOWS @@ -81,7 +79,5 @@ #endif // MODPLUG_TRACKER -#endif // MPT_ENABLE_FILEIO - OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/misc/mptFileCompression.h ============================================================================== --- trunk/OpenMPT/misc/mptFileCompression.h Mon Mar 10 14:27:20 2025 (r23007) +++ trunk/OpenMPT/misc/mptFileCompression.h Mon Mar 10 15:17:35 2025 (r23008) @@ -11,8 +11,6 @@ #include "openmpt/all/BuildSettings.hpp" -#if defined(MPT_ENABLE_FILEIO) - #ifdef MODPLUG_TRACKER #if MPT_OS_WINDOWS @@ -23,14 +21,10 @@ #endif // MPT_OS_WINDOWS #endif // MODPLUG_TRACKER -#endif // MPT_ENABLE_FILEIO - OPENMPT_NAMESPACE_BEGIN -#if defined(MPT_ENABLE_FILEIO) - // Sets the NTFS compression attribute on the file or directory. // Requires read and write permissions for already opened files. // Returns true if the attribute has been set. @@ -43,8 +37,6 @@ #endif // MPT_OS_WINDOWS #endif // MODPLUG_TRACKER -#endif // MPT_ENABLE_FILEIO - OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp ============================================================================== --- trunk/OpenMPT/soundlib/SampleFormats.cpp Mon Mar 10 14:27:20 2025 (r23007) +++ trunk/OpenMPT/soundlib/SampleFormats.cpp Mon Mar 10 15:17:35 2025 (r23008) @@ -141,7 +141,7 @@ DestroyInstrument(nInstr, doNoDeleteAssociatedSamples); Instruments[nInstr] = pIns; -#if defined(MPT_ENABLE_FILEIO) && defined(MPT_EXTERNAL_SAMPLES) +#if defined(MPT_EXTERNAL_SAMPLES) SetSamplePath(nSample, file.GetOptionalFileName().value_or(P_(""))); #endif Modified: trunk/OpenMPT/test/test.cpp ============================================================================== --- trunk/OpenMPT/test/test.cpp Mon Mar 10 14:27:20 2025 (r23007) +++ trunk/OpenMPT/test/test.cpp Mon Mar 10 15:17:35 2025 (r23008) @@ -1166,7 +1166,6 @@ } #ifdef MODPLUG_TRACKER -#ifdef MPT_ENABLE_FILEIO { std::vector<std::byte> data; @@ -1188,7 +1187,6 @@ RemoveFile(fn); } -#endif #endif // MODPLUG_TRACKER #ifdef MPT_WITH_ZLIB |
From: <sv...@op...> - 2025-03-10 13:27:27
|
Author: manx Date: Mon Mar 10 14:27:20 2025 New Revision: 23007 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23007 Log: [Ref] Tuning: Tiny header cleanup. Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp ============================================================================== --- trunk/OpenMPT/soundlib/tuningCollection.cpp Mon Mar 10 14:19:57 2025 (r23006) +++ trunk/OpenMPT/soundlib/tuningCollection.cpp Mon Mar 10 14:27:20 2025 (r23007) @@ -14,9 +14,9 @@ #include "mpt/io/io_stdstream.hpp" #include "../common/serialization_utils.h" #include <algorithm> -#include "../common/mptFileIO.h" #include "Loaders.h" #ifdef MODPLUG_TRACKER +#include "../common/mptFileIO.h" #include "mpt/fs/fs.hpp" #include "mpt/io_file/outputfile.hpp" #include "../mptrack/TrackerSettings.h" |
From: <sv...@op...> - 2025-03-10 13:20:04
|
Author: manx Date: Mon Mar 10 14:19:57 2025 New Revision: 23006 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23006 Log: [Fix] Do not include unneeded headers in libopenmpt. Modified: trunk/OpenMPT/common/Logging.cpp Modified: trunk/OpenMPT/common/Logging.cpp ============================================================================== --- trunk/OpenMPT/common/Logging.cpp Mon Mar 10 14:07:28 2025 (r23005) +++ trunk/OpenMPT/common/Logging.cpp Mon Mar 10 14:19:57 2025 (r23006) @@ -16,9 +16,14 @@ #include "mpt/io/base.hpp" #include "mpt/io/io.hpp" #include "mpt/io/io_stdstream.hpp" +#if defined(MODPLUG_TRACKER) #include "mpt/io_file/fstream.hpp" +#endif +#if defined(MODPLUG_TRACKER) #include "mptFileIO.h" +#endif + #if defined(MODPLUG_TRACKER) #include <atomic> #endif |
From: <sv...@op...> - 2025-03-10 13:07:45
|
Author: manx Date: Mon Mar 10 14:07:28 2025 New Revision: 23005 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23005 Log: [Ref] mptFileIO: Remove unneeded includes. Modified: trunk/OpenMPT/common/mptFileIO.h Modified: trunk/OpenMPT/common/mptFileIO.h ============================================================================== --- trunk/OpenMPT/common/mptFileIO.h Mon Mar 10 14:04:08 2025 (r23004) +++ trunk/OpenMPT/common/mptFileIO.h Mon Mar 10 14:07:28 2025 (r23005) @@ -1,7 +1,7 @@ /* * mptFileIO.h * ----------- - * Purpose: A wrapper around std::fstream, enforcing usage of mpt::PathString. + * Purpose: * Notes : You should only ever use these wrappers instead of plain std::fstream classes. * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. @@ -13,12 +13,8 @@ #if defined(MPT_ENABLE_FILEIO) -#include "mpt/base/detect_libcxx.hpp" -#include "mpt/base/namespace.hpp" -#include "mpt/io_file/fstream.hpp" #include "mpt/io_file_read/inputfile_filecursor.hpp" -#include "../common/mptString.h" #include "../common/mptPathString.h" #include "../common/FileReaderFwd.h" |
From: <sv...@op...> - 2025-03-10 13:04:31
|
Author: manx Date: Mon Mar 10 14:04:08 2025 New Revision: 23004 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23004 Log: [Ref] mptFileIO: Remove mpt::fstream/mpt::ifstream/mpt::ofstream and rename all uses to mpt::IO::fstream/mpt::IO::ifstream/mpt::IO::ofstream. Modified: trunk/OpenMPT/common/Logging.cpp trunk/OpenMPT/common/mptFileIO.h trunk/OpenMPT/misc/mptWine.cpp trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/MPTrackWine.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Settings.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/UpdateCheck.cpp trunk/OpenMPT/pluginBridge/BridgeWrapper.cpp trunk/OpenMPT/soundlib/SampleFormatFLAC.cpp trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/common/Logging.cpp ============================================================================== --- trunk/OpenMPT/common/Logging.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/common/Logging.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -16,6 +16,7 @@ #include "mpt/io/base.hpp" #include "mpt/io/io.hpp" #include "mpt/io/io_stdstream.hpp" +#include "mpt/io_file/fstream.hpp" #include "mptFileIO.h" #if defined(MODPLUG_TRACKER) @@ -128,7 +129,7 @@ #endif if(mpt::log::FileEnabled) { - static std::optional<mpt::ofstream> s_logfile; + static std::optional<mpt::IO::ofstream> s_logfile; if(!s_logfile) { s_logfile.emplace(P_("mptrack.log"), std::ios::app); @@ -318,7 +319,7 @@ // sort according to index in case of overflows std::stable_sort(Entries.begin(), Entries.end()); - mpt::ofstream f(filename); + mpt::IO::ofstream f(filename); f << "Build: OpenMPT " << mpt::transcode<std::string>(mpt::logfile_encoding, Build::GetVersionStringExtended()) << std::endl; Modified: trunk/OpenMPT/common/mptFileIO.h ============================================================================== --- trunk/OpenMPT/common/mptFileIO.h Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/common/mptFileIO.h Mon Mar 10 14:04:08 2025 (r23004) @@ -33,16 +33,6 @@ #if defined(MPT_ENABLE_FILEIO) -namespace mpt -{ - -using fstream = mpt::IO::fstream; -using ifstream = mpt::IO::ifstream; -using ofstream = mpt::IO::ofstream; - -} // namespace mpt - - template <typename Targ1> inline FileCursor GetFileReader(Targ1 &&arg1) { Modified: trunk/OpenMPT/misc/mptWine.cpp ============================================================================== --- trunk/OpenMPT/misc/mptWine.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/misc/mptWine.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -13,6 +13,7 @@ #include "mpt/fs/fs.hpp" #include "mpt/io_file/fileref.hpp" +#include "mpt/io_file/fstream.hpp" #include "mpt/parse/parse.hpp" #include "mpt/path/native_path.hpp" #include "mpt/string/utility.hpp" @@ -267,7 +268,7 @@ // write the script to disk mpt::PathString scriptFilenameWindows = dirWindows + P_("script.sh"); { - mpt::ofstream tempfile(scriptFilenameWindows, std::ios::binary); + mpt::IO::ofstream tempfile(scriptFilenameWindows, std::ios::binary); tempfile << script; tempfile.flush(); if(!tempfile) @@ -287,7 +288,7 @@ // create a wrapper that will call the script and gather result. mpt::PathString wrapperstarterFilenameWindows = dirWindows + P_("wrapperstarter.sh"); { - mpt::ofstream tempfile(wrapperstarterFilenameWindows, std::ios::binary); + mpt::IO::ofstream tempfile(wrapperstarterFilenameWindows, std::ios::binary); std::string wrapperstarterscript; wrapperstarterscript += std::string() + "#!/usr/bin/env sh" "\n"; wrapperstarterscript += std::string() + "exec /usr/bin/env sh " + dirPosixEscape + "wrapper.sh" "\n"; @@ -301,7 +302,7 @@ mpt::PathString wrapperFilenameWindows = dirWindows + P_("wrapper.sh"); std::string cleanupscript; { - mpt::ofstream tempfile(wrapperFilenameWindows, std::ios::binary); + mpt::IO::ofstream tempfile(wrapperFilenameWindows, std::ios::binary); std::string wrapperscript; if(!flags[ExecFlagSilent]) { @@ -394,7 +395,7 @@ // create a wrapper that will find a suitable terminal and run the wrapper script in the terminal window. mpt::PathString terminalWrapperFilenameWindows = dirWindows + P_("terminal.sh"); { - mpt::ofstream tempfile(terminalWrapperFilenameWindows, std::ios::binary); + mpt::IO::ofstream tempfile(terminalWrapperFilenameWindows, std::ios::binary); // NOTE: // Modern terminals detach themselves from the invoking shell if another instance is already present. // This means we cannot rely on terminal invocation being syncronous. @@ -592,7 +593,7 @@ int exitCode = 0; { - mpt::ifstream exitFile(dirWindows + P_("exit"), std::ios::binary); + mpt::IO::ifstream exitFile(dirWindows + P_("exit"), std::ios::binary); if(!exitFile) { throw mpt::Wine::Exception("Script .exit file not found."); @@ -611,7 +612,7 @@ std::string outputString; if(!flags[ExecFlagInteractive]) { - mpt::ifstream outputFile(dirWindows + P_("out"), std::ios::binary); + mpt::IO::ifstream outputFile(dirWindows + P_("out"), std::ios::binary); if(outputFile) { outputFile.seekg(0, std::ios::end); @@ -628,7 +629,7 @@ std::string errorString; if(flags[ExecFlagSplitOutput]) { - mpt::ifstream errorFile(dirWindows + P_("err"), std::ios::binary); + mpt::IO::ifstream errorFile(dirWindows + P_("err"), std::ios::binary); if(errorFile) { errorFile.seekg(0, std::ios::end); Modified: trunk/OpenMPT/mptrack/CommandSet.cpp ============================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/mptrack/CommandSet.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -16,6 +16,7 @@ #include "../soundlib/mod_specifications.h" #include "../soundlib/Tables.h" #include "../mptrack/Reporting.h" +#include "mpt/io_file/fstream.hpp" #include "mpt/io_file/outputfile.hpp" #include "../common/mptFileIO.h" #include <sstream> @@ -1865,7 +1866,7 @@ bool CCommandSet::LoadFile(const mpt::PathString &filename) { - mpt::ifstream fin(filename); + mpt::IO::ifstream fin(filename); if(fin.fail()) { Reporting::Warning(MPT_TFORMAT("Can't open key bindings file {} for reading. Default key bindings will be used.")(filename)); Modified: trunk/OpenMPT/mptrack/MPTrackWine.cpp ============================================================================== --- trunk/OpenMPT/mptrack/MPTrackWine.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/mptrack/MPTrackWine.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -28,6 +28,7 @@ #include "../misc/mptWine.h" #include "mpt/crc/crc.hpp" #include "mpt/fs/fs.hpp" +#include "mpt/io_file/fstream.hpp" #include "mpt/io_file/inputfile.hpp" #include "mpt/io_file_read/inputfile_filecursor.hpp" #include "mpt/string/utility.hpp" @@ -707,7 +708,7 @@ { std::string fn = "libopenmpt_native_support.so"; - mpt::ofstream f(wine.PathToWindows(nativeSearchPath) + P_("\\") + mpt::PathString::FromUTF8(fn), std::ios::binary); + mpt::IO::ofstream f(wine.PathToWindows(nativeSearchPath) + P_("\\") + mpt::PathString::FromUTF8(fn), std::ios::binary); f.write(&result.filetree[fn][0], result.filetree[fn].size()); f.flush(); if(!f) @@ -717,7 +718,7 @@ } { std::string fn = "openmpt_wine_wrapper.dll"; - mpt::ofstream f(paths.AppData_Wine_WineVersion_OpenMPTVersion + P_("\\") + mpt::PathString::FromUTF8(fn), std::ios::binary); + mpt::IO::ofstream f(paths.AppData_Wine_WineVersion_OpenMPTVersion + P_("\\") + mpt::PathString::FromUTF8(fn), std::ios::binary); f.write(&result.filetree[fn][0], result.filetree[fn].size()); f.flush(); if(!f) @@ -727,7 +728,7 @@ } { std::string fn = "success.txt"; - mpt::ofstream f(paths.AppData_Wine_WineVersion_OpenMPTVersion + P_("\\") + mpt::PathString::FromUTF8(fn), std::ios::binary); + mpt::IO::ofstream f(paths.AppData_Wine_WineVersion_OpenMPTVersion + P_("\\") + mpt::PathString::FromUTF8(fn), std::ios::binary); f.imbue(std::locale::classic()); f << std::string("1"); f.flush(); Modified: trunk/OpenMPT/mptrack/MainFrm.cpp ============================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/mptrack/MainFrm.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -53,6 +53,7 @@ #include "mpt/audio/span.hpp" #include "mpt/base/alloc.hpp" #include "mpt/fs/fs.hpp" +#include "mpt/io_file/fstream.hpp" #include "mpt/io_file/inputfile.hpp" #include "mpt/io_file_read/inputfile_filecursor.hpp" #include "mpt/string/utility.hpp" @@ -3449,7 +3450,7 @@ if(!sndFile->Create(GetFileReader(f))) continue; auto playTest = sndFile->CreatePlaybackTest(PlaybackTestSettings{}); - mpt::ofstream outFile(fileName + P_(".testdata.gz"), std::ios::binary | std::ios::trunc); + mpt::IO::ofstream outFile(fileName + P_(".testdata.gz"), std::ios::binary | std::ios::trunc); if(outFile) { std::ostringstream outStream; @@ -3542,7 +3543,7 @@ if(!f.IsValid()) throw std::runtime_error{"Cannot open test data file!"}; PlaybackTest playTest{GetFileReader(f)}; - mpt::ofstream output(fileName.ReplaceExtension(P_(".tsv")), std::ios::binary); + mpt::IO::ofstream output(fileName.ReplaceExtension(P_(".tsv")), std::ios::binary); playTest.ToTSV(output); } catch(const std::exception &e) { Modified: trunk/OpenMPT/mptrack/Settings.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Settings.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/mptrack/Settings.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -21,6 +21,7 @@ #include "Mainfrm.h" #include <algorithm> +#include "mpt/io_file/fstream.hpp" #include "mpt/io_file/outputfile.hpp" #include "mpt/parse/parse.hpp" #include "../common/mptFileIO.h" @@ -416,7 +417,7 @@ static std::vector<char> ReadFile(const mpt::PathString &filename) { - mpt::ifstream s(filename, std::ios::binary); + mpt::IO::ifstream s(filename, std::ios::binary); std::vector<char> result; while(s) { Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp ============================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -32,6 +32,7 @@ #include "mpt/environment/environment.hpp" #include "mpt/fs/common_directories.hpp" #include "mpt/fs/fs.hpp" +#include "mpt/io_file/fstream.hpp" #include "mpt/io_file/outputfile.hpp" #include "mpt/parse/parse.hpp" #include "mpt/uuid/uuid.hpp" @@ -1045,7 +1046,7 @@ std::unique_ptr<CTuningCollection> TrackerSettings::LoadLocalTunings() { std::unique_ptr<CTuningCollection> s_pTuningsSharedLocal = std::make_unique<CTuningCollection>(); - mpt::ifstream f( + mpt::IO::ifstream f( PathTunings.GetDefaultDir() + P_("local_tunings") + mpt::PathString::FromUTF8(CTuningCollection::s_FileExtension) Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp ============================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -22,6 +22,7 @@ #include "mpt/io/base.hpp" #include "mpt/io/io.hpp" #include "mpt/io/io_stdstream.hpp" +#include "mpt/io_file/fstream.hpp" #include "mpt/io_file/outputfile.hpp" #include "mpt/parse/parse.hpp" #include "mpt/string/utility.hpp" @@ -792,7 +793,7 @@ const bool bIsScl = (mpt::PathCompareNoCase(fileExt, P_(".scl")) == 0); //const bool bIsTc = (mpt::PathCompareNoCase(fileExt, mpt::PathString::FromUTF8(CTuningCollection::s_FileExtension)) == 0); - mpt::ifstream fin(file, std::ios::binary); + mpt::IO::ifstream fin(file, std::ios::binary); // "HSCT", 0x01, 0x00, 0x00, 0x00 const uint8 magicTColdV1 [] = { 'H', 'S', 'C', 'T',0x01,0x00,0x00,0x00 }; @@ -1557,7 +1558,7 @@ { MPT_ASSERT(result == nullptr); result = nullptr; - mpt::ifstream iStrm(filename, std::ios::in | std::ios::binary); + mpt::IO::ifstream iStrm(filename, std::ios::in | std::ios::binary); if(!iStrm) { return enSclImportFailUnableToOpenFile; Modified: trunk/OpenMPT/mptrack/UpdateCheck.cpp ============================================================================== --- trunk/OpenMPT/mptrack/UpdateCheck.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/mptrack/UpdateCheck.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -33,6 +33,7 @@ #include "mpt/fs/fs.hpp" #include "mpt/io/io.hpp" #include "mpt/io/io_stdstream.hpp" +#include "mpt/io_file/fstream.hpp" #include "mpt/io_file/inputfile.hpp" #include "mpt/io_file/outputfile.hpp" #include "mpt/io_file_read/inputfile_filecursor.hpp" @@ -1249,7 +1250,7 @@ std::array<std::byte, 512/8> expected; std::copy(binhash.begin(), binhash.end(), expected.begin()); mpt::crypto::hash::SHA512 hash; - mpt::ifstream f(updateFilename, std::ios::binary); + mpt::IO::ifstream f(updateFilename, std::ios::binary); f.imbue(std::locale::classic()); f.exceptions(std::ios::badbit); while(!mpt::IO::IsEof(f)) Modified: trunk/OpenMPT/pluginBridge/BridgeWrapper.cpp ============================================================================== --- trunk/OpenMPT/pluginBridge/BridgeWrapper.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/pluginBridge/BridgeWrapper.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -19,6 +19,7 @@ #include "../mptrack/ExceptionHandler.h" #include "../common/mptFileIO.h" #include "mpt/fs/fs.hpp" +#include "mpt/io_file/fstream.hpp" #include "../common/mptStringBuffer.h" #include "../common/misc_util.h" @@ -171,7 +172,7 @@ PluginArch BridgeWrapper::GetPluginBinaryType(const mpt::PathString &pluginPath) { PluginArch type = PluginArch_unknown; - mpt::ifstream file(pluginPath, std::ios::in | std::ios::binary); + mpt::IO::ifstream file(pluginPath, std::ios::in | std::ios::binary); if(file.is_open()) { IMAGE_DOS_HEADER dosHeader; Modified: trunk/OpenMPT/soundlib/SampleFormatFLAC.cpp ============================================================================== --- trunk/OpenMPT/soundlib/SampleFormatFLAC.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/soundlib/SampleFormatFLAC.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -14,6 +14,7 @@ #include "../mptrack/TrackerSettings.h" #endif //MODPLUG_TRACKER #ifndef MODPLUG_NO_FILESAVE +#include "mpt/io_file/fstream.hpp" #include "../common/mptFileIO.h" #endif #include "../common/misc_util.h" @@ -491,7 +492,7 @@ static FLAC__StreamEncoderWriteStatus StreamEncoderWriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) { - mpt::ofstream & file = *mpt::void_ptr<mpt::ofstream>(client_data); + mpt::IO::ofstream & file = *mpt::void_ptr<mpt::IO::ofstream>(client_data); MPT_UNUSED_VARIABLE(encoder); MPT_UNUSED_VARIABLE(samples); MPT_UNUSED_VARIABLE(current_frame); @@ -503,7 +504,7 @@ } static FLAC__StreamEncoderSeekStatus StreamEncoderSeekCallback(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data) { - mpt::ofstream & file = *mpt::void_ptr<mpt::ofstream>(client_data); + mpt::IO::ofstream & file = *mpt::void_ptr<mpt::IO::ofstream>(client_data); MPT_UNUSED_VARIABLE(encoder); if(!mpt::in_range<mpt::IO::Offset>(absolute_byte_offset)) { @@ -517,7 +518,7 @@ } static FLAC__StreamEncoderTellStatus StreamEncoderTellCallback(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data) { - mpt::ofstream & file = *mpt::void_ptr<mpt::ofstream>(client_data); + mpt::IO::ofstream & file = *mpt::void_ptr<mpt::IO::ofstream>(client_data); MPT_UNUSED_VARIABLE(encoder); mpt::IO::Offset pos = mpt::IO::TellWrite(file); if(pos < 0) Modified: trunk/OpenMPT/test/test.cpp ============================================================================== --- trunk/OpenMPT/test/test.cpp Mon Mar 10 13:11:39 2025 (r23003) +++ trunk/OpenMPT/test/test.cpp Mon Mar 10 14:04:08 2025 (r23004) @@ -30,6 +30,7 @@ #include "mpt/io/base.hpp" #include "mpt/io/io.hpp" #include "mpt/io/io_stdstream.hpp" +#include "mpt/io_file/fstream.hpp" #include "mpt/io_read/filecursor_stdstream.hpp" #include "mpt/osinfo/class.hpp" #include "mpt/osinfo/dos_version.hpp" @@ -608,7 +609,7 @@ #if MPT_TEST_HAS_FILESYSTEM #if !MPT_OS_DJGPP mpt::PathString version_mk = GetPathPrefix() + P_("libopenmpt/libopenmpt_version.mk"); - mpt::ifstream f(version_mk, std::ios::in); + mpt::IO::ifstream f(version_mk, std::ios::in); VERIFY_EQUAL(f ? true : false, true); std::map<std::string, std::string> fields; std::string line; @@ -3628,7 +3629,7 @@ static TSoundFileContainer CreateSoundFileContainer(const mpt::PathString &filename) { - mpt::ifstream stream(filename, std::ios::binary); + mpt::IO::ifstream stream(filename, std::ios::binary); FileReader file = mpt::IO::make_FileCursor<mpt::PathString>(stream); std::shared_ptr<CSoundFile> pSndFile = std::make_shared<CSoundFile>(); pSndFile->Create(file, CSoundFile::loadCompleteModule); @@ -3644,25 +3645,25 @@ static void SaveIT(const TSoundFileContainer &sndFile, const mpt::PathString &filename) { - mpt::ofstream f(filename, std::ios::binary); + mpt::IO::ofstream f(filename, std::ios::binary); sndFile->SaveIT(f, filename, false); } static void SaveXM(const TSoundFileContainer &sndFile, const mpt::PathString &filename) { - mpt::ofstream f(filename, std::ios::binary); + mpt::IO::ofstream f(filename, std::ios::binary); sndFile->SaveXM(f, false); } static void SaveS3M(const TSoundFileContainer &sndFile, const mpt::PathString &filename) { - mpt::ofstream f(filename, std::ios::binary); + mpt::IO::ofstream f(filename, std::ios::binary); sndFile->SaveS3M(f); } static void SaveMOD(const TSoundFileContainer &sndFile, const mpt::PathString &filename) { - mpt::ofstream f(filename, std::ios::binary); + mpt::IO::ofstream f(filename, std::ios::binary); sndFile->SaveMod(f); } |
From: <sv...@op...> - 2025-03-10 12:11:51
|
Author: manx Date: Mon Mar 10 13:11:39 2025 New Revision: 23003 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23003 Log: [Ref] mptPathString: Make SanitizePathComponent() work with any string type. [Ref] mptPathString: Move SanitizePathComponent() to namespace mpt. Modified: trunk/OpenMPT/common/mptPathString.cpp trunk/OpenMPT/common/mptPathString.h trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/soundlib/plugins/PlugInterface.cpp Modified: trunk/OpenMPT/common/mptPathString.cpp ============================================================================== --- trunk/OpenMPT/common/mptPathString.cpp Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/common/mptPathString.cpp Mon Mar 10 13:11:39 2025 (r23003) @@ -132,22 +132,4 @@ -#if defined(MODPLUG_TRACKER) - -mpt::ustring SanitizePathComponent(mpt::ustring str) -{ - return mpt::PathString::FromUnicode(str).AsSanitizedComponent().ToUnicode(); -} - -#if defined(MPT_WITH_MFC) -CString SanitizePathComponent(CString str) -{ - return mpt::PathString::FromCString(str).AsSanitizedComponent().ToCString(); -} -#endif // MPT_WITH_MFC - -#endif // MODPLUG_TRACKER - - - OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/mptPathString.h ============================================================================== --- trunk/OpenMPT/common/mptPathString.h Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/common/mptPathString.h Mon Mar 10 13:11:39 2025 (r23003) @@ -19,6 +19,10 @@ #include "mpt/path/os_path.hpp" #include "mpt/string/types.hpp" +#if defined(MODPLUG_TRACKER) +#include "mpt/string_transcode/transcode.hpp" +#endif + #include "mptString.h" @@ -64,7 +68,11 @@ -#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS +#if defined(MODPLUG_TRACKER) + + + +#if MPT_OS_WINDOWS @@ -89,25 +97,23 @@ -#endif // MODPLUG_TRACKER && MPT_OS_WINDOWS +#endif // MPT_OS_WINDOWS -} // namespace mpt - +template <typename Tstring> +inline Tstring SanitizePathComponent(const Tstring &str) +{ + return mpt::transcode<Tstring>(mpt::native_path::FromNative(mpt::transcode<mpt::native_path::raw_path_type>(str)).AsSanitizedComponent().AsNative()); +} -#if defined(MODPLUG_TRACKER) -// Sanitize a filename (remove special chars) +#endif // MODPLUG_TRACKER -mpt::ustring SanitizePathComponent(mpt::ustring str); -#if defined(MPT_WITH_MFC) -CString SanitizePathComponent(CString str); -#endif // MPT_WITH_MFC -#endif // MODPLUG_TRACKER +} // namespace mpt Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp Mon Mar 10 13:11:39 2025 (r23003) @@ -2127,8 +2127,8 @@ { mpt::ustring instrName = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), pIns->name[0] ? pIns->GetName() : "untitled"); mpt::ustring instrFilename = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), pIns->filename[0] ? pIns->GetFilename() : pIns->GetName()); - instrName = SanitizePathComponent(instrName); - instrFilename = SanitizePathComponent(instrFilename); + instrName = mpt::SanitizePathComponent(instrName); + instrFilename = mpt::SanitizePathComponent(instrFilename); mpt::ustring fileNameW = fileName.ToUnicode(); fileNameW = mpt::replace(fileNameW, U_("%instrument_number%"), mpt::ufmt::fmt(ins, numberFmt)); Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp Mon Mar 10 13:11:39 2025 (r23003) @@ -1407,8 +1407,8 @@ { mpt::ustring sampleName = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), (!m_sndFile.m_szNames[smp].empty()) ? std::string(m_sndFile.m_szNames[smp]) : "untitled"); mpt::ustring sampleFilename = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), (!sample.filename.empty()) ? sample.GetFilename() : m_sndFile.m_szNames[smp]); - sampleName = SanitizePathComponent(sampleName); - sampleFilename = SanitizePathComponent(sampleFilename); + sampleName = mpt::SanitizePathComponent(sampleName); + sampleFilename = mpt::SanitizePathComponent(sampleFilename); mpt::ustring fileNameU = fileName.ToUnicode(); fileNameU = mpt::replace(fileNameU, U_("%sample_number%"), mpt::ufmt::fmt(smp, numberFmt)); Modified: trunk/OpenMPT/mptrack/Moddoc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/mptrack/Moddoc.cpp Mon Mar 10 13:11:39 2025 (r23003) @@ -1878,7 +1878,7 @@ if(!fileNameAdd.empty()) { - fileNameAdd = SanitizePathComponent(fileNameAdd); + fileNameAdd = mpt::SanitizePathComponent(fileNameAdd); thisName += mpt::PathString::FromUnicode(fileNameAdd); } thisName += fileExt; Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp ============================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp Mon Mar 10 13:11:39 2025 (r23003) @@ -689,10 +689,10 @@ } mpt::ustring fileNameW = fileName.ToUnicode(); mpt::ustring numberW = mpt::ufmt::fmt(i + 1, numberFmt); - numberW = SanitizePathComponent(numberW); + numberW = mpt::SanitizePathComponent(numberW); fileNameW = mpt::replace(fileNameW, U_("%tuning_number%"), numberW); mpt::ustring nameW = mpt::ToUnicode(tuningName); - nameW = SanitizePathComponent(nameW); + nameW = mpt::SanitizePathComponent(nameW); fileNameW = mpt::replace(fileNameW, U_("%tuning_name%"), nameW); fileName = mpt::PathString::FromUnicode(fileNameW); Modified: trunk/OpenMPT/mptrack/View_tre.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/mptrack/View_tre.cpp Mon Mar 10 13:11:39 2025 (r23003) @@ -786,7 +786,7 @@ // Module folder + sub folders CString name = modDoc.GetPathNameMpt().GetFilename().ToCString(); if(name.IsEmpty()) - name = SanitizePathComponent(modDoc.GetTitle()); + name = mpt::SanitizePathComponent(modDoc.GetTitle()); if(!info.hSong) { Modified: trunk/OpenMPT/soundlib/plugins/PlugInterface.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PlugInterface.cpp Mon Mar 10 11:59:46 2025 (r23002) +++ trunk/OpenMPT/soundlib/plugins/PlugInterface.cpp Mon Mar 10 13:11:39 2025 (r23003) @@ -642,7 +642,7 @@ } CString progName = m_Factory.libraryName.ToCString() + _T(" - ") + GetCurrentProgramName(); - progName = SanitizePathComponent(progName); + progName = mpt::SanitizePathComponent(progName); FileDialog dlg = SaveFileDialog() .DefaultExtension("fxb") |
From: <sv...@op...> - 2025-03-10 11:00:04
|
Author: manx Date: Mon Mar 10 11:59:46 2025 New Revision: 23002 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23002 Log: [Ref] mptPathString: Most of mptPathString.h is only used if MODPLUG_TRACKER. Simplify preprocessor logic. Modified: trunk/OpenMPT/common/mptPathString.cpp trunk/OpenMPT/common/mptPathString.h Modified: trunk/OpenMPT/common/mptPathString.cpp ============================================================================== --- trunk/OpenMPT/common/mptPathString.cpp Mon Mar 10 11:58:03 2025 (r23001) +++ trunk/OpenMPT/common/mptPathString.cpp Mon Mar 10 11:59:46 2025 (r23002) @@ -10,15 +10,13 @@ #include "stdafx.h" #include "mptPathString.h" -#include "mpt/path/os_path_long.hpp" - #include <vector> -#if MPT_OS_WINDOWS +#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS #include <tchar.h> #endif -#if MPT_OS_WINDOWS +#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS #include <windows.h> #endif @@ -31,7 +29,9 @@ -#if MPT_OS_WINDOWS +#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS + + #if !MPT_OS_WINDOWS_WINRT @@ -42,11 +42,6 @@ #endif // !MPT_OS_WINDOWS_WINRT -#endif // MPT_OS_WINDOWS - - - -#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS // Convert an absolute path to a path that's relative to "&relativeTo". @@ -107,11 +102,6 @@ } -#endif // MODPLUG_TRACKER && MPT_OS_WINDOWS - - - -#if MPT_OS_WINDOWS #if !(MPT_WINRT_BEFORE(MPT_WIN_10)) @@ -132,17 +122,17 @@ #endif -#endif // MPT_OS_WINDOWS +#endif // MODPLUG_TRACKER && MPT_OS_WINDOWS -} // namespace mpt +} // namespace mpt -#if defined(MODPLUG_TRACKER) +#if defined(MODPLUG_TRACKER) mpt::ustring SanitizePathComponent(mpt::ustring str) { @@ -156,8 +146,6 @@ } #endif // MPT_WITH_MFC - - #endif // MODPLUG_TRACKER Modified: trunk/OpenMPT/common/mptPathString.h ============================================================================== --- trunk/OpenMPT/common/mptPathString.h Mon Mar 10 11:58:03 2025 (r23001) +++ trunk/OpenMPT/common/mptPathString.h Mon Mar 10 11:59:46 2025 (r23002) @@ -64,14 +64,16 @@ -#if MPT_OS_WINDOWS +#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS + + + #if !(MPT_WINRT_BEFORE(MPT_WIN_10)) // Returns the absolute path for a potentially relative path and removes ".." or "." components. (same as GetFullPathNameW) mpt::PathString GetAbsolutePath(const mpt::PathString &path); #endif -#endif // MPT_OS_WINDOWS -#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS + // Relative / absolute paths conversion @@ -79,15 +81,15 @@ mpt::PathString RelativePathToAbsolute(const mpt::PathString &p, const mpt::PathString &relativeTo); -#endif // MODPLUG_TRACKER && MPT_OS_WINDOWS - -#if MPT_OS_WINDOWS #if !MPT_OS_WINDOWS_WINRT int PathCompareNoCase(const PathString &a, const PathString &b); #endif // !MPT_OS_WINDOWS_WINRT -#endif + + + +#endif // MODPLUG_TRACKER && MPT_OS_WINDOWS |
From: <sv...@op...> - 2025-03-10 10:58:20
|
Author: manx Date: Mon Mar 10 11:58:03 2025 New Revision: 23001 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23001 Log: [Ref] Plugin Manager: Comparing paths case-insensitively is really only necessary for the tracker. Always use UTF8 fallback for libopenmpt. Avoids dependency on lstrcmpi(). Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Mon Mar 10 11:55:10 2025 (r23000) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Mon Mar 10 11:58:03 2025 (r23001) @@ -615,7 +615,7 @@ }; PlugMatchQuality match = kNoMatch; // "Match quality" of found plugin. Higher value = better match. -#if MPT_OS_WINDOWS && !MPT_OS_WINDOWS_WINRT +#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS && !MPT_OS_WINDOWS_WINRT const mpt::PathString libraryName = mpt::PathString::FromUnicode(mixPlugin.GetLibraryName()); #else const std::string libraryName = mpt::ToCharset(mpt::Charset::UTF8, mixPlugin.GetLibraryName()); @@ -625,7 +625,7 @@ const bool matchID = (plug->pluginId1 == mixPlugin.Info.dwPluginId1) && (plug->pluginId2 == mixPlugin.Info.dwPluginId2) && (plug->shellPluginID == mixPlugin.Info.shellPluginID); -#if MPT_OS_WINDOWS && !MPT_OS_WINDOWS_WINRT +#if defined(MODPLUG_TRACKER) && MPT_OS_WINDOWS && !MPT_OS_WINDOWS_WINRT const bool matchName = !mpt::PathCompareNoCase(plug->libraryName, libraryName); #else const bool matchName = !mpt::CompareNoCaseAscii(plug->libraryName.ToUTF8(), libraryName); |
From: <sv...@op...> - 2025-03-10 10:55:18
|
Author: manx Date: Mon Mar 10 11:55:10 2025 New Revision: 23000 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23000 Log: [Ref] Avoid unnecessary CString<->mpt::ustring roundtrips when constructing instrument and sample names. Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_smp.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp Fri Mar 7 21:17:57 2025 (r22999) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp Mon Mar 10 11:55:10 2025 (r23000) @@ -2110,7 +2110,6 @@ maxIns = m_sndFile.GetNumInstruments(); } auto numberFmt = mpt::format_simple_spec<mpt::ustring>().Dec().FillNul().Width(1 + static_cast<int>(std::log10(maxIns))); - CString instrName, instrFilename; bool ok = true; const bool saveXI = !mpt::PathCompareNoCase(dlg.GetExtension(), P_("xi")); @@ -2126,15 +2125,15 @@ fileName = dlg.GetFirstFile(); if(doBatchSave) { - instrName = mpt::ToCString(m_sndFile.GetCharsetInternal(), pIns->name[0] ? pIns->GetName() : "untitled"); - instrFilename = mpt::ToCString(m_sndFile.GetCharsetInternal(), pIns->filename[0] ? pIns->GetFilename() : pIns->GetName()); + mpt::ustring instrName = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), pIns->name[0] ? pIns->GetName() : "untitled"); + mpt::ustring instrFilename = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), pIns->filename[0] ? pIns->GetFilename() : pIns->GetName()); instrName = SanitizePathComponent(instrName); instrFilename = SanitizePathComponent(instrFilename); mpt::ustring fileNameW = fileName.ToUnicode(); fileNameW = mpt::replace(fileNameW, U_("%instrument_number%"), mpt::ufmt::fmt(ins, numberFmt)); - fileNameW = mpt::replace(fileNameW, U_("%instrument_filename%"), mpt::ToUnicode(instrFilename)); - fileNameW = mpt::replace(fileNameW, U_("%instrument_name%"), mpt::ToUnicode(instrName)); + fileNameW = mpt::replace(fileNameW, U_("%instrument_filename%"), instrFilename); + fileNameW = mpt::replace(fileNameW, U_("%instrument_name%"), instrName); fileName = mpt::PathString::FromUnicode(fileNameW); } Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp Fri Mar 7 21:17:57 2025 (r22999) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp Mon Mar 10 11:55:10 2025 (r23000) @@ -1394,7 +1394,6 @@ const auto numberFmt = mpt::format_simple_spec<mpt::ustring>().Dec().FillNul().Width(1 + static_cast<int>(std::log10(maxSmp))); bool ok = false; - CString sampleName, sampleFilename; for(SAMPLEINDEX smp = minSmp; smp <= maxSmp; smp++) { @@ -1406,15 +1405,15 @@ fileName = dlg.GetFirstFile(); if(doBatchSave) { - sampleName = mpt::ToCString(m_sndFile.GetCharsetInternal(), (!m_sndFile.m_szNames[smp].empty()) ? std::string(m_sndFile.m_szNames[smp]) : "untitled"); - sampleFilename = mpt::ToCString(m_sndFile.GetCharsetInternal(), (!sample.filename.empty()) ? sample.GetFilename() : m_sndFile.m_szNames[smp]); + mpt::ustring sampleName = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), (!m_sndFile.m_szNames[smp].empty()) ? std::string(m_sndFile.m_szNames[smp]) : "untitled"); + mpt::ustring sampleFilename = mpt::ToUnicode(m_sndFile.GetCharsetInternal(), (!sample.filename.empty()) ? sample.GetFilename() : m_sndFile.m_szNames[smp]); sampleName = SanitizePathComponent(sampleName); sampleFilename = SanitizePathComponent(sampleFilename); mpt::ustring fileNameU = fileName.ToUnicode(); fileNameU = mpt::replace(fileNameU, U_("%sample_number%"), mpt::ufmt::fmt(smp, numberFmt)); - fileNameU = mpt::replace(fileNameU, U_("%sample_filename%"), mpt::ToUnicode(sampleFilename)); - fileNameU = mpt::replace(fileNameU, U_("%sample_name%"), mpt::ToUnicode(sampleName)); + fileNameU = mpt::replace(fileNameU, U_("%sample_filename%"), sampleFilename); + fileNameU = mpt::replace(fileNameU, U_("%sample_name%"), sampleName); fileName = mpt::PathString::FromUnicode(fileNameU); // Need to enforce S3I for Adlib samples |
From: <sv...@op...> - 2025-03-07 20:18:10
|
Author: manx Date: Fri Mar 7 21:17:57 2025 New Revision: 22999 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22999 Log: Merged revision(s) 22984 from trunk/OpenMPT: [Var] Vorbis: Apply the following patches from git master: <https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c>. ........ Modified: branches/OpenMPT-1.28/ (props changed) branches/OpenMPT-1.28/include/vorbis/OpenMPT.txt branches/OpenMPT-1.28/include/vorbis/include/vorbis/vorbisenc.h branches/OpenMPT-1.28/include/vorbis/lib/block.c branches/OpenMPT-1.28/include/vorbis/lib/psy.c branches/OpenMPT-1.28/include/vorbis/lib/sharedbook.c Modified: branches/OpenMPT-1.28/include/vorbis/OpenMPT.txt ============================================================================== --- branches/OpenMPT-1.28/include/vorbis/OpenMPT.txt Fri Mar 7 21:17:32 2025 (r22998) +++ branches/OpenMPT-1.28/include/vorbis/OpenMPT.txt Fri Mar 7 21:17:57 2025 (r22999) @@ -1,11 +1,16 @@ -libvorbis library version 1.3.7. +libvorbis library version 1.3.7 (2020-07-04). The following changes have been made: -- Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, - symbian, test, vq) have been removed. -- https://github.com/xiph/vorbis/pull/100 and - https://github.com/xiph/vorbis/pull/101 have been applied. -- GCC warnings in lib/lpc.c and lib/psy.c have been silenced. -- os.h has been modified to build for ARM64EC. -- All modifications have been marked with /* OpenMPT */. -- For building, premake is used to generate Visual Studio project files. - See ../build/premake/ for details. + * Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, + symbian, test, vq) have been removed. + * The following commits have been applied: + * https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa + * https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c + * GCC warnings in lib/lpc.c and lib/psy.c have been silenced. + * os.h has been modified to build for ARM64EC. + * All modifications have been marked with /* OpenMPT */. + * For building, premake is used to generate Visual Studio project files. + See ../build/premake/ for details. Modified: branches/OpenMPT-1.28/include/vorbis/include/vorbis/vorbisenc.h ============================================================================== --- branches/OpenMPT-1.28/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:17:32 2025 (r22998) +++ branches/OpenMPT-1.28/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:17:57 2025 (r22999) @@ -202,8 +202,8 @@ * * \param vi Pointer to an initialized vorbis_info struct. * - * \param number Specifies the desired action; See \ref encctlcodes "the list - * of available requests". + * \param number Specifies the desired action; See \ref encctlcodes + * "the list of available requests". * * \param arg void * pointing to a data structure matching the request * argument. @@ -298,7 +298,7 @@ * The type of the referent of that function's \c arg pointer depends on these * codes. */ -/*@{*/ +/**@{*/ /** * Query the current encoder bitrate management setting. @@ -424,7 +424,7 @@ */ #define OV_ECTL_RATEMANAGE_HARD 0x13 -/*@}*/ +/**@}*/ Modified: branches/OpenMPT-1.28/include/vorbis/lib/block.c ============================================================================== --- branches/OpenMPT-1.28/include/vorbis/lib/block.c Fri Mar 7 21:17:32 2025 (r22998) +++ branches/OpenMPT-1.28/include/vorbis/lib/block.c Fri Mar 7 21:17:57 2025 (r22999) @@ -392,9 +392,18 @@ private_state *b=v->backend_state; /* free header, header1, header2 */ - if(b->header){_ogg_free(b->header);b->header=NULL;} - if(b->header1){_ogg_free(b->header1);b->header1=NULL;} - if(b->header2){_ogg_free(b->header2);b->header2=NULL;} + if(b->header) { + _ogg_free(b->header); + b->header=NULL; + } + if(b->header1) { + _ogg_free(b->header1); + b->header1=NULL; + } + if(b->header2) { + _ogg_free(b->header2); + b->header2=NULL; + } /* Do we have enough storage space for the requested buffer? If not, expand the PCM (and envelope) storage */ Modified: branches/OpenMPT-1.28/include/vorbis/lib/psy.c ============================================================================== --- branches/OpenMPT-1.28/include/vorbis/lib/psy.c Fri Mar 7 21:17:32 2025 (r22998) +++ branches/OpenMPT-1.28/include/vorbis/lib/psy.c Fri Mar 7 21:17:57 2025 (r22999) @@ -339,6 +339,10 @@ if(halfoc<0)halfoc=0; if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1; inthalfoc=(int)halfoc; + /*If we hit the P_BANDS-1 clamp above, inthalfoc+1 will be out of bounds, + even though it will have an interpolation weight of 0. + Shift the interval so we don't read past the end of the array.*/ + if(inthalfoc>=P_BANDS-2)inthalfoc=P_BANDS-2; del=halfoc-inthalfoc; for(j=0;j<P_NOISECURVES;j++) Modified: branches/OpenMPT-1.28/include/vorbis/lib/sharedbook.c ============================================================================== --- branches/OpenMPT-1.28/include/vorbis/lib/sharedbook.c Fri Mar 7 21:17:32 2025 (r22998) +++ branches/OpenMPT-1.28/include/vorbis/lib/sharedbook.c Fri Mar 7 21:17:57 2025 (r22999) @@ -422,7 +422,7 @@ long lo=0,hi=0; for(i=0;i<tabn;i++){ - ogg_uint32_t word=i<<(32-c->dec_firsttablen); + ogg_uint32_t word=((ogg_uint32_t)i<<(32-c->dec_firsttablen)); if(c->dec_firsttable[bitreverse(word)]==0){ while((lo+1)<n && c->codelist[lo+1]<=word)lo++; while( hi<n && word>=(c->codelist[hi]&mask))hi++; @@ -581,7 +581,7 @@ exit(1); } } - free(out); + _ogg_free(out); } int main(){ |
From: <sv...@op...> - 2025-03-07 20:17:50
|
Author: manx Date: Fri Mar 7 21:17:32 2025 New Revision: 22998 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22998 Log: Merged revision(s) 22984 from trunk/OpenMPT: [Var] Vorbis: Apply the following patches from git master: <https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c>. ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/include/vorbis/OpenMPT.txt branches/OpenMPT-1.29/include/vorbis/include/vorbis/vorbisenc.h branches/OpenMPT-1.29/include/vorbis/lib/block.c branches/OpenMPT-1.29/include/vorbis/lib/psy.c branches/OpenMPT-1.29/include/vorbis/lib/sharedbook.c Modified: branches/OpenMPT-1.29/include/vorbis/OpenMPT.txt ============================================================================== --- branches/OpenMPT-1.29/include/vorbis/OpenMPT.txt Fri Mar 7 21:16:23 2025 (r22997) +++ branches/OpenMPT-1.29/include/vorbis/OpenMPT.txt Fri Mar 7 21:17:32 2025 (r22998) @@ -1,11 +1,16 @@ -libvorbis library version 1.3.7. +libvorbis library version 1.3.7 (2020-07-04). The following changes have been made: -- Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, - symbian, test, vq) have been removed. -- https://github.com/xiph/vorbis/pull/100 and - https://github.com/xiph/vorbis/pull/101 have been applied. -- GCC warnings in lib/lpc.c and lib/psy.c have been silenced. -- os.h has been modified to build for ARM64EC. -- All modifications have been marked with /* OpenMPT */. -- For building, premake is used to generate Visual Studio project files. - See ../build/premake/ for details. + * Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, + symbian, test, vq) have been removed. + * The following commits have been applied: + * https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa + * https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c + * GCC warnings in lib/lpc.c and lib/psy.c have been silenced. + * os.h has been modified to build for ARM64EC. + * All modifications have been marked with /* OpenMPT */. + * For building, premake is used to generate Visual Studio project files. + See ../build/premake/ for details. Modified: branches/OpenMPT-1.29/include/vorbis/include/vorbis/vorbisenc.h ============================================================================== --- branches/OpenMPT-1.29/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:16:23 2025 (r22997) +++ branches/OpenMPT-1.29/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:17:32 2025 (r22998) @@ -202,8 +202,8 @@ * * \param vi Pointer to an initialized vorbis_info struct. * - * \param number Specifies the desired action; See \ref encctlcodes "the list - * of available requests". + * \param number Specifies the desired action; See \ref encctlcodes + * "the list of available requests". * * \param arg void * pointing to a data structure matching the request * argument. @@ -298,7 +298,7 @@ * The type of the referent of that function's \c arg pointer depends on these * codes. */ -/*@{*/ +/**@{*/ /** * Query the current encoder bitrate management setting. @@ -424,7 +424,7 @@ */ #define OV_ECTL_RATEMANAGE_HARD 0x13 -/*@}*/ +/**@}*/ Modified: branches/OpenMPT-1.29/include/vorbis/lib/block.c ============================================================================== --- branches/OpenMPT-1.29/include/vorbis/lib/block.c Fri Mar 7 21:16:23 2025 (r22997) +++ branches/OpenMPT-1.29/include/vorbis/lib/block.c Fri Mar 7 21:17:32 2025 (r22998) @@ -392,9 +392,18 @@ private_state *b=v->backend_state; /* free header, header1, header2 */ - if(b->header){_ogg_free(b->header);b->header=NULL;} - if(b->header1){_ogg_free(b->header1);b->header1=NULL;} - if(b->header2){_ogg_free(b->header2);b->header2=NULL;} + if(b->header) { + _ogg_free(b->header); + b->header=NULL; + } + if(b->header1) { + _ogg_free(b->header1); + b->header1=NULL; + } + if(b->header2) { + _ogg_free(b->header2); + b->header2=NULL; + } /* Do we have enough storage space for the requested buffer? If not, expand the PCM (and envelope) storage */ Modified: branches/OpenMPT-1.29/include/vorbis/lib/psy.c ============================================================================== --- branches/OpenMPT-1.29/include/vorbis/lib/psy.c Fri Mar 7 21:16:23 2025 (r22997) +++ branches/OpenMPT-1.29/include/vorbis/lib/psy.c Fri Mar 7 21:17:32 2025 (r22998) @@ -339,6 +339,10 @@ if(halfoc<0)halfoc=0; if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1; inthalfoc=(int)halfoc; + /*If we hit the P_BANDS-1 clamp above, inthalfoc+1 will be out of bounds, + even though it will have an interpolation weight of 0. + Shift the interval so we don't read past the end of the array.*/ + if(inthalfoc>=P_BANDS-2)inthalfoc=P_BANDS-2; del=halfoc-inthalfoc; for(j=0;j<P_NOISECURVES;j++) Modified: branches/OpenMPT-1.29/include/vorbis/lib/sharedbook.c ============================================================================== --- branches/OpenMPT-1.29/include/vorbis/lib/sharedbook.c Fri Mar 7 21:16:23 2025 (r22997) +++ branches/OpenMPT-1.29/include/vorbis/lib/sharedbook.c Fri Mar 7 21:17:32 2025 (r22998) @@ -422,7 +422,7 @@ long lo=0,hi=0; for(i=0;i<tabn;i++){ - ogg_uint32_t word=i<<(32-c->dec_firsttablen); + ogg_uint32_t word=((ogg_uint32_t)i<<(32-c->dec_firsttablen)); if(c->dec_firsttable[bitreverse(word)]==0){ while((lo+1)<n && c->codelist[lo+1]<=word)lo++; while( hi<n && word>=(c->codelist[hi]&mask))hi++; @@ -581,7 +581,7 @@ exit(1); } } - free(out); + _ogg_free(out); } int main(){ |
From: <sv...@op...> - 2025-03-07 20:16:35
|
Author: manx Date: Fri Mar 7 21:16:23 2025 New Revision: 22997 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22997 Log: Merged revision(s) 22984 from trunk/OpenMPT: [Var] Vorbis: Apply the following patches from git master: <https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c>. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h branches/OpenMPT-1.30/include/vorbis/lib/block.c branches/OpenMPT-1.30/include/vorbis/lib/psy.c branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c Modified: branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt Fri Mar 7 21:16:23 2025 (r22997) @@ -1,12 +1,17 @@ -libvorbis library version 1.3.7. +libvorbis library version 1.3.7 (2020-07-04). The following changes have been made: -- Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, - symbian, test, vq) have been removed. -- Building for DJGPP has been fixed. -- https://github.com/xiph/vorbis/pull/100 and - https://github.com/xiph/vorbis/pull/101 have been applied. -- GCC warnings in lib/lpc.c and lib/psy.c have been silenced. -- os.h has been modified to build for ARM64EC. -- All modifications have been marked with /* OpenMPT */. -- For building, premake is used to generate Visual Studio project files. - See ../build/premake/ for details. + * Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, + symbian, test, vq) have been removed. + * The following commits have been applied: + * https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa + * https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c + * GCC warnings in lib/lpc.c and lib/psy.c have been silenced. + * Building for DJGPP has been fixed. + * os.h has been modified to build for ARM64EC. + * All modifications have been marked with /* OpenMPT */. + * For building, premake is used to generate Visual Studio project files. + See ../build/premake/ for details. Modified: branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:16:23 2025 (r22997) @@ -202,8 +202,8 @@ * * \param vi Pointer to an initialized vorbis_info struct. * - * \param number Specifies the desired action; See \ref encctlcodes "the list - * of available requests". + * \param number Specifies the desired action; See \ref encctlcodes + * "the list of available requests". * * \param arg void * pointing to a data structure matching the request * argument. @@ -298,7 +298,7 @@ * The type of the referent of that function's \c arg pointer depends on these * codes. */ -/*@{*/ +/**@{*/ /** * Query the current encoder bitrate management setting. @@ -424,7 +424,7 @@ */ #define OV_ECTL_RATEMANAGE_HARD 0x13 -/*@}*/ +/**@}*/ Modified: branches/OpenMPT-1.30/include/vorbis/lib/block.c ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/lib/block.c Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/lib/block.c Fri Mar 7 21:16:23 2025 (r22997) @@ -392,9 +392,18 @@ private_state *b=v->backend_state; /* free header, header1, header2 */ - if(b->header){_ogg_free(b->header);b->header=NULL;} - if(b->header1){_ogg_free(b->header1);b->header1=NULL;} - if(b->header2){_ogg_free(b->header2);b->header2=NULL;} + if(b->header) { + _ogg_free(b->header); + b->header=NULL; + } + if(b->header1) { + _ogg_free(b->header1); + b->header1=NULL; + } + if(b->header2) { + _ogg_free(b->header2); + b->header2=NULL; + } /* Do we have enough storage space for the requested buffer? If not, expand the PCM (and envelope) storage */ Modified: branches/OpenMPT-1.30/include/vorbis/lib/psy.c ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/lib/psy.c Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/lib/psy.c Fri Mar 7 21:16:23 2025 (r22997) @@ -339,6 +339,10 @@ if(halfoc<0)halfoc=0; if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1; inthalfoc=(int)halfoc; + /*If we hit the P_BANDS-1 clamp above, inthalfoc+1 will be out of bounds, + even though it will have an interpolation weight of 0. + Shift the interval so we don't read past the end of the array.*/ + if(inthalfoc>=P_BANDS-2)inthalfoc=P_BANDS-2; del=halfoc-inthalfoc; for(j=0;j<P_NOISECURVES;j++) Modified: branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c Fri Mar 7 21:16:23 2025 (r22997) @@ -422,7 +422,7 @@ long lo=0,hi=0; for(i=0;i<tabn;i++){ - ogg_uint32_t word=i<<(32-c->dec_firsttablen); + ogg_uint32_t word=((ogg_uint32_t)i<<(32-c->dec_firsttablen)); if(c->dec_firsttable[bitreverse(word)]==0){ while((lo+1)<n && c->codelist[lo+1]<=word)lo++; while( hi<n && word>=(c->codelist[hi]&mask))hi++; @@ -581,7 +581,7 @@ exit(1); } } - free(out); + _ogg_free(out); } int main(){ |