You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(213) |
Aug
(182) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2024-06-25 17:52:13
|
Author: sagamusix Date: Tue Jun 25 19:52:06 2024 New Revision: 21077 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21077 Log: [Fix] Compiler warnings. Modified: trunk/OpenMPT/soundlib/modcommand.cpp Modified: trunk/OpenMPT/soundlib/modcommand.cpp ============================================================================== --- trunk/OpenMPT/soundlib/modcommand.cpp Tue Jun 25 19:11:16 2024 (r21076) +++ trunk/OpenMPT/soundlib/modcommand.cpp Tue Jun 25 19:52:06 2024 (r21077) @@ -1409,6 +1409,8 @@ case CMD_MED_SYNTH_JUMP: effect2 = CMD_NONE; break; + default: + break; } } |
From: <sv...@op...> - 2024-06-25 17:11:24
|
Author: sagamusix Date: Tue Jun 25 19:11:16 2024 New Revision: 21076 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21076 Log: [Imp] When combining two identical pattern commands, don't try to keep both commands. The first command is preferred to be kept (fixes DBM.143_gnoj, https://www.un4seen.com/forum/?topic=15448.msg143155#msg143155) Modified: trunk/OpenMPT/soundlib/modcommand.cpp Modified: trunk/OpenMPT/soundlib/modcommand.cpp ============================================================================== --- trunk/OpenMPT/soundlib/modcommand.cpp Tue Jun 25 18:58:19 2024 (r21075) +++ trunk/OpenMPT/soundlib/modcommand.cpp Tue Jun 25 19:11:16 2024 (r21076) @@ -1377,6 +1377,41 @@ std::pair<EffectCommand, ModCommand::PARAM> ModCommand::FillInTwoCommands(EffectCommand effect1, uint8 param1, EffectCommand effect2, uint8 param2) { + if(effect1 == effect2) + { + // For non-sliding, absolute effects, it doesn't make sense to keep both commands + switch(effect1) + { + case CMD_ARPEGGIO: + case CMD_PANNING8: + case CMD_OFFSET: + case CMD_POSITIONJUMP: + case CMD_VOLUME: + case CMD_PATTERNBREAK: + case CMD_SPEED: + case CMD_TEMPO: + case CMD_CHANNELVOLUME: + case CMD_GLOBALVOLUME: + case CMD_KEYOFF: + case CMD_SETENVPOSITION: + case CMD_MIDI: + case CMD_SMOOTHMIDI: + case CMD_DELAYCUT: + case CMD_FINETUNE: + case CMD_FINETUNE_SMOOTH: + case CMD_DUMMY: + case CMD_REVERSEOFFSET: + case CMD_DBMECHO: + case CMD_OFFSETPERCENTAGE: + case CMD_DIGIREVERSESAMPLE: + case CMD_VOLUME8: + case CMD_HMN_MEGA_ARP: + case CMD_MED_SYNTH_JUMP: + effect2 = CMD_NONE; + break; + } + } + for(uint8 n = 0; n < 4; n++) { if(auto volCmd = ModCommand::ConvertToVolCommand(effect1, param1, (n > 1)); effect1 == CMD_NONE || volCmd.first != VOLCMD_NONE) |
From: <sv...@op...> - 2024-06-25 16:58:32
|
Author: sagamusix Date: Tue Jun 25 18:58:19 2024 New Revision: 21075 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21075 Log: [Fix] Since r20831, EffectWriter::AllowMultiple() was always set. Modified: trunk/OpenMPT/soundlib/pattern.h Modified: trunk/OpenMPT/soundlib/pattern.h ============================================================================== --- trunk/OpenMPT/soundlib/pattern.h Tue Jun 25 18:30:30 2024 (r21074) +++ trunk/OpenMPT/soundlib/pattern.h Tue Jun 25 18:58:19 2024 (r21075) @@ -190,7 +190,7 @@ }; bool m_retry = true; - bool m_allowMultiple = true; + bool m_allowMultiple = false; bool m_isVolEffect = false; }; |
From: <sv...@op...> - 2024-06-25 16:30:42
|
Author: manx Date: Tue Jun 25 18:30:30 2024 New Revision: 21074 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21074 Log: Merged revision(s) 21073 from branches/OpenMPT-1.29: Merged revision(s) 21071 from branches/OpenMPT-1.30: [Fix] build: CI: GitHub: FreeBSD: Update all already installed packages. ........ ........ Modified: branches/OpenMPT-1.28/ (props changed) branches/OpenMPT-1.28/.github/workflows/FreeBSD-13.3-Makefile.yml Modified: branches/OpenMPT-1.28/.github/workflows/FreeBSD-13.3-Makefile.yml ============================================================================== --- branches/OpenMPT-1.28/.github/workflows/FreeBSD-13.3-Makefile.yml Tue Jun 25 18:30:00 2024 (r21073) +++ branches/OpenMPT-1.28/.github/workflows/FreeBSD-13.3-Makefile.yml Tue Jun 25 18:30:30 2024 (r21074) @@ -40,6 +40,7 @@ sync_files: false shutdown_vm: false run: | + 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.24.0 |
From: <sv...@op...> - 2024-06-25 16:30:07
|
Author: manx Date: Tue Jun 25 18:30:00 2024 New Revision: 21073 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21073 Log: Merged revision(s) 21071 from branches/OpenMPT-1.30: [Fix] build: CI: GitHub: FreeBSD: Update all already installed packages. ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/.github/workflows/FreeBSD-13.3-Makefile.yml Modified: branches/OpenMPT-1.29/.github/workflows/FreeBSD-13.3-Makefile.yml ============================================================================== --- branches/OpenMPT-1.29/.github/workflows/FreeBSD-13.3-Makefile.yml Tue Jun 25 18:29:12 2024 (r21072) +++ branches/OpenMPT-1.29/.github/workflows/FreeBSD-13.3-Makefile.yml Tue Jun 25 18:30:00 2024 (r21073) @@ -40,6 +40,7 @@ sync_files: false shutdown_vm: false run: | + 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.24.0 |
From: <sv...@op...> - 2024-06-25 16:29:24
|
Author: manx Date: Tue Jun 25 18:29:12 2024 New Revision: 21072 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21072 Log: [Fix] build: CI: GitHub: OpenBSD: Update all already installed packages. Modified: branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.4-Makefile.yml branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.5-Makefile.yml Modified: branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.4-Makefile.yml ============================================================================== --- branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.4-Makefile.yml Tue Jun 25 18:29:02 2024 (r21071) +++ branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.4-Makefile.yml Tue Jun 25 18:29:12 2024 (r21072) @@ -40,6 +40,7 @@ sync_files: false shutdown_vm: false run: | + sudo pkg_add -u sudo pkg_add -I ghostscript-10.02.0 sudo pkg_add -I autoconf-2.71 automake-1.16.5 sudo pkg_add -I subversion p5-XML-XPath git mawk gmake pkgconf autoconf-archive libtool libltdl help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio-svn sdl2 Modified: branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.5-Makefile.yml ============================================================================== --- branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.5-Makefile.yml Tue Jun 25 18:29:02 2024 (r21071) +++ branches/OpenMPT-1.30/.github/workflows/OpenBSD-7.5-Makefile.yml Tue Jun 25 18:29:12 2024 (r21072) @@ -40,6 +40,7 @@ sync_files: false shutdown_vm: false run: | + sudo pkg_add -u sudo pkg_add -I ghostscript-10.03.1 sudo pkg_add -I autoconf-2.71 automake-1.16.5 sudo pkg_add -I subversion p5-XML-XPath git mawk gmake pkgconf autoconf-archive libtool libltdl help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio-svn sdl2 |
From: <sv...@op...> - 2024-06-25 16:29:14
|
Author: manx Date: Tue Jun 25 18:29:02 2024 New Revision: 21071 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21071 Log: [Fix] build: CI: GitHub: FreeBSD: Update all already installed packages. Modified: branches/OpenMPT-1.30/.github/workflows/FreeBSD-13.3-Makefile.yml branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.1-Makefile.yml Modified: branches/OpenMPT-1.30/.github/workflows/FreeBSD-13.3-Makefile.yml ============================================================================== --- branches/OpenMPT-1.30/.github/workflows/FreeBSD-13.3-Makefile.yml Tue Jun 25 18:27:41 2024 (r21070) +++ branches/OpenMPT-1.30/.github/workflows/FreeBSD-13.3-Makefile.yml Tue Jun 25 18:29:02 2024 (r21071) @@ -40,6 +40,7 @@ sync_files: false shutdown_vm: false run: | + 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.24.0 Modified: branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.1-Makefile.yml ============================================================================== --- branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.1-Makefile.yml Tue Jun 25 18:27:41 2024 (r21070) +++ branches/OpenMPT-1.30/.github/workflows/FreeBSD-14.1-Makefile.yml Tue Jun 25 18:29:02 2024 (r21071) @@ -40,6 +40,7 @@ sync_files: false shutdown_vm: false run: | + 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@6acac3ca1b632aa762721d537dea32398ba0f2b1 |
From: <sv...@op...> - 2024-06-25 16:27:48
|
Author: manx Date: Tue Jun 25 18:27:41 2024 New Revision: 21070 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21070 Log: Merged revision(s) 21067 from trunk/OpenMPT: [Fix] build: CI: GitHub: FreeBSD: Update all already installed packages. ........ 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 Tue Jun 25 18:27:18 2024 (r21069) +++ branches/OpenMPT-1.31/.github/workflows/FreeBSD-Autotools.yml Tue Jun 25 18:27:41 2024 (r21070) @@ -47,6 +47,7 @@ sync_files: false shutdown_vm: false run: | + 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@6acac3ca1b632aa762721d537dea32398ba0f2b1 Modified: branches/OpenMPT-1.31/.github/workflows/FreeBSD-Makefile.yml ============================================================================== --- branches/OpenMPT-1.31/.github/workflows/FreeBSD-Makefile.yml Tue Jun 25 18:27:18 2024 (r21069) +++ branches/OpenMPT-1.31/.github/workflows/FreeBSD-Makefile.yml Tue Jun 25 18:27:41 2024 (r21070) @@ -51,6 +51,7 @@ sync_files: false shutdown_vm: false run: | + 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@6acac3ca1b632aa762721d537dea32398ba0f2b1 |
From: <sv...@op...> - 2024-06-25 16:27:24
|
Author: manx Date: Tue Jun 25 18:27:18 2024 New Revision: 21069 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21069 Log: Merged revision(s) 21066 from trunk/OpenMPT: [Fix] build: CI: GitHub: OpenBSD: Update all already installed packages. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/.github/workflows/OpenBSD-Autotools.yml branches/OpenMPT-1.31/.github/workflows/OpenBSD-Makefile.yml Modified: branches/OpenMPT-1.31/.github/workflows/OpenBSD-Autotools.yml ============================================================================== --- branches/OpenMPT-1.31/.github/workflows/OpenBSD-Autotools.yml Tue Jun 25 18:26:52 2024 (r21068) +++ branches/OpenMPT-1.31/.github/workflows/OpenBSD-Autotools.yml Tue Jun 25 18:27:18 2024 (r21069) @@ -47,6 +47,7 @@ sync_files: false shutdown_vm: false run: | + sudo pkg_add -u sudo pkg_add -I ${{ (matrix.version == '7.5') && 'ghostscript-10.03.1' || (matrix.version == '7.4') && 'ghostscript-10.02.0' || 'ghostscript' }} sudo pkg_add -I ${{ (matrix.version == '7.5') && 'autoconf-2.71 automake-1.16.5' || (matrix.version == '7.4') && 'autoconf-2.71 automake-1.16.5' || 'autoconf automake' }} sudo pkg_add -I subversion p5-XML-XPath git mawk gmake pkgconf autoconf-archive libtool libltdl help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio-svn sdl2 Modified: branches/OpenMPT-1.31/.github/workflows/OpenBSD-Makefile.yml ============================================================================== --- branches/OpenMPT-1.31/.github/workflows/OpenBSD-Makefile.yml Tue Jun 25 18:26:52 2024 (r21068) +++ branches/OpenMPT-1.31/.github/workflows/OpenBSD-Makefile.yml Tue Jun 25 18:27:18 2024 (r21069) @@ -51,6 +51,7 @@ sync_files: false shutdown_vm: false run: | + sudo pkg_add -u sudo pkg_add -I ${{ (matrix.version == '7.5') && 'ghostscript-10.03.1' || (matrix.version == '7.4') && 'ghostscript-10.02.0' || 'ghostscript' }} sudo pkg_add -I ${{ (matrix.version == '7.5') && 'autoconf-2.71 automake-1.16.5' || (matrix.version == '7.4') && 'autoconf-2.71 automake-1.16.5' || 'autoconf automake' }} sudo pkg_add -I subversion p5-XML-XPath git mawk gmake pkgconf autoconf-archive libtool libltdl help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio-svn sdl2 |
From: <sv...@op...> - 2024-06-25 16:26:59
|
Author: manx Date: Tue Jun 25 18:26:52 2024 New Revision: 21068 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21068 Log: Merged revision(s) 21065 from trunk/OpenMPT: [Fix] build: CI: GitHub: NetBSD: Update pkgin database before installing packages. [Fix] build: CI: GitHub: NetBSD: Update all already installed packages. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/.github/workflows/NetBSD-Makefile.yml Modified: branches/OpenMPT-1.31/.github/workflows/NetBSD-Makefile.yml ============================================================================== --- branches/OpenMPT-1.31/.github/workflows/NetBSD-Makefile.yml Tue Jun 25 17:37:29 2024 (r21067) +++ branches/OpenMPT-1.31/.github/workflows/NetBSD-Makefile.yml Tue Jun 25 18:26:52 2024 (r21068) @@ -51,6 +51,8 @@ sync_files: false shutdown_vm: false run: | + sudo pkgin -y update + sudo pkgin -y full-upgrade sudo pkgin -y install subversion git p5-XML-XPath mawk sudo pkgin -y install gmake pkgconf sudo pkgin -y install mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio SDL2 |
From: <sv...@op...> - 2024-06-25 15:37:35
|
Author: manx Date: Tue Jun 25 17:37:29 2024 New Revision: 21067 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21067 Log: [Fix] build: CI: GitHub: FreeBSD: Update all already installed packages. Modified: trunk/OpenMPT/.github/workflows/FreeBSD-Autotools.yml trunk/OpenMPT/.github/workflows/FreeBSD-Makefile.yml Modified: trunk/OpenMPT/.github/workflows/FreeBSD-Autotools.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/FreeBSD-Autotools.yml Tue Jun 25 17:37:11 2024 (r21066) +++ trunk/OpenMPT/.github/workflows/FreeBSD-Autotools.yml Tue Jun 25 17:37:29 2024 (r21067) @@ -49,6 +49,7 @@ sync_files: false shutdown_vm: false run: | + 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@6acac3ca1b632aa762721d537dea32398ba0f2b1 Modified: trunk/OpenMPT/.github/workflows/FreeBSD-Makefile.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/FreeBSD-Makefile.yml Tue Jun 25 17:37:11 2024 (r21066) +++ trunk/OpenMPT/.github/workflows/FreeBSD-Makefile.yml Tue Jun 25 17:37:29 2024 (r21067) @@ -53,6 +53,7 @@ sync_files: false shutdown_vm: false run: | + 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@6acac3ca1b632aa762721d537dea32398ba0f2b1 |
From: <sv...@op...> - 2024-06-25 15:37:24
|
Author: manx Date: Tue Jun 25 17:37:11 2024 New Revision: 21066 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21066 Log: [Fix] build: CI: GitHub: OpenBSD: Update all already installed packages. Modified: trunk/OpenMPT/.github/workflows/OpenBSD-Autotools.yml trunk/OpenMPT/.github/workflows/OpenBSD-Makefile.yml Modified: trunk/OpenMPT/.github/workflows/OpenBSD-Autotools.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/OpenBSD-Autotools.yml Tue Jun 25 17:31:35 2024 (r21065) +++ trunk/OpenMPT/.github/workflows/OpenBSD-Autotools.yml Tue Jun 25 17:37:11 2024 (r21066) @@ -49,6 +49,7 @@ sync_files: false shutdown_vm: false run: | + sudo pkg_add -u sudo pkg_add -I ${{ (matrix.version == '7.5') && 'ghostscript-10.03.1' || (matrix.version == '7.4') && 'ghostscript-10.02.0' || 'ghostscript' }} sudo pkg_add -I ${{ (matrix.version == '7.5') && 'autoconf-2.71 automake-1.16.5' || (matrix.version == '7.4') && 'autoconf-2.71 automake-1.16.5' || 'autoconf automake' }} sudo pkg_add -I subversion p5-XML-XPath git mawk gmake pkgconf autoconf-archive libtool libltdl help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio-svn sdl2 Modified: trunk/OpenMPT/.github/workflows/OpenBSD-Makefile.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/OpenBSD-Makefile.yml Tue Jun 25 17:31:35 2024 (r21065) +++ trunk/OpenMPT/.github/workflows/OpenBSD-Makefile.yml Tue Jun 25 17:37:11 2024 (r21066) @@ -53,6 +53,7 @@ sync_files: false shutdown_vm: false run: | + sudo pkg_add -u sudo pkg_add -I ${{ (matrix.version == '7.5') && 'ghostscript-10.03.1' || (matrix.version == '7.4') && 'ghostscript-10.02.0' || 'ghostscript' }} sudo pkg_add -I ${{ (matrix.version == '7.5') && 'autoconf-2.71 automake-1.16.5' || (matrix.version == '7.4') && 'autoconf-2.71 automake-1.16.5' || 'autoconf automake' }} sudo pkg_add -I subversion p5-XML-XPath git mawk gmake pkgconf autoconf-archive libtool libltdl help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio-svn sdl2 |
From: <sv...@op...> - 2024-06-25 15:31:47
|
Author: manx Date: Tue Jun 25 17:31:35 2024 New Revision: 21065 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21065 Log: [Fix] build: CI: GitHub: NetBSD: Update pkgin database before installing packages. [Fix] build: CI: GitHub: NetBSD: Update all already installed packages. Modified: trunk/OpenMPT/.github/workflows/NetBSD-Makefile.yml Modified: trunk/OpenMPT/.github/workflows/NetBSD-Makefile.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/NetBSD-Makefile.yml Tue Jun 25 16:04:27 2024 (r21064) +++ trunk/OpenMPT/.github/workflows/NetBSD-Makefile.yml Tue Jun 25 17:31:35 2024 (r21065) @@ -53,6 +53,8 @@ sync_files: false shutdown_vm: false run: | + sudo pkgin -y update + sudo pkgin -y full-upgrade sudo pkgin -y install subversion git p5-XML-XPath mawk sudo pkgin -y install gmake pkgconf sudo pkgin -y install mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio SDL2 |
From: <sv...@op...> - 2024-06-25 14:04:34
|
Author: manx Date: Tue Jun 25 16:04:27 2024 New Revision: 21064 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21064 Log: Merged revision(s) 21056 from trunk/OpenMPT: [Fix] mpt/string_transcode/transcode.hpp: When converting to UTF16 from UTF32 or UTF8 and encountering a Unicode codepoint outside of official range, do not output a \0 character after the replacement character. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/src/mpt/string_transcode/transcode.hpp Modified: branches/OpenMPT-1.30/src/mpt/string_transcode/transcode.hpp ============================================================================== --- branches/OpenMPT-1.30/src/mpt/string_transcode/transcode.hpp Tue Jun 25 16:04:01 2024 (r21063) +++ branches/OpenMPT-1.30/src/mpt/string_transcode/transcode.hpp Tue Jun 25 16:04:27 2024 (r21064) @@ -378,6 +378,7 @@ out.push_back(replacement); ucs4 = 0; charsleft = 0; + continue; } if (ucs4 <= 0xffff) { out.push_back(static_cast<mpt::widechar>(ucs4)); @@ -517,7 +518,7 @@ char32_t ucs4 = static_cast<char32_t>(static_cast<uint32>(in[i])); if (ucs4 > 0x1fffff) { out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(replacement))); - ucs4 = 0; + continue; } if (ucs4 <= 0xffff) { out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(ucs4))); |
From: <sv...@op...> - 2024-06-25 14:04:12
|
Author: manx Date: Tue Jun 25 16:04:01 2024 New Revision: 21063 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21063 Log: Merged revision(s) 21056 from trunk/OpenMPT: [Fix] mpt/string_transcode/transcode.hpp: When converting to UTF16 from UTF32 or UTF8 and encountering a Unicode codepoint outside of official range, do not output a \0 character after the replacement character. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp Modified: branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp Tue Jun 25 16:02:34 2024 (r21062) +++ branches/OpenMPT-1.31/src/mpt/string_transcode/transcode.hpp Tue Jun 25 16:04:01 2024 (r21063) @@ -678,6 +678,7 @@ out.push_back(replacement); ucs4 = 0; charsleft = 0; + continue; } if (ucs4 <= 0xffff) { out.push_back(static_cast<mpt::widechar>(ucs4)); @@ -817,7 +818,7 @@ char32_t ucs4 = static_cast<char32_t>(static_cast<uint32>(in[i])); if (ucs4 > 0x1fffff) { out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(replacement))); - ucs4 = 0; + continue; } if (ucs4 <= 0xffff) { out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(ucs4))); |
From: <sv...@op...> - 2024-06-25 14:02:45
|
Author: manx Date: Tue Jun 25 16:02:34 2024 New Revision: 21062 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21062 Log: [Fix] mpt/string_transcode/transcode.hpp: Fix 7bit/8bit to/from UTF16 transcoding of non-BMP codepoints. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 16:01:40 2024 (r21061) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 16:02:34 2024 (r21062) @@ -575,7 +575,7 @@ for (std::size_t i = 0; i < str.length(); ++i) { std::size_t c = static_cast<std::size_t>(mpt::char_value(str[i])); if (c < std::size(table)) { - res.push_back(static_cast<mpt::widechar>(table[c])); + encode_single_wide(res, table[c]); } else { res.push_back(replacement); } @@ -588,7 +588,7 @@ Tdststring res; res.reserve(str.length()); for (std::size_t i = 0; i < str.length(); ++i) { - char32_t c = static_cast<char32_t>(str[i]); + char32_t c = decode_single_wide(i, str); bool found = false; // Try non-control characters first. // In cases where there are actual characters mirrored in this range (like in AMS/AMS2 character sets), @@ -626,7 +626,7 @@ if ((0x80 <= c) && (c <= 0x9f)) { res.push_back(replacement); } else if (c < std::size(table)) { - res.push_back(static_cast<mpt::widechar>(table[c])); + encode_single_wide(res, table[c]); } else { res.push_back(replacement); } @@ -639,7 +639,7 @@ Tdststring res; res.reserve(str.length()); for (std::size_t i = 0; i < str.length(); ++i) { - char32_t c = static_cast<char32_t>(str[i]); + char32_t c = decode_single_wide(i, str); bool found = false; // Try non-control characters first. // In cases where there are actual characters mirrored in this range (like in AMS/AMS2 character sets), @@ -678,7 +678,7 @@ for (std::size_t i = 0; i < str.length(); ++i) { uint8 c = mpt::char_value(str[i]); if (c <= 0x7f) { - res.push_back(static_cast<mpt::widechar>(static_cast<uint32>(c))); + encode_single_wide(res, static_cast<char32_t>(static_cast<uint32>(c))); } else { res.push_back(replacement); } @@ -691,9 +691,9 @@ Tdststring res; res.reserve(str.length()); for (std::size_t i = 0; i < str.length(); ++i) { - char32_t c = static_cast<char32_t>(str[i]); + char32_t c = decode_single_wide(i, str); if (c <= 0x7f) { - res.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint8>(c))); + res.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint8>(static_cast<uint32>(c)))); } else { res.push_back(replacement); } @@ -708,7 +708,7 @@ res.reserve(str.length()); for (std::size_t i = 0; i < str.length(); ++i) { uint8 c = mpt::char_value(str[i]); - res.push_back(static_cast<mpt::widechar>(static_cast<uint32>(c))); + encode_single_wide(res, static_cast<char32_t>(static_cast<uint32>(c))); } return res; } @@ -718,7 +718,7 @@ Tdststring res; res.reserve(str.length()); for (std::size_t i = 0; i < str.length(); ++i) { - char32_t c = static_cast<char32_t>(str[i]); + char32_t c = decode_single_wide(i, str); if (c <= 0xff) { res.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint8>(c))); } else { |
From: <sv...@op...> - 2024-06-25 14:01:51
|
Author: manx Date: Tue Jun 25 16:01:40 2024 New Revision: 21061 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21061 Log: [Var] Run clang-format. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:53:46 2024 (r21060) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 16:01:40 2024 (r21061) @@ -773,7 +773,7 @@ continue; } } - encode_single_wide(out, ucs4); + encode_single_wide(out, ucs4); ucs4 = 0; } } |
From: <sv...@op...> - 2024-06-25 13:53:52
|
Author: manx Date: Tue Jun 25 15:53:46 2024 New Revision: 21060 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21060 Log: [Ref] mpt/string_transcode/transcode.hpp: Move single codepoint encode and decode functions further up in source file. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:52:38 2024 (r21059) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:53:46 2024 (r21060) @@ -476,6 +476,98 @@ 0x03B1, 0x03B2, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x222E, 0x03C6, 0x2208, 0x2229, 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x00B3, 0x00AF}; + + +template <typename Tdststring> +inline void encode_single_utf16(Tdststring & out, char32_t ucs4) { + static_assert(sizeof(typename Tdststring::value_type) == 2); + if (ucs4 <= 0xffff) { + out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(static_cast<uint32>(ucs4)))); + } else { + uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; + uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); + uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); + out.push_back(static_cast<typename Tdststring::value_type>(hi_sur)); + out.push_back(static_cast<typename Tdststring::value_type>(lo_sur)); + } +} + +template <typename Tsrcstring> +inline char32_t decode_single_utf16(std::size_t & i, const Tsrcstring & in) { + static_assert(sizeof(typename Tsrcstring::value_type) == 2); + char32_t ucs4 = 0; + typename Tsrcstring::value_type wc = in[i]; + uint16 c = static_cast<uint16>(wc); + if (i + 1 < in.length()) { + // check for surrogate pair + uint16 hi_sur = in[i + 0]; + uint16 lo_sur = in[i + 1]; + if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { + // surrogate pair + ++i; + hi_sur &= (1 << 10) - 1; + lo_sur &= (1 << 10) - 1; + ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); + } else { + // no surrogate pair + ucs4 = static_cast<char32_t>(c); + } + } else { + // no surrogate possible + ucs4 = static_cast<char32_t>(c); + } + return ucs4; +} + + + +inline void encode_single_wide(mpt::widestring & out, char32_t ucs4) { + if constexpr (sizeof(mpt::widechar) == 2) { + if (ucs4 <= 0xffff) { + out.push_back(static_cast<mpt::widechar>(static_cast<uint16>(static_cast<uint32>(ucs4)))); + } else { + uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; + uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); + uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); + out.push_back(static_cast<mpt::widechar>(hi_sur)); + out.push_back(static_cast<mpt::widechar>(lo_sur)); + } + } else { + out.push_back(static_cast<mpt::widechar>(static_cast<uint32>(ucs4))); + } +} + +inline char32_t decode_single_wide(std::size_t & i, const mpt::widestring & in) { + char32_t ucs4 = 0; + mpt::widechar wc = in[i]; + if constexpr (sizeof(mpt::widechar) == 2) { + uint16 c = static_cast<uint16>(wc); + if (i + 1 < in.length()) { + // check for surrogate pair + uint16 hi_sur = in[i + 0]; + uint16 lo_sur = in[i + 1]; + if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { + // surrogate pair + ++i; + hi_sur &= (1 << 10) - 1; + lo_sur &= (1 << 10) - 1; + ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); + } else { + // no surrogate pair + ucs4 = static_cast<char32_t>(c); + } + } else { + // no surrogate possible + ucs4 = static_cast<char32_t>(c); + } + } else { + ucs4 = static_cast<char32_t>(static_cast<uint32>(wc)); + } + return ucs4; +} + + + template <typename Tsrcstring> inline mpt::widestring decode_8bit(const Tsrcstring & str, const char32_t (&table)[256], mpt::widechar replacement = MPT_WIDECHAR('\uFFFD')) { mpt::widestring res; @@ -637,94 +729,6 @@ } - -template <typename Tdststring> -inline void encode_single_utf16(Tdststring & out, char32_t ucs4) { - static_assert(sizeof(typename Tdststring::value_type) == 2); - if (ucs4 <= 0xffff) { - out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(static_cast<uint32>(ucs4)))); - } else { - uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; - uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); - uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); - out.push_back(static_cast<typename Tdststring::value_type>(hi_sur)); - out.push_back(static_cast<typename Tdststring::value_type>(lo_sur)); - } -} - -template <typename Tsrcstring> -inline char32_t decode_single_utf16(std::size_t & i, const Tsrcstring & in) { - static_assert(sizeof(typename Tsrcstring::value_type) == 2); - char32_t ucs4 = 0; - typename Tsrcstring::value_type wc = in[i]; - uint16 c = static_cast<uint16>(wc); - if (i + 1 < in.length()) { - // check for surrogate pair - uint16 hi_sur = in[i + 0]; - uint16 lo_sur = in[i + 1]; - if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { - // surrogate pair - ++i; - hi_sur &= (1 << 10) - 1; - lo_sur &= (1 << 10) - 1; - ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); - } else { - // no surrogate pair - ucs4 = static_cast<char32_t>(c); - } - } else { - // no surrogate possible - ucs4 = static_cast<char32_t>(c); - } - return ucs4; -} - -inline void encode_single_wide(mpt::widestring & out, char32_t ucs4) { - if constexpr (sizeof(mpt::widechar) == 2) { - if (ucs4 <= 0xffff) { - out.push_back(static_cast<mpt::widechar>(static_cast<uint16>(static_cast<uint32>(ucs4)))); - } else { - uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; - uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); - uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); - out.push_back(static_cast<mpt::widechar>(hi_sur)); - out.push_back(static_cast<mpt::widechar>(lo_sur)); - } - } else { - out.push_back(static_cast<mpt::widechar>(static_cast<uint32>(ucs4))); - } -} - -inline char32_t decode_single_wide(std::size_t & i, const mpt::widestring & in) { - char32_t ucs4 = 0; - mpt::widechar wc = in[i]; - if constexpr (sizeof(mpt::widechar) == 2) { - uint16 c = static_cast<uint16>(wc); - if (i + 1 < in.length()) { - // check for surrogate pair - uint16 hi_sur = in[i + 0]; - uint16 lo_sur = in[i + 1]; - if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { - // surrogate pair - ++i; - hi_sur &= (1 << 10) - 1; - lo_sur &= (1 << 10) - 1; - ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); - } else { - // no surrogate pair - ucs4 = static_cast<char32_t>(c); - } - } else { - // no surrogate possible - ucs4 = static_cast<char32_t>(c); - } - } else { - ucs4 = static_cast<char32_t>(static_cast<uint32>(wc)); - } - return ucs4; -} - - template <typename Tsrcstring> inline mpt::widestring decode_utf8(const Tsrcstring & str, mpt::widechar replacement = MPT_WIDECHAR('\uFFFD')) { |
From: <sv...@op...> - 2024-06-25 13:52:45
|
Author: manx Date: Tue Jun 25 15:52:38 2024 New Revision: 21059 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21059 Log: [Ref] mpt/string_transcode/transcode.hpp: Split wide single codepoint encode and decode into separate functions. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:50:13 2024 (r21058) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:52:38 2024 (r21059) @@ -679,6 +679,51 @@ return ucs4; } +inline void encode_single_wide(mpt::widestring & out, char32_t ucs4) { + if constexpr (sizeof(mpt::widechar) == 2) { + if (ucs4 <= 0xffff) { + out.push_back(static_cast<mpt::widechar>(static_cast<uint16>(static_cast<uint32>(ucs4)))); + } else { + uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; + uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); + uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); + out.push_back(static_cast<mpt::widechar>(hi_sur)); + out.push_back(static_cast<mpt::widechar>(lo_sur)); + } + } else { + out.push_back(static_cast<mpt::widechar>(static_cast<uint32>(ucs4))); + } +} + +inline char32_t decode_single_wide(std::size_t & i, const mpt::widestring & in) { + char32_t ucs4 = 0; + mpt::widechar wc = in[i]; + if constexpr (sizeof(mpt::widechar) == 2) { + uint16 c = static_cast<uint16>(wc); + if (i + 1 < in.length()) { + // check for surrogate pair + uint16 hi_sur = in[i + 0]; + uint16 lo_sur = in[i + 1]; + if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { + // surrogate pair + ++i; + hi_sur &= (1 << 10) - 1; + lo_sur &= (1 << 10) - 1; + ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); + } else { + // no surrogate pair + ucs4 = static_cast<char32_t>(c); + } + } else { + // no surrogate possible + ucs4 = static_cast<char32_t>(c); + } + } else { + ucs4 = static_cast<char32_t>(static_cast<uint32>(wc)); + } + return ucs4; +} + template <typename Tsrcstring> @@ -723,10 +768,8 @@ charsleft = 0; continue; } - encode_single_utf16(out, ucs4); - } else { - out.push_back(static_cast<mpt::widechar>(static_cast<uint32>(ucs4))); } + encode_single_wide(out, ucs4); ucs4 = 0; } } @@ -744,12 +787,7 @@ const mpt::widestring & in = str; Tdststring out; for (std::size_t i = 0; i < in.length(); i++) { - char32_t ucs4 = 0; - if constexpr (sizeof(mpt::widechar) == 2) { - ucs4 = decode_single_utf16(i, in); - } else { - ucs4 = static_cast<char32_t>(static_cast<uint32>(in[i])); - } + char32_t ucs4 = decode_single_wide(i, in); if (ucs4 > 0x1fffff) { out.push_back(replacement); continue; |
From: <sv...@op...> - 2024-06-25 13:50:26
|
Author: manx Date: Tue Jun 25 15:50:13 2024 New Revision: 21058 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21058 Log: [Fix] mpt/string_transcode/transcode.hpp: Split UTF16 single codepoint encode and decode into separate functions. Fix const-correctness. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:42:25 2024 (r21057) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:50:13 2024 (r21058) @@ -653,7 +653,7 @@ } template <typename Tsrcstring> -inline char32_t decode_single_utf16(std::size_t & i, Tsrcstring & in) { +inline char32_t decode_single_utf16(std::size_t & i, const Tsrcstring & in) { static_assert(sizeof(typename Tsrcstring::value_type) == 2); char32_t ucs4 = 0; typename Tsrcstring::value_type wc = in[i]; |
From: <sv...@op...> - 2024-06-25 13:42:37
|
Author: manx Date: Tue Jun 25 15:42:25 2024 New Revision: 21057 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21057 Log: [Ref] mpt/string_transcode/transcode.hpp: Split UTF16 single codepoint encode and decode into separate functions. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:09:37 2024 (r21056) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:42:25 2024 (r21057) @@ -638,6 +638,49 @@ +template <typename Tdststring> +inline void encode_single_utf16(Tdststring & out, char32_t ucs4) { + static_assert(sizeof(typename Tdststring::value_type) == 2); + if (ucs4 <= 0xffff) { + out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(static_cast<uint32>(ucs4)))); + } else { + uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; + uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); + uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); + out.push_back(static_cast<typename Tdststring::value_type>(hi_sur)); + out.push_back(static_cast<typename Tdststring::value_type>(lo_sur)); + } +} + +template <typename Tsrcstring> +inline char32_t decode_single_utf16(std::size_t & i, Tsrcstring & in) { + static_assert(sizeof(typename Tsrcstring::value_type) == 2); + char32_t ucs4 = 0; + typename Tsrcstring::value_type wc = in[i]; + uint16 c = static_cast<uint16>(wc); + if (i + 1 < in.length()) { + // check for surrogate pair + uint16 hi_sur = in[i + 0]; + uint16 lo_sur = in[i + 1]; + if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { + // surrogate pair + ++i; + hi_sur &= (1 << 10) - 1; + lo_sur &= (1 << 10) - 1; + ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); + } else { + // no surrogate pair + ucs4 = static_cast<char32_t>(c); + } + } else { + // no surrogate possible + ucs4 = static_cast<char32_t>(c); + } + return ucs4; +} + + + template <typename Tsrcstring> inline mpt::widestring decode_utf8(const Tsrcstring & str, mpt::widechar replacement = MPT_WIDECHAR('\uFFFD')) { const Tsrcstring & in = str; @@ -680,17 +723,9 @@ charsleft = 0; continue; } - if (ucs4 <= 0xffff) { - out.push_back(static_cast<mpt::widechar>(ucs4)); - } else { - uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; - uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); - uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); - out.push_back(hi_sur); - out.push_back(lo_sur); - } + encode_single_utf16(out, ucs4); } else { - out.push_back(static_cast<mpt::widechar>(ucs4)); + out.push_back(static_cast<mpt::widechar>(static_cast<uint32>(ucs4))); } ucs4 = 0; } @@ -709,30 +744,11 @@ const mpt::widestring & in = str; Tdststring out; for (std::size_t i = 0; i < in.length(); i++) { - mpt::widechar wc = in[i]; char32_t ucs4 = 0; if constexpr (sizeof(mpt::widechar) == 2) { - uint16 c = static_cast<uint16>(wc); - if (i + 1 < in.length()) { - // check for surrogate pair - uint16 hi_sur = in[i + 0]; - uint16 lo_sur = in[i + 1]; - if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { - // surrogate pair - ++i; - hi_sur &= (1 << 10) - 1; - lo_sur &= (1 << 10) - 1; - ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); - } else { - // no surrogate pair - ucs4 = static_cast<char32_t>(c); - } - } else { - // no surrogate possible - ucs4 = static_cast<char32_t>(c); - } + ucs4 = decode_single_utf16(i, in); } else { - ucs4 = static_cast<char32_t>(wc); + ucs4 = static_cast<char32_t>(static_cast<uint32>(in[i])); } if (ucs4 > 0x1fffff) { out.push_back(replacement); @@ -782,27 +798,7 @@ Tdststring out; out.reserve(in.length()); for (std::size_t i = 0; i < in.length(); i++) { - char16_t wc = static_cast<char16_t>(static_cast<uint16>(in[i])); - char32_t ucs4 = 0; - uint16 c = static_cast<uint16>(wc); - if (i + 1 < in.length()) { - // check for surrogate pair - uint16 hi_sur = in[i + 0]; - uint16 lo_sur = in[i + 1]; - if (hi_sur >> 10 == 0x36 && lo_sur >> 10 == 0x37) { - // surrogate pair - ++i; - hi_sur &= (1 << 10) - 1; - lo_sur &= (1 << 10) - 1; - ucs4 = (static_cast<uint32>(hi_sur) << 10) | (static_cast<uint32>(lo_sur) << 0); - } else { - // no surrogate pair - ucs4 = static_cast<char32_t>(c); - } - } else { - // no surrogate possible - ucs4 = static_cast<char32_t>(c); - } + char32_t ucs4 = decode_single_utf16(i, in); out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint32>(ucs4))); } return out; @@ -820,15 +816,7 @@ out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(replacement))); continue; } - if (ucs4 <= 0xffff) { - out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(ucs4))); - } else { - uint32 surrogate = static_cast<uint32>(ucs4) - 0x10000; - uint16 hi_sur = static_cast<uint16>((0x36 << 10) | ((surrogate >> 10) & ((1 << 10) - 1))); - uint16 lo_sur = static_cast<uint16>((0x37 << 10) | ((surrogate >> 0) & ((1 << 10) - 1))); - out.push_back(static_cast<typename Tdststring::value_type>(hi_sur)); - out.push_back(static_cast<typename Tdststring::value_type>(lo_sur)); - } + encode_single_utf16(out, ucs4); } return out; } |
From: <sv...@op...> - 2024-06-25 13:09:50
|
Author: manx Date: Tue Jun 25 15:09:37 2024 New Revision: 21056 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21056 Log: [Fix] mpt/string_transcode/transcode.hpp: When converting to UTF16 from UTF32 or UTF8 and encountering a Unicode codepoint outside of official range, do not output a \0 character after the replacement character. Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Modified: trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Sun Jun 23 14:05:01 2024 (r21055) +++ trunk/OpenMPT/src/mpt/string_transcode/transcode.hpp Tue Jun 25 15:09:37 2024 (r21056) @@ -678,6 +678,7 @@ out.push_back(replacement); ucs4 = 0; charsleft = 0; + continue; } if (ucs4 <= 0xffff) { out.push_back(static_cast<mpt::widechar>(ucs4)); @@ -817,7 +818,7 @@ char32_t ucs4 = static_cast<char32_t>(static_cast<uint32>(in[i])); if (ucs4 > 0x1fffff) { out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(replacement))); - ucs4 = 0; + continue; } if (ucs4 <= 0xffff) { out.push_back(static_cast<typename Tdststring::value_type>(static_cast<uint16>(ucs4))); |
From: <sv...@op...> - 2024-06-23 12:05:14
|
Author: sagamusix Date: Sun Jun 23 14:05:01 2024 New Revision: 21055 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21055 Log: [Fix] FTM: Avoid integer overflow in pattern+row calculation, eventually leading to addressing a negative pattern row (found with afl++). Modified: trunk/OpenMPT/soundlib/Load_ftm.cpp Modified: trunk/OpenMPT/soundlib/Load_ftm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ftm.cpp Sun Jun 23 11:35:43 2024 (r21054) +++ trunk/OpenMPT/soundlib/Load_ftm.cpp Sun Jun 23 14:05:01 2024 (r21055) @@ -383,9 +383,9 @@ } const auto position = std::div(globalRow + spacing, fileHeader.rowsPerMeasure); - PATTERNINDEX pat = static_cast<PATTERNINDEX>(position.quot); - if(pat >= Patterns.GetNumPatterns()) + if(position.quot >= fileHeader.numMeasures) break; + const PATTERNINDEX pat = static_cast<PATTERNINDEX>(position.quot); ModCommand &m = *Patterns[pat].GetpModCommand(position.rem, chn); const uint8 param = ((data[0] & 0x0F) << 2) | (data[1] >> 6); // 0...63 |
From: <sv...@op...> - 2024-06-23 09:35:51
|
Author: sagamusix Date: Sun Jun 23 11:35:43 2024 New Revision: 21054 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21054 Log: [Ref] Silenece warning. Modified: trunk/OpenMPT/soundlib/Load_cba.cpp Modified: trunk/OpenMPT/soundlib/Load_cba.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_cba.cpp Sat Jun 22 23:00:03 2024 (r21053) +++ trunk/OpenMPT/soundlib/Load_cba.cpp Sun Jun 23 11:35:43 2024 (r21054) @@ -145,7 +145,7 @@ else if(command == 0x18) m.SetEffectCommand(CMD_RETRIG, param); else if(command >= 0x10 && command <= 0x1E) - m.SetEffectCommand(CMD_MODCMDEX, ((command << 4) + 0x10) | std::min(param ,uint8(0x0F))); + m.SetEffectCommand(CMD_MODCMDEX, static_cast<ModCommand::PARAM>(((command << 4) + 0x10) | std::min(param ,uint8(0x0F)))); else if(command == 0x1F) m.SetEffectCommand(CMD_SPEED, param); else if(command == 0x20) |
From: <sv...@op...> - 2024-06-22 21:00:12
|
Author: sagamusix Date: Sat Jun 22 23:00:03 2024 New Revision: 21053 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21053 Log: [Fix] CBA: It would be really useful to actually use the header channel panning table instead of leftover debug code... Modified: trunk/OpenMPT/soundlib/Load_cba.cpp Modified: trunk/OpenMPT/soundlib/Load_cba.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_cba.cpp Sat Jun 22 21:10:12 2024 (r21052) +++ trunk/OpenMPT/soundlib/Load_cba.cpp Sat Jun 22 23:00:03 2024 (r21053) @@ -2,7 +2,7 @@ * Load_cba.cpp * ------------ * Purpose: Chuck Biscuits / Black Artist (CBA) module loader - * Notes : This format appears to have been only used for the Expoze musicdisk by Heretics. + * Notes : This format appears to have been used only for the Expoze musicdisk by Heretics. * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ @@ -106,7 +106,7 @@ for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - ChnSettings[chn].nPan = (chn % 2u) ? 208 : 48; + ChnSettings[chn].nPan = fileHeader.panPos[chn] * 2; } for(SAMPLEINDEX smp = 1; smp <= m_nSamples; smp++) |