mpg123-1.33.4

This commit is contained in:
Ozkan Sezer
2025-12-21 11:00:24 +03:00
parent 69118bb8bf
commit 2eb4320e16
10 changed files with 53 additions and 19 deletions

8
NEWS
View File

@@ -1,3 +1,11 @@
1.33.4
------
- mpg123: In terminal control, ignore 7-bit escape sequences to avoid spurious
actions, e.g. when hitting cursor keys. Inspired by Peter Tirsek.
- ports/cmake: Avoid possibly conflicting use of SIZEOF_OFF_T CMake variable
when embedding mpg123 with other projects using cmake and different off_t
semantics. (bug 382)
1.33.3 1.33.3
------ ------
- libmpg123: - libmpg123:

20
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for mpg123 1.33.3. # Generated by GNU Autoconf 2.71 for mpg123 1.33.4.
# #
# Report bugs to <maintainer@mpg123.org>. # Report bugs to <maintainer@mpg123.org>.
# #
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='mpg123' PACKAGE_NAME='mpg123'
PACKAGE_TARNAME='mpg123' PACKAGE_TARNAME='mpg123'
PACKAGE_VERSION='1.33.3' PACKAGE_VERSION='1.33.4'
PACKAGE_STRING='mpg123 1.33.3' PACKAGE_STRING='mpg123 1.33.4'
PACKAGE_BUGREPORT='maintainer@mpg123.org' PACKAGE_BUGREPORT='maintainer@mpg123.org'
PACKAGE_URL='' PACKAGE_URL=''
@@ -1727,7 +1727,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures mpg123 1.33.3 to adapt to many kinds of systems. \`configure' configures mpg123 1.33.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1798,7 +1798,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of mpg123 1.33.3:";; short | recursive ) echo "Configuration of mpg123 1.33.4:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@@ -2077,7 +2077,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
mpg123 configure 1.33.3 mpg123 configure 1.33.4
generated by GNU Autoconf 2.71 generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc. Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2622,7 +2622,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by mpg123 $as_me 1.33.3, which was It was created by mpg123 $as_me 1.33.4, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw $ $0$ac_configure_args_raw
@@ -3992,7 +3992,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='mpg123' PACKAGE='mpg123'
VERSION='1.33.3' VERSION='1.33.4'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -22468,7 +22468,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by mpg123 $as_me 1.33.3, which was This file was extended by mpg123 $as_me 1.33.4, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@@ -22536,7 +22536,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped' ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\ ac_cs_version="\\
mpg123 config.status 1.33.3 mpg123 config.status 1.33.4
configured by $0, generated by GNU Autoconf 2.71, configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@@ -3,7 +3,7 @@
# - devel packages for alsa, sdl, etc... to build the respective output modules. # - devel packages for alsa, sdl, etc... to build the respective output modules.
Summary: The fast console mpeg audio decoder/player. Summary: The fast console mpeg audio decoder/player.
Name: mpg123 Name: mpg123
Version: 1.33.3 Version: 1.33.4
Release: 1 Release: 1
URL: http://www.mpg123.org/ URL: http://www.mpg123.org/
License: GPL License: GPL

View File

@@ -74,9 +74,9 @@ check_function_exists(execvp HAVE_EXECVP)
check_function_exists(ctermid HAVE_CTERMID) check_function_exists(ctermid HAVE_CTERMID)
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
check_type_size(off_t SIZEOF_OFF_T) check_type_size(off_t MPG123_SIZEOF_OFF_T)
if(SIZEOF_OFF_T LESS 8) if(MPG123_SIZEOF_OFF_T LESS 8)
check_function_exists(lseek64 LFS_LARGEFILE_64) check_function_exists(lseek64 LFS_LARGEFILE_64)
if(LFS_LARGEFILE_64) if(LFS_LARGEFILE_64)

View File

@@ -146,7 +146,7 @@
#define PKGLIBDIR "@CMAKE_INSTALL_LIBDIR@/@PROJECT_NAME@" #define PKGLIBDIR "@CMAKE_INSTALL_LIBDIR@/@PROJECT_NAME@"
// CMake leaves it emtpy for non-existing type. Autoconf sets it to 0. // CMake leaves it emtpy for non-existing type. Autoconf sets it to 0.
#define SIZEOF_OFF_T (@SIZEOF_OFF_T@+0) #define SIZEOF_OFF_T (@MPG123_SIZEOF_OFF_T@+0)
#cmakedefine STDERR_FILENO @STDERR_FILENO@ #cmakedefine STDERR_FILENO @STDERR_FILENO@
#cmakedefine STDIN_FILENO @STDIN_FILENO@ #cmakedefine STDIN_FILENO @STDIN_FILENO@

View File

@@ -589,8 +589,34 @@ static void term_handle_key(mpg123_handle *fr, out123_handle *ao, char val)
static void term_handle_input(mpg123_handle *fr, out123_handle *ao, int do_delay) static void term_handle_input(mpg123_handle *fr, out123_handle *ao, int do_delay)
{ {
char val; char val;
if(term_get_key(playstate==STATE_STOPPED, do_delay, &val)) if(term_get_key(playstate==STATE_STOPPED, do_delay ? 1 : 0, &val))
{ {
// Crude ignoring of 7-bit escape sequences. 8-bit ones you better really handle
// in the terminal and do not pass on. The idea is that pressing cursor keys
// that contain plain characters in the triggered escape sequences should
// not confuse mpg123 terminal control At the same time, the user pressing
// ESC on its own should not confuse mpg123 into starting a sequence.
// So the assumption is quick succession of the bytes for real sequences.
// If the sequence has been ignoret, return, as this has been handled. Come
// back for real control.
if(val == 0x1b) // ESC, get next key, if any
{
int seq_len = 1;
if(term_get_key(FALSE, -1, &val))
{
++seq_len;
if(val == 'Z') // SCI, single character to drop, if any
term_get_key(FALSE, -1, &val);
else if(val == '[') // sequence begin
{
while(term_get_key(FALSE, -1, &val) && strchr("0123456789;", val))
++seq_len;
} // else simple single-character escape
}
mdebug("dropped escape sequence of length %d", seq_len);
return;
} else
mdebug("got key: %02x", val);
term_handle_key(fr, ao, val); term_handle_key(fr, ao, val);
} }
} }

View File

@@ -207,7 +207,7 @@ int term_get_key(int stopped, int do_delay, char *val)
} }
t.tv_sec=0; t.tv_sec=0;
t.tv_usec=(do_delay) ? 10*1000 : 0; t.tv_usec = do_delay==1 ? 10*1000 : (do_delay==-1 ? 1*1000 : 0);
FD_ZERO(&r); FD_ZERO(&r);
FD_SET(term_fd,&r); FD_SET(term_fd,&r);

View File

@@ -98,7 +98,7 @@ int term_get_key(int stopped, int do_delay, char *val){
if(input == NULL || input == INVALID_HANDLE_VALUE) if(input == NULL || input == INVALID_HANDLE_VALUE)
return 0; return 0;
while(WaitForSingleObject(input, stopped ? INFINITE : (do_delay ? 10 : 0)) == WAIT_OBJECT_0){ while(WaitForSingleObject(input, stopped ? INFINITE : (do_delay==1 ? 10 : (do_delay==-1 ? 1 : 0))) == WAIT_OBJECT_0){
do_delay = 0; do_delay = 0;
if(!ReadConsoleInput(input, &record, 1, &res)) if(!ReadConsoleInput(input, &record, 1, &res))
return 0; return 0;

View File

@@ -43,7 +43,7 @@ int term_setup(void);
void term_restore(void); void term_restore(void);
/** Check for and return a key press event. /** Check for and return a key press event.
* \param do_delay Wait for up to 10 ms for a key event if true. * \param do_delay Wait for up to 10 ms for key event if 1, for 1 ms if -1, without delay for 0.
* \param val address to store character to * \param val address to store character to
* \return 1 if there is a key, 0 if not * \return 1 if there is a key, 0 if not
*/ */

View File

@@ -16,7 +16,7 @@
// only single spaces as separator to ease parsing by build scripts // only single spaces as separator to ease parsing by build scripts
#define MPG123_MAJOR 1 #define MPG123_MAJOR 1
#define MPG123_MINOR 33 #define MPG123_MINOR 33
#define MPG123_PATCH 3 #define MPG123_PATCH 4
// Don't get too wild with that to avoid confusing m4. No brackets. // 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. // Also, it should fit well into a sane file name for the tarball.
#define MPG123_SUFFIX "" #define MPG123_SUFFIX ""