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
(353) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2025-06-26 08:21:26
|
Author: manx Date: Thu Jun 26 10:21:09 2025 New Revision: 23626 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23626 Log: [Fix] mpt/filemode/iostream.hpp: Make Clang happy. Modified: trunk/OpenMPT/src/mpt/filemode/iostream.hpp Modified: trunk/OpenMPT/src/mpt/filemode/iostream.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/filemode/iostream.hpp Thu Jun 26 10:16:20 2025 (r23625) +++ trunk/OpenMPT/src/mpt/filemode/iostream.hpp Thu Jun 26 10:21:09 2025 (r23626) @@ -35,7 +35,6 @@ class istream_guard { private: - std::istream * stream; std::optional<mpt::filemode::FILE_guard> guard; private: static std::FILE * get_FILE(std::istream & stream) { @@ -48,8 +47,7 @@ return result; } public: - istream_guard(std::istream & stream, mpt::filemode::mode mode) - : stream(&stream) { + istream_guard(std::istream & stream, mpt::filemode::mode mode) { guard = std::make_optional<mpt::filemode::FILE_guard>(get_FILE(stream), mode); } istream_guard(const istream_guard &) = delete; @@ -104,7 +102,6 @@ class wistream_guard { private: - std::wistream * stream; std::optional<mpt::filemode::FILE_guard> guard; private: static std::FILE * get_FILE(std::wistream & stream) { @@ -117,8 +114,7 @@ return result; } public: - wistream_guard(std::wistream & stream, mpt::filemode::mode mode) - : stream(&stream) { + wistream_guard(std::wistream & stream, mpt::filemode::mode mode) { guard = std::make_optional<mpt::filemode::FILE_guard>(get_FILE(stream), mode); } wistream_guard(const wistream_guard &) = delete; |
From: <sv...@op...> - 2025-06-26 08:16:28
|
Author: manx Date: Thu Jun 26 10:16:20 2025 New Revision: 23625 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23625 Log: [Var] Run clang-format. Modified: trunk/OpenMPT/src/mpt/filemode/fd.hpp trunk/OpenMPT/src/mpt/filemode/iostream.hpp trunk/OpenMPT/src/mpt/filemode/stdfile.hpp trunk/OpenMPT/src/mpt/filemode/stdio.hpp Modified: trunk/OpenMPT/src/mpt/filemode/fd.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/filemode/fd.hpp Thu Jun 26 10:09:00 2025 (r23624) +++ trunk/OpenMPT/src/mpt/filemode/fd.hpp Thu Jun 26 10:16:20 2025 (r23625) @@ -37,32 +37,31 @@ int fd; int old_mode; public: - fd_guard( int fd, mpt::filemode::mode new_mode ) + fd_guard(int fd, mpt::filemode::mode new_mode) : fd(fd) - , old_mode(-1) - { + , old_mode(-1) { switch (new_mode) { case mpt::filemode::mode::text: - old_mode = setmode( fd, O_TEXT ); - if ( old_mode == -1 ) { - throw mpt::runtime_error( MPT_USTRING("failed to set TEXT mode on file descriptor") ); + old_mode = setmode(fd, O_TEXT); + if (old_mode == -1) { + throw mpt::runtime_error(MPT_USTRING("failed to set TEXT mode on file descriptor")); } break; case mpt::filemode::mode::binary: - old_mode = setmode( fd, O_BINARY ); - if ( old_mode == -1 ) { - throw mpt::runtime_error( MPT_USTRING("failed to set BINARY mode on file descriptor") ); + old_mode = setmode(fd, O_BINARY); + if (old_mode == -1) { + throw mpt::runtime_error(MPT_USTRING("failed to set BINARY mode on file descriptor")); } break; } } - fd_guard( const fd_guard & ) = delete; - fd_guard( fd_guard && ) = default; - fd_guard & operator=( const fd_guard & ) = delete; - fd_guard & operator=( fd_guard && ) = default; + fd_guard(const fd_guard &) = delete; + fd_guard(fd_guard &&) = default; + fd_guard & operator=(const fd_guard &) = delete; + fd_guard & operator=(fd_guard &&) = default; ~fd_guard() { - if ( old_mode != -1 ) { - old_mode = setmode( fd, old_mode ); + if (old_mode != -1) { + old_mode = setmode(fd, old_mode); } } }; @@ -74,36 +73,35 @@ int fd; int old_mode; public: - fd_guard( int fd, mpt::filemode::mode new_mode ) + fd_guard(int fd, mpt::filemode::mode new_mode) : fd(fd) - , old_mode(-1) - { + , old_mode(-1) { switch (new_mode) { case mpt::filemode::mode::text: - #if defined(UNICODE) && MPT_LIBC_MS_AT_LEAST(MPT_LIBC_MS_VER_UCRT) - old_mode = _setmode( fd, _O_U8TEXT ); - #else - old_mode = _setmode( fd, _O_TEXT ); - #endif - if ( old_mode == -1 ) { - throw mpt::runtime_error( MPT_USTRING("failed to set TEXT mode on file descriptor") ); +#if defined(UNICODE) && MPT_LIBC_MS_AT_LEAST(MPT_LIBC_MS_VER_UCRT) + old_mode = _setmode(fd, _O_U8TEXT); +#else + old_mode = _setmode(fd, _O_TEXT); +#endif + if (old_mode == -1) { + throw mpt::runtime_error(MPT_USTRING("failed to set TEXT mode on file descriptor")); } break; case mpt::filemode::mode::binary: - old_mode = _setmode( fd, _O_BINARY ); - if ( old_mode == -1 ) { - throw mpt::runtime_error( MPT_USTRING("failed to set BINARY mode on file descriptor") ); + old_mode = _setmode(fd, _O_BINARY); + if (old_mode == -1) { + throw mpt::runtime_error(MPT_USTRING("failed to set BINARY mode on file descriptor")); } break; } } - fd_guard( const fd_guard & ) = delete; - fd_guard( fd_guard && ) = default; - fd_guard & operator=( const fd_guard & ) = delete; - fd_guard & operator=( fd_guard && ) = default; + fd_guard(const fd_guard &) = delete; + fd_guard(fd_guard &&) = default; + fd_guard & operator=(const fd_guard &) = delete; + fd_guard & operator=(fd_guard &&) = default; ~fd_guard() { - if ( old_mode != -1 ) { - old_mode = _setmode( fd, old_mode ); + if (old_mode != -1) { + old_mode = _setmode(fd, old_mode); } } }; @@ -112,13 +110,13 @@ class fd_guard { public: - fd_guard( int * /* fd */, mpt::filemode::mode /* new_mode */ ) { + fd_guard(int * /* fd */, mpt::filemode::mode /* new_mode */) { return; } - fd_guard( const fd_guard & ) = delete; - fd_guard( fd_guard && ) = default; - fd_guard & operator=( const fd_guard & ) = delete; - fd_guard & operator=( fd_guard && ) = default; + fd_guard(const fd_guard &) = delete; + fd_guard(fd_guard &&) = default; + fd_guard & operator=(const fd_guard &) = delete; + fd_guard & operator=(fd_guard &&) = default; ~fd_guard() = default; }; Modified: trunk/OpenMPT/src/mpt/filemode/iostream.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/filemode/iostream.hpp Thu Jun 26 10:09:00 2025 (r23624) +++ trunk/OpenMPT/src/mpt/filemode/iostream.hpp Thu Jun 26 10:16:20 2025 (r23625) @@ -38,25 +38,24 @@ std::istream * stream; std::optional<mpt::filemode::FILE_guard> guard; private: - static std::FILE * get_FILE( std::istream & stream ) { + static std::FILE * get_FILE(std::istream & stream) { std::FILE * result = NULL; - if ( &stream == &std::cin ) { + if (&stream == &std::cin) { result = stdin; } else { - throw mpt::runtime_error( MPT_USTRING("invalid iostream") ); + throw mpt::runtime_error(MPT_USTRING("invalid iostream")); } return result; } public: - istream_guard( std::istream & stream, mpt::filemode::mode mode ) - : stream( &stream ) - { - guard = std::make_optional<mpt::filemode::FILE_guard>( get_FILE( stream ), mode ); - } - istream_guard( const istream_guard & ) = delete; - istream_guard( istream_guard && ) = default; - istream_guard & operator=( const istream_guard & ) = delete; - istream_guard & operator=( istream_guard && ) = default; + istream_guard(std::istream & stream, mpt::filemode::mode mode) + : stream(&stream) { + guard = std::make_optional<mpt::filemode::FILE_guard>(get_FILE(stream), mode); + } + istream_guard(const istream_guard &) = delete; + istream_guard(istream_guard &&) = default; + istream_guard & operator=(const istream_guard &) = delete; + istream_guard & operator=(istream_guard &&) = default; ~istream_guard() { guard = std::nullopt; } @@ -69,29 +68,28 @@ std::ostream * stream; std::optional<mpt::filemode::FILE_guard> guard; private: - static std::FILE * get_FILE( std::ostream & stream ) { + static std::FILE * get_FILE(std::ostream & stream) { std::FILE * result = NULL; - if ( &stream == &std::cout ) { + if (&stream == &std::cout) { result = stdout; - } else if ( &stream == &std::cerr ) { + } else if (&stream == &std::cerr) { result = stderr; - } else if ( &stream == &std::clog ) { + } else if (&stream == &std::clog) { result = stderr; } else { - throw mpt::runtime_error( MPT_USTRING("invalid iostream") ); + throw mpt::runtime_error(MPT_USTRING("invalid iostream")); } return result; } public: - ostream_guard( std::ostream & stream, mpt::filemode::mode mode ) - : stream( &stream ) - { - guard = std::make_optional<mpt::filemode::FILE_guard>( get_FILE( stream ), mode ); - } - ostream_guard( const ostream_guard & ) = delete; - ostream_guard( ostream_guard && ) = default; - ostream_guard & operator=( const ostream_guard & ) = delete; - ostream_guard & operator=( ostream_guard && ) = default; + ostream_guard(std::ostream & stream, mpt::filemode::mode mode) + : stream(&stream) { + guard = std::make_optional<mpt::filemode::FILE_guard>(get_FILE(stream), mode); + } + ostream_guard(const ostream_guard &) = delete; + ostream_guard(ostream_guard &&) = default; + ostream_guard & operator=(const ostream_guard &) = delete; + ostream_guard & operator=(ostream_guard &&) = default; ~ostream_guard() { stream->flush(); guard = std::nullopt; @@ -109,25 +107,24 @@ std::wistream * stream; std::optional<mpt::filemode::FILE_guard> guard; private: - static std::FILE * get_FILE( std::wistream & stream ) { + static std::FILE * get_FILE(std::wistream & stream) { std::FILE * result = NULL; - if ( &stream == &std::wcin ) { + if (&stream == &std::wcin) { result = stdin; } else { - throw mpt::runtime_error( MPT_USTRING("invalid iostream") ); + throw mpt::runtime_error(MPT_USTRING("invalid iostream")); } return result; } public: - wistream_guard( std::wistream & stream, mpt::filemode::mode mode ) - : stream( &stream ) - { - guard = std::make_optional<mpt::filemode::FILE_guard>( get_FILE( stream ), mode ); - } - wistream_guard( const wistream_guard & ) = delete; - wistream_guard( wistream_guard && ) = default; - wistream_guard & operator=( const wistream_guard & ) = delete; - wistream_guard & operator=( wistream_guard && ) = default; + wistream_guard(std::wistream & stream, mpt::filemode::mode mode) + : stream(&stream) { + guard = std::make_optional<mpt::filemode::FILE_guard>(get_FILE(stream), mode); + } + wistream_guard(const wistream_guard &) = delete; + wistream_guard(wistream_guard &&) = default; + wistream_guard & operator=(const wistream_guard &) = delete; + wistream_guard & operator=(wistream_guard &&) = default; ~wistream_guard() { guard = std::nullopt; } @@ -140,29 +137,28 @@ std::wostream * stream; std::optional<mpt::filemode::FILE_guard> guard; private: - static std::FILE * get_FILE( std::wostream & stream ) { + static std::FILE * get_FILE(std::wostream & stream) { std::FILE * result = NULL; - if ( &stream == &std::wcout ) { + if (&stream == &std::wcout) { result = stdout; - } else if ( &stream == &std::wcerr ) { + } else if (&stream == &std::wcerr) { result = stderr; - } else if ( &stream == &std::wclog ) { + } else if (&stream == &std::wclog) { result = stderr; } else { - throw mpt::runtime_error( MPT_USTRING("invalid iostream") ); + throw mpt::runtime_error(MPT_USTRING("invalid iostream")); } return result; } public: - wostream_guard( std::wostream & stream, mpt::filemode::mode mode ) - : stream( &stream ) - { - guard = std::make_optional<mpt::filemode::FILE_guard>( get_FILE( stream ), mode ); - } - wostream_guard( const wostream_guard & ) = delete; - wostream_guard( wostream_guard && ) = default; - wostream_guard & operator=( const wostream_guard & ) = delete; - wostream_guard & operator=( wostream_guard && ) = default; + wostream_guard(std::wostream & stream, mpt::filemode::mode mode) + : stream(&stream) { + guard = std::make_optional<mpt::filemode::FILE_guard>(get_FILE(stream), mode); + } + wostream_guard(const wostream_guard &) = delete; + wostream_guard(wostream_guard &&) = default; + wostream_guard & operator=(const wostream_guard &) = delete; + wostream_guard & operator=(wostream_guard &&) = default; ~wostream_guard() { stream->flush(); guard = std::nullopt; Modified: trunk/OpenMPT/src/mpt/filemode/stdfile.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/filemode/stdfile.hpp Thu Jun 26 10:09:00 2025 (r23624) +++ trunk/OpenMPT/src/mpt/filemode/stdfile.hpp Thu Jun 26 10:16:20 2025 (r23625) @@ -38,18 +38,17 @@ std::FILE * file; std::optional<mpt::filemode::fd_guard> guard; public: - FILE_guard( std::FILE * file, mpt::filemode::mode new_mode ) - : file(file) - { - std::fflush( file ); - guard = std::make_optional<mpt::filemode::fd_guard>( fileno( file ), new_mode ); + FILE_guard(std::FILE * file, mpt::filemode::mode new_mode) + : file(file) { + std::fflush(file); + guard = std::make_optional<mpt::filemode::fd_guard>(fileno(file), new_mode); } - FILE_guard( const FILE_guard & ) = delete; - FILE_guard( FILE_guard && ) = default; - FILE_guard & operator=( const FILE_guard & ) = delete; - FILE_guard & operator=( FILE_guard && ) = default; + FILE_guard(const FILE_guard &) = delete; + FILE_guard(FILE_guard &&) = default; + FILE_guard & operator=(const FILE_guard &) = delete; + FILE_guard & operator=(FILE_guard &&) = default; ~FILE_guard() { - std::fflush( file ); + std::fflush(file); guard = std::nullopt; } }; @@ -61,18 +60,17 @@ std::FILE * file; std::optional<mpt::filemode::fd_guard> guard; public: - FILE_guard( std::FILE * file, mpt::filemode::mode new_mode ) - : file(file) - { - std::fflush( file ); - guard = std::make_optional<mpt::filemode::fd_guard>( _fileno( file ), new_mode ); + FILE_guard(std::FILE * file, mpt::filemode::mode new_mode) + : file(file) { + std::fflush(file); + guard = std::make_optional<mpt::filemode::fd_guard>(_fileno(file), new_mode); } - FILE_guard( const FILE_guard & ) = delete; - FILE_guard( FILE_guard && ) = default; - FILE_guard & operator=( const FILE_guard & ) = delete; - FILE_guard & operator=( FILE_guard && ) = default; + FILE_guard(const FILE_guard &) = delete; + FILE_guard(FILE_guard &&) = default; + FILE_guard & operator=(const FILE_guard &) = delete; + FILE_guard & operator=(FILE_guard &&) = default; ~FILE_guard() { - std::fflush( file ); + std::fflush(file); guard = std::nullopt; } }; @@ -81,13 +79,13 @@ class FILE_guard { public: - FILE_guard( std::FILE * /* file */, mpt::filemode::mode /* new_mode */ ) { + FILE_guard(std::FILE * /* file */, mpt::filemode::mode /* new_mode */) { return; } - FILE_guard( const FILE_guard & ) = delete; - FILE_guard( FILE_guard && ) = default; - FILE_guard & operator=( const FILE_guard & ) = delete; - FILE_guard & operator=( FILE_guard && ) = default; + FILE_guard(const FILE_guard &) = delete; + FILE_guard(FILE_guard &&) = default; + FILE_guard & operator=(const FILE_guard &) = delete; + FILE_guard & operator=(FILE_guard &&) = default; ~FILE_guard() = default; }; Modified: trunk/OpenMPT/src/mpt/filemode/stdio.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/filemode/stdio.hpp Thu Jun 26 10:09:00 2025 (r23624) +++ trunk/OpenMPT/src/mpt/filemode/stdio.hpp Thu Jun 26 10:16:20 2025 (r23625) @@ -34,64 +34,64 @@ std::variant<std::monostate, mpt::filemode::istream_guard, mpt::filemode::ostream_guard> guard; #endif public: - stdio_guard( stdio which, mpt::filemode::mode mode ) { + stdio_guard(stdio which, mpt::filemode::mode mode) { #if MPT_OS_WINDOWS && defined(UNICODE) - switch ( which ) { + switch (which) { case mpt::filemode::stdio::input: - if ( mode == mpt::filemode::mode::text ) { - guard = mpt::filemode::wistream_guard( std::wcin, mode ); + if (mode == mpt::filemode::mode::text) { + guard = mpt::filemode::wistream_guard(std::wcin, mode); } else { - guard = mpt::filemode::istream_guard( std::cin, mode ); + guard = mpt::filemode::istream_guard(std::cin, mode); } break; case mpt::filemode::stdio::output: - if ( mode == mpt::filemode::mode::text ) { - guard = mpt::filemode::wostream_guard( std::wcout, mode ); + if (mode == mpt::filemode::mode::text) { + guard = mpt::filemode::wostream_guard(std::wcout, mode); } else { - guard = mpt::filemode::ostream_guard( std::cout, mode ); + guard = mpt::filemode::ostream_guard(std::cout, mode); } break; case mpt::filemode::stdio::error: - if ( mode == mpt::filemode::mode::text ) { - guard = mpt::filemode::wostream_guard( std::wcerr, mode ); + if (mode == mpt::filemode::mode::text) { + guard = mpt::filemode::wostream_guard(std::wcerr, mode); } else { - guard = mpt::filemode::ostream_guard( std::cerr, mode ); + guard = mpt::filemode::ostream_guard(std::cerr, mode); } break; case mpt::filemode::stdio::log: - if ( mode == mpt::filemode::mode::text ) { - guard = mpt::filemode::wostream_guard( std::wclog, mode ); + if (mode == mpt::filemode::mode::text) { + guard = mpt::filemode::wostream_guard(std::wclog, mode); } else { - guard = mpt::filemode::ostream_guard( std::clog, mode ); + guard = mpt::filemode::ostream_guard(std::clog, mode); } break; default: - throw mpt::runtime_error( MPT_USTRING("invalid stdio") ); + throw mpt::runtime_error(MPT_USTRING("invalid stdio")); break; #else - switch ( which ) { + switch (which) { case mpt::filemode::stdio::input: - guard = mpt::filemode::istream_guard( std::cin, mode ); + guard = mpt::filemode::istream_guard(std::cin, mode); break; case mpt::filemode::stdio::output: - guard = mpt::filemode::ostream_guard( std::cout, mode ); + guard = mpt::filemode::ostream_guard(std::cout, mode); break; case mpt::filemode::stdio::error: - guard = mpt::filemode::ostream_guard( std::cerr, mode ); + guard = mpt::filemode::ostream_guard(std::cerr, mode); break; case mpt::filemode::stdio::log: - guard = mpt::filemode::ostream_guard( std::clog, mode ); + guard = mpt::filemode::ostream_guard(std::clog, mode); break; default: - throw mpt::runtime_error( MPT_USTRING("invalid stdio") ); + throw mpt::runtime_error(MPT_USTRING("invalid stdio")); break; #endif } } - stdio_guard( const stdio_guard & ) = delete; - stdio_guard( stdio_guard && ) = default; - stdio_guard & operator=( const stdio_guard & ) = delete; - stdio_guard & operator=( stdio_guard && ) = default; + stdio_guard(const stdio_guard &) = delete; + stdio_guard(stdio_guard &&) = default; + stdio_guard & operator=(const stdio_guard &) = delete; + stdio_guard & operator=(stdio_guard &&) = default; ~stdio_guard() { guard = std::monostate{}; } |
From: <sv...@op...> - 2025-06-26 08:09:14
|
Author: manx Date: Thu Jun 26 10:09:00 2025 New Revision: 23624 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23624 Log: [Imp] openmpt123: Untie stdin and stderr from stdout if either is binary data. Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp Thu Jun 26 10:05:39 2025 (r23623) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp Thu Jun 26 10:09:00 2025 (r23624) @@ -2223,6 +2223,22 @@ [[maybe_unused]] std::optional<mpt::filemode::stdio_guard> stdin_text_guard{ stdin_text ? std::make_optional<mpt::filemode::stdio_guard>( mpt::filemode::stdio::input, mpt::filemode::mode::text ) : std::nullopt }; [[maybe_unused]] std::optional<terminal_ui_guard> input_guard{ stdin_text && ( flags.mode == Mode::UI ) ? std::make_optional<terminal_ui_guard>() : std::nullopt }; + // untie stdin and stdout + if ( stdin_data || stdout_data ) { + std::cin.tie( nullptr ); + #if MPT_OS_WINDOWS && defined(UNICODE) + std::wcin.tie( nullptr ); + #endif + } + + // untie stderr and stdout + if ( stdout_data ) { + std::cerr.tie( nullptr ); + #if MPT_OS_WINDOWS && defined(UNICODE) + std::wcerr.tie( nullptr ); + #endif + } + // choose text output between quiet/stdout/stderr textout_dummy dummy_log; textout & log = flags.quiet ? static_cast<textout&>( dummy_log ) : stdout_text ? static_cast<textout&>( std_out ) : static_cast<textout&>( std_err ); |
From: <sv...@op...> - 2025-06-26 08:05:53
|
Author: manx Date: Thu Jun 26 10:05:39 2025 New Revision: 23623 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23623 Log: [Ref] mpt/filemode: Add a generic interface for handling DOS/Windows setmode() on stdin/stdout/stderr. [Ref] openmpt123: Use mpt::filemode. Added: trunk/OpenMPT/src/mpt/filemode/ trunk/OpenMPT/src/mpt/filemode/fd.hpp - copied, changed from r23618, trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp trunk/OpenMPT/src/mpt/filemode/filemode.hpp - copied, changed from r23622, trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp trunk/OpenMPT/src/mpt/filemode/iostream.hpp - copied, changed from r23618, trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp trunk/OpenMPT/src/mpt/filemode/stdfile.hpp - copied, changed from r23618, trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp trunk/OpenMPT/src/mpt/filemode/stdio.hpp - copied, changed from r23618, trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp Deleted: trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp Modified: trunk/OpenMPT/Makefile trunk/OpenMPT/build/autotools/Makefile.am trunk/OpenMPT/build/autotools/autoconfiscate.sh trunk/OpenMPT/build/premake-xcode/mpt-libopenmpt.lua trunk/OpenMPT/build/premake/mpt-OpenMPT-NativeSupport.lua trunk/OpenMPT/build/premake/mpt-OpenMPT.lua trunk/OpenMPT/build/premake/mpt-PluginBridge.lua trunk/OpenMPT/build/premake/mpt-libopenmpt-small.lua trunk/OpenMPT/build/premake/mpt-libopenmpt.lua trunk/OpenMPT/build/premake/mpt-libopenmpt_test.lua trunk/OpenMPT/build/premake/mpt-openmpt123.lua trunk/OpenMPT/build/premake/mpt-updatesigntool.lua trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj.filters trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj.filters trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/Makefile ============================================================================== --- trunk/OpenMPT/Makefile Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/Makefile Thu Jun 26 10:05:39 2025 (r23623) @@ -2113,6 +2113,7 @@ svn export ./src/mpt/endian bin/$(FLAVOUR_DIR)dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/endian svn export ./src/mpt/environment bin/$(FLAVOUR_DIR)dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/environment svn export ./src/mpt/exception bin/$(FLAVOUR_DIR)dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/exception + svn export ./src/mpt/filemode bin/$(FLAVOUR_DIR)dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/filemode svn export ./src/mpt/format bin/$(FLAVOUR_DIR)dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/format #svn export ./src/mpt/fs bin/$(FLAVOUR_DIR)dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/fs svn export ./src/mpt/io bin/$(FLAVOUR_DIR)dist-tar/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/io @@ -2217,6 +2218,7 @@ svn export ./src/mpt/endian bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/endian --native-eol CRLF svn export ./src/mpt/environment bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/environment --native-eol CRLF svn export ./src/mpt/exception bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/exception --native-eol CRLF + svn export ./src/mpt/filemode bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/filemode --native-eol CRLF svn export ./src/mpt/format bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/format --native-eol CRLF #svn export ./src/mpt/fs bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/fs --native-eol CRLF svn export ./src/mpt/io bin/$(FLAVOUR_DIR)dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/src/mpt/io --native-eol CRLF Modified: trunk/OpenMPT/build/autotools/Makefile.am ============================================================================== --- trunk/OpenMPT/build/autotools/Makefile.am Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/autotools/Makefile.am Thu Jun 26 10:05:39 2025 (r23623) @@ -191,6 +191,11 @@ MPT_FILES_SRC_MPT += src/mpt/exception/exception_text.hpp MPT_FILES_SRC_MPT += src/mpt/exception/logic_error.hpp MPT_FILES_SRC_MPT += src/mpt/exception/runtime_error.hpp +MPT_FILES_SRC_MPT += src/mpt/filemode/fd.hpp +MPT_FILES_SRC_MPT += src/mpt/filemode/filemode.hpp +MPT_FILES_SRC_MPT += src/mpt/filemode/iostream.hpp +MPT_FILES_SRC_MPT += src/mpt/filemode/stdfile.hpp +MPT_FILES_SRC_MPT += src/mpt/filemode/stdio.hpp MPT_FILES_SRC_MPT += src/mpt/format/concat.hpp MPT_FILES_SRC_MPT += src/mpt/format/default_floatingpoint.hpp MPT_FILES_SRC_MPT += src/mpt/format/default_formatter.hpp @@ -718,7 +723,6 @@ bin_openmpt123_SOURCES += openmpt123/openmpt123_raw.hpp bin_openmpt123_SOURCES += openmpt123/openmpt123_sdl2.hpp bin_openmpt123_SOURCES += openmpt123/openmpt123_sndfile.hpp -bin_openmpt123_SOURCES += openmpt123/openmpt123_stdio.hpp bin_openmpt123_SOURCES += openmpt123/openmpt123_stdout.hpp bin_openmpt123_SOURCES += openmpt123/openmpt123_terminal.hpp bin_openmpt123_SOURCES += openmpt123/openmpt123_waveout.hpp Modified: trunk/OpenMPT/build/autotools/autoconfiscate.sh ============================================================================== --- trunk/OpenMPT/build/autotools/autoconfiscate.sh Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/autotools/autoconfiscate.sh Thu Jun 26 10:05:39 2025 (r23623) @@ -115,6 +115,7 @@ svn export ./src/mpt/endian bin/dist-autotools/src/mpt/endian svn export ./src/mpt/environment bin/dist-autotools/src/mpt/environment svn export ./src/mpt/exception bin/dist-autotools/src/mpt/exception +svn export ./src/mpt/filemode bin/dist-autotools/src/mpt/filemode svn export ./src/mpt/format bin/dist-autotools/src/mpt/format #svn export ./src/mpt/fs bin/dist-autotools/src/mpt/fs svn export ./src/mpt/io bin/dist-autotools/src/mpt/io @@ -192,6 +193,7 @@ cp -r ./src/mpt/endian bin/dist-autotools/src/mpt/endian cp -r ./src/mpt/environment bin/dist-autotools/src/mpt/environment cp -r ./src/mpt/exception bin/dist-autotools/src/mpt/exception +cp -r ./src/mpt/filemode bin/dist-autotools/src/mpt/filemode cp -r ./src/mpt/format bin/dist-autotools/src/mpt/format #cp -r ./src/mpt/fs bin/dist-autotools/src/mpt/fs cp -r ./src/mpt/io bin/dist-autotools/src/mpt/io Modified: trunk/OpenMPT/build/premake-xcode/mpt-libopenmpt.lua ============================================================================== --- trunk/OpenMPT/build/premake-xcode/mpt-libopenmpt.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake-xcode/mpt-libopenmpt.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -43,6 +43,8 @@ excludes { "../../src/mpt/crypto/**.cpp", "../../src/mpt/crypto/**.hpp", + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/fs/**.cpp", "../../src/mpt/fs/**.hpp", "../../src/mpt/json/**.cpp", Modified: trunk/OpenMPT/build/premake/mpt-OpenMPT-NativeSupport.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-OpenMPT-NativeSupport.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-OpenMPT-NativeSupport.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -35,6 +35,8 @@ } excludes { "../../mptrack/wine/WineWrapper.cpp", + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/main/**.cpp", "../../src/mpt/main/**.hpp", "../../src/openmpt/fileformat_base/**.cpp", Modified: trunk/OpenMPT/build/premake/mpt-OpenMPT.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-OpenMPT.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-OpenMPT.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -119,6 +119,8 @@ "../../pluginBridge/BridgeWrapper.h", } excludes { + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/main/**.cpp", "../../src/mpt/main/**.hpp", } Modified: trunk/OpenMPT/build/premake/mpt-PluginBridge.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-PluginBridge.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-PluginBridge.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -23,6 +23,8 @@ "../../common/versionNumber.h", } excludes { + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/main/**.cpp", "../../src/mpt/main/**.hpp", "../../src/openmpt/fileformat_base/**.cpp", @@ -87,6 +89,8 @@ "../../common/versionNumber.h", } excludes { + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/main/**.cpp", "../../src/mpt/main/**.hpp", "../../src/openmpt/fileformat_base/**.cpp", Modified: trunk/OpenMPT/build/premake/mpt-libopenmpt-small.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-libopenmpt-small.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-libopenmpt-small.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -60,6 +60,8 @@ excludes { "../../src/mpt/crypto/**.cpp", "../../src/mpt/crypto/**.hpp", + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/fs/**.cpp", "../../src/mpt/fs/**.hpp", "../../src/mpt/json/**.cpp", Modified: trunk/OpenMPT/build/premake/mpt-libopenmpt.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-libopenmpt.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-libopenmpt.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -46,6 +46,8 @@ excludes { "../../src/mpt/crypto/**.cpp", "../../src/mpt/crypto/**.hpp", + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/fs/**.cpp", "../../src/mpt/fs/**.hpp", "../../src/mpt/json/**.cpp", Modified: trunk/OpenMPT/build/premake/mpt-libopenmpt_test.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-libopenmpt_test.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-libopenmpt_test.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -69,6 +69,8 @@ excludes { "../../src/mpt/crypto/**.cpp", "../../src/mpt/crypto/**.hpp", + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/fs/**.cpp", "../../src/mpt/fs/**.hpp", "../../src/mpt/json/**.cpp", Modified: trunk/OpenMPT/build/premake/mpt-openmpt123.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-openmpt123.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-openmpt123.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -30,6 +30,7 @@ "../../src/mpt/chrono/*.hpp", "../../src/mpt/detect/*.hpp", "../../src/mpt/exception/*.hpp", + "../../src/mpt/filemode/*.hpp", "../../src/mpt/format/*.hpp", "../../src/mpt/io/*.hpp", "../../src/mpt/io_file/*.hpp", Modified: trunk/OpenMPT/build/premake/mpt-updatesigntool.lua ============================================================================== --- trunk/OpenMPT/build/premake/mpt-updatesigntool.lua Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/premake/mpt-updatesigntool.lua Thu Jun 26 10:05:39 2025 (r23623) @@ -24,6 +24,8 @@ "../../installer/updatesigntool/*.h", } excludes { + "../../src/mpt/filemode/**.cpp", + "../../src/mpt/filemode/**.hpp", "../../src/mpt/main/**.cpp", "../../src/mpt/main/**.hpp", "../../src/openmpt/fileformat_base/**.cpp", Modified: trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -748,7 +748,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -800,6 +799,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2017winxp/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -25,6 +25,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -87,9 +90,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -243,6 +243,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -748,7 +748,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -800,6 +799,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2017winxpansi/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -25,6 +25,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -87,9 +90,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -243,6 +243,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -757,7 +757,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -809,6 +808,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2019win7/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -1509,7 +1509,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -1561,6 +1560,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win10/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -1515,7 +1515,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -1567,6 +1566,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win10uwp/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -1511,7 +1511,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -1563,6 +1562,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win11/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -1069,7 +1069,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -1121,6 +1120,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win11clang/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -1145,7 +1145,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -1197,6 +1196,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win11uwp/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -765,7 +765,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -817,6 +816,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win7/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -1137,7 +1137,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -1189,6 +1188,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win8/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj Thu Jun 26 10:05:39 2025 (r23623) @@ -1137,7 +1137,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_raw.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sdl2.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp" /> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_terminal.hpp" /> <ClInclude Include="..\..\openmpt123\openmpt123_waveout.hpp" /> @@ -1189,6 +1188,11 @@ <ClInclude Include="..\..\src\mpt\exception\exception_text.hpp" /> <ClInclude Include="..\..\src\mpt\exception\logic_error.hpp" /> <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp" /> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp" /> <ClInclude Include="..\..\src\mpt\format\concat.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_floatingpoint.hpp" /> <ClInclude Include="..\..\src\mpt\format\default_formatter.hpp" /> Modified: trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj.filters Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/build/vs2022win81/openmpt123.vcxproj.filters Thu Jun 26 10:05:39 2025 (r23623) @@ -31,6 +31,9 @@ <Filter Include="src\mpt\exception"> <UniqueIdentifier>{2B7E92B2-9794-9048-E00B-1C6A4C6161D0}</UniqueIdentifier> </Filter> + <Filter Include="src\mpt\filemode"> + <UniqueIdentifier>{4132C08B-2D2B-DFDD-565D-C46242B5BEE9}</UniqueIdentifier> + </Filter> <Filter Include="src\mpt\format"> <UniqueIdentifier>{C5847241-B152-6647-9AE6-D66D865342AC}</UniqueIdentifier> </Filter> @@ -93,9 +96,6 @@ <ClInclude Include="..\..\openmpt123\openmpt123_sndfile.hpp"> <Filter>openmpt123</Filter> </ClInclude> - <ClInclude Include="..\..\openmpt123\openmpt123_stdio.hpp"> - <Filter>openmpt123</Filter> - </ClInclude> <ClInclude Include="..\..\openmpt123\openmpt123_stdout.hpp"> <Filter>openmpt123</Filter> </ClInclude> @@ -249,6 +249,21 @@ <ClInclude Include="..\..\src\mpt\exception\runtime_error.hpp"> <Filter>src\mpt\exception</Filter> </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\fd.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\filemode.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\iostream.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdfile.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> + <ClInclude Include="..\..\src\mpt\filemode\stdio.hpp"> + <Filter>src\mpt\filemode</Filter> + </ClInclude> <ClInclude Include="..\..\src\mpt\format\concat.hpp"> <Filter>src\mpt\format</Filter> </ClInclude> Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp Thu Jun 26 07:14:01 2025 (r23622) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp Thu Jun 26 10:05:39 2025 (r23623) @@ -47,8 +47,9 @@ #include "mpt/base/algorithm.hpp" #include "mpt/base/detect.hpp" +#include "mpt/filemode/filemode.hpp" +#include "mpt/filemode/stdio.hpp" #include "mpt/main/main.hpp" - #include "mpt/random/crand.hpp" #include "mpt/random/default_engines.hpp" #include "mpt/random/device.hpp" @@ -74,7 +75,6 @@ #include <cassert> #include <cmath> #include <cstdint> -#include <cstdio> #include <cstdlib> #include <cstring> @@ -87,7 +87,6 @@ #include "openmpt123.hpp" #include "openmpt123_exception.hpp" -#include "openmpt123_stdio.hpp" #include "openmpt123_terminal.hpp" #include "openmpt123_flac.hpp" @@ -2116,8 +2115,9 @@ static mpt::uint8 main( std::vector<mpt::ustring> args ) { - FILE_mode_guard stdout_text_guard( stdout, FILE_mode::text ); - FILE_mode_guard stderr_text_guard( stderr, FILE_mode::text ); + mpt::filemode::stdio_guard stdout_text_guard( mpt::filemode::stdio::output, mpt::filemode::mode::text ); + mpt::filemode::stdio_guard stderr_text_guard( mpt::filemode::stdio::error, mpt::filemode::mode::text ); + mpt::filemode::stdio_guard stdlog_text_guard( mpt::filemode::stdio::log, mpt::filemode::mode::text ); textout_wrapper<textout_destination::destination_stdout> std_out; textout_wrapper<textout_destination::destination_stderr> std_err; @@ -2207,20 +2207,20 @@ try { - const FILE_mode stdin_mode = mpt::contains( flags.filenames, MPT_NATIVE_PATH("-") ) ? FILE_mode::binary : FILE_mode::text; - const FILE_mode stdout_mode = flags.use_stdout ? FILE_mode::binary : FILE_mode::text; + const mpt::filemode::mode stdin_mode = mpt::contains( flags.filenames, MPT_NATIVE_PATH("-") ) ? mpt::filemode::mode::binary : mpt::filemode::mode::text; + const mpt::filemode::mode stdout_mode = flags.use_stdout ? mpt::filemode::mode::binary : mpt::filemode::mode::text; - const bool stdin_text = ( stdin_mode == FILE_mode::text ); - const bool stdin_data = ( stdin_mode == FILE_mode::binary ); - const bool stdout_text = ( stdout_mode == FILE_mode::text ); - const bool stdout_data = ( stdout_mode == FILE_mode::binary ); + const bool stdin_text = ( stdin_mode == mpt::filemode::mode::text ); + const bool stdin_data = ( stdin_mode == mpt::filemode::mode::binary ); + const bool stdout_text = ( stdout_mode == mpt::filemode::mode::text ); + const bool stdout_data = ( stdout_mode == mpt::filemode::mode::binary ); // set stdin/stdout to binary for data input/output - [[maybe_unused]] std::optional<FILE_mode_guard> stdin_guard{ stdin_data ? std::make_optional<FILE_mode_guard>( stdin, FILE_mode::binary ) : std::nullopt }; - [[maybe_unused]] std::optional<FILE_mode_guard> stdout_guard{ stdout_data ? std::make_optional<FILE_mode_guard>( stdout, FILE_mode::binary ) : std::nullopt }; + [[maybe_unused]] std::optional<mpt::filemode::stdio_guard> stdin_guard{ stdin_data ? std::make_optional<mpt::filemode::stdio_guard>( mpt::filemode::stdio::input, mpt::filemode::mode::binary ) : std::nullopt }; + [[maybe_unused]] std::optional<mpt::filemode::stdio_guard> stdout_guard{ stdout_data ? std::make_optional<mpt::filemode::stdio_guard>( mpt::filemode::stdio::output, mpt::filemode::mode::binary ) : std::nullopt }; // setup terminal input - [[maybe_unused]] std::optional<FILE_mode_guard> stdin_text_guard{ stdin_text ? std::make_optional<FILE_mode_guard>( stdin, FILE_mode::text ) : std::nullopt }; + [[maybe_unused]] std::optional<mpt::filemode::stdio_guard> stdin_text_guard{ stdin_text ? std::make_optional<mpt::filemode::stdio_guard>( mpt::filemode::stdio::input, mpt::filemode::mode::text ) : std::nullopt }; [[maybe_unused]] std::optional<terminal_ui_guard> input_guard{ stdin_text && ( flags.mode == Mode::UI ) ? std::make_optional<terminal_ui_guard>() : std::nullopt }; // choose text output between quiet/stdout/stderr Copied and modified: trunk/OpenMPT/src/mpt/filemode/fd.hpp (from r23618, trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp) ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp Wed Jun 25 10:36:38 2025 (r23618, copy source) +++ trunk/OpenMPT/src/mpt/filemode/fd.hpp Thu Jun 26 10:05:39 2025 (r23623) @@ -1,141 +1,138 @@ -/* - * openmpt123_stdio.hpp - * -------------------- - * Purpose: libopenmpt command line player - * Notes : (currently none) - * Authors: OpenMPT Devs - * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. - */ +/* SPDX-License-Identifier: BSL-1.0 OR BSD-3-Clause */ -#ifndef OPENMPT123_STDIO_HPP -#define OPENMPT123_STDIO_HPP +#ifndef MPT_FILEMODE_FD_HPP +#define MPT_FILEMODE_FD_HPP -#include "openmpt123_config.hpp" -#include "openmpt123_exception.hpp" #include "mpt/base/detect.hpp" #include "mpt/base/namespace.hpp" +#include "mpt/exception/runtime_error.hpp" +#include "mpt/filemode/filemode.hpp" #include "mpt/string/types.hpp" -#include <cstdio> - #if MPT_OS_DJGPP #include <fcntl.h> #include <io.h> -#elif MPT_OS_WINDOWS +#elif MPT_OS_WINDOWS && MPT_LIBC_MS #include <fcntl.h> #include <io.h> #endif -#include <stdio.h> -namespace openmpt123 { -enum class FILE_mode { - text, - binary, -}; + +namespace mpt { +inline namespace MPT_INLINE_NS { + + + +namespace filemode { + + #if MPT_OS_DJGPP -class FILE_mode_guard { +class fd_guard { private: - FILE * file; + int fd; int old_mode; public: - FILE_mode_guard( FILE * file, FILE_mode new_mode ) - : file(file) + fd_guard( int fd, mpt::filemode::mode new_mode ) + : fd(fd) , old_mode(-1) { switch (new_mode) { - case FILE_mode::text: - fflush( file ); - old_mode = setmode( fileno( file ), O_TEXT ); + case mpt::filemode::mode::text: + old_mode = setmode( fd, O_TEXT ); if ( old_mode == -1 ) { - throw exception( MPT_USTRING("failed to set TEXT mode on file descriptor") ); + throw mpt::runtime_error( MPT_USTRING("failed to set TEXT mode on file descriptor") ); } break; - case FILE_mode::binary: - fflush( file ); - old_mode = setmode( fileno( file ), O_BINARY ); + case mpt::filemode::mode::binary: + old_mode = setmode( fd, O_BINARY ); if ( old_mode == -1 ) { - throw exception( MPT_USTRING("failed to set binary mode on file descriptor") ); + throw mpt::runtime_error( MPT_USTRING("failed to set BINARY mode on file descriptor") ); } break; } } - FILE_mode_guard( const FILE_mode_guard & ) = delete; - FILE_mode_guard( FILE_mode_guard && ) = default; - FILE_mode_guard & operator=( const FILE_mode_guard & ) = delete; - FILE_mode_guard & operator=( FILE_mode_guard && ) = default; - ~FILE_mode_guard() { + fd_guard( const fd_guard & ) = delete; + fd_guard( fd_guard && ) = default; + fd_guard & operator=( const fd_guard & ) = delete; + fd_guard & operator=( fd_guard && ) = default; + ~fd_guard() { if ( old_mode != -1 ) { - fflush( file ); - old_mode = setmode( fileno( file ), old_mode ); + old_mode = setmode( fd, old_mode ); } } }; -#elif MPT_OS_WINDOWS +#elif MPT_OS_WINDOWS && MPT_LIBC_MS -class FILE_mode_guard { +class fd_guard { private: - FILE * file; + int fd; int old_mode; public: - FILE_mode_guard( FILE * file, FILE_mode new_mode )... [truncated message content] |
From: <sv...@op...> - 2025-06-26 05:14:26
|
Author: manx Date: Thu Jun 26 07:14:01 2025 New Revision: 23622 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23622 Log: [Ref] openmpt123: Terminal: SetConsoleCursorPosition() is deprecated since Windows 10 1809. Use VT100 codes for cursor-up. Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Thu Jun 26 07:08:14 2025 (r23621) +++ trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Thu Jun 26 07:14:01 2025 (r23622) @@ -285,6 +285,9 @@ } HANDLE handle; bool console; +#if MPT_WIN_AT_LEAST(MPT_WIN_10_1809) + DWORD mode; +#endif public: #if defined(UNICODE) textout_ostream_console( std::wostream & s_, DWORD stdHandle_ ) @@ -295,6 +298,12 @@ , handle(GetStdHandle( stdHandle_ )) , console(IsConsole( stdHandle_ )) { + s.flush(); +#if MPT_WIN_AT_LEAST(MPT_WIN_10_1809) + if ( GetConsoleMode( handle, &mode ) == FALSE ) { + mode = 0; + } +#endif return; } ~textout_ostream_console() override = default; @@ -313,7 +322,16 @@ } void cursor_up( std::size_t lines ) override { if ( console ) { - s.flush(); + #if MPT_WIN_AT_LEAST(MPT_WIN_10_1809) + if ( ( mode & (ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING) ) == (ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING) ) { + for ( std::size_t line = 0; line < lines; ++line ) { + DWORD chars_written = 0; + mpt::winstring wtext = std::wstring(TEXT("\x1b[A")); + WriteConsole( handle, wtext.data(), static_cast<DWORD>( wtext.size() ), &chars_written, NULL ); + } + return; + } + #endif CONSOLE_SCREEN_BUFFER_INFO csbi; ZeroMemory( &csbi, sizeof( CONSOLE_SCREEN_BUFFER_INFO ) ); COORD coord_cursor = COORD(); |
From: <sv...@op...> - 2025-06-26 05:08:21
|
Author: manx Date: Thu Jun 26 07:08:14 2025 New Revision: 23621 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23621 Log: [Ref] openmpt123: Terminal: Fallback to terminal escape codes for cursor-up if there is no console window attached on Windows. Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Thu Jun 26 07:05:12 2025 (r23620) +++ trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Thu Jun 26 07:08:14 2025 (r23621) @@ -323,6 +323,11 @@ coord_cursor.Y -= static_cast<SHORT>( lines ); SetConsoleCursorPosition( handle, coord_cursor ); } + } else { + s.flush(); + for ( std::size_t line = 0; line < lines; ++line ) { + write_raw( mpt::winstring(TEXT("\x1b[1A")) ); + } } } }; |
From: <sv...@op...> - 2025-06-26 05:05:24
|
Author: manx Date: Thu Jun 26 07:05:12 2025 New Revision: 23620 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23620 Log: [Ref] openmpt123: Terminal: Use mpt::winstring. Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Thu Jun 26 07:03:31 2025 (r23619) +++ trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Thu Jun 26 07:05:12 2025 (r23620) @@ -303,7 +303,7 @@ if ( text.length() > 0 ) { if ( console ) { DWORD chars_written = 0; - std::wstring wtext = mpt::transcode<mpt::winstring>( text ); + mpt::winstring wtext = mpt::transcode<mpt::winstring>( text ); WriteConsole( handle, wtext.data(), static_cast<DWORD>( wtext.size() ), &chars_written, NULL ); } else { write_raw( mpt::transcode<mpt::winstring>( text ) ); |
From: <sv...@op...> - 2025-06-26 05:03:47
|
Author: manx Date: Thu Jun 26 07:03:31 2025 New Revision: 23619 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23619 Log: [Ref] openmpt123: Terminal: Use mpt::winstring. Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Wed Jun 25 10:36:38 2025 (r23618) +++ trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Thu Jun 26 07:03:31 2025 (r23619) @@ -275,19 +275,14 @@ private: #if defined(UNICODE) std::wostream & s; - void write_raw( const std::wstring & wchars ) { - if ( wchars.size() > 0 ) { - s.write( wchars.data(), wchars.size() ); - } - } #else std::ostream & s; - void write_raw( const std::string & chars ) { - if ( chars.size() > 0 ) { - s.write( chars.data(), chars.size() ); +#endif + void write_raw( const mpt::winstring & wchars ) { + if ( wchars.size() > 0 ) { + s.write( wchars.data(), wchars.size() ); } } -#endif HANDLE handle; bool console; public: @@ -308,19 +303,10 @@ if ( text.length() > 0 ) { if ( console ) { DWORD chars_written = 0; - #if defined(UNICODE) - std::wstring wtext = mpt::transcode<std::wstring>( text ); - WriteConsole( handle, wtext.data(), static_cast<DWORD>( wtext.size() ), &chars_written, NULL ); - #else - std::string ltext = mpt::transcode<std::string>( mpt::logical_encoding::locale, text ); - WriteConsole( handle, ltext.data(), static_cast<DWORD>( ltext.size() ), &chars_written, NULL ); - #endif + std::wstring wtext = mpt::transcode<mpt::winstring>( text ); + WriteConsole( handle, wtext.data(), static_cast<DWORD>( wtext.size() ), &chars_written, NULL ); } else { - #if defined(UNICODE) - write_raw( mpt::transcode<std::wstring>( text ) ); - #else - write_raw( mpt::transcode<std::string>( mpt::logical_encoding::locale, text ) ); - #endif + write_raw( mpt::transcode<mpt::winstring>( text ) ); s.flush(); } } |
From: <sv...@op...> - 2025-06-25 08:36:51
|
Author: manx Date: Wed Jun 25 10:36:38 2025 New Revision: 23618 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23618 Log: [Ref] openmpt123: Cleanup --driver help and --device help output printing. [Ref] openmpt123: Do not print directly to stdout or stderr during command line parsing. Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/openmpt123/openmpt123.hpp Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp Wed Jun 25 10:36:10 2025 (r23617) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp Wed Jun 25 10:36:38 2025 (r23618) @@ -127,6 +127,12 @@ struct show_long_version_number_exception : public std::exception { }; +struct show_drivers_exception : public std::exception { +}; + +struct show_devices_exception : public std::exception { +}; + constexpr auto libopenmpt_encoding = mpt::common_encoding::utf8; @@ -588,37 +594,32 @@ } static void show_help( textout & log, bool longhelp = false, bool man_version = false, const mpt::ustring & message = mpt::ustring() ) { - { - log << MPT_USTRING("Usage: openmpt123 [options] [--] file1 [file2] ...") << lf; + log << MPT_USTRING("Usage: openmpt123 [options] [--] file1 [file2] ...") << lf; + log << lf; + if ( man_version ) { + log << MPT_USTRING("openmpt123 plays module music files.") << lf; log << lf; - if ( man_version ) { - log << MPT_USTRING("openmpt123 plays module music files.") << lf; - log << lf; - } - if ( man_version ) { - log << MPT_USTRING("Options:") << lf; - log << lf; - } - log << MPT_USTRING(" -h, --help Show help") << lf; - log << MPT_USTRING(" --help-keyboard Show keyboard hotkeys in ui mode") << lf; - log << MPT_USTRING(" -q, --quiet Suppress non-error screen output") << lf; - log << MPT_USTRING(" -v, --verbose Show more screen output") << lf; - log << MPT_USTRING(" --version Show version information and exit") << lf; - log << MPT_USTRING(" --short-version Show version number and nothing else") << lf; - log << MPT_USTRING(" --long-version Show long version information and exit") << lf; - log << MPT_USTRING(" --credits Show elaborate contributors list") << lf; - log << MPT_USTRING(" --license Show license") << lf; + } + if ( man_version ) { + log << MPT_USTRING("Options:") << lf; log << lf; - log << MPT_USTRING(" --probe Probe each file whether it is a supported file format") << lf; - log << MPT_USTRING(" --info Display information about each file") << lf; - log << MPT_USTRING(" --ui Interactively play each file") << lf; - log << MPT_USTRING(" --batch Play each file") << lf; - log << MPT_USTRING(" --render Render each file to individual PCM data files") << lf; - if ( !longhelp ) { - log << lf; - log.writeout(); - return; - } + } + log << MPT_USTRING(" -h, --help Show help") << lf; + log << MPT_USTRING(" --help-keyboard Show keyboard hotkeys in ui mode") << lf; + log << MPT_USTRING(" -q, --quiet Suppress non-error screen output") << lf; + log << MPT_USTRING(" -v, --verbose Show more screen output") << lf; + log << MPT_USTRING(" --version Show version information and exit") << lf; + log << MPT_USTRING(" --short-version Show version number and nothing else") << lf; + log << MPT_USTRING(" --long-version Show long version information and exit") << lf; + log << MPT_USTRING(" --credits Show elaborate contributors list") << lf; + log << MPT_USTRING(" --license Show license") << lf; + log << lf; + log << MPT_USTRING(" --probe Probe each file whether it is a supported file format") << lf; + log << MPT_USTRING(" --info Display information about each file") << lf; + log << MPT_USTRING(" --ui Interactively play each file") << lf; + log << MPT_USTRING(" --batch Play each file") << lf; + log << MPT_USTRING(" --render Render each file to individual PCM data files") << lf; + if ( longhelp ) { log << lf; log << MPT_USTRING(" --banner n openmpt123 banner style [0=hide,1=show,2=verbose] [default: ") << commandlineflags().banner << MPT_USTRING("]") << lf; log << lf; @@ -1727,7 +1728,7 @@ } -static bool parse_playlist( commandlineflags & flags, mpt::native_path filename, concat_stream<mpt::ustring> & log ) { +static bool parse_playlist( commandlineflags & flags, mpt::native_path filename ) { bool is_playlist = false; bool m3u8 = false; if ( get_extension( filename ) == MPT_NATIVE_PATH("m3u") || get_extension( filename ) == MPT_NATIVE_PATH("m3U") || get_extension( filename ) == MPT_NATIVE_PATH("M3u") || get_extension( filename ) == MPT_NATIVE_PATH("M3U") ) { @@ -1741,85 +1742,79 @@ is_playlist = true; } mpt::native_path basepath = get_basepath( filename ); - try { - mpt::IO::ifstream file_stream( filename, std::ios::binary ); - std::string line; - bool first = true; - bool extm3u = false; - bool pls = false; - while ( std::getline( file_stream, line ) ) { - mpt::native_path newfile; - line = trim_eol( line ); - if ( first ) { - first = false; - if ( line == "#EXTM3U" ) { - extm3u = true; - continue; - } else if ( line == "[playlist]" ) { - pls = true; - } - } - if ( line.empty() ) { + mpt::IO::ifstream file_stream( filename, std::ios::binary ); + std::string line; + bool first = true; + bool extm3u = false; + bool pls = false; + while ( std::getline( file_stream, line ) ) { + mpt::native_path newfile; + line = trim_eol( line ); + if ( first ) { + first = false; + if ( line == "#EXTM3U" ) { + extm3u = true; continue; + } else if ( line == "[playlist]" ) { + pls = true; } - constexpr auto pls_encoding = mpt::common_encoding::utf8; - constexpr auto m3u8_encoding = mpt::common_encoding::utf8; + } + if ( line.empty() ) { + continue; + } + constexpr auto pls_encoding = mpt::common_encoding::utf8; + constexpr auto m3u8_encoding = mpt::common_encoding::utf8; #if MPT_OS_WINDOWS - constexpr auto m3u_encoding = mpt::logical_encoding::locale; + constexpr auto m3u_encoding = mpt::logical_encoding::locale; #else - constexpr auto m3u_encoding = mpt::common_encoding::utf8; + constexpr auto m3u_encoding = mpt::common_encoding::utf8; #endif - if ( pls ) { - if ( mpt::starts_with( line, "File" ) ) { - if ( line.find( "=" ) != std::string::npos ) { - flags.filenames.push_back( mpt::transcode<mpt::native_path>( pls_encoding, line.substr( line.find( "=" ) + 1 ) ) ); - } - } else if ( mpt::starts_with( line, "Title" ) ) { - continue; - } else if ( mpt::starts_with( line, "Length" ) ) { - continue; - } else if ( mpt::starts_with( line, "NumberOfEntries" ) ) { - continue; - } else if ( mpt::starts_with( line, "Version" ) ) { - continue; - } else { - continue; - } - } else if ( extm3u ) { - if ( mpt::starts_with( line, "#EXTINF" ) ) { - continue; - } else if ( mpt::starts_with( line, "#" ) ) { - continue; - } - if ( m3u8 ) { - newfile = mpt::transcode<mpt::native_path>( m3u8_encoding, line ); - } else { - newfile = mpt::transcode<mpt::native_path>( m3u_encoding, line ); + if ( pls ) { + if ( mpt::starts_with( line, "File" ) ) { + if ( line.find( "=" ) != std::string::npos ) { + flags.filenames.push_back( mpt::transcode<mpt::native_path>( pls_encoding, line.substr( line.find( "=" ) + 1 ) ) ); } + } else if ( mpt::starts_with( line, "Title" ) ) { + continue; + } else if ( mpt::starts_with( line, "Length" ) ) { + continue; + } else if ( mpt::starts_with( line, "NumberOfEntries" ) ) { + continue; + } else if ( mpt::starts_with( line, "Version" ) ) { + continue; } else { - if ( m3u8 ) { - newfile = mpt::transcode<mpt::native_path>( m3u8_encoding, line ); - } else { - newfile = mpt::transcode<mpt::native_path>( m3u_encoding, line ); - } + continue; } - if ( !newfile.empty() ) { - if ( !is_absolute( newfile ) ) { - newfile = basepath + newfile; - } - flags.filenames.push_back( newfile ); + } else if ( extm3u ) { + if ( mpt::starts_with( line, "#EXTINF" ) ) { + continue; + } else if ( mpt::starts_with( line, "#" ) ) { + continue; + } + if ( m3u8 ) { + newfile = mpt::transcode<mpt::native_path>( m3u8_encoding, line ); + } else { + newfile = mpt::transcode<mpt::native_path>( m3u_encoding, line ); + } + } else { + if ( m3u8 ) { + newfile = mpt::transcode<mpt::native_path>( m3u8_encoding, line ); + } else { + newfile = mpt::transcode<mpt::native_path>( m3u_encoding, line ); } } - } catch ( std::exception & e ) { - log << MPT_USTRING("error loading '") << mpt::transcode<mpt::ustring>( filename ) << MPT_USTRING("': ") << mpt::get_exception_text<mpt::ustring>( e ) << lf; - } catch ( ... ) { - log << MPT_USTRING("unknown error loading '") << mpt::transcode<mpt::ustring>( filename ) << MPT_USTRING("'") << lf; + if ( !newfile.empty() ) { + if ( !is_absolute( newfile ) ) { + newfile = basepath + newfile; + } + flags.filenames.push_back( newfile ); + } } return is_playlist; } -static void parse_openmpt123( commandlineflags & flags, const std::vector<mpt::ustring> & args, concat_stream<mpt::ustring> & log ) { +static void parse_openmpt123( commandlineflags & flags, const std::vector<mpt::ustring> & args ) { enum class action { help, @@ -1831,6 +1826,8 @@ long_version, credits, license, + show_drivers, + show_devices, }; std::optional<action> return_action; @@ -1956,9 +1953,10 @@ if ( false ) { // nothing } else if ( nextarg == MPT_USTRING("help") ) { - string_concat_stream<mpt::ustring> drivers; - realtime_audio_stream::show_drivers( drivers ); - throw show_help_exception( drivers.str() ); + if ( return_action ) { + throw args_error_exception(); + } + return_action = action::show_drivers; } else if ( nextarg == MPT_USTRING("default") ) { flags.driver = MPT_USTRING(""); } else { @@ -1969,9 +1967,10 @@ if ( false ) { // nothing } else if ( nextarg == MPT_USTRING("help") ) { - string_concat_stream<mpt::ustring> devices; - realtime_audio_stream::show_devices( devices, log ); - throw show_help_exception( devices.str() ); + if ( return_action ) { + throw args_error_exception(); + } + return_action = action::show_devices; } else if ( nextarg == MPT_USTRING("default") ) { flags.device = MPT_USTRING(""); } else { @@ -2031,7 +2030,7 @@ mpt::parse_into( flags.dither, nextarg ); ++i; } else if ( arg == MPT_USTRING("--playlist") && nextarg != MPT_USTRING("") ) { - parse_playlist( flags, mpt::transcode<mpt::native_path>( nextarg ), log ); + parse_playlist( flags, mpt::transcode<mpt::native_path>( nextarg ) ); ++i; } else if ( arg == MPT_USTRING("--randomize") ) { flags.randomize = true; @@ -2104,6 +2103,12 @@ case action::license: throw show_license_exception(); break; + case action::show_drivers: + throw show_drivers_exception(); + break; + case action::show_devices: + throw show_devices_exception(); + break; } } @@ -2121,7 +2126,7 @@ try { - parse_openmpt123( flags, args, std_err ); + parse_openmpt123( flags, args ); flags.check_and_sanitize(); @@ -2148,7 +2153,7 @@ return 0; } catch ( show_help_exception & e ) { show_banner( std_out, flags.banner ); - show_help( std_out, e.longhelp, false, e.message ); + show_help( std_out, e.longhelp, false ); if ( flags.verbose ) { show_credits( std_out, verbosity_hidden ); } @@ -2172,6 +2177,18 @@ } catch ( show_license_exception & ) { show_license( std_out, flags.banner ); return 0; + } catch ( show_drivers_exception & ) { + show_banner( std_out, flags.banner ); + string_concat_stream<mpt::ustring> drivers; + realtime_audio_stream::show_drivers( drivers ); + show_help( std_out, false, false, drivers.str() ); + return 0; + } catch ( show_devices_exception & ) { + show_banner( std_out, flags.banner ); + string_concat_stream<mpt::ustring> devices; + realtime_audio_stream::show_devices( devices, std_err ); + show_help( std_out, false, false, devices.str() ); + return 0; } catch ( silent_exit_exception & ) { return 0; } catch ( exception & e ) { Modified: trunk/OpenMPT/openmpt123/openmpt123.hpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.hpp Wed Jun 25 10:36:10 2025 (r23617) +++ trunk/OpenMPT/openmpt123/openmpt123.hpp Wed Jun 25 10:36:38 2025 (r23618) @@ -67,9 +67,8 @@ namespace openmpt123 { struct show_help_exception { - mpt::ustring message; bool longhelp; - show_help_exception( const mpt::ustring & msg = MPT_USTRING(""), bool longhelp_ = true ) : message(msg), longhelp(longhelp_) { } + show_help_exception( bool longhelp_ = true ) : longhelp(longhelp_) { } }; struct args_nofiles_exception { |
From: <sv...@op...> - 2025-06-25 08:36:23
|
Author: manx Date: Wed Jun 25 10:36:10 2025 New Revision: 23617 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23617 Log: [Ref] openmpt123: Small cleanup. Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp Wed Jun 25 10:09:21 2025 (r23616) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp Wed Jun 25 10:36:10 2025 (r23617) @@ -2193,10 +2193,10 @@ const FILE_mode stdin_mode = mpt::contains( flags.filenames, MPT_NATIVE_PATH("-") ) ? FILE_mode::binary : FILE_mode::text; const FILE_mode stdout_mode = flags.use_stdout ? FILE_mode::binary : FILE_mode::text; - [[maybe_unused]] const bool stdin_text = ( stdin_mode == FILE_mode::text ); - [[maybe_unused]] const bool stdin_data = ( stdin_mode == FILE_mode::binary ); - [[maybe_unused]] const bool stdout_text = ( stdout_mode == FILE_mode::text ); - [[maybe_unused]] const bool stdout_data = ( stdout_mode == FILE_mode::binary ); + const bool stdin_text = ( stdin_mode == FILE_mode::text ); + const bool stdin_data = ( stdin_mode == FILE_mode::binary ); + const bool stdout_text = ( stdout_mode == FILE_mode::text ); + const bool stdout_data = ( stdout_mode == FILE_mode::binary ); // set stdin/stdout to binary for data input/output [[maybe_unused]] std::optional<FILE_mode_guard> stdin_guard{ stdin_data ? std::make_optional<FILE_mode_guard>( stdin, FILE_mode::binary ) : std::nullopt }; |
From: <sv...@op...> - 2025-06-25 08:09:29
|
Author: manx Date: Wed Jun 25 10:09:21 2025 New Revision: 23616 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23616 Log: [Ref] mpt/base/detect_quirks.hpp: Cleanup soft-float detection. Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Wed Jun 25 10:06:56 2025 (r23615) +++ trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Wed Jun 25 10:09:21 2025 (r23616) @@ -199,8 +199,10 @@ -#if MPT_COMPILER_GCC && !defined(__arm__) +#if MPT_COMPILER_GCC || MPT_COMPILER_CLANG + #if defined(_SOFT_FLOAT) +#ifndef MPT_COMPILER_QUIRK_FLOAT_EMULATED #define MPT_COMPILER_QUIRK_FLOAT_EMULATED 1 #endif #endif @@ -208,9 +210,9 @@ #if defined(__arm__) #if defined(__SOFTFP__) +#ifndef MPT_COMPILER_QUIRK_FLOAT_EMULATED #define MPT_COMPILER_QUIRK_FLOAT_EMULATED 1 -#else -#define MPT_COMPILER_QUIRK_FLOAT_EMULATED 0 +#endif #endif #if defined(__VFP_FP__) // native-endian IEEE754 @@ -229,9 +231,11 @@ #elif defined(__mips__) #if defined(__mips_soft_float) +#ifndef MPT_COMPILER_QUIRK_FLOAT_EMULATED #define MPT_COMPILER_QUIRK_FLOAT_EMULATED 1 -#else -#define MPT_COMPILER_QUIRK_FLOAT_EMULATED 0 +#endif +#endif + #endif #endif |
From: <sv...@op...> - 2025-06-25 08:07:19
|
Author: manx Date: Wed Jun 25 10:06:56 2025 New Revision: 23615 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23615 Log: Merged revision(s) 23614 from trunk/OpenMPT: [Fix] openmpt123: _setmode(_O_U8TEXT) only exists for UCRT. MinGW-w64 header define it for MSVCRT as well, but the library does not know what to do wit that constant. ........ Modified: branches/OpenMPT-1.32/ (props changed) branches/OpenMPT-1.32/openmpt123/openmpt123_stdio.hpp Modified: branches/OpenMPT-1.32/openmpt123/openmpt123_stdio.hpp ============================================================================== --- branches/OpenMPT-1.32/openmpt123/openmpt123_stdio.hpp Wed Jun 25 10:06:37 2025 (r23614) +++ branches/OpenMPT-1.32/openmpt123/openmpt123_stdio.hpp Wed Jun 25 10:06:56 2025 (r23615) @@ -90,7 +90,7 @@ switch (new_mode) { case FILE_mode::text: fflush( file ); - #if defined(UNICODE) + #if defined(UNICODE) && MPT_LIBC_MS_AT_LEAST(MPT_LIBC_MS_VER_UCRT) old_mode = _setmode( _fileno( file ), _O_U8TEXT ); #else old_mode = _setmode( _fileno( file ), _O_TEXT ); |
From: <sv...@op...> - 2025-06-25 08:06:44
|
Author: manx Date: Wed Jun 25 10:06:37 2025 New Revision: 23614 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23614 Log: [Fix] openmpt123: _setmode(_O_U8TEXT) only exists for UCRT. MinGW-w64 header define it for MSVCRT as well, but the library does not know what to do wit that constant. Modified: trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp Modified: trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp Tue Jun 24 22:26:21 2025 (r23613) +++ trunk/OpenMPT/openmpt123/openmpt123_stdio.hpp Wed Jun 25 10:06:37 2025 (r23614) @@ -90,7 +90,7 @@ switch (new_mode) { case FILE_mode::text: fflush( file ); - #if defined(UNICODE) + #if defined(UNICODE) && MPT_LIBC_MS_AT_LEAST(MPT_LIBC_MS_VER_UCRT) old_mode = _setmode( _fileno( file ), _O_U8TEXT ); #else old_mode = _setmode( _fileno( file ), _O_TEXT ); |
From: <sv...@op...> - 2025-06-24 20:26:33
|
Author: sagamusix Date: Tue Jun 24 22:26:21 2025 New Revision: 23613 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23613 Log: Merged revision(s) 23612 from trunk/OpenMPT: [Imp] Pattern tab: Show expand/shrink shortcuts in tooltips. ........ Modified: branches/OpenMPT-1.32/ (props changed) branches/OpenMPT-1.32/mptrack/Ctrl_pat.cpp Modified: branches/OpenMPT-1.32/mptrack/Ctrl_pat.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/Ctrl_pat.cpp Tue Jun 24 22:26:04 2025 (r23612) +++ branches/OpenMPT-1.32/mptrack/Ctrl_pat.cpp Tue Jun 24 22:26:21 2025 (r23613) @@ -1400,8 +1400,8 @@ cmd = kcEditUndo; break; case ID_PATTERN_PROPERTIES: s = _T("Pattern Properties"); cmd = kcShowPatternProperties; break; - case ID_PATTERN_EXPAND: s = _T("Expand Pattern"); break; - case ID_PATTERN_SHRINK: s = _T("Shrink Pattern"); break; + case ID_PATTERN_EXPAND: s = _T("Expand Pattern"); cmd = kcPatternExpand; break; + case ID_PATTERN_SHRINK: s = _T("Shrink Pattern"); cmd = kcPatternShrink; break; case ID_PATTERNDETAIL_DROPDOWN: s = _T("Change Pattern Detail Level"); break; case ID_OVERFLOWPASTE: s = _T("Toggle Overflow Paste"); cmd = kcToggleOverflowPaste; break; case IDC_PATTERN_LOOP: s = _T("Toggle Loop Pattern"); cmd = kcChangeLoopStatus; break; |
From: <sv...@op...> - 2025-06-24 20:26:16
|
Author: sagamusix Date: Tue Jun 24 22:26:04 2025 New Revision: 23612 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23612 Log: [Imp] Pattern tab: Show expand/shrink shortcuts in tooltips. Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp Tue Jun 24 22:23:55 2025 (r23611) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp Tue Jun 24 22:26:04 2025 (r23612) @@ -1400,8 +1400,8 @@ cmd = kcEditUndo; break; case ID_PATTERN_PROPERTIES: s = _T("Pattern Properties"); cmd = kcShowPatternProperties; break; - case ID_PATTERN_EXPAND: s = _T("Expand Pattern"); break; - case ID_PATTERN_SHRINK: s = _T("Shrink Pattern"); break; + case ID_PATTERN_EXPAND: s = _T("Expand Pattern"); cmd = kcPatternExpand; break; + case ID_PATTERN_SHRINK: s = _T("Shrink Pattern"); cmd = kcPatternShrink; break; case ID_PATTERNDETAIL_DROPDOWN: s = _T("Change Pattern Detail Level"); break; case ID_OVERFLOWPASTE: s = _T("Toggle Overflow Paste"); cmd = kcToggleOverflowPaste; break; case IDC_PATTERN_LOOP: s = _T("Toggle Loop Pattern"); cmd = kcChangeLoopStatus; break; |
From: <sv...@op...> - 2025-06-24 20:24:07
|
Author: sagamusix Date: Tue Jun 24 22:23:55 2025 New Revision: 23611 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23611 Log: Merged revision(s) 23610 from trunk/OpenMPT: [Imp] Add keyboard shortcuts for expanding and shrinking patterns (default: Ctrl+Alt+E/D). ........ Modified: branches/OpenMPT-1.32/ (props changed) branches/OpenMPT-1.32/mptrack/CommandSet.cpp branches/OpenMPT-1.32/mptrack/CommandSet.h branches/OpenMPT-1.32/mptrack/DefaultKeyBindings.h branches/OpenMPT-1.32/mptrack/View_pat.cpp Modified: branches/OpenMPT-1.32/mptrack/CommandSet.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/CommandSet.cpp Tue Jun 24 22:23:38 2025 (r23610) +++ branches/OpenMPT-1.32/mptrack/CommandSet.cpp Tue Jun 24 22:23:55 2025 (r23611) @@ -954,6 +954,8 @@ {2117, kcToggleRecordMIDIPitchBend, _T("Toggle Record MIDI Pitch Bend")}, {2118, kcToggleRecordMIDICCs, _T("Toggle Record MIDI CCs")}, {2119, kcToggleMetronome, _T("Toggle Metronome")}, + {2120, kcPatternExpand, _T("Expand Pattern")}, + {2121, kcPatternShrink, _T("Shrink Pattern")}, }; // clang-format on Modified: branches/OpenMPT-1.32/mptrack/CommandSet.h ============================================================================== --- branches/OpenMPT-1.32/mptrack/CommandSet.h Tue Jun 24 22:23:38 2025 (r23610) +++ branches/OpenMPT-1.32/mptrack/CommandSet.h Tue Jun 24 22:23:55 2025 (r23611) @@ -411,7 +411,9 @@ kcPatternSetInstrumentNotEmpty, kcPatternGrowSelection, kcPatternShrinkSelection, - kcEndPatternEditMisc = kcPatternShrinkSelection, + kcPatternExpand, + kcPatternShrink, + kcEndPatternEditMisc = kcPatternShrink, // kcClearSelection, kcClearRow, Modified: branches/OpenMPT-1.32/mptrack/DefaultKeyBindings.h ============================================================================== --- branches/OpenMPT-1.32/mptrack/DefaultKeyBindings.h Tue Jun 24 22:23:38 2025 (r23610) +++ branches/OpenMPT-1.32/mptrack/DefaultKeyBindings.h Tue Jun 24 22:23:55 2025 (r23611) @@ -159,6 +159,8 @@ {kcPatternSetInstrument, 'I', ModCtrl, kKeyEventDown, MPT_V("1.31")}, {kcPatternGrowSelection, 'E', ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.31")}, {kcPatternShrinkSelection, 'D', ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.31")}, + {kcPatternExpand, 'E', ModCtrl | ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.32.01.05")}, + {kcPatternShrink, 'D', ModCtrl | ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.32.01.05")}, {kcClearField, VK_DELETE, ModNone, kKeyEventDown, MPT_V("1.31")}, {kcClearFieldITStyle, VK_OEM_PERIOD, ModShift, kKeyEventDown, MPT_V("1.31")}, {kcClearRowStep, VK_DELETE, ModCtrl, kKeyEventDown | kKeyEventRepeat, MPT_V("1.31")}, Modified: branches/OpenMPT-1.32/mptrack/View_pat.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/View_pat.cpp Tue Jun 24 22:23:38 2025 (r23610) +++ branches/OpenMPT-1.32/mptrack/View_pat.cpp Tue Jun 24 22:23:55 2025 (r23611) @@ -4502,6 +4502,8 @@ case kcPatternVisualizeEffect: OnVisualizeEffect(); return wParam; case kcPatternGrowSelection: OnGrowSelection(); return wParam; case kcPatternShrinkSelection: OnShrinkSelection(); return wParam; + case kcPatternExpand: OnModViewMsg(VIEWMSG_EXPANDPATTERN, 0); return wParam; + case kcPatternShrink: OnModViewMsg(VIEWMSG_SHRINKPATTERN, 0); return wParam; case kcPatternScrollLeft: case kcPatternScrollRight: |
From: <sv...@op...> - 2025-06-24 20:23:50
|
Author: sagamusix Date: Tue Jun 24 22:23:38 2025 New Revision: 23610 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23610 Log: [Imp] Add keyboard shortcuts for expanding and shrinking patterns (default: Ctrl+Alt+E/D). Modified: trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/DefaultKeyBindings.h trunk/OpenMPT/mptrack/View_pat.cpp Modified: trunk/OpenMPT/mptrack/CommandSet.cpp ============================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp Tue Jun 24 22:15:36 2025 (r23609) +++ trunk/OpenMPT/mptrack/CommandSet.cpp Tue Jun 24 22:23:38 2025 (r23610) @@ -954,6 +954,8 @@ {2117, kcToggleRecordMIDIPitchBend, _T("Toggle Record MIDI Pitch Bend")}, {2118, kcToggleRecordMIDICCs, _T("Toggle Record MIDI CCs")}, {2119, kcToggleMetronome, _T("Toggle Metronome")}, + {2120, kcPatternExpand, _T("Expand Pattern")}, + {2121, kcPatternShrink, _T("Shrink Pattern")}, }; // clang-format on Modified: trunk/OpenMPT/mptrack/CommandSet.h ============================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h Tue Jun 24 22:15:36 2025 (r23609) +++ trunk/OpenMPT/mptrack/CommandSet.h Tue Jun 24 22:23:38 2025 (r23610) @@ -411,7 +411,9 @@ kcPatternSetInstrumentNotEmpty, kcPatternGrowSelection, kcPatternShrinkSelection, - kcEndPatternEditMisc = kcPatternShrinkSelection, + kcPatternExpand, + kcPatternShrink, + kcEndPatternEditMisc = kcPatternShrink, // kcClearSelection, kcClearRow, Modified: trunk/OpenMPT/mptrack/DefaultKeyBindings.h ============================================================================== --- trunk/OpenMPT/mptrack/DefaultKeyBindings.h Tue Jun 24 22:15:36 2025 (r23609) +++ trunk/OpenMPT/mptrack/DefaultKeyBindings.h Tue Jun 24 22:23:38 2025 (r23610) @@ -159,6 +159,8 @@ {kcPatternSetInstrument, 'I', ModCtrl, kKeyEventDown, MPT_V("1.31")}, {kcPatternGrowSelection, 'E', ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.31")}, {kcPatternShrinkSelection, 'D', ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.31")}, + {kcPatternExpand, 'E', ModCtrl | ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.32.01.05")}, + {kcPatternShrink, 'D', ModCtrl | ModAlt, kKeyEventDown | kKeyEventRepeat, MPT_V("1.32.01.05")}, {kcClearField, VK_DELETE, ModNone, kKeyEventDown, MPT_V("1.31")}, {kcClearFieldITStyle, VK_OEM_PERIOD, ModShift, kKeyEventDown, MPT_V("1.31")}, {kcClearRowStep, VK_DELETE, ModCtrl, kKeyEventDown | kKeyEventRepeat, MPT_V("1.31")}, Modified: trunk/OpenMPT/mptrack/View_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp Tue Jun 24 22:15:36 2025 (r23609) +++ trunk/OpenMPT/mptrack/View_pat.cpp Tue Jun 24 22:23:38 2025 (r23610) @@ -4502,6 +4502,8 @@ case kcPatternVisualizeEffect: OnVisualizeEffect(); return wParam; case kcPatternGrowSelection: OnGrowSelection(); return wParam; case kcPatternShrinkSelection: OnShrinkSelection(); return wParam; + case kcPatternExpand: OnModViewMsg(VIEWMSG_EXPANDPATTERN, 0); return wParam; + case kcPatternShrink: OnModViewMsg(VIEWMSG_SHRINKPATTERN, 0); return wParam; case kcPatternScrollLeft: case kcPatternScrollRight: |
From: <sv...@op...> - 2025-06-24 20:15:54
|
Author: sagamusix Date: Tue Jun 24 22:15:36 2025 New Revision: 23609 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23609 Log: Merged revision(s) 23608 from trunk/OpenMPT: [Mod] In export dialogs, also show the song index within the selected sequence (https://forum.openmpt.org/index.php?topic=7340.0). ........ Modified: branches/OpenMPT-1.32/ (props changed) branches/OpenMPT-1.32/mptrack/Mod2wave.cpp branches/OpenMPT-1.32/mptrack/Moddoc.cpp branches/OpenMPT-1.32/mptrack/Moddoc.h branches/OpenMPT-1.32/mptrack/OPLExport.cpp branches/OpenMPT-1.32/mptrack/mod2midi.cpp Modified: branches/OpenMPT-1.32/mptrack/Mod2wave.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/Mod2wave.cpp Tue Jun 24 22:15:16 2025 (r23608) +++ branches/OpenMPT-1.32/mptrack/Mod2wave.cpp Tue Jun 24 22:15:36 2025 (r23609) @@ -589,7 +589,7 @@ const auto subsongText = GetDlgItem(IDC_SUBSONG); if(subsongText == nullptr || m_selectedSong >= m_subSongs.size()) return; - subsongText->SetWindowText(m_SndFile.GetpModDoc()->FormatSubsongName(m_subSongs[m_selectedSong]).c_str()); + subsongText->SetWindowText(m_SndFile.GetpModDoc()->FormatSubsongName(m_subSongs, m_selectedSong).c_str()); } Modified: branches/OpenMPT-1.32/mptrack/Moddoc.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/Moddoc.cpp Tue Jun 24 22:15:16 2025 (r23608) +++ branches/OpenMPT-1.32/mptrack/Moddoc.cpp Tue Jun 24 22:15:36 2025 (r23609) @@ -3070,14 +3070,26 @@ } -mpt::tstring CModDoc::FormatSubsongName(const SubSong &song) +mpt::tstring CModDoc::FormatSubsongName(const std::vector<SubSong> &songs, size_t subSong) { + if(subSong >= songs.size()) + return {}; + const SubSong &song = songs[subSong]; + size_t subsongInSequence = 1; + for(size_t i = 1; i <= subSong; i++) + { + if(songs[subSong - i].sequence == song.sequence) + subsongInSequence++; + else + break; + } const auto sequenceName = m_SndFile.Order(song.sequence).GetName(); const auto startPattern = m_SndFile.Order(song.sequence).PatternAt(song.startOrder); const auto orderName = startPattern ? startPattern->GetName() : std::string{}; - return MPT_TFORMAT("Sequence {}{}\nOrder {} to {}{}")( + return MPT_TFORMAT("Sequence {}{}, Song {}\nOrder {} to {}{}")( song.sequence + 1, sequenceName.empty() ? mpt::tstring{} : MPT_TFORMAT(" ({})")(sequenceName), + subsongInSequence, song.startOrder, song.endOrder, orderName.empty() ? mpt::tstring{} : MPT_TFORMAT(" ({})")(mpt::ToWin(m_SndFile.GetCharsetInternal(), orderName))); Modified: branches/OpenMPT-1.32/mptrack/Moddoc.h ============================================================================== --- branches/OpenMPT-1.32/mptrack/Moddoc.h Tue Jun 24 22:15:16 2025 (r23608) +++ branches/OpenMPT-1.32/mptrack/Moddoc.h Tue Jun 24 22:15:36 2025 (r23609) @@ -336,7 +336,7 @@ // [in] bIncludeIndex: True to include instrument index in front of the instrument name, false otherwise. CString GetPatternViewInstrumentName(INSTRUMENTINDEX nInstr, bool bEmptyInsteadOfNoName = false, bool bIncludeIndex = true) const; - mpt::tstring FormatSubsongName(const SubSong &song); + mpt::tstring FormatSubsongName(const std::vector<SubSong> &songs, size_t subSong); // Check if a given channel contains data. bool IsChannelUnused(CHANNELINDEX nChn) const; Modified: branches/OpenMPT-1.32/mptrack/OPLExport.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/OPLExport.cpp Tue Jun 24 22:15:16 2025 (r23608) +++ branches/OpenMPT-1.32/mptrack/OPLExport.cpp Tue Jun 24 22:15:36 2025 (r23609) @@ -455,7 +455,7 @@ const auto subsongText = GetDlgItem(IDC_SUBSONG); if(subsongText == nullptr || m_selectedSong >= m_subSongs.size()) return; - subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs[m_selectedSong]).c_str()); + subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs, m_selectedSong).c_str()); } void DoConversion(const mpt::PathString &fileName) Modified: branches/OpenMPT-1.32/mptrack/mod2midi.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/mod2midi.cpp Tue Jun 24 22:15:16 2025 (r23608) +++ branches/OpenMPT-1.32/mptrack/mod2midi.cpp Tue Jun 24 22:15:36 2025 (r23609) @@ -965,7 +965,7 @@ const auto subsongText = GetDlgItem(IDC_SUBSONG); if(subsongText == nullptr || m_selectedSong >= m_subSongs.size()) return; - subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs[m_selectedSong]).c_str()); + subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs, m_selectedSong).c_str()); } |
From: <sv...@op...> - 2025-06-24 20:15:29
|
Author: sagamusix Date: Tue Jun 24 22:15:16 2025 New Revision: 23608 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23608 Log: [Mod] In export dialogs, also show the song index within the selected sequence (https://forum.openmpt.org/index.php?topic=7340.0). Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/OPLExport.cpp trunk/OpenMPT/mptrack/mod2midi.cpp Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Mod2wave.cpp Mon Jun 23 17:17:06 2025 (r23607) +++ trunk/OpenMPT/mptrack/Mod2wave.cpp Tue Jun 24 22:15:16 2025 (r23608) @@ -589,7 +589,7 @@ const auto subsongText = GetDlgItem(IDC_SUBSONG); if(subsongText == nullptr || m_selectedSong >= m_subSongs.size()) return; - subsongText->SetWindowText(m_SndFile.GetpModDoc()->FormatSubsongName(m_subSongs[m_selectedSong]).c_str()); + subsongText->SetWindowText(m_SndFile.GetpModDoc()->FormatSubsongName(m_subSongs, m_selectedSong).c_str()); } Modified: trunk/OpenMPT/mptrack/Moddoc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp Mon Jun 23 17:17:06 2025 (r23607) +++ trunk/OpenMPT/mptrack/Moddoc.cpp Tue Jun 24 22:15:16 2025 (r23608) @@ -3070,14 +3070,26 @@ } -mpt::tstring CModDoc::FormatSubsongName(const SubSong &song) +mpt::tstring CModDoc::FormatSubsongName(const std::vector<SubSong> &songs, size_t subSong) { + if(subSong >= songs.size()) + return {}; + const SubSong &song = songs[subSong]; + size_t subsongInSequence = 1; + for(size_t i = 1; i <= subSong; i++) + { + if(songs[subSong - i].sequence == song.sequence) + subsongInSequence++; + else + break; + } const auto sequenceName = m_SndFile.Order(song.sequence).GetName(); const auto startPattern = m_SndFile.Order(song.sequence).PatternAt(song.startOrder); const auto orderName = startPattern ? startPattern->GetName() : std::string{}; - return MPT_TFORMAT("Sequence {}{}\nOrder {} to {}{}")( + return MPT_TFORMAT("Sequence {}{}, Song {}\nOrder {} to {}{}")( song.sequence + 1, sequenceName.empty() ? mpt::tstring{} : MPT_TFORMAT(" ({})")(sequenceName), + subsongInSequence, song.startOrder, song.endOrder, orderName.empty() ? mpt::tstring{} : MPT_TFORMAT(" ({})")(mpt::ToWin(m_SndFile.GetCharsetInternal(), orderName))); Modified: trunk/OpenMPT/mptrack/Moddoc.h ============================================================================== --- trunk/OpenMPT/mptrack/Moddoc.h Mon Jun 23 17:17:06 2025 (r23607) +++ trunk/OpenMPT/mptrack/Moddoc.h Tue Jun 24 22:15:16 2025 (r23608) @@ -336,7 +336,7 @@ // [in] bIncludeIndex: True to include instrument index in front of the instrument name, false otherwise. CString GetPatternViewInstrumentName(INSTRUMENTINDEX nInstr, bool bEmptyInsteadOfNoName = false, bool bIncludeIndex = true) const; - mpt::tstring FormatSubsongName(const SubSong &song); + mpt::tstring FormatSubsongName(const std::vector<SubSong> &songs, size_t subSong); // Check if a given channel contains data. bool IsChannelUnused(CHANNELINDEX nChn) const; Modified: trunk/OpenMPT/mptrack/OPLExport.cpp ============================================================================== --- trunk/OpenMPT/mptrack/OPLExport.cpp Mon Jun 23 17:17:06 2025 (r23607) +++ trunk/OpenMPT/mptrack/OPLExport.cpp Tue Jun 24 22:15:16 2025 (r23608) @@ -455,7 +455,7 @@ const auto subsongText = GetDlgItem(IDC_SUBSONG); if(subsongText == nullptr || m_selectedSong >= m_subSongs.size()) return; - subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs[m_selectedSong]).c_str()); + subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs, m_selectedSong).c_str()); } void DoConversion(const mpt::PathString &fileName) Modified: trunk/OpenMPT/mptrack/mod2midi.cpp ============================================================================== --- trunk/OpenMPT/mptrack/mod2midi.cpp Mon Jun 23 17:17:06 2025 (r23607) +++ trunk/OpenMPT/mptrack/mod2midi.cpp Tue Jun 24 22:15:16 2025 (r23608) @@ -965,7 +965,7 @@ const auto subsongText = GetDlgItem(IDC_SUBSONG); if(subsongText == nullptr || m_selectedSong >= m_subSongs.size()) return; - subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs[m_selectedSong]).c_str()); + subsongText->SetWindowText(m_modDoc.FormatSubsongName(m_subSongs, m_selectedSong).c_str()); } |
From: <sv...@op...> - 2025-06-23 15:17:18
|
Author: manx Date: Mon Jun 23 17:17:06 2025 New Revision: 23607 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23607 Log: [Ref] openmpt123: Use unformatted IO for text output. Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Modified: trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Sun Jun 22 22:55:24 2025 (r23606) +++ trunk/OpenMPT/openmpt123/openmpt123_terminal.hpp Mon Jun 23 17:17:06 2025 (r23607) @@ -193,6 +193,11 @@ class textout_ostream : public textout_backend { private: std::ostream & s; + void write_raw( const std::string & chars ) { + if ( chars.size() > 0 ) { + s.write( chars.data(), chars.size() ); + } + } #if MPT_OS_DJGPP mpt::common_encoding codepage; #endif @@ -213,11 +218,11 @@ void write( const mpt::ustring & text ) override { if ( text.length() > 0 ) { #if MPT_OS_DJGPP - s << mpt::transcode<std::string>( codepage, text ); + write_raw( mpt::transcode<std::string>( codepage, text ) ); #elif MPT_OS_EMSCRIPTEN - s << mpt::transcode<std::string>( mpt::common_encoding::utf8, text ) ; + write_raw( mpt::transcode<std::string>( mpt::common_encoding::utf8, text ) ); #else - s << mpt::transcode<std::string>( mpt::logical_encoding::locale, text ); + write_raw( mpt::transcode<std::string>( mpt::logical_encoding::locale, text ) ); #endif s.flush(); } @@ -225,7 +230,7 @@ void cursor_up( std::size_t lines ) override { s.flush(); for ( std::size_t line = 0; line < lines; ++line ) { - s << std::string("\x1b[1A"); + write_raw( std::string("\x1b[1A") ); } } }; @@ -235,6 +240,11 @@ class textout_wostream : public textout_backend { private: std::wostream & s; + void write_raw( const std::wstring & wchars ) { + if ( wchars.size() > 0 ) { + s.write( wchars.data(), wchars.size() ); + } + } public: textout_wostream( std::wostream & s_ ) : s(s_) @@ -245,14 +255,14 @@ public: void write( const mpt::ustring & text ) override { if ( text.length() > 0 ) { - s << mpt::transcode<std::wstring>( text ); + write_raw( mpt::transcode<std::wstring>( text ) ); s.flush(); } } void cursor_up( std::size_t lines ) override { s.flush(); for ( std::size_t line = 0; line < lines; ++line ) { - s << std::wstring(L"\x1b[1A"); + write_raw( std::wstring(L"\x1b[1A") ); } } }; @@ -265,8 +275,18 @@ private: #if defined(UNICODE) std::wostream & s; + void write_raw( const std::wstring & wchars ) { + if ( wchars.size() > 0 ) { + s.write( wchars.data(), wchars.size() ); + } + } #else std::ostream & s; + void write_raw( const std::string & chars ) { + if ( chars.size() > 0 ) { + s.write( chars.data(), chars.size() ); + } + } #endif HANDLE handle; bool console; @@ -297,9 +317,9 @@ #endif } else { #if defined(UNICODE) - s << mpt::transcode<std::wstring>( text ); + write_raw( mpt::transcode<std::wstring>( text ) ); #else - s << mpt::transcode<std::string>( mpt::logical_encoding::locale, text ); + write_raw( mpt::transcode<std::string>( mpt::logical_encoding::locale, text ) ); #endif s.flush(); } |
From: <sv...@op...> - 2025-06-22 20:55:35
|
Author: sagamusix Date: Sun Jun 22 22:55:24 2025 New Revision: 23606 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23606 Log: Merged revision(s) 23605 from trunk/OpenMPT: [Fix] Tree view: After dragging an instrument to a sample or instrument editor, the MIDI input focus remained on the tree view, while keyboard input focus was on the editor (effectively reverting r23158, https://bugs.openmpt.org/view.php?id=1899). ........ Modified: branches/OpenMPT-1.32/ (props changed) branches/OpenMPT-1.32/mptrack/View_tre.cpp Modified: branches/OpenMPT-1.32/mptrack/View_tre.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/View_tre.cpp Sun Jun 22 22:54:43 2025 (r23605) +++ branches/OpenMPT-1.32/mptrack/View_tre.cpp Sun Jun 22 22:55:24 2025 (r23606) @@ -4385,6 +4385,9 @@ } CTreeCtrl::OnKillFocus(pNewWnd); CMainFrame::GetMainFrame()->m_bModTreeHasFocus = false; + // Required to immediately redirect MIDI input focus after drag&drop from tree view to editor + if(pNewWnd != nullptr) + CMainFrame::GetMainFrame()->SetMidiRecordWnd(pNewWnd->m_hWnd); } |
From: <sv...@op...> - 2025-06-22 20:54:55
|
Author: sagamusix Date: Sun Jun 22 22:54:43 2025 New Revision: 23605 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23605 Log: [Fix] Tree view: After dragging an instrument to a sample or instrument editor, the MIDI input focus remained on the tree view, while keyboard input focus was on the editor (effectively reverting r23158, https://bugs.openmpt.org/view.php?id=1899). Modified: trunk/OpenMPT/mptrack/View_tre.cpp Modified: trunk/OpenMPT/mptrack/View_tre.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp Sat Jun 21 21:40:21 2025 (r23604) +++ trunk/OpenMPT/mptrack/View_tre.cpp Sun Jun 22 22:54:43 2025 (r23605) @@ -4385,6 +4385,9 @@ } CTreeCtrl::OnKillFocus(pNewWnd); CMainFrame::GetMainFrame()->m_bModTreeHasFocus = false; + // Required to immediately redirect MIDI input focus after drag&drop from tree view to editor + if(pNewWnd != nullptr) + CMainFrame::GetMainFrame()->SetMidiRecordWnd(pNewWnd->m_hWnd); } |
From: <sv...@op...> - 2025-06-21 19:40:33
|
Author: manx Date: Sat Jun 21 21:40:21 2025 New Revision: 23604 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23604 Log: [Imp] build: CI: GitHub: CPA: FreeBSD: Update FreeBSD 14 to 14.3. [Var] build: CI: GitHub: CPA: FreeBSD: Update CPA to commit 9a4355714f90c057476048788b82147e99b7c0f0. Added: branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.3-Makefile.yml - copied, changed from r23603, branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.2-Makefile.yml Deleted: branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.2-Makefile.yml Copied and modified: branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.3-Makefile.yml (from r23603, branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.2-Makefile.yml) ============================================================================== --- branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.2-Makefile.yml Sat Jun 21 21:37:57 2025 (r23603, copy source) +++ branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.3-Makefile.yml Sat Jun 21 21:40:21 2025 (r23604) @@ -1,4 +1,4 @@ -name: FreeBSD 14.2 Makefile +name: FreeBSD 14.3 Makefile on: push: @@ -17,23 +17,23 @@ - name: Checkout uses: actions/checkout@v4 - name: Startup VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G operating_system: freebsd - version: '14.2' + version: '14.3' shell: bash sync_files: runner-to-vm shutdown_vm: false run: true - name: Install dependencies - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G operating_system: freebsd - version: '14.2' + version: '14.3' shell: bash sync_files: false shutdown_vm: false @@ -41,36 +41,36 @@ sudo pkg upgrade -y sudo pkg install -y subversion p5-XML-XPath git mawk gmake pkgconf autoconf autoconf-archive automake libtool help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio sdl2 - name: Build - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G operating_system: freebsd - version: '14.2' + version: '14.3' shell: bash sync_files: false shutdown_vm: false run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 AUTO_DEPS=1 - name: Test - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G operating_system: freebsd - version: '14.2' + version: '14.3' shell: bash sync_files: false shutdown_vm: false run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 AUTO_DEPS=1 check - name: Shutdown VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G operating_system: freebsd - version: '14.2' + version: '14.3' shell: bash sync_files: false shutdown_vm: true |
From: <sv...@op...> - 2025-06-21 19:38:08
|
Author: manx Date: Sat Jun 21 21:37:57 2025 New Revision: 23603 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23603 Log: Merged revision(s) 23601 from trunk/OpenMPT: [Imp] build: CI: GitHub: CPA: FreeBSD: Update FreeBSD 14 to 14.3. [Var] build: CI: GitHub: CPA: FreeBSD: Update CPA to commit 9a4355714f90c057476048788b82147e99b7c0f0. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/.github/workflows/FreeBSD-Autotools.yml branches/OpenMPT-1.31/.github/workflows/FreeBSD-Makefile.yml Modified: branches/OpenMPT-1.31/.github/workflows/FreeBSD-Autotools.yml ============================================================================== --- branches/OpenMPT-1.31/.github/workflows/FreeBSD-Autotools.yml Sat Jun 21 21:37:18 2025 (r23602) +++ branches/OpenMPT-1.31/.github/workflows/FreeBSD-Autotools.yml Sat Jun 21 21:37:57 2025 (r23603) @@ -11,7 +11,7 @@ fail-fast: false matrix: include: - - { version: '14.2' } + - { version: '14.3' } - { version: '13.5' } concurrency: @@ -24,7 +24,7 @@ - name: Checkout uses: actions/checkout@v4 - name: Startup VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -35,7 +35,7 @@ shutdown_vm: false run: true - name: Install dependencies - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -48,7 +48,7 @@ sudo pkg upgrade -y sudo pkg install -y subversion p5-XML-XPath git mawk gmake pkgconf autoconf autoconf-archive automake libtool help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio sdl2 - name: Build - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -60,7 +60,7 @@ run: | export MAKEFLAGS="-j$(sysctl -n hw.ncpu)"; ./build/autotools/autoconfiscate.sh - name: Shutdown VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G Modified: branches/OpenMPT-1.31/.github/workflows/FreeBSD-Makefile.yml ============================================================================== --- branches/OpenMPT-1.31/.github/workflows/FreeBSD-Makefile.yml Sat Jun 21 21:37:18 2025 (r23602) +++ branches/OpenMPT-1.31/.github/workflows/FreeBSD-Makefile.yml Sat Jun 21 21:37:57 2025 (r23603) @@ -11,9 +11,9 @@ fail-fast: false matrix: include: - - { version: '14.2', deps: sys } - - { version: '14.2', deps: local } - - { version: '14.2', deps: small } + - { version: '14.3', deps: sys } + - { version: '14.3', deps: local } + - { version: '14.3', deps: small } - { version: '13.5', deps: sys } - { version: '13.5', deps: local } - { version: '13.5', deps: small } @@ -28,7 +28,7 @@ - name: Checkout uses: actions/checkout@v4 - name: Startup VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -39,7 +39,7 @@ shutdown_vm: false run: true - name: Install dependencies - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -52,7 +52,7 @@ sudo pkg upgrade -y sudo pkg install -y subversion p5-XML-XPath git mawk gmake pkgconf autoconf autoconf-archive automake libtool help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio sdl2 - name: Build - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -64,7 +64,7 @@ run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 ${{ (matrix.deps == 'sys') && 'AUTO_DEPS=1' || (matrix.deps == 'local') && 'LOCAL_ZLIB=1 LOCAL_MPG123=1 LOCAL_OGG=1 LOCAL_VORBIS=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' || 'NO_ZLIB=1 NO_MPG123=1 NO_OGG=1 NO_VORBIS=1 NO_VORBISFILE=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' }} - name: Test - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -76,7 +76,7 @@ run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 ${{ (matrix.deps == 'sys') && 'AUTO_DEPS=1' || (matrix.deps == 'local') && 'LOCAL_ZLIB=1 LOCAL_MPG123=1 LOCAL_OGG=1 LOCAL_VORBIS=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' || 'NO_ZLIB=1 NO_MPG123=1 NO_OGG=1 NO_VORBIS=1 NO_VORBISFILE=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' }} check - name: Shutdown VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G |
From: <sv...@op...> - 2025-06-21 19:37:30
|
Author: manx Date: Sat Jun 21 21:37:18 2025 New Revision: 23602 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23602 Log: Merged revision(s) 23601 from trunk/OpenMPT: [Imp] build: CI: GitHub: CPA: FreeBSD: Update FreeBSD 14 to 14.3. [Var] build: CI: GitHub: CPA: FreeBSD: Update CPA to commit 9a4355714f90c057476048788b82147e99b7c0f0. ........ Modified: branches/OpenMPT-1.32/ (props changed) branches/OpenMPT-1.32/.github/workflows/FreeBSD-Autotools.yml branches/OpenMPT-1.32/.github/workflows/FreeBSD-Makefile.yml Modified: branches/OpenMPT-1.32/.github/workflows/FreeBSD-Autotools.yml ============================================================================== --- branches/OpenMPT-1.32/.github/workflows/FreeBSD-Autotools.yml Sat Jun 21 21:36:20 2025 (r23601) +++ branches/OpenMPT-1.32/.github/workflows/FreeBSD-Autotools.yml Sat Jun 21 21:37:18 2025 (r23602) @@ -11,7 +11,7 @@ fail-fast: false matrix: include: - - { version: '14.2' } + - { version: '14.3' } - { version: '13.5' } concurrency: @@ -24,7 +24,7 @@ - name: Checkout uses: actions/checkout@v4 - name: Startup VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -35,7 +35,7 @@ shutdown_vm: false run: true - name: Install dependencies - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -48,7 +48,7 @@ sudo pkg upgrade -y sudo pkg install -y subversion p5-XML-XPath git mawk gmake pkgconf autoconf autoconf-archive automake libtool help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio sdl2 - name: Build - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -60,7 +60,7 @@ run: | export MAKEFLAGS="-j$(sysctl -n hw.ncpu)"; ./build/autotools/autoconfiscate.sh - name: Shutdown VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G Modified: branches/OpenMPT-1.32/.github/workflows/FreeBSD-Makefile.yml ============================================================================== --- branches/OpenMPT-1.32/.github/workflows/FreeBSD-Makefile.yml Sat Jun 21 21:36:20 2025 (r23601) +++ branches/OpenMPT-1.32/.github/workflows/FreeBSD-Makefile.yml Sat Jun 21 21:37:18 2025 (r23602) @@ -11,9 +11,9 @@ fail-fast: false matrix: include: - - { version: '14.2', deps: sys } - - { version: '14.2', deps: local } - - { version: '14.2', deps: small } + - { version: '14.3', deps: sys } + - { version: '14.3', deps: local } + - { version: '14.3', deps: small } - { version: '13.5', deps: sys } - { version: '13.5', deps: local } - { version: '13.5', deps: small } @@ -28,7 +28,7 @@ - name: Checkout uses: actions/checkout@v4 - name: Startup VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -39,7 +39,7 @@ shutdown_vm: false run: true - name: Install dependencies - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -52,7 +52,7 @@ sudo pkg upgrade -y sudo pkg install -y subversion p5-XML-XPath git mawk gmake pkgconf autoconf autoconf-archive automake libtool help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio sdl2 - name: Build - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -64,7 +64,7 @@ run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 ${{ (matrix.deps == 'sys') && 'AUTO_DEPS=1' || (matrix.deps == 'local') && 'LOCAL_ZLIB=1 LOCAL_MPG123=1 LOCAL_OGG=1 LOCAL_VORBIS=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' || 'NO_ZLIB=1 NO_MPG123=1 NO_OGG=1 NO_VORBIS=1 NO_VORBISFILE=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' }} - name: Test - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G @@ -76,7 +76,7 @@ run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 ${{ (matrix.deps == 'sys') && 'AUTO_DEPS=1' || (matrix.deps == 'local') && 'LOCAL_ZLIB=1 LOCAL_MPG123=1 LOCAL_OGG=1 LOCAL_VORBIS=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' || 'NO_ZLIB=1 NO_MPG123=1 NO_OGG=1 NO_VORBIS=1 NO_VORBISFILE=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' }} check - name: Shutdown VM - uses: cross-platform-actions/action@v0.28.0 + uses: cross-platform-actions/action@9a4355714f90c057476048788b82147e99b7c0f0 with: architecture: x86_64 memory: 4G |