Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mpg123 for openSUSE:Factory checked in at 2025-06-10 08:56:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mpg123 (Old) and /work/SRC/openSUSE:Factory/.mpg123.new.19631 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mpg123" Tue Jun 10 08:56:21 2025 rev:45 rq:1283917 version:1.33.0 Changes: -------- --- /work/SRC/openSUSE:Factory/mpg123/mpg123.changes 2025-03-13 15:04:47.134652022 +0100 +++ /work/SRC/openSUSE:Factory/.mpg123.new.19631/mpg123.changes 2025-06-10 08:56:42.530145187 +0200 @@ -1,0 +2,34 @@ +Sun Jun 8 09:18:13 UTC 2025 - Luigi Baldoni <aloi...@gmx.com> + +- Update to version 1.33.0 + mpg123: + * Fix printout of filenames at end (convert/limit text + encoding). + * Treat HTTP header encoding as unknown/ASCII and formally + convert to UTF-8. + * Make --continue mode work with --random. + out123: + * Finally give zero exit code when generating sounds, not + indicating spurious failure. + build: + * Use CCASFLAGS for assembler tests, to enable builds that + enable instruction sets that way. + * PIC for compat libs (convenience libs used during build) + only if building shared libs. + compat: + * Map strtok use to strtok_r or strtok_s (MS platforms), if + possible. users only in control_generic and libout123 so far. + Out123 itself uses mytok. + * Enable build on PSP by merging in the hotfix of opmitting + signal code. + libmpg123: + * API version 49 with added mpg123_open_handle64(), + mpg123_open64(), and mpg123_open_fixed64() that are not + subject to largefile renaming. This means you can still + access internal I/O with MPG123_PORTABLE_API. The code has + been there before, anyway. + * With MPG123_PORTABLE_API, mpg123_open_handle() is hidden now + (use mpg123_open_handle64() instead). + * more silence on errors (sideband limit message) + +------------------------------------------------------------------- Old: ---- mpg123-1.32.10.tar.bz2 mpg123-1.32.10.tar.bz2.sig New: ---- mpg123-1.33.0.tar.bz2 mpg123-1.33.0.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mpg123.spec ++++++ --- /var/tmp/diff_new_pack.P7CoqK/_old 2025-06-10 08:56:43.374180051 +0200 +++ /var/tmp/diff_new_pack.P7CoqK/_new 2025-06-10 08:56:43.378180217 +0200 @@ -18,7 +18,7 @@ %define sover 0 Name: mpg123 -Version: 1.32.10 +Version: 1.33.0 Release: 0 Summary: Console MPEG audio player and decoder library License: LGPL-2.1-only ++++++ mpg123-1.32.10.tar.bz2 -> mpg123-1.33.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/INSTALL new/mpg123-1.33.0/INSTALL --- old/mpg123-1.32.10/INSTALL 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/INSTALL 2025-06-07 17:57:49.000000000 +0200 @@ -32,6 +32,11 @@ 1. Build +Note: If you want the full range of output modules, you might +run into cirucular dependencies, as pulseaudio or SDL might also +want to use parts of the mpg123 distribution. You can split the +build avoid that circle. + There is one main supported way to get your mpg123 installation consisting of @@ -51,6 +56,43 @@ make make install +If you want to separate components (for avoiding circular dependencies, +for example), you can split things at various points. Either you build +all libraries and programs first, then all output modules via + + # Build programs and libs only. + ./configure --disable-components --enable-programs \ + --enable-libmpg123 --enable-libsyn123 --enable-libout123 \ + --with-default-audio=$OUTPUT_MODULES + make && make install + # Build packges relying on mpg123 libraries. + # After that, build out123 modules with external dependencies + ./configure --disable-components --enable-libout123-modules \ + --with-audio=$OUTPUT_MODULES + make && make install + +or you can build each component individually, or just separate out the +problematic modules by + + # Build all components, but dummy output only. + ./configure --with-audio=dummy,$SAFE_MODULES \ + --with-default-audio=$OUTPUT_MODULES + make && install + # Build other packages, like SDL, pulse. + # After that, build output modules depending on those. + # Without --with-audio, auto-detection will build a list. + ./configure --disable-components --enable-libout123-modules \ + --with-audio=$UNSAFE_MODULES + make && make install + +The variables OUTPUT_MODULES, SAFE_MOULES, and UNSAFE_MODULES are +supposed to contain comma-separated lists of output modules like +"oss,pulse,alsa,jack". You need to give a full list when building +libout123 without modules to setup the default search order. Without +this, it won't find modules automatically without specifying one with +mpg123 -o $module. There is no module registry, just a simple build-time +list and the option to specify a module at runtime. + Run ./configure --help diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/NEWS new/mpg123-1.33.0/NEWS --- old/mpg123-1.32.10/NEWS 2024-12-14 16:00:11.000000000 +0100 +++ new/mpg123-1.33.0/NEWS 2025-06-07 17:57:48.000000000 +0200 @@ -1,3 +1,37 @@ +1.33.0 +------ +- mpg123 +-- Fix printout of filenames at end (convert/limit text encoding). +-- Treat HTTP header encoding as unknown/ASCII and formally convert to UTF-8. +-- Make --continue mode work with --random. +-- Handle possible failure of __wgetmainargs on Windows (bug 375). +- mpg123-id3dump: Fix up command line arg handling for Windows. +- out123 +-- Finally give zero exit code when generating sounds, not indicating + spurious failure. +- build: +-- Use CCASFLAGS for assembler tests, to enable builds that enable instruction + sets that way (bug 377). +-- PIC for compat libs (convenience libs used during build) only if building + shared libs (github PR 17 by Wouter Wijsman). +- compat: +-- Map strtok use to strtok_r or strtok_s (MS platforms), if possible. + users only in control_generic and libout123 so far. Out123 itself uses mytok. + Shall fix bug 376 (build with MSVC again). +-- Enable build on PSP by merging in the hotfix of opmitting signal code + (github PR 18 by Wouter Wijsman). +- libout123 +-- modules/win32: Align waveOutGetDevCapsA to WAVEOUTCAPSA, in anticipation + of some UNICODE change. +- libmpg123 +-- API version 49 with added mpg123_open_handle64(), mpg123_open64(), and + mpg123_open_fixed64() that are not subject to largefile renaming. This + means you can still access internal I/O with MPG123_PORTABLE_API. The + code has been there before, anyway. +-- With MPG123_PORTABLE_API, mpg123_open_handle() is hidden now (use + mpg123_open_handle64() instead). +-- more silence on errors (sideband limit message) + 1.32.10 ------ - scripts/tag_lyrics.py: fix for python3 (thanks to cclauss, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/NEWS.libmpg123 new/mpg123-1.33.0/NEWS.libmpg123 --- old/mpg123-1.32.10/NEWS.libmpg123 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/NEWS.libmpg123 2025-06-07 17:57:49.000000000 +0200 @@ -2,6 +2,16 @@ the mpg123 release where its changes first appeared to the public is given. +49.0.49 (mpg123 1.33) + - Added mpg123_open_handle64() as clearly portable match for + mpg123_reader64(). It is just mpg123_open_handle() without + code path for non-portable API. + - Remove mpg123_open_handle() and renamed variants from builds + with MPG123_PORTABLE_API. Code must switch to + mpg123_open_handle64() there if MPG123_API_VERSION >= 49! + - Added mpg123_open64() and mpg123_open_fixed64() as portable + variants of mpg123_open() and mpg123_open_fixed(). + 48.0.48 (mpg123 1.32) - Added mpg123_distversion() and mpg123_libversion(). - Added mpg123_reader64() and the other int64_t-based functions: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/configure new/mpg123-1.33.0/configure --- old/mpg123-1.32.10/configure 2024-12-14 16:01:08.000000000 +0100 +++ new/mpg123-1.33.0/configure 2025-06-07 17:58:29.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for mpg123 1.32.10. +# Generated by GNU Autoconf 2.71 for mpg123 1.33.0. # # Report bugs to <maintai...@mpg123.org>. # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='mpg123' PACKAGE_TARNAME='mpg123' -PACKAGE_VERSION='1.32.10' -PACKAGE_STRING='mpg123 1.32.10' +PACKAGE_VERSION='1.33.0' +PACKAGE_STRING='mpg123 1.33.0' PACKAGE_BUGREPORT='maintai...@mpg123.org' PACKAGE_URL='' @@ -1727,7 +1727,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mpg123 1.32.10 to adapt to many kinds of systems. +\`configure' configures mpg123 1.33.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1798,7 +1798,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mpg123 1.32.10:";; + short | recursive ) echo "Configuration of mpg123 1.33.0:";; esac cat <<\_ACEOF @@ -1877,7 +1877,8 @@ --disable-layer1 no layer I decoding --disable-layer2 no layer II decoding --disable-layer3 no layer III decoding - --enable-portable only build portable API (no off_t, no internal I/O) + --enable-portable only build portable API (no off_t, no internal I/O + -- and no end-user programs) --disable-largefile to not attempt to use 64 bit file offsets internally --disable-feature_report Disable feature report function @@ -2076,7 +2077,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mpg123 configure 1.32.10 +mpg123 configure 1.33.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2621,7 +2622,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mpg123 $as_me 1.32.10, which was +It was created by mpg123 $as_me 1.33.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3390,8 +3391,8 @@ -LIBMPG123_VERSION=48:3:48 -LIBOUT123_VERSION=5:1:5 +LIBMPG123_VERSION=49:3:49 +LIBOUT123_VERSION=5:2:5 LIBSYN123_VERSION=2:3:2 @@ -3991,7 +3992,7 @@ # Define the identity of the package. PACKAGE='mpg123' - VERSION='1.32.10' + VERSION='1.33.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -17131,7 +17132,7 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if .balign is present" >&5 printf %s "checking if .balign is present... " >&6; } echo '.balign 4' > conftest.s -if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then +if $CCAS $CCASFLAGS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -17151,7 +17152,7 @@ printf %s "checking if .align takes 2-exponent... " >&6; } asmalign_exp="no" echo '.align 3' > conftest.s - if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + if $CCAS $CCASFLAGS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then asmalign_exp="yes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -17198,7 +17199,7 @@ avx_support="no" echo '.text' > conftest.s echo 'vaddps %ymm0,%ymm0,%ymm0' >> conftest.s - if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + if $CCAS $CCASFLAGS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then avx_support="yes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -17789,6 +17790,7 @@ fi +# strtok_s for MSVCRT, not the C11 variant ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : @@ -17807,6 +17809,18 @@ printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" +if test "x$ac_cv_func_strtok_r" = xyes +then : + printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strtok_s" "ac_cv_func_strtok_s" +if test "x$ac_cv_func_strtok_s" = xyes +then : + printf "%s\n" "#define HAVE_STRTOK_S 1" >>confdefs.h + +fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" @@ -22453,7 +22467,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mpg123 $as_me 1.32.10, which was +This file was extended by mpg123 $as_me 1.33.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22521,7 +22535,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -mpg123 config.status 1.32.10 +mpg123 config.status 1.33.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -24222,11 +24236,18 @@ default_offset_bits=`expr "$ac_cv_sizeof_off_t" "*" "8"` +if test "x$build_programs" = xyes && ! test "x$portable_api" = xyes; then + build_mpg123_programs=yes +else + build_mpg123_programs=no +fi + echo " $PACKAGE_NAME $PACKAGE_VERSION Install path ............ $prefix Components .............. $components + Main mpg123 program(s)... $build_mpg123_programs CPU Optimization ........ $cpu_type Compiler Optimization ... $with_optimization" if test x"$use_yasm_for_avx" = xyes; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/configure.ac new/mpg123-1.33.0/configure.ac --- old/mpg123-1.32.10/configure.ac 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/configure.ac 2025-06-07 17:57:49.000000000 +0200 @@ -1209,7 +1209,7 @@ # extended to use balign if present AC_MSG_CHECKING([if .balign is present]) echo '.balign 4' > conftest.s -if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then +if $CCAS $CCASFLAGS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then AC_MSG_RESULT([yes]) AC_DEFINE(ASMALIGN_BALIGN, 1, [ Define if .balign is present. ]) @@ -1224,7 +1224,7 @@ AC_MSG_CHECKING([if .align takes 2-exponent]) asmalign_exp="no" echo '.align 3' > conftest.s - if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + if $CCAS $CCASFLAGS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then asmalign_exp="yes" AC_MSG_RESULT([yes]) else @@ -1263,7 +1263,7 @@ avx_support="no" echo '.text' > conftest.s echo 'vaddps %ymm0,%ymm0,%ymm0' >> conftest.s - if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + if $CCAS $CCASFLAGS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then avx_support="yes" AC_MSG_RESULT([yes]) else @@ -1331,7 +1331,7 @@ portable_api=no AC_ARG_ENABLE(portable, - [AS_HELP_STRING( [--enable-portable], [only build portable API (no off_t, no internal I/O)])], + [AS_HELP_STRING( [--enable-portable], [only build portable API (no off_t, no internal I/O -- and no end-user programs)])], [ if test "x$enableval" = xyes; then portable_api="yes" @@ -1491,7 +1491,8 @@ # Check for setpriority AC_CHECK_FUNCS( setpriority ) -AC_CHECK_FUNCS( strerror strerror_l uselocale ) +# strtok_s for MSVCRT, not the C11 variant +AC_CHECK_FUNCS( strerror strerror_l uselocale strtok_r strtok_s) AC_CHECK_FUNCS( setlocale nl_langinfo mbstowcs wcstombs wcswidth iswprint ) @@ -2953,11 +2954,18 @@ default_offset_bits=`expr "$ac_cv_sizeof_off_t" "*" "8"` +if test "x$build_programs" = xyes && ! test "x$portable_api" = xyes; then + build_mpg123_programs=yes +else + build_mpg123_programs=no +fi + echo " $PACKAGE_NAME $PACKAGE_VERSION Install path ............ $prefix Components .............. $components + Main mpg123 program(s)... $build_mpg123_programs CPU Optimization ........ $cpu_type Compiler Optimization ... $with_optimization" if test x"$use_yasm_for_avx" = xyes; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/man1/mpg123.1 new/mpg123-1.33.0/man1/mpg123.1 --- old/mpg123-1.32.10/man1/mpg123.1 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/man1/mpg123.1 2025-06-07 17:57:49.000000000 +0200 @@ -141,9 +141,10 @@ Enable playlist continuation mode. This changes frame skipping to apply only to the first track and also continues to play following tracks in playlist after the selected one. Also, the option to play a number of frames only applies to the whole playlist. Basically, this tries to treat the playlist more like one big stream (like, an audio book). The current track number in list (1-based) and frame number (0-based) are printed at exit (useful if you interrupted playback and want to continue later). Note that the continuation info is printed to standard output unless the switch for piping audio data to standard out is used. Also, it really makes sense to work with actual playlist files instead of lists of file names as arguments, to keep track positions consistent. +This interacts fine with \-\-random since version 1.33, but not \-\-shuffle, as that destroys the notion of a stable position in the playlist. .TP \fB\-\-loop \fItimes\fR -for looping track(s) a certain number of times, < 0 means infinite loop (not with \-\-random!). +for playing track(s) a certain number of times in a loop, < 0 means infinite loop. .TP .BR \-\-keep\-open For remote control mode: Keep loaded file open after reaching end. @@ -228,7 +229,7 @@ to stdout. .TP .BR \-\-reopen -Forces reopen of the audiodevice after ever song +Forces reopen of the audiodevice after every track. .TP .BR \-\-cpu\ \fIdecoder\-type Selects a certain decoder (optimized for specific CPU), for example i586 or MMX. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/mpg123.spec new/mpg123-1.33.0/mpg123.spec --- old/mpg123-1.32.10/mpg123.spec 2024-12-14 16:01:22.000000000 +0100 +++ new/mpg123-1.33.0/mpg123.spec 2025-06-07 17:59:14.000000000 +0200 @@ -3,7 +3,7 @@ # - devel packages for alsa, sdl, etc... to build the respective output modules. Summary: The fast console mpeg audio decoder/player. Name: mpg123 -Version: 1.32.10 +Version: 1.33.0 Release: 1 URL: http://www.mpg123.org/ License: GPL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/ports/cmake/src/CMakeLists.txt new/mpg123-1.33.0/ports/cmake/src/CMakeLists.txt --- old/mpg123-1.32.10/ports/cmake/src/CMakeLists.txt 2024-12-14 16:00:11.000000000 +0100 +++ new/mpg123-1.33.0/ports/cmake/src/CMakeLists.txt 2025-06-07 17:57:49.000000000 +0200 @@ -67,6 +67,8 @@ check_function_exists(shmctl HAVE_SHMCTL) check_function_exists(strerror HAVE_STRERROR) check_function_exists(strerror_l HAVE_STRERROR_L) +check_function_exists(strtok_r HAVE_STRTOK_R) +check_function_exists(strtok_s HAVE_STRTOK_S) check_function_exists(fork HAVE_FORK) check_function_exists(execvp HAVE_EXECVP) check_function_exists(ctermid HAVE_CTERMID) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/ports/cmake/src/compat/CMakeLists.txt new/mpg123-1.33.0/ports/cmake/src/compat/CMakeLists.txt --- old/mpg123-1.32.10/ports/cmake/src/compat/CMakeLists.txt 2024-12-14 16:00:11.000000000 +0100 +++ new/mpg123-1.33.0/ports/cmake/src/compat/CMakeLists.txt 2025-06-07 17:57:48.000000000 +0200 @@ -2,12 +2,18 @@ add_library(${TARGET} OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat.c" "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat_str.c") -set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) +if(BUILD_SHARED_LIBS) + set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() add_library(${TARGET}_dl OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat_dl.c") -set_target_properties(${TARGET}_dl PROPERTIES POSITION_INDEPENDENT_CODE ON) +if(BUILD_SHARED_LIBS) + set_target_properties(${TARGET}_dl PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() add_library(${TARGET}_str OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat_str.c") -set_target_properties(${TARGET}_str PROPERTIES POSITION_INDEPENDENT_CODE ON) +if(BUILD_SHARED_LIBS) + set_target_properties(${TARGET}_str PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/ports/cmake/src/config.cmake.h.in new/mpg123-1.33.0/ports/cmake/src/config.cmake.h.in --- old/mpg123-1.32.10/ports/cmake/src/config.cmake.h.in 2024-12-14 16:00:11.000000000 +0100 +++ new/mpg123-1.33.0/ports/cmake/src/config.cmake.h.in 2025-06-07 17:57:49.000000000 +0200 @@ -43,6 +43,8 @@ #cmakedefine HAVE_SIGNAL_H 1 #cmakedefine HAVE_STRERROR 1 #cmakedefine HAVE_STRERROR_L 1 +#cmakedefine HAVE_STRTOK_R 1 +#cmakedefine HAVE_STRTOK_S 1 #cmakedefine HAVE_FORK 1 #cmakedefine HAVE_EXECVP 1 #cmakedefine HAVE_CTERMID 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/compat/compat.c new/mpg123-1.33.0/src/compat/compat.c --- old/mpg123-1.32.10/src/compat/compat.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/compat/compat.c 2025-06-07 17:57:48.000000000 +0200 @@ -512,7 +512,7 @@ } #ifndef NO_CATCHSIGNAL -#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H) +#if (!defined(WIN32) || defined (__CYGWIN__)) && !defined(__PSP__) && defined(HAVE_SIGNAL_H) void (*INT123_catchsignal(int signum, void(*handler)(int)))(int) { struct sigaction new_sa; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/compat/compat.h new/mpg123-1.33.0/src/compat/compat.h --- old/mpg123-1.32.10/src/compat/compat.h 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/compat/compat.h 2025-06-07 17:57:48.000000000 +0200 @@ -110,8 +110,17 @@ typedef unsigned char byte; +// Annoying hackery to select a safe strtok variant. MS decided to call their strtok_r strtok_s, while +// C11 declares another strtok_s with different prototype. Thanks to you all. +#ifdef HAVE_STRTOK_R +#define INT123_compat_strtok(a, b, c) strtok_r((a), (b), (c)) +#endif + #if (defined(_UCRT) || defined(_MSC_VER) || (defined(__MINGW32__) || defined(__MINGW64__)) || (defined(__WATCOMC__) && defined(__NT__))) && !defined(__CYGWIN__) #define MPG123_COMPAT_MSVCRT_IO +#ifndef INT123_compat_strtok +#define INT123_compat_strtok(a, b, c) strtok_s((a), (b), (c)) +#endif #endif #if defined(MPG123_COMPAT_MSVCRT_IO) @@ -150,6 +159,11 @@ #include <io.h> #endif +#ifndef INT123_compat_strtok +#warning "no safe strtok found" +#define INT123_compat_strtok(a, b, c) strtok((a), (b)) +#endif + /* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */ void *INT123_safe_realloc(void *ptr, size_t size); // Also freeing ptr if result is NULL. You can do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/compat/compat_dl.c new/mpg123-1.33.0/src/compat/compat_dl.c --- old/mpg123-1.32.10/src/compat/compat_dl.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/compat/compat_dl.c 2025-06-07 17:57:48.000000000 +0200 @@ -49,9 +49,9 @@ #include "../common/debug.h" -#include "wpathconv.h" #ifdef USE_MODULES +#include "wpathconv.h" /* This is what I expected the platform-specific dance for dynamic module support to be. Little did I know about the peculiarities of (long) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/config.h.in new/mpg123-1.33.0/src/config.h.in --- old/mpg123-1.32.10/src/config.h.in 2024-12-14 16:01:09.000000000 +0100 +++ new/mpg123-1.33.0/src/config.h.in 2025-06-07 17:58:30.000000000 +0200 @@ -244,6 +244,12 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strtok_r' function. */ +#undef HAVE_STRTOK_R + +/* Define to 1 if you have the `strtok_s' function. */ +#undef HAVE_STRTOK_S + /* Define to 1 if you have the <sun/audioio.h> header file. */ #undef HAVE_SUN_AUDIOIO_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/control_generic.c new/mpg123-1.33.0/src/control_generic.c --- old/mpg123-1.32.10/src/control_generic.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/control_generic.c 2025-06-07 17:57:48.000000000 +0200 @@ -780,8 +780,9 @@ /* commands with arguments */ cmd = NULL; arg = NULL; - cmd = strtok(comstr," \t"); /* get the main command */ - arg = strtok(NULL,""); /* get the args */ + char *toksave = NULL; + cmd = INT123_compat_strtok(comstr, " \t", &toksave); /* get the main command */ + arg = INT123_compat_strtok(NULL, "", &toksave); /* get the args */ if (cmd && strlen(cmd) && arg && strlen(arg)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/include/mpg123.h new/mpg123-1.33.0/src/include/mpg123.h --- old/mpg123-1.32.10/src/include/mpg123.h 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/include/mpg123.h 2025-06-07 17:57:48.000000000 +0200 @@ -13,11 +13,15 @@ /** \file mpg123.h The header file for the libmpg123 MPEG Audio decoder */ +/** \defgroup mpg123_h mpg123 header general settings and notes + * @{ + */ + /** A macro to check at compile time which set of API functions to expect. * This must be incremented at least each time a new symbol is added * to the header. */ -#define MPG123_API_VERSION 48 +#define MPG123_API_VERSION 49 /** library patch level at client build time */ #define MPG123_PATCHLEVEL 3 @@ -43,8 +47,10 @@ #endif #endif -/** Earlier versions of libmpg123 put enums into public API calls, - * thich is not exactly safe. There are ABI rules, but you can use +/** \page enumapi About enum API + * + * Earlier versions of libmpg123 put enums into public API calls, + * which is not exactly safe. There are ABI rules, but you can use * compiler switches to change the sizes of enums. It is safer not * to have them in API calls. Thus, the default is to remap calls and * structs to variants that use plain ints. Define MPG123_ENUM_API to @@ -53,6 +59,21 @@ * You might want to define this to increase the chance of your binary * working with an older version of the library. But if that is your goal, * you should better build with an older version to begin with. + * + * You can avoid renamed symbols by using the non-enum names directly: + * + * - mpg123_param2() + * - mpg123_getparam2() + * - mpg123_feature2() + * - mpg123_eq2() + * - mpg123_geteq2() + * - mpg123_frameinfo2() + * - mpg123_info2() + * - mpg123_getstate2() + * - mpg123_enc_from_id3_2() + * - mpg123_store_utf8_2() + * - mpg123_par2() + * - mpg123_getpar2() */ #ifndef MPG123_ENUM_API @@ -76,7 +97,7 @@ #ifndef MPG123_PORTABLE_API #include <sys/types.h> -/* A little hack to help MSVC not having ssize_t. */ +/** A little hack to help MSVC not having ssize_t. */ #ifdef _MSC_VER typedef ptrdiff_t mpg123_ssize_t; #else @@ -85,26 +106,61 @@ #endif -/* Handling of large file offsets. - When client code defines _FILE_OFFSET_BITS, it wants non-default large file support, - and thus functions with added suffix (mpg123_open_64). The default library build provides - wrapper and alias functions to accomodate client code variations (dual-mode library like glibc). - - Client code can definie MPG123_NO_LARGENAME and MPG123_LARGESUFFIX, respectively, for disabling - or enforcing the suffixes. If explicit usage of 64 bit offsets is desired, the int64_t API - (functions with 64 suffix without underscore, notablly mpg123_reader64()) can be used since - API version 48 (mpg123 1.32). - - When in doubt, use the explicit 64 bit functions and avoid off_t in the API. You can define - MPG123_PORTABLE_API to ensure that. That being said, if you and your compiler do not have - problems with the concept of off_t, just use the normal API and be happy. Both 32 and 64 - bit versions will be present where appropriate. -*/ +/** \page lfs Handling of large file offsets + * + * When client code defines _FILE_OFFSET_BITS, it wants non-default large file + * support, and thus functions with added suffix (mpg123_open_64). The default + * library build provides wrapper and alias functions to accomodate client code + * variations (dual-mode library like glibc). + * + * Client code can definie MPG123_NO_LARGENAME and MPG123_LARGESUFFIX, + * respectively, for disabling or enforcing the suffixes. You should *not* do + * this, though, unless you *really* want to deal with symbol ABI yourself. + * If explicit usage of 64 bit offsets is desired, the int64_t API + * consisting of functions with 64 suffix without underscore, notably + * mpg123_reader64(), can be used since API version 48 (mpg123 1.32). A matching + * mpg123_open64(), stripped-down mpg123_open_handle_64() is present since API + * version 49 (mpg123 1.33). + * + * When in doubt, use the explicit 64 bit functions and avoid off_t in the API. + * You can define MPG123_PORTABLE_API to ensure that. That being said, if you + * and your compiler do not have problems with the concept of off_t, just use + * the normal AP like the I/O API of the standard C library. Both 32 and 64 bit + * versions of functions will be present where appropriate. + * + * If your toolchain enforces _FILE_OFFSET_BITS also during build of libmpg123, + * only that setting will be supported for client code. + */ #ifndef MPG123_PORTABLE_API -/* - Now, the renaming of large file aware functions. - By default, it appends underscore _FILE_OFFSET_BITS (so, mpg123_seek_64 for mpg123_seek), if _FILE_OFFSET_BITS is defined. You can force a different suffix via MPG123_LARGESUFFIX (that must include the underscore), or you can just disable the whole mess by defining MPG123_NO_LARGENAME. +/** \page lfs_names Renaming of functions for largefile support + * + * Now, the renaming of large file aware functions. + * By default, it appends underscore _FILE_OFFSET_BITS (so, mpg123_seek_64() for mpg123_seek()), + * if _FILE_OFFSET_BITS is defined. These are the affected API functions: + * + * - mpg123_open_fixed() + * - mpg123_open() + * - mpg123_open_fd() + * - mpg123_open_handle() + * - mpg123_framebyframe_decode() + * - mpg123_decode_frame() + * - mpg123_tell() + * - mpg123_tellframe() + * - mpg123_tell_stream() + * - mpg123_seek() + * - mpg123_feedseek() + * - mpg123_seek_frame() + * - mpg123_timeframe() + * - mpg123_index() + * - mpg123_set_index() + * - mpg123_position() + * - mpg123_length() + * - mpg123_framelength() + * - mpg123_set_filesize() + * - mpg123_replace_reader() + * - mpg123_replace_reader_handle() + * - mpg123_framepos() */ #if (!defined MPG123_NO_LARGENAME) && ((defined _FILE_OFFSET_BITS) || (defined MPG123_LARGESUFFIX)) @@ -142,6 +198,8 @@ #endif /* largefile hackery */ #endif +/** @} */ + #ifdef __cplusplus extern "C" { #endif @@ -774,7 +832,7 @@ * UTF-8, which also fits any sane modern install of Unix-like systems. * * \param mh handle - * \param path filesystem + * \param path filesystem path * \return MPG123_OK on success */ MPG123_EXPORT int mpg123_open(mpg123_handle *mh, const char *path); @@ -786,17 +844,63 @@ * \return MPG123_OK on success */ MPG123_EXPORT int mpg123_open_fd(mpg123_handle *mh, int fd); -#endif /** Use an opaque handle as bitstream input. This works only with the * replaced I/O from mpg123_replace_reader_handle() or mpg123_reader64()! * mpg123_close() will call the cleanup callback for your non-NULL * handle (if you gave one). + * Note that this used to be usable with MPG123_PORTABLE_API defined in + * mpg123 1.32.x and was in fact the only entry point for handle I/O. + * Since mpg123 1.33.0 and API version 49, there is + * mpg123_open_handle64() for the portable case and has to be used + * instead of this function here, even if it _would_ work just fine, + * the inclusion of a largefile-renamed symbol in the portable set was wrong. + * * \param mh handle * \param iohandle your handle * \return MPG123_OK on success */ MPG123_EXPORT int mpg123_open_handle(mpg123_handle *mh, void *iohandle); +#endif + +/** Open and prepare to decode the specified file by filesystem path. + * This works exactly like mpg123_open() in modern libmpg123, see there + * for more description. This name is not subject to largefile symbol renaming. + * You can also use it with MPG123_PORTABLE_API. + * + * \param mh handle + * \param path filesystem path of your resource + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open64(mpg123_handle *mh, const char *path); + +/** Open a simple MPEG file with fixed properties. + * This is the same as mpg123_open_fixed(), just with a stable + * symbol name for int64_t portable API. + * + * \param mh handle + * \param path filesystem path (see mpg123_open()) + * \param channels allowed channel count, either 1 (MPG123_MONO) or + * 2 (MPG123_STEREO), or bitwise or of them, but then you're halfway back to + * calling mpg123_format() again;-) + * \param encoding a definite encoding from enum mpg123_enc_enum + * or a bitmask like for mpg123_format(), defeating the purpose somewhat + */ +MPG123_EXPORT int mpg123_open_fixed64(mpg123_handle *mh, const char *path +, int channels, int encoding); + +/** Use an opaque handle as bitstream input. This works only with the + * replaced I/O from mpg123_reader64()! + * mpg123_close() will call the cleanup callback for your non-NULL + * handle (if you gave one). + * This is a simplified variant of mpg123_open_handle() that only + * supports the int64_t API, available with MPG123_PORTABLE_API. + * + * \param mh handle + * \param iohandle your handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_handle64(mpg123_handle *mh, void *iohandle); /** Open a new bitstream and prepare for direct feeding * This works together with mpg123_decode(); you are responsible for reading and feeding the input bitstream. @@ -1258,6 +1362,7 @@ /** Set a range of equalizer bands * \param channel Can be #MPG123_LEFT, #MPG123_RIGHT or * #MPG123_LEFT|#MPG123_RIGHT for both. + * \param mh handle * \param a The first equalizer band to set (from 0 to 31) * \param b The last equalizer band to set (from 0 to 31) * \param factor The (linear) adjustment factor, 1 being neutral. @@ -1267,6 +1372,7 @@ , int channel, int a, int b, double factor ); /** Change a range of equalizer bands + * \param mh handle * \param channel Can be #MPG123_LEFT, #MPG123_RIGHT or * #MPG123_LEFT|#MPG123_RIGHT for both. * \param a The first equalizer band to change (from 0 to 31) @@ -2218,7 +2324,8 @@ /** Set up portable read functions on an opaque handle. * The handle is a void pointer, so you can pass any data you want... - * mpg123_open_handle() is the call you make to use the I/O defined here. + * mpg123_open64() (since API 49) or mpg123_open_handle() is the call you make + * to use the I/O defined here. * There is no fallback to internal read/seek here. * Note: As it would be troublesome to mess with this while having a file open, * this mpg123_close() is implied here. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/include/out123.h new/mpg123-1.33.0/src/include/out123.h --- old/mpg123-1.32.10/src/include/out123.h 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/include/out123.h 2025-06-07 17:57:48.000000000 +0200 @@ -20,7 +20,7 @@ */ #define OUT123_API_VERSION 5 /** library patch level at client build time */ -#define OUT123_PATCHLEVEL 1 +#define OUT123_PATCHLEVEL 2 /* We only need size_t definition. */ #include <stddef.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/include/syn123.h new/mpg123-1.33.0/src/include/syn123.h --- old/mpg123-1.32.10/src/include/syn123.h 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/include/syn123.h 2025-06-07 17:57:48.000000000 +0200 @@ -1112,7 +1112,7 @@ // anywhere, also to avoid using non-standard types like ssize_t. #if !defined(SYN123_PORTABLE_API) && !defined(SYN123_NO_LARGEFUNC) -/* A little hack to help MSVC not having ssize_t, duplicated in internal header. */ +/** A little hack to help MSVC not having ssize_t, duplicated in internal header. */ #ifdef _MSC_VER #include <stddef.h> typedef ptrdiff_t syn123_ssize_t; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/libmpg123/layer2.c new/mpg123-1.33.0/src/libmpg123/layer2.c --- old/mpg123-1.32.10/src/libmpg123/layer2.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/libmpg123/layer2.c 2025-06-07 17:57:48.000000000 +0200 @@ -341,7 +341,8 @@ if(fr->jsbound > fr->II_sblimit) { - fprintf(stderr, "Truncating stereo boundary to sideband limit.\n"); + if(NOQUIET) + error("Truncating stereo boundary to sideband limit."); fr->jsbound=fr->II_sblimit; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/libmpg123/libmpg123.c new/mpg123-1.33.0/src/libmpg123/libmpg123.c --- old/mpg123-1.32.10/src/libmpg123/libmpg123.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/libmpg123/libmpg123.c 2025-06-07 17:57:48.000000000 +0200 @@ -15,9 +15,7 @@ #define FORCE_ACCURATE #include "../common/sample.h" #include "parse.h" -#ifndef PORTABLE_API #include "lfs_wrap.h" -#endif #include "../common/debug.h" @@ -559,18 +557,9 @@ return mpg123_geteq(mh, channel, band); } -#ifndef PORTABLE_API - -#ifdef FORCED_OFF_64 -// Only _64 symbols for a system-wide enforced _FILE_OFFSET_BITS=64. -#define mpg123_open mpg123_open_64 -#define mpg123_open_fixed mpg123_open_fixed_64 -#define mpg123_open_fd mpg123_open_fd_64 -#define mpg123_open_handle mpg123_open_handle_64 -#endif - -/* plain file access, no http! */ -int attribute_align_arg mpg123_open(mpg123_handle *mh, const char *path) +// LFS wrapper code is so agnostic to it all now that internal I/O is portable +// as long as you do not mix in off_t API. +int attribute_align_arg mpg123_open64(mpg123_handle *mh, const char *path) { if(mh == NULL) return MPG123_BAD_HANDLE; @@ -585,6 +574,24 @@ return ret; } +#ifndef PORTABLE_API + +#ifdef FORCED_OFF_64 +// Only _64 symbols for a system-wide enforced _FILE_OFFSET_BITS=64. +#define mpg123_open mpg123_open_64 +#define mpg123_open_fixed mpg123_open_fixed_64 +#define mpg123_open_fd mpg123_open_fd_64 +#define mpg123_open_handle mpg123_open_handle_64 +#endif + +// This now is agnostic to off_t choice, but still subject to renaming +// for legacy reasons. +int attribute_align_arg mpg123_open(mpg123_handle *mh, const char *path) +{ + return mpg123_open64(mh, path); +} +#endif // PORTABLE_API + // The convenience function mpg123_open_fixed() wraps over acual mpg123_open // and hence needs to have the exact same code in lfs_wrap.c. The flesh is // in INT123_open_fixed_pre() and INT123_open_fixed_post(), wich are only defined here. @@ -624,17 +631,28 @@ return err; } -int attribute_align_arg mpg123_open_fixed( mpg123_handle *mh, const char *path +int attribute_align_arg mpg123_open_fixed64( mpg123_handle *mh, const char *path , int channels, int encoding ) { int err = INT123_open_fixed_pre(mh, channels, encoding); if(err == MPG123_OK) - err = mpg123_open(mh, path); + err = mpg123_open64(mh, path); if(err == MPG123_OK) err = INT123_open_fixed_post(mh, channels, encoding); return err; } +#ifndef PORTABLE_API +// Only to have the modern offset-agnostic open under a fixed name. +int attribute_align_arg mpg123_open_fixed( mpg123_handle *mh, const char *path +, int channels, int encoding ) +{ + return mpg123_open_fixed64(mh, path, channels, encoding); +} + +// Won't define a 'portable' variant of this, as I cannot guess +// properties of the handed-in fd, which in theory, on specific platforms, +// could not support large files. int attribute_align_arg mpg123_open_fd(mpg123_handle *mh, int fd) { if(mh == NULL) return MPG123_BAD_HANDLE; @@ -650,21 +668,33 @@ } #endif // PORTABLE_API +// Only works with int64 reader setup. +int attribute_align_arg mpg123_open_handle64(mpg123_handle *mh, void *iohandle) +{ + if(mh == NULL) return MPG123_BAD_HANDLE; + + mpg123_close(mh); + return INT123_open_stream_handle(mh, iohandle); +} + +#ifndef PORTABLE_API +// Change from 1.32: No largefile-renamed symbols in a library with strict +// portable API. +// I allow that breaking change since this is far from a standard libmpg123 build. int attribute_align_arg mpg123_open_handle(mpg123_handle *mh, void *iohandle) { if(mh == NULL) return MPG123_BAD_HANDLE; mpg123_close(mh); int ret; -#ifndef PORTABLE_API ret = INT123_wrap_open( mh, iohandle, NULL, -1 , mh->p.timeout, mh->p.flags & MPG123_QUIET ); iohandle = ret == LFS_WRAP_NONE ? iohandle : mh->wrapperdata; if(ret >= 0) -#endif ret = INT123_open_stream_handle(mh, iohandle); return ret; } +#endif int attribute_align_arg mpg123_open_feed(mpg123_handle *mh) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/libout123/libout123.c new/mpg123-1.33.0/src/libout123/libout123.c --- old/mpg123-1.32.10/src/libout123/libout123.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/libout123/libout123.c 2025-06-07 17:57:48.000000000 +0200 @@ -456,11 +456,11 @@ /* Now loop over the list of possible modules to find one that works. */ char *toksave = NULL; - nextname = strtok_r(modnames, ",", &toksave); + nextname = INT123_compat_strtok(modnames, ",", &toksave); while(!ao->open && nextname) { char *curname = nextname; - nextname = strtok_r(NULL, ",", &toksave); + nextname = INT123_compat_strtok(NULL, ",", &toksave); check_output_module(ao, curname, device, !nextname); if(ao->open) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/libout123/modules/win32.c new/mpg123-1.33.0/src/libout123/modules/win32.c --- old/mpg123-1.32.10/src/libout123/modules/win32.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/libout123/modules/win32.c 2025-06-07 17:57:48.000000000 +0200 @@ -172,7 +172,7 @@ int ret = 0; UINT dev_id = dev_select(ao); - MMRESULT mr = waveOutGetDevCaps(dev_id, &caps, sizeof(caps)); + MMRESULT mr = waveOutGetDevCapsA(dev_id, &caps, sizeof(caps)); if(mr != MMSYSERR_NOERROR) return 0; /* no formats? */ @@ -367,7 +367,7 @@ for(i = 0; i < devices; i++){ memset(id, 0, sizeof(id)); memset(&caps, 0, sizeof(caps)); - mr = waveOutGetDevCaps(i, &caps, sizeof(caps)); + mr = waveOutGetDevCapsA(i, &caps, sizeof(caps)); if (mr != MMSYSERR_NOERROR) { switch(mr) { case MMSYSERR_BADDEVICEID: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/local.h new/mpg123-1.33.0/src/local.h --- old/mpg123-1.32.10/src/local.h 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/local.h 2025-06-07 17:57:48.000000000 +0200 @@ -59,6 +59,7 @@ // If count is >= 0, it is used instead of strlen(source), enabling // processing of data without closing zero byte. // Returns 0 if all went well, as do the others following. +// On error, the dest memory is freed and the pointer nulled. int unknown2utf8(char **dest, const char *source, int count); // Wrapper around the above for printing the string to some stream. // Return value is directly from fprintf or also -1 if there was trouble diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/mpg123-id3dump.c new/mpg123-1.33.0/src/mpg123-id3dump.c --- old/mpg123-1.32.10/src/mpg123-id3dump.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/mpg123-id3dump.c 2025-06-07 17:57:48.000000000 +0200 @@ -364,7 +364,11 @@ int i, result; mpg123_handle* m; #if defined(WANT_WIN32_UNICODE) - win32_cmdline_utf8(&argc,&argv); + if(win32_cmdline_utf8(&argc,&argv) != 0) + { + error("Cannot convert command line to UTF8!"); + return 1; + } #endif progname = argv[0]; @@ -428,9 +432,9 @@ mpg123_delete(m); mpg123_exit(); - if(errors) error1("Encountered %i errors along the way.", errors); - return errors != 0; #if defined(WANT_WIN32_UNICODE) win32_cmdline_free(argc,argv); #endif + if(errors) error1("Encountered %i errors along the way.", errors); + return errors != 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/mpg123.c new/mpg123-1.33.0/src/mpg123.c --- old/mpg123-1.32.10/src/mpg123.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/mpg123.c 2025-06-07 17:57:48.000000000 +0200 @@ -1431,9 +1431,17 @@ print_outstr(stderr, filename, 0, stderr_is_term); fprintf(stderr, " ...\n"); if(filept->htd.icy_name.fill) - fprintf(stderr, "ICY-NAME: %s\n", filept->htd.icy_name.p); + { + fprintf(stderr, "ICY-NAME: "); + print_outstr(stderr, filept->htd.icy_name.p, 1, stderr_is_term); + fprintf(stderr, "\n"); + } if(filept->htd.icy_url.fill) - fprintf(stderr, "ICY-URL: %s\n", filept->htd.icy_url.p); + { + fprintf(stderr, "ICY-URL: "); + print_outstr(stderr, filept->htd.icy_url.p, 1, stderr_is_term); + fprintf(stderr, "\n"); + } } #if !defined(GENERIC) { @@ -1515,7 +1523,9 @@ fprintf(stderr, "This was a Frankenstein track.\n"); position_info(mh, 0, ao, NULL, NULL, &secs, NULL, NULL, NULL); - fprintf(stderr,"[%d:%02d] Decoding of %s finished.\n", (int)(secs / 60), ((int)secs) % 60, filename); + fprintf(stderr,"[%d:%02d] Decoding of ", (int)(secs / 60), ((int)secs) % 60); + print_outstr(stderr, filename, 0, stderr_is_term); + fprintf(stderr," finished.\n"); } else if(param.verbose) fprintf(stderr, "\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/out123.c new/mpg123-1.33.0/src/out123.c --- old/mpg123-1.32.10/src/out123.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/out123.c 2025-06-07 17:57:48.000000000 +0200 @@ -1,7 +1,7 @@ /* out123: stream data from libmpg123 or libsyn123 to an audio output device - copyright 1995-2023 by the mpg123 project, + copyright 1995-2025 by the mpg123 project, free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org @@ -1630,7 +1630,10 @@ } if(strcmp(signal_source, "file")) + { + had_something = 1; generate = TRUE; + } else input = open_next_file(argc, argv, 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/playlist.c new/mpg123-1.33.0/src/playlist.c --- old/mpg123-1.32.10/src/playlist.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/playlist.c 2025-06-07 17:57:48.000000000 +0200 @@ -34,6 +34,14 @@ enum playlist_type { UNKNOWN = 0, M3U, PLS, NO_LIST }; +enum playflag +{ + PL_IS_UTF8 = 1 // if we really know the contents are UTF-8-encooded +, PL_HIT_END = 2 +, PL_STDIN_USED = 4 // If the playlist itself or an input file was '-' (stdin not usable for terminal.). +, PL_NO_RANDOM = 8 +}; + typedef struct listitem { char* url; /* the filename */ @@ -56,10 +64,7 @@ mpg123_string linebuf; mpg123_string dir; enum playlist_type type; - int is_utf8; /* if we really know the contents are UTF-8-encooded */ - int hit_end; - // If the playlist itself or an input file was '-' (stdin not usable for terminal.). - int stdin_used; + unsigned int flags; } playlist_struct; /* one global instance... add a pointer to this to every function definition and you have OO-style... */ @@ -97,7 +102,7 @@ mpg123_free_string(&pl.linebuf); mpg123_free_string(&pl.dir); if(is_utf8) - *is_utf8 = pl.is_utf8; + *is_utf8 = (pl.flags & PL_IS_UTF8) != 0; } /* Return a random number >= 0 and < n */ @@ -142,9 +147,9 @@ } else { - /* Handle looping first, but only if there is a random track selection - presently active (see playlist_jump() for interaction). */ - if(!(pl.num && ((pl.loop > 0 && --pl.loop) || pl.loop < 0))) + // Handle looping first, but only if there is a random track selection + // Also applies to continue mode. + if(!(pl.num && ((pl.loop > 0 && --pl.loop) || pl.loop < 0)) && !(pl.flags & PL_NO_RANDOM)) { /* Randomly select the next track. */ do /* limiting randomness: don't repeat too early */ @@ -157,6 +162,7 @@ newitem = &pl.list[pl.pos]; pl.num = pl.pos+1; + pl.flags &= ~PL_NO_RANDOM; // The random blocking works only once. } /* "-" is STDIN, "" is dumb, NULL is nothing */ @@ -168,7 +174,7 @@ } else { - pl.hit_end = TRUE; + pl.flags |= PL_HIT_END; return NULL; } } @@ -179,7 +185,7 @@ *total = pl.fill; if(loop) *loop = pl.loop; - return pl.hit_end ? pl.fill+1 : pl.num; + return pl.flags & PL_HIT_END ? pl.fill+1 : pl.num; } void playlist_jump(mpg123_ssize_t incr) @@ -286,23 +292,23 @@ pl.fill = 0; pl.pos = 0; pl.num = 0; - if(APPFLAG(MPG123APP_CONTINUE) && param.listentry > 0) - pl.pos = param.listentry - 1; - pl.list = NULL; pl.alloc_step = 10; mpg123_init_string(&pl.dir); mpg123_init_string(&pl.linebuf); pl.type = UNKNOWN; - pl.is_utf8 = FALSE; - pl.hit_end = FALSE; + pl.flags = 0; pl.loop = param.loop; - pl.stdin_used = FALSE; + if(APPFLAG(MPG123APP_CONTINUE) && param.listentry > 0) + { + pl.pos = param.listentry - 1; + pl.flags |= PL_NO_RANDOM; // Skip random selection for first track. + } } int playlist_stdin(void) { - return pl.stdin_used; + return (pl.flags & PL_STDIN_USED) != 0; } /* @@ -314,7 +320,10 @@ { int firstline = 0; - pl.is_utf8 = args_utf8; + if(args_utf8) + pl.flags |= PL_IS_UTF8; + else + pl.flags &= ~PL_IS_UTF8; /* hack for url that has been detected as track, not playlist */ if(pl.type == NO_LIST) return 0; @@ -343,7 +352,7 @@ if (param.listname || pl.file) { size_t line_offset = 0; - pl.is_utf8 = 0; // Playlist files in env encoding (HTTP lists should be ASCII-clean). + pl.flags &= ~PL_IS_UTF8; // Playlist files in env encoding (HTTP lists should be ASCII-clean). if(!pl.file) { pl.file = stream_open(param.listname); @@ -352,7 +361,7 @@ firstline = 1; /* just opened */ if(pl.file->fd == STDIN_FILENO) { - pl.stdin_used = TRUE; + pl.flags |= PL_STDIN_USED; param.listname = NULL; } } @@ -393,7 +402,7 @@ } } char *ptmp = NULL; - outstr(&ptmp, pl.file->htd.content_type.p, 0, stderr_is_term); + outstr(&ptmp, pl.file->htd.content_type.p, 1, stderr_is_term); error1( "Unknown playlist MIME type %s; maybe "PACKAGE_NAME " can support it in future if you report this to the maintainer." , PSTR(ptmp) ); @@ -671,7 +680,7 @@ if(pl.fill < pl.size) { if(!strcmp(new_entry, "-") || !strcmp(new_entry, "/dev/stdin")) - pl.stdin_used = TRUE; + pl.flags |= PL_STDIN_USED; pl.list[pl.fill].freeit = freeit; pl.list[pl.fill].url = new_entry; pl.list[pl.fill].playcount = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/streamdump.c new/mpg123-1.33.0/src/streamdump.c --- old/mpg123-1.32.10/src/streamdump.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/streamdump.c 2025-06-07 17:57:48.000000000 +0200 @@ -317,6 +317,17 @@ { break; // This is the content separator line. } + { // Convert from unknown/ASCII encoding to UTF-8. Play safe. + char *buf = NULL; + if(unknown2utf8(&buf, line.p, -1)) + { + error("failed converting HTTP header line"); + continue; + } + // Avoiding extra allocation here would be nice. mpg123_adopt_string()? + mpg123_set_string(&line, buf); + free(buf); + } // React to HTTP error codes, but do not enforce an OK being sent as Shoutcast // only produces very minimal headers, not even a HTTP response code. // Well, ICY 200 OK could be there, but then we got other headers to know diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/version.h new/mpg123-1.33.0/src/version.h --- old/mpg123-1.32.10/src/version.h 2024-12-14 16:00:29.000000000 +0100 +++ new/mpg123-1.33.0/src/version.h 2025-06-07 17:58:02.000000000 +0200 @@ -15,8 +15,8 @@ // only single spaces as separator to ease parsing by build scripts #define MPG123_MAJOR 1 -#define MPG123_MINOR 32 -#define MPG123_PATCH 10 +#define MPG123_MINOR 33 +#define MPG123_PATCH 0 // Don't get too wild with that to avoid confusing m4. No brackets. // Also, it should fit well into a sane file name for the tarball. #define MPG123_SUFFIX "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/src/win32_support.c new/mpg123-1.33.0/src/win32_support.c --- old/mpg123-1.32.10/src/win32_support.c 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/src/win32_support.c 2025-06-07 17:57:48.000000000 +0200 @@ -22,6 +22,7 @@ int win32_cmdline_utf8(int * argc, char *** argv) { int argcounter; + int nargc; wchar_t **argv_wide; wchar_t **env; char *argvptr; @@ -31,9 +32,21 @@ if(argv == NULL || argc == NULL) return -1; startup.newmode = 0; - __wgetmainargs(argc, &argv_wide,&env,1, &startup); + nargc = -1; + argv_wide = NULL; + env = NULL; + __wgetmainargs(&nargc, &argv_wide,&env,1, &startup); + if (nargc == -1 || argv_wide == NULL || env == NULL) { + error("Cannot allocate memory for wide command line."); + return -1; + } + *argc = nargc; *argv = (char **)calloc(sizeof (char *), *argc); - if(*argv == NULL){ error("Cannot allocate memory for command line."); return -1; } + if(*argv == NULL) + { + error("Cannot allocate memory for UTF-8 command line."); + return -1; + } for(argcounter = 0; argcounter < *argc; argcounter++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpg123-1.32.10/windows-builds.sh new/mpg123-1.33.0/windows-builds.sh --- old/mpg123-1.32.10/windows-builds.sh 2024-12-14 16:00:12.000000000 +0100 +++ new/mpg123-1.33.0/windows-builds.sh 2025-06-07 17:57:49.000000000 +0200 @@ -9,6 +9,7 @@ echo "Please specify a build type as argument, one of:" echo "x86, x86_64, x86-cross, x86_64-cross" echo "Optionally set a number of parallel make processes as second argument." + echo "A third argument might override the list of output modules to build." exit 1 fi @@ -23,6 +24,8 @@ # -D__MINGW_USE_VC2005_COMPAT=1 use 64bit time internally for 32bit, so XP and earlier don't get into # missing _time32 errors +modules=${3:-win32_wasapi,win32} + echo "build type: $build_type" case $build_type in x86) @@ -55,8 +58,7 @@ final="$PWD/releases" txt="README COPYING NEWS" # let's try with modules -opts="LDFLAGS=-static-libgcc" -#opts="--with-audio=win32 --disable-modules" +opts="--with-audio=$modules LDFLAGS=-static-libgcc" # Get the version for the build from version.h. major=$(grep '#define MPG123_MAJOR' src/version.h | cut -f 3 -d ' ')