Projects
Multimedia
audacious-plugins
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 14
View file
audacious-plugins.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Feb 23 00:00:00 UTC 2011 - detlef@links2linux.de + +- new upstream version <2.4.4> + +------------------------------------------------------------------- Fri Jan 14 00:00:00 UTC 2011 - detlef@links2linux.de - new upstream version <2.4.3>
View file
audacious-plugins.spec
Changed
@@ -3,7 +3,7 @@ %define grp Productivity/Multimedia/Sound/Players Name: audacious-plugins -Version: 2.4.3 +Version: 2.4.4 Release: 1 Summary: Plugins for Audacious
View file
audacious-plugins-2.4.3.tgz/config.h.in -> audacious-plugins-2.4.4.tgz/config.h.in
Changed
@@ -123,6 +123,9 @@ */ #undef HAVE_SIDPLAY2_DISTORTION +/* Define if you have snd_device_name_hint */ +#undef HAVE_SND_DEVICE_NAME_HINT + /* Define to 1 if you have the <soundcard.h> header file. */ #undef HAVE_SOUNDCARD_H
View file
audacious-plugins-2.4.3.tgz/configure -> audacious-plugins-2.4.4.tgz/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for audacious-plugins 2.4.3. +# Generated by GNU Autoconf 2.68 for audacious-plugins 2.4.4. # # Report bugs to <bugs+audacious-plugins@atheme.org>. # @@ -560,8 +560,8 @@ # Identity of this package. PACKAGE_NAME='audacious-plugins' PACKAGE_TARNAME='audacious-plugins' -PACKAGE_VERSION='2.4.3' -PACKAGE_STRING='audacious-plugins 2.4.3' +PACKAGE_VERSION='2.4.4' +PACKAGE_STRING='audacious-plugins 2.4.4' PACKAGE_BUGREPORT='bugs+audacious-plugins@atheme.org' PACKAGE_URL='' @@ -692,6 +692,8 @@ JACK_CFLAGS FFMPEG_LIBS FFMPEG_CFLAGS +NEED_AVCORE_LIBS +NEED_AVCORE_CFLAGS SNDFILE_LIBS SNDFILE_CFLAGS FAAD_LIBS @@ -940,6 +942,7 @@ enable_filewriter_flac enable_bs2b enable_resample +enable_lyricwiki ' ac_precious_vars='build_alias host_alias @@ -994,6 +997,8 @@ WAVPACK_LIBS SNDFILE_CFLAGS SNDFILE_LIBS +NEED_AVCORE_CFLAGS +NEED_AVCORE_LIBS FFMPEG_CFLAGS FFMPEG_LIBS JACK_CFLAGS @@ -1577,7 +1582,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 audacious-plugins 2.4.3 to adapt to many kinds of systems. +\`configure' configures audacious-plugins 2.4.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1644,7 +1649,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of audacious-plugins 2.4.3:";; + short | recursive ) echo "Configuration of audacious-plugins 2.4.4:";; esac cat <<\_ACEOF @@ -1712,6 +1717,7 @@ --disable-filewriter_flac disable FileWriter FLAC output part (default=enabled) --disable-bs2b disable BS2B effect plugin (default=enabled) --disable-resample disable resample effect plugin (default=enabled) + --disable-lyricwiki disable LyricWiki plugin (default=enabled) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1813,6 +1819,10 @@ C compiler flags for SNDFILE, overriding pkg-config SNDFILE_LIBS linker flags for SNDFILE, overriding pkg-config + NEED_AVCORE_CFLAGS + C compiler flags for NEED_AVCORE, overriding pkg-config + NEED_AVCORE_LIBS + linker flags for NEED_AVCORE, overriding pkg-config FFMPEG_CFLAGS C compiler flags for FFMPEG, overriding pkg-config FFMPEG_LIBS linker flags for FFMPEG, overriding pkg-config @@ -1935,7 +1945,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -audacious-plugins configure 2.4.3 +audacious-plugins configure 2.4.4 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2471,7 +2481,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by audacious-plugins $as_me 2.4.3, which was +It was created by audacious-plugins $as_me 2.4.4, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2973,7 +2983,7 @@ PACKAGE=audacious-plugins -VERSION=2.4.3 +VERSION=2.4.4 @@ -4706,6 +4716,7 @@ CXXFLAGS="$CXXFLAGS -pipe -Wall" fi + CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" @@ -6974,7 +6985,7 @@ INPUT_PLUGINS="tonegen console xsf metronom vtx" OUTPUT_PLUGINS="null" EFFECT_PLUGINS="compressor crossfade crystalizer ladspa sndstretch stereo_plugin voice_removal echo_plugin" -GENERAL_PLUGINS="song_change alarm skins gtkui lyricwiki" +GENERAL_PLUGINS="song_change alarm skins gtkui" VISUALIZATION_PLUGINS="blur_scope spectrum" CONTAINER_PLUGINS="m3u pls" TRANSPORT_PLUGINS="unix-io" @@ -7728,20 +7739,20 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSE" >&5 $as_echo_n "checking for PULSE... " >&6; } if test "x$PKG_CONFIG" != "x"; then - if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.9\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.9") 2>&5 + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "x${PULSE_CFLAGS}" != "x"; then pkg_cv_PULSE_CFLAGS="${PULSE_CFLAGS}" else - pkg_cv_PULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse >= 0.9.9" 2>/dev/null` + pkg_cv_PULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse >= 0.9.5" 2>/dev/null` fi if test "x${PULSE_LIBS}" != "x"; then pkg_cv_PULSE_LIBS="${PULSE_LIBS}" else - pkg_cv_PULSE_LIBS=`$PKG_CONFIG --libs "libpulse >= 0.9.9" 2>/dev/null` + pkg_cv_PULSE_LIBS=`$PKG_CONFIG --libs "libpulse >= 0.9.5" 2>/dev/null` fi else pkg_failed="yes" @@ -7753,9 +7764,9 @@ if test "x$pkg_failed" = "xyes"; then if test "x$_pkg_short_errors_supported" = "xyes"; then - PULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpulse >= 0.9.9" 2>&1` + PULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpulse >= 0.9.5" 2>&1` else - PULSE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpulse >= 0.9.9" 2>&1` + PULSE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpulse >= 0.9.5" 2>&1` fi echo "$PULSE_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -8463,20 +8474,20 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5 $as_echo_n "checking for CAIRO... " >&6; } if test "x$PKG_CONFIG" != "x"; then - if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.2.6\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cairo >= 1.2.6") 2>&5 + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.2.4\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cairo >= 1.2.4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "x${CAIRO_CFLAGS}" != "x"; then pkg_cv_CAIRO_CFLAGS="${CAIRO_CFLAGS}" else - pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.2.6" 2>/dev/null` + pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.2.4" 2>/dev/null` fi if test "x${CAIRO_LIBS}" != "x"; then pkg_cv_CAIRO_LIBS="${CAIRO_LIBS}" else - pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.2.6" 2>/dev/null` + pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.2.4" 2>/dev/null` fi else pkg_failed="yes" @@ -8488,21 +8499,21 @@ if test "x$pkg_failed" = "xyes"; then if test "x$_pkg_short_errors_supported" = "xyes"; then - CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.2.6" 2>&1` + CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.2.4" 2>&1` else - CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.2.6" 2>&1` + CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.2.4" 2>&1` fi echo "$CAIRO_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_aosd="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** cairo >= 1.2.6 is required for Audacious OSD plugin ***" >&5 -$as_echo "*** cairo >= 1.2.6 is required for Audacious OSD plugin ***" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** cairo >= 1.2.4 is required for Audacious OSD plugin ***" >&5 +$as_echo "*** cairo >= 1.2.4 is required for Audacious OSD plugin ***" >&6; } elif test "x$pkg_failed" = "xuntried"; then have_aosd="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** cairo >= 1.2.6 is required for Audacious OSD plugin ***" >&5 -$as_echo "*** cairo >= 1.2.6 is required for Audacious OSD plugin ***" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** cairo >= 1.2.4 is required for Audacious OSD plugin ***" >&5 +$as_echo "*** cairo >= 1.2.4 is required for Audacious OSD plugin ***" >&6; } else CAIRO_CFLAGS="$pkg_cv_CAIRO_CFLAGS" @@ -9403,25 +9414,74 @@ fi -if test "x$enable_ffaudio" = "xyes"; then + +if test $enable_ffaudio = yes ; then pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NEED_AVCORE" >&5 +$as_echo_n "checking for NEED_AVCORE... " >&6; } +if test "x$PKG_CONFIG" != "x"; then + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec >= 52.94.3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec >= 52.94.3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "x${NEED_AVCORE_CFLAGS}" != "x"; then + pkg_cv_NEED_AVCORE_CFLAGS="${NEED_AVCORE_CFLAGS}" + else + pkg_cv_NEED_AVCORE_CFLAGS=`$PKG_CONFIG --cflags "libavcodec >= 52.94.3" 2>/dev/null` + fi + if test "x${NEED_AVCORE_LIBS}" != "x"; then + pkg_cv_NEED_AVCORE_LIBS="${NEED_AVCORE_LIBS}" + else + pkg_cv_NEED_AVCORE_LIBS=`$PKG_CONFIG --libs "libavcodec >= 52.94.3" 2>/dev/null` + fi + else + pkg_failed="yes" + fi +else + pkg_failed="untried" +fi + + +if test "x$pkg_failed" = "xyes"; then + if test "x$_pkg_short_errors_supported" = "xyes"; then + NEED_AVCORE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavcodec >= 52.94.3" 2>&1` + else + NEED_AVCORE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec >= 52.94.3" 2>&1` + fi + echo "$NEED_AVCORE_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_new_ffmpeg=no +elif test "x$pkg_failed" = "xuntried"; then + have_new_ffmpeg=no +else + NEED_AVCORE_CFLAGS="$pkg_cv_NEED_AVCORE_CFLAGS" + NEED_AVCORE_LIBS="$pkg_cv_NEED_AVCORE_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_new_ffmpeg=yes +fi + + if test $have_new_ffmpeg = yes ; then + pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFMPEG" >&5 $as_echo_n "checking for FFMPEG... " >&6; } if test "x$PKG_CONFIG" != "x"; then - if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavformat >= 52.31.0 libavcodec >= 52.20.0 libavutil >= 49.15.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libavformat >= 52.31.0 libavcodec >= 52.20.0 libavutil >= 49.15.0") 2>&5 + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec >= 52.20.0 libavcore >= 0.12.0 libavformat >= 52.31.0 libavutil >= 49.15.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec >= 52.20.0 libavcore >= 0.12.0 libavformat >= 52.31.0 libavutil >= 49.15.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "x${FFMPEG_CFLAGS}" != "x"; then pkg_cv_FFMPEG_CFLAGS="${FFMPEG_CFLAGS}" else - pkg_cv_FFMPEG_CFLAGS=`$PKG_CONFIG --cflags "libavformat >= 52.31.0 libavcodec >= 52.20.0 libavutil >= 49.15.0" 2>/dev/null` + pkg_cv_FFMPEG_CFLAGS=`$PKG_CONFIG --cflags "libavcodec >= 52.20.0 libavcore >= 0.12.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>/dev/null` fi if test "x${FFMPEG_LIBS}" != "x"; then pkg_cv_FFMPEG_LIBS="${FFMPEG_LIBS}" else - pkg_cv_FFMPEG_LIBS=`$PKG_CONFIG --libs "libavformat >= 52.31.0 libavcodec >= 52.20.0 libavutil >= 49.15.0" 2>/dev/null` + pkg_cv_FFMPEG_LIBS=`$PKG_CONFIG --libs "libavcodec >= 52.20.0 libavcore >= 0.12.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>/dev/null` fi else pkg_failed="yes" @@ -9433,23 +9493,71 @@ if test "x$pkg_failed" = "xyes"; then if test "x$_pkg_short_errors_supported" = "xyes"; then - FFMPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavformat >= 52.31.0 libavcodec >= 52.20.0 libavutil >= 49.15.0" 2>&1` + FFMPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavcodec >= 52.20.0 libavcore >= 0.12.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>&1` else - FFMPEG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavformat >= 52.31.0 libavcodec >= 52.20.0 libavutil >= 49.15.0" 2>&1` + FFMPEG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec >= 52.20.0 libavcore >= 0.12.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>&1` fi echo "$FFMPEG_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - have_ffaudio="no" + have_ffaudio=no elif test "x$pkg_failed" = "xuntried"; then - have_ffaudio="no" + have_ffaudio=no else FFMPEG_CFLAGS="$pkg_cv_FFMPEG_CFLAGS" FFMPEG_LIBS="$pkg_cv_FFMPEG_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - have_ffaudio="yes" + have_ffaudio=yes fi + else + pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFMPEG" >&5 +$as_echo_n "checking for FFMPEG... " >&6; } +if test "x$PKG_CONFIG" != "x"; then + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec >= 52.20.0 libavformat >= 52.31.0 libavutil >= 49.15.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec >= 52.20.0 libavformat >= 52.31.0 libavutil >= 49.15.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "x${FFMPEG_CFLAGS}" != "x"; then + pkg_cv_FFMPEG_CFLAGS="${FFMPEG_CFLAGS}" + else + pkg_cv_FFMPEG_CFLAGS=`$PKG_CONFIG --cflags "libavcodec >= 52.20.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>/dev/null` + fi + if test "x${FFMPEG_LIBS}" != "x"; then + pkg_cv_FFMPEG_LIBS="${FFMPEG_LIBS}" + else + pkg_cv_FFMPEG_LIBS=`$PKG_CONFIG --libs "libavcodec >= 52.20.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>/dev/null` + fi + else + pkg_failed="yes" + fi +else + pkg_failed="untried" +fi + + +if test "x$pkg_failed" = "xyes"; then + if test "x$_pkg_short_errors_supported" = "xyes"; then + FFMPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavcodec >= 52.20.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>&1` + else + FFMPEG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec >= 52.20.0 libavformat >= 52.31.0 libavutil >= 49.15.0" 2>&1` + fi + echo "$FFMPEG_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_ffaudio=no +elif test "x$pkg_failed" = "xuntried"; then + have_ffaudio=no +else + FFMPEG_CFLAGS="$pkg_cv_FFMPEG_CFLAGS" + FFMPEG_LIBS="$pkg_cv_FFMPEG_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_ffaudio=yes +fi + fi fi if test "x$have_ffaudio" = "xyes"; then @@ -11205,6 +11313,48 @@ $as_echo "yes" >&6; } have_alsa=yes fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_device_name_hint in -lasound" >&5 +$as_echo_n "checking for snd_device_name_hint in -lasound... " >&6; } +if ${ac_cv_lib_asound_snd_device_name_hint+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char snd_device_name_hint (); +int +main () +{ +return snd_device_name_hint (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_asound_snd_device_name_hint=yes +else + ac_cv_lib_asound_snd_device_name_hint=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_device_name_hint" >&5 +$as_echo "$ac_cv_lib_asound_snd_device_name_hint" >&6; } +if test "x$ac_cv_lib_asound_snd_device_name_hint" = xyes; then : + +$as_echo "#define HAVE_SND_DEVICE_NAME_HINT 1" >>confdefs.h + +fi + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** ALSA output plugin disabled per user request ***" >&5 $as_echo "*** ALSA output plugin disabled per user request ***" >&6; } @@ -13111,20 +13261,20 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLAC" >&5 $as_echo_n "checking for FLAC... " >&6; } if test "x$PKG_CONFIG" != "x"; then - if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flac >= 1.1.2\""; } >&5 - ($PKG_CONFIG --exists --print-errors "flac >= 1.1.2") 2>&5 + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flac >= 1.1.3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "flac >= 1.1.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "x${FLAC_CFLAGS}" != "x"; then pkg_cv_FLAC_CFLAGS="${FLAC_CFLAGS}" else - pkg_cv_FLAC_CFLAGS=`$PKG_CONFIG --cflags "flac >= 1.1.2" 2>/dev/null` + pkg_cv_FLAC_CFLAGS=`$PKG_CONFIG --cflags "flac >= 1.1.3" 2>/dev/null` fi if test "x${FLAC_LIBS}" != "x"; then pkg_cv_FLAC_LIBS="${FLAC_LIBS}" else - pkg_cv_FLAC_LIBS=`$PKG_CONFIG --libs "flac >= 1.1.2" 2>/dev/null` + pkg_cv_FLAC_LIBS=`$PKG_CONFIG --libs "flac >= 1.1.3" 2>/dev/null` fi else pkg_failed="yes" @@ -13136,9 +13286,9 @@ if test "x$pkg_failed" = "xyes"; then if test "x$_pkg_short_errors_supported" = "xyes"; then - FLAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "flac >= 1.1.2" 2>&1` + FLAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "flac >= 1.1.3" 2>&1` else - FLAC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "flac >= 1.1.2" 2>&1` + FLAC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "flac >= 1.1.3" 2>&1` fi echo "$FLAC_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13301,6 +13451,68 @@ fi +# Check whether --enable-lyricwiki was given. +if test "${enable_lyricwiki+set}" = set; then : + enableval=$enable_lyricwiki; enable_lyricwiki=$enableval +else + enable_lyricwiki=yes +fi + + +if test "x$enable_lyricwiki" = "xyes"; then + pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 +$as_echo_n "checking for GLIB... " >&6; } +if test "x$PKG_CONFIG" != "x"; then + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.14\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.14") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "x${GLIB_CFLAGS}" != "x"; then + pkg_cv_GLIB_CFLAGS="${GLIB_CFLAGS}" + else + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.14" 2>/dev/null` + fi + if test "x${GLIB_LIBS}" != "x"; then + pkg_cv_GLIB_LIBS="${GLIB_LIBS}" + else + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.14" 2>/dev/null` + fi + else + pkg_failed="yes" + fi +else + pkg_failed="untried" +fi + + +if test "x$pkg_failed" = "xyes"; then + if test "x$_pkg_short_errors_supported" = "xyes"; then + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.14" 2>&1` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.14" 2>&1` + fi + echo "$GLIB_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + enable_lyricwiki=no +elif test "x$pkg_failed" = "xuntried"; then + enable_lyricwiki=no +else + GLIB_CFLAGS="$pkg_cv_GLIB_CFLAGS" + GLIB_LIBS="$pkg_cv_GLIB_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_lyricwiki=yes +fi +fi + +if test "x$enable_lyricwiki" = "xyes"; then + GENERAL_PLUGINS="$GENERAL_PLUGINS lyricwiki" +fi + + if test "x$arch_type" = "xix86"; then @@ -13965,7 +14177,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by audacious-plugins $as_me 2.4.3, which was +This file was extended by audacious-plugins $as_me 2.4.4, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14031,7 +14243,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -audacious-plugins config.status 2.4.3 +audacious-plugins config.status 2.4.4 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -15025,7 +15237,7 @@ echo " Bluetooth audio support: $have_bluetooth" echo " MacOS Dock Album Art plugin: $have_dockalbumart" echo " Streambrowser: $enable_streambrowser" -echo " LyricWiki viewer: yes" +echo " LyricWiki viewer: $enable_lyricwiki" echo echo " Effect" echo " ------"
View file
audacious-plugins-2.4.3.tgz/configure.ac -> audacious-plugins-2.4.4.tgz/configure.ac
Changed
@@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([audacious-plugins], [2.4.3], [bugs+audacious-plugins@atheme.org]) +AC_INIT([audacious-plugins], [2.4.4], [bugs+audacious-plugins@atheme.org]) AC_PREREQ([2.59]) AC_CANONICAL_HOST @@ -36,6 +36,9 @@ CXXFLAGS="$CXXFLAGS -pipe -Wall" fi +dnl Chainsaw says this is broken. +dnl LDFLAGS="$LDFLAGS -z defs" + dnl Large file support dnl ================== CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" @@ -120,7 +123,7 @@ INPUT_PLUGINS="tonegen console xsf metronom vtx" OUTPUT_PLUGINS="null" EFFECT_PLUGINS="compressor crossfade crystalizer ladspa sndstretch stereo_plugin voice_removal echo_plugin" -GENERAL_PLUGINS="song_change alarm skins gtkui lyricwiki" +GENERAL_PLUGINS="song_change alarm skins gtkui" VISUALIZATION_PLUGINS="blur_scope spectrum" CONTAINER_PLUGINS="m3u pls" TRANSPORT_PLUGINS="unix-io" @@ -232,7 +235,7 @@ ) if test "x$enable_pulse" = "xyes"; then - PKG_CHECK_MODULES(PULSE, [libpulse >= 0.9.9], + PKG_CHECK_MODULES(PULSE, [libpulse >= 0.9.5], [have_pulse=yes OUTPUT_PLUGINS="$OUTPUT_PLUGINS pulse_audio"], [have_pulse=no] @@ -545,9 +548,9 @@ [have_aosd="no" AC_MSG_RESULT([*** pango >= 1.14.7 is required for Audacious OSD plugin ***])] ) - PKG_CHECK_MODULES(CAIRO,[cairo >= 1.2.6],, + PKG_CHECK_MODULES(CAIRO,[cairo >= 1.2.4],, [have_aosd="no" - AC_MSG_RESULT([*** cairo >= 1.2.6 is required for Audacious OSD plugin ***])] + AC_MSG_RESULT([*** cairo >= 1.2.4 is required for Audacious OSD plugin ***])] ) PKG_CHECK_MODULES(PANGOCAIRO,[pangocairo >= 1.14.7],, [have_aosd="no" @@ -778,9 +781,22 @@ [enable_ffaudio="yes"] ) -if test "x$enable_ffaudio" = "xyes"; then - PKG_CHECK_MODULES(FFMPEG, [libavformat >= 52.31.0 libavcodec >= 52.20.0 libavutil >= 49.15.0], - [have_ffaudio="yes"], [have_ffaudio="no"]) +dnl In 2010, some libavcodec functions were moved into a new library called +dnl libavcore, making our checks here a bit complex. + +if test $enable_ffaudio = yes ; then + PKG_CHECK_MODULES([NEED_AVCORE], [libavcodec >= 52.94.3], + [have_new_ffmpeg=yes], [have_new_ffmpeg=no]) + + if test $have_new_ffmpeg = yes ; then + PKG_CHECK_MODULES([FFMPEG], + [libavcodec >= 52.20.0 libavcore >= 0.12.0 libavformat >= 52.31.0 libavutil >= 49.15.0], + [have_ffaudio=yes], [have_ffaudio=no]) + else + PKG_CHECK_MODULES([FFMPEG], + [libavcodec >= 52.20.0 libavformat >= 52.31.0 libavutil >= 49.15.0], + [have_ffaudio=yes], [have_ffaudio=no]) + fi fi if test "x$have_ffaudio" = "xyes"; then @@ -968,6 +984,8 @@ if test "x$enable_alsa" = "xyes"; then PKG_CHECK_MODULES([ALSA], [alsa >= 1.0], [have_alsa=yes], [have_alsa=no]) + AC_CHECK_LIB([asound], [snd_device_name_hint], + AC_DEFINE(HAVE_SND_DEVICE_NAME_HINT, 1, Define if you have snd_device_name_hint)) else AC_MSG_RESULT([*** ALSA output plugin disabled per user request ***]) have_alsa=no @@ -1469,7 +1487,7 @@ ) if test "x$enable_filewriter_flac" = "xyes"; then - PKG_CHECK_MODULES(FLAC, [flac >= 1.1.2], + PKG_CHECK_MODULES(FLAC, [flac >= 1.1.3], [have_writer_flac=yes], [have_writer_flac=no] ) if test "x$have_writer_flac" = "xyes"; then @@ -1524,6 +1542,21 @@ EFFECT_PLUGINS="$EFFECT_PLUGINS resample" fi +dnl LyricWiki +dnl ========= + +AC_ARG_ENABLE(lyricwiki, + [ --disable-lyricwiki disable LyricWiki plugin (default=enabled)], + [enable_lyricwiki=$enableval], [enable_lyricwiki=yes]) + +if test "x$enable_lyricwiki" = "xyes"; then + PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.14], [enable_lyricwiki=yes], [enable_lyricwiki=no]) +fi + +if test "x$enable_lyricwiki" = "xyes"; then + GENERAL_PLUGINS="$GENERAL_PLUGINS lyricwiki" +fi + dnl *** End of all plugin checks *** AC_SUBST(ARCH_DEFINES) @@ -1664,7 +1697,7 @@ echo " Bluetooth audio support: $have_bluetooth" echo " MacOS Dock Album Art plugin: $have_dockalbumart" echo " Streambrowser: $enable_streambrowser" -echo " LyricWiki viewer: yes" +echo " LyricWiki viewer: $enable_lyricwiki" echo echo " Effect" echo " ------"
View file
audacious-plugins-2.4.3.tgz/src/aac/libmp4.c -> audacious-plugins-2.4.4.tgz/src/aac/libmp4.c
Changed
@@ -24,7 +24,8 @@ */ #define BUFFER_SIZE (FAAD_MIN_STREAMSIZE * 16) -#define M4A_MAGIC (unsigned char [11]) { 0x00, 0x00, 0x00, 0x20, 0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x41 } +static const guchar M4A_MAGIC[11] = {0x00, 0x00, 0x00, 0x20, 0x66, 0x74, 0x79, + 0x70, 0x4D, 0x34, 0x41}; static void mp4_init(void); static void mp4_about(void); @@ -264,20 +265,23 @@ return success; } -static gint mp4_is_our_fd(const gchar *filename, VFSFile* file) +static gboolean mp4_is_our_fd (const gchar * filename, VFSFile * file) { - gchar magic[sizeof(M4A_MAGIC)]; + gchar magic[sizeof M4A_MAGIC]; - vfs_fread(magic, 1, sizeof(M4A_MAGIC), file); - if (!memcmp(magic, M4A_MAGIC, 11)) - return 1; + if (vfs_fread (magic, 1, sizeof magic, file) != sizeof magic) + return FALSE; + if (! memcmp (magic, M4A_MAGIC, sizeof magic)) + return TRUE; - vfs_rewind(file); - if (parse_aac_stream(file) == TRUE) - return 1; + if (vfs_fseek (file, 0, SEEK_SET)) + return FALSE; + if (parse_aac_stream (file)) + return TRUE; - vfs_fseek (file, 0, SEEK_SET); - return is_mp4_aac_file (file); + if (vfs_fseek (file, 0, SEEK_SET)) + return FALSE; + return is_mp4_aac_file (file); } static void mp4_about(void) @@ -326,8 +330,8 @@ * channels = -1; /* look for a representative bitrate in the middle of the file */ - if (size > 0) - vfs_fseek (handle, size / 2, SEEK_SET); + if (size > 0 && vfs_fseek (handle, size / 2, SEEK_SET)) + goto DONE; for (found = 0; found < 32; found ++) { @@ -547,7 +551,8 @@ if (parse_aac_stream (handle)) return aac_get_tuple (filename, handle); - vfs_fseek (handle, 0, SEEK_SET); + if (vfs_fseek (handle, 0, SEEK_SET)) + return NULL; mp4cb.read = mp4_read_callback; mp4cb.seek = mp4_seek_callback; @@ -814,13 +819,14 @@ return; } if(!strncmp((char*)streambuffer, "ID3", 3)){ - gint size = 0; + if (vfs_fseek (file, 10 + (streambuffer[6] << 21) + (streambuffer[7] << + 14) + (streambuffer[8] << 7) + streambuffer[9], SEEK_SET)) + { + playback->playing = FALSE; + playback->error = TRUE; + return; + } - vfs_fseek(file, 0, SEEK_SET); - size = (streambuffer[6]<<21) | (streambuffer[7]<<14) | - (streambuffer[8]<<7) | streambuffer[9]; - size+=10; - vfs_fread(streambuffer, 1, size, file); buffervalid = vfs_fread(streambuffer, 1, BUFFER_SIZE, file); } @@ -970,7 +976,10 @@ ret = parse_aac_stream(mp4fh); if( ret == TRUE ) - vfs_fseek(mp4fh, 0, SEEK_SET); + { + if (vfs_fseek (mp4fh, 0, SEEK_SET)) + ; /* errors here are normal for streaming */ + } else { vfs_fclose(mp4fh); mp4fh = vfs_fopen(filename, "rb");
View file
audacious-plugins-2.4.3.tgz/src/adplug/adplug-xmms.cc -> audacious-plugins-2.4.4.tgz/src/adplug/adplug-xmms.cc
Changed
@@ -77,7 +77,7 @@ CPlayers players; } conf = { -44100l, true, false, false, CAdPlug::players}; +44100l, true, false, false, CAdPlug::getPlayers()}; // Player variables static struct @@ -392,7 +392,7 @@ gtk_clist_set_selection_mode (fl, GTK_SELECTION_MULTIPLE); // Build list - for (i = CAdPlug::players.begin (); i != CAdPlug::players.end (); i++) + for (i = CAdPlug::getPlayers().begin (); i != CAdPlug::getPlayers().end (); i++) { gint rownum; @@ -1068,8 +1068,8 @@ dbg_printf ("exclude, "); std::string exclude; - for (CPlayers::const_iterator i = CAdPlug::players.begin (); - i != CAdPlug::players.end (); i++) + for (CPlayers::const_iterator i = CAdPlug::getPlayers().begin (); + i != CAdPlug::getPlayers().end (); i++) if (find (conf.players.begin (), conf.players.end (), *i) == conf.players.end ()) {
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/a2m.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/a2m.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -29,6 +29,8 @@ * Following commands are ignored: Gxy, Hxy, Kxy - &xy */ +#include <string.h> + #include "a2m.h" const unsigned int
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/adl.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/adl.cxx
Changed
@@ -45,9 +45,10 @@ * */ +#include <assert.h> #include <inttypes.h> #include <stdarg.h> -#include <assert.h> +#include <string.h> #include "adl.h" #include "debug.h" @@ -833,7 +834,7 @@ { // Each channel runs its own program. There are ten channels: One for // each Adlib channel (0-8), plus one "control channel" (9) which is - // the one that tells the other channels what to do. + // the one that tells the other channels what to do. for (_curChannel = 9; _curChannel >= 0; --_curChannel) { @@ -922,7 +923,7 @@ } } -// +// void AdlibDriver::resetAdlibState ()
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/adplug.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/adplug.cxx
Changed
@@ -76,7 +76,7 @@ /***** CAdPlug *****/ // List of all players that come with the standard AdPlug distribution -const CPlayerDesc +/*const CPlayerDesc CAdPlug::allplayers[] = { CPlayerDesc (ChscPlayer::factory, "HSC-Tracker", ".hsc\0"), CPlayerDesc (CsngPlayer::factory, "SNGPlay", ".sng\0"), @@ -121,7 +121,7 @@ CPlayerDesc (CjbmPlayer::factory, "Johannes Bjerregaard", ".jbm\0"), CPlayerDesc () }; - +*/ const CPlayers & CAdPlug::init_players (const CPlayerDesc pd[]) @@ -135,8 +135,56 @@ return initplayers; } -const CPlayers - CAdPlug::players = CAdPlug::init_players (CAdPlug::allplayers); +const CPlayers& CAdPlug::getPlayers() { + static const CPlayerDesc + _allplayers[] = { + CPlayerDesc (ChscPlayer::factory, "HSC-Tracker", ".hsc\0"), + CPlayerDesc (CsngPlayer::factory, "SNGPlay", ".sng\0"), + CPlayerDesc (CimfPlayer::factory, "Apogee IMF", ".imf\0.wlf\0.adlib\0"), + CPlayerDesc (Ca2mLoader::factory, "Adlib Tracker 2", ".a2m\0"), + CPlayerDesc (CadtrackLoader::factory, "Adlib Tracker", ".sng\0"), + CPlayerDesc (CamdLoader::factory, "AMUSIC", ".amd\0"), + CPlayerDesc (CbamPlayer::factory, "Bob's Adlib Music", ".bam\0"), + CPlayerDesc (CcmfPlayer::factory, "Creative Music File", ".cmf\0"), + CPlayerDesc (Cd00Player::factory, "Packed EdLib", ".d00\0"), + CPlayerDesc (CdfmLoader::factory, "Digital-FM", ".dfm\0"), + CPlayerDesc (ChspLoader::factory, "HSC Packed", ".hsp\0"), + CPlayerDesc (CksmPlayer::factory, "Ken Silverman Music", ".ksm\0"), + CPlayerDesc (CmadLoader::factory, "Mlat Adlib Tracker", ".mad\0"), + CPlayerDesc (CmidPlayer::factory, "MIDI", ".sci\0.laa\0"), + CPlayerDesc (CmkjPlayer::factory, "MKJamz", ".mkj\0"), + CPlayerDesc (CcffLoader::factory, "Boomtracker", ".cff\0"), + CPlayerDesc (CdmoLoader::factory, "TwinTeam", ".dmo\0"), + CPlayerDesc (Cs3mPlayer::factory, "Scream Tracker 3", ".s3m\0"), + CPlayerDesc (CdtmLoader::factory, "DeFy Adlib Tracker", ".dtm\0"), + CPlayerDesc (CfmcLoader::factory, "Faust Music Creator", ".sng\0"), + CPlayerDesc (CmtkLoader::factory, "MPU-401 Trakker", ".mtk\0"), + CPlayerDesc (CradLoader::factory, "Reality Adlib Tracker", ".rad\0"), + CPlayerDesc (CrawPlayer::factory, "RdosPlay RAW", ".raw\0"), + CPlayerDesc (Csa2Loader::factory, "Surprise! Adlib Tracker", + ".sat\0.sa2\0"), + CPlayerDesc (CxadbmfPlayer::factory, "BMF Adlib Tracker", ".xad\0"), + CPlayerDesc (CxadflashPlayer::factory, "Flash", ".xad\0"), + CPlayerDesc (CxadhybridPlayer::factory, "Hybrid", ".xad\0"), + CPlayerDesc (CxadhypPlayer::factory, "Hypnosis", ".xad\0"), + CPlayerDesc (CxadpsiPlayer::factory, "PSI", ".xad\0"), + CPlayerDesc (CxadratPlayer::factory, "rat", ".xad\0"), + CPlayerDesc (CldsPlayer::factory, "LOUDNESS Sound System", ".lds\0"), + CPlayerDesc (Cu6mPlayer::factory, "Ultima 6 Music", ".m\0"), + CPlayerDesc (CrolPlayer::factory, "Adlib Visual Composer", ".rol\0"), + CPlayerDesc (CxsmPlayer::factory, "eXtra Simple Music", ".xsm\0"), + CPlayerDesc (CdroPlayer::factory, "DOSBox Raw OPL v0.1", ".dro\0"), + CPlayerDesc (Cdro2Player::factory, "DOSBox Raw OPL v2.0", ".dro\0"), + CPlayerDesc (CmscPlayer::factory, "Adlib MSC Player", ".msc\0"), + CPlayerDesc (CrixPlayer::factory, "Softstar RIX OPL Music", ".rix\0"), + CPlayerDesc (CadlPlayer::factory, "Westwood ADL", ".adl\0"), + CPlayerDesc (CjbmPlayer::factory, "Johannes Bjerregaard", ".jbm\0"), + CPlayerDesc () + }; + static CPlayers players = CAdPlug::init_players(_allplayers); + return players; +} + CAdPlugDatabase * CAdPlug::database = 0;
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/adplug.h -> audacious-plugins-2.4.4.tgz/src/adplug/core/adplug.h
Changed
@@ -35,10 +35,10 @@ friend CPlayer::CPlayer(Copl *newopl); public: - static const CPlayers players; + static const CPlayers& getPlayers(); static CPlayer *factory(VFSFile *fd, Copl *opl, - const CPlayers &pl = players, + const CPlayers &pl = getPlayers(), const CFileProvider &fp = CProvider_Filesystem()); static void set_database(CAdPlugDatabase *db); @@ -47,7 +47,6 @@ private: static CAdPlugDatabase *database; - static const CPlayerDesc allplayers[]; static const CPlayers &init_players(const CPlayerDesc pd[]); };
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/binio_virtual.h -> audacious-plugins-2.4.4.tgz/src/adplug/core/binio_virtual.h
Changed
@@ -7,127 +7,139 @@ #define __BINIO_VIRTUAL__ #include <binio.h> -#include <binstr.h> - -#include <string> - -#include <glib.h> extern "C" { -#include <audacious/plugin.h> +#include <libaudcore/vfs.h> }; -class vfsistream : public binistream, virtual public binio { +class vfsistream : public binistream { private: VFSFile *fd; public: - vfsistream() {}; - ~vfsistream() {}; + vfsistream() { + this->fd = 0; + }; + + ~vfsistream() { + if (this->fd) { + vfs_fclose(this->fd); + this->fd = 0; + } + }; vfsistream(VFSFile *fd) { this->fd = fd; }; vfsistream(const char *file) { - this->fd = vfs_fopen(file, "rb"); + this->fd = vfs_fopen(file, "r"); + if (!this->fd) + err |= NotFound; }; vfsistream(std::string &file) { - this->fd = vfs_fopen(file.c_str(), "rb"); + this->fd = vfs_fopen(file.c_str(), "r"); + if (!this->fd) + err |= NotFound; }; void open(const char *file) { - this->fd = vfs_fopen(file, "rb"); + g_return_if_fail(!this->fd); + this->fd = vfs_fopen(file, "r"); + if (!this->fd) + err |= NotFound; }; void open(std::string &file) { - this->fd = vfs_fopen(file.c_str(), "rb"); + g_return_if_fail(!this->fd); + this->fd = vfs_fopen(file.c_str(), "r"); + if (!this->fd) + err |= NotFound; }; - // XXX: this sucks because binio won't let us do sanity checking Byte getByte(void) { + g_return_val_if_fail(this->fd, EOF); int c = vfs_getc(this->fd); - - if (c == EOF) err |= Eof; - + if (c < 0) + err |= Eof; return (Byte) c; }; void seek(long pos, Offset offs = Set) { - switch (offs) - { - case Add: - vfs_fseek(this->fd, pos, SEEK_CUR); - break; - case End: - vfs_fseek(this->fd, pos, SEEK_END); - break; - case Set: - default: - vfs_fseek(this->fd, pos, SEEK_SET); - break; - } - + g_return_if_fail(this->fd); + int wh = (offs == Add) ? SEEK_CUR : (offs == End) ? SEEK_END : SEEK_SET; + if (vfs_fseek(this->fd, pos, wh)) + err |= Eof; } long pos(void) { + g_return_val_if_fail(this->fd, -1); return vfs_ftell(this->fd); } }; -// XXX: binio sucks and doesn't let us just combine the two. -class vfsostream : public binostream, virtual public binio { +class vfsostream : public binostream { private: VFSFile *fd; public: - vfsostream() {}; - ~vfsostream() {}; + vfsostream() { + this->fd = 0; + }; + + ~vfsostream() { + if (this->fd) { + vfs_fclose(this->fd); + this->fd = 0; + } + }; vfsostream(VFSFile *fd) { this->fd = fd; }; vfsostream(const char *file) { - this->fd = vfs_fopen(file, "wb"); + this->fd = vfs_fopen(file, "w"); + if (!this->fd) + err |= Denied; }; vfsostream(std::string &file) { - this->fd = vfs_fopen(file.c_str(), "wb"); + this->fd = vfs_fopen(file.c_str(), "w"); + if (!this->fd) + err |= Denied; }; void open(const char *file) { - this->fd = vfs_fopen(file, "wb"); + g_return_if_fail(!this->fd); + this->fd = vfs_fopen(file, "w"); + if (!this->fd) + err |= Denied; }; void open(std::string &file) { - this->fd = vfs_fopen(file.c_str(), "wb"); + g_return_if_fail(!this->fd); + this->fd = vfs_fopen(file.c_str(), "w"); + if (!this->fd) + err |= Denied; }; - // XXX: this sucks because binio won't let us do sanity checking void putByte(Byte b) { - vfs_fwrite(&b, 1, 1, this->fd); + g_return_if_fail(this->fd); + if (vfs_fwrite(&b, 1, 1, this->fd) != 1) + err |= Fatal; }; void seek(long pos, Offset offs = Set) { - switch (offs) - { - case Add: - vfs_fseek(this->fd, pos, SEEK_CUR); - break; - case End: - vfs_fseek(this->fd, pos, SEEK_END); - break; - case Set: - default: - vfs_fseek(this->fd, pos, SEEK_SET); - break; - } - + g_return_if_fail(this->fd); + int wh = (offs == Add) ? SEEK_CUR : (offs == End) ? SEEK_END : SEEK_SET; + if (vfs_fseek(this->fd, pos, wh)) + err |= Fatal; } long pos(void) { + g_return_val_if_fail(this->fd, -1); return vfs_ftell(this->fd); } };
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/bmf.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/bmf.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2003, 2006 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -40,6 +40,8 @@ comment : inaccurate replaying, because constant outport; in original player it can be 380 or 382. */ +#include <string.h> + #include "bmf.h" #include "debug.h" @@ -540,7 +542,7 @@ if ((0x20 <= *stream) && (*stream <= 0x3F)) { - // 0x20 or higher; 0x3F or lower: Set Instrument + // 0x20 or higher; 0x3F or lower: Set Instrument bmf.streams[channel][pos].instrument = *stream - 0x20 + 1; stream++;
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/cff.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/cff.cxx
Changed
@@ -25,6 +25,7 @@ */ #include <stdlib.h> +#include <string.h> #include "cff.h"
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/cmf.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/cmf.cxx
Changed
@@ -548,7 +548,7 @@ 00 -> N/A (note off) */ // Approximate formula, need to figure out more accurate one (my maths isn't so good...) - int iLevel = 0x25 - sqrt(iVelocity * 16/*6*/);//(127 - iVelocity) * 0x20 / 127; + int iLevel = 0x25 - (int) sqrt(iVelocity * 16 /* 6 */); // (127 - iVelocity) * 0x20 / 127; if (iVelocity > 0x7b) iLevel = 0; // full volume if (iLevel < 0) iLevel = 0; if (iLevel > 0x3F) iLevel = 0x3F;
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/dro.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/dro.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -19,11 +19,12 @@ * dro.c - DOSBox Raw OPL Player by Sjoerd van der Berg <harekiet@zophar.net> * * upgraded by matthew gambrell <zeromus@zeromus.org> - * + * * NOTES: 3-oct-04: the DRO format is not yet finalized. beware. */ #include <stdio.h> +#include <string.h> #include "dro.h"
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/dtm.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/dtm.cxx
Changed
@@ -22,6 +22,8 @@ NOTE: Panning (Ex) effect is ignored. */ +#include <string.h> + #include "dtm.h" /* -------- Public Methods -------------------------------- */
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/fmc.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/fmc.cxx
Changed
@@ -19,6 +19,8 @@ fmc.cpp - FMC Loader by Riven the Mage <riven@ok.ru> */ +#include <string.h> + #include "fmc.h" /* -------- Public Methods -------------------------------- */
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/mad.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/mad.cxx
Changed
@@ -19,6 +19,8 @@ mad.cpp - MAD loader by Riven the Mage <riven@ok.ru> */ +#include <string.h> + #include "mad.h" /* -------- Public Methods -------------------------------- */
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/mkj.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/mkj.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2004 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -20,6 +20,7 @@ */ #include <assert.h> +#include <string.h> #include "mkj.h" #include "debug.h"
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/msc.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/msc.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2006 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -20,6 +20,7 @@ */ #include <stdio.h> +#include <string.h> #include "msc.h" #include "debug.h"
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/mtk.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/mtk.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2006 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -19,6 +19,8 @@ * mtk.cpp - MPU-401 Trakker Loader by Simon Peter (dn.tlp@gmx.net) */ +#include <string.h> + #include "mtk.h" /*** public methods **************************************/
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/protrack.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/protrack.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -25,6 +25,8 @@ * Protracker-like format, this is most certainly the player you want to use. */ +#include <string.h> + #include "protrack.h" #include "debug.h" @@ -266,6 +268,10 @@ else track--; + if (track >= npats*nchans) { // prevent overflow + songend = 1; + return !songend; + } AdPlug_LogWrite ("%3d%3d%2X%2X%2X|", tracks[track][row].note, tracks[track][row].inst, tracks[track][row].command, tracks[track][row].param1, tracks[track][row].param2);
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/rad.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/rad.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -22,6 +22,8 @@ * some volumes are dropped out */ +#include <string.h> + #include "rad.h" CPlayer *
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/rat.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/rat.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2003 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -29,6 +29,8 @@ comment : there are bug in original replayer's adlib_init(): wrong frequency registers. */ +#include <string.h> + #include "rat.h" #include "debug.h"
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/raw.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/raw.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2005 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -19,6 +19,8 @@ * raw.c - RAW Player by Simon Peter <dn.tlp@gmx.net> */ +#include <string.h> + #include "raw.h" /*** public methods *************************************/
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/rix.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/rix.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -20,9 +20,11 @@ * BSPAL <BSPAL.ys168.com> */ +#include <cstdlib> +#include <string.h> + #include "rix.h" #include "debug.h" -#include <cstdlib> const unsigned char CrixPlayer::adflag[] =
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/rol.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/rol.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2006 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -21,6 +21,7 @@ * Visit: http://tenacity.hispeed.com/aomit/oplx/ */ #include <algorithm> +#include <string.h> #include "rol.h" #include "debug.h" @@ -40,8 +41,8 @@ static const unsigned char drum_table[4] = {0x14, 0x12, 0x15, 0x11}; -CrolPlayer::uint16 const CrolPlayer::kNoteTable[12] = -{ +CrolPlayer::uint16 const CrolPlayer::kNoteTable[12] = +{ 340, // C 363, // C# 385, // D @@ -79,7 +80,7 @@ memset(freqCache, 0, sizeof(freqCache) ); for(n=0; n<11; n++) - pitchCache[n]=1.0f; + pitchCache[n]=1.0f; } //--------------------------------------------------------- CrolPlayer::~CrolPlayer() @@ -257,6 +258,9 @@ TVolumeEvents &vEvents = voiceData.volume_events; TPitchEvents &pEvents = voiceData.pitch_events; + if (iEvents.empty()) { + return; // prevent out-of-bounds access + } if( !(voiceData.mEventStatus & CVoiceData::kES_InstrEnd ) && iEvents[voiceData.next_instrument_event].time == mCurrTick ) { @@ -271,6 +275,9 @@ } } + if (vEvents.empty()) { + return; // prevent out-of-bounds access + } if( !(voiceData.mEventStatus & CVoiceData::kES_VolumeEnd ) && vEvents[voiceData.next_volume_event].time == mCurrTick ) { @@ -287,7 +294,7 @@ else { voiceData.mEventStatus |= CVoiceData::kES_VolumeEnd; - } + } } if( voiceData.mForceNote || voiceData.current_note_duration > voiceData.mNoteDuration-1 ) @@ -314,6 +321,9 @@ } } + if (pEvents.empty()) { + return; // prevent out-of-bounds access + } if( !(voiceData.mEventStatus & CVoiceData::kES_PitchEnd ) && pEvents[voiceData.next_pitch_event].time == mCurrTick ) { @@ -400,7 +410,7 @@ { volumeCache[voice] = (volumeCache[voice] &0xc0) | volume; - int const op_offset = ( voice < kSnareDrumChannel || rol_header->mode ) ? + int const op_offset = ( voice < kSnareDrumChannel || rol_header->mode ) ? op_table[voice]+3 : drum_table[voice-kSnareDrumChannel]; opl->write( 0x40+op_offset, volumeCache[voice] ); @@ -454,6 +464,9 @@ { int16 const num_tempo_events = f->readInt( 2 ); + if (num_tempo_events<0) { + return; + } mTempoEvents.reserve( num_tempo_events ); for(int i=0; i<num_tempo_events; ++i) @@ -538,6 +551,9 @@ binistream *bnk_file, SBnkHeader const &bnk_header ) { int16 const number_of_instrument_events = f->readInt( 2 ); + if (number_of_instrument_events<0) { + return; + } TInstrumentEvents &instrument_events = voice.instrument_events; @@ -563,6 +579,9 @@ void CrolPlayer::load_volume_events( binistream *f, CVoiceData &voice ) { int16 const number_of_volume_events = f->readInt( 2 ); + if (number_of_volume_events<0) { + return; + } TVolumeEvents &volume_events = voice.volume_events; @@ -583,6 +602,9 @@ void CrolPlayer::load_pitch_events( binistream *f, CVoiceData &voice ) { int16 const number_of_pitch_events = f->readInt( 2 ); + if (number_of_pitch_events<0) { + return; + } TPitchEvents &pitch_events = voice.pitch_events; @@ -647,9 +669,9 @@ typedef TInstrumentNames::const_iterator TInsIter; typedef std::pair<TInsIter, TInsIter> TInsIterPair; - TInsIterPair range = std::equal_range( ins_name_list.begin(), - ins_name_list.end(), - name, + TInsIterPair range = std::equal_range( ins_name_list.begin(), + ins_name_list.end(), + name, StringCompare() ); if( range.first != range.second )
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/s3m.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/s3m.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2006 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -22,6 +22,8 @@ * Extra Fine Slides (EEx, FEx) & Fine Vibrato (Uxy) are inaccurate */ +#include <string.h> + #include "s3m.h" const char
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/sa2.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/sa2.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -21,6 +21,7 @@ */ #include <stdio.h> +#include <string.h> #include "sa2.h" #include "debug.h"
View file
audacious-plugins-2.4.3.tgz/src/adplug/core/sng.cxx -> audacious-plugins-2.4.4.tgz/src/adplug/core/sng.cxx
Changed
@@ -1,17 +1,17 @@ /* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2002 Simon Peter, <dn.tlp@gmx.net>, et al. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -19,6 +19,8 @@ * sng.cpp - SNG Player by Simon Peter <dn.tlp@gmx.net> */ +#include <string.h> + #include "sng.h" CPlayer *
View file
audacious-plugins-2.4.3.tgz/src/alsa/alsa.c -> audacious-plugins-2.4.4.tgz/src/alsa/alsa.c
Changed
@@ -139,7 +139,8 @@ static void poll_wake (void) { const char c = 0; - write (poll_pipe[1], & c, 1); + if (write (poll_pipe[1], & c, 1) < 0) + ERROR ("Failed to write to pipe: %s.\n", strerror (errno)); } static void poll_cleanup (void)
View file
audacious-plugins-2.4.3.tgz/src/alsa/config.c -> audacious-plugins-2.4.4.tgz/src/alsa/config.c
Changed
@@ -69,6 +69,7 @@ static void get_defined_devices (const char * type, int capture, void (* found) (const char * name, const char * description)) { +#ifdef HAVE_SND_DEVICE_NAME_HINT void * * hints = NULL; int count; @@ -94,6 +95,7 @@ FAILED: if (hints != NULL) snd_device_name_free_hint (hints); +#endif } static char * get_card_description (int card)
View file
audacious-plugins-2.4.3.tgz/src/amidi-plug/backend-fluidsynth/b-fluidsynth.c -> audacious-plugins-2.4.4.tgz/src/amidi-plug/backend-fluidsynth/b-fluidsynth.c
Changed
@@ -21,9 +21,6 @@ #include "b-fluidsynth.h" #include "b-fluidsynth-config.h" -/* some versions of fluidsynth don't export this in the public headers */ -extern int fluid_synth_all_notes_off(fluid_synth_t* synth, int chan); - /* sequencer instance */ static sequencer_client_t sc; /* options */ @@ -289,7 +286,7 @@ gint c = 0; for ( c = 0 ; c < 16 ; c++ ) { - fluid_synth_all_notes_off( sc.synth , c ); + fluid_synth_cc (sc.synth, c, 123 /* all notes off */, 0); } return 1; }
View file
audacious-plugins-2.4.3.tgz/src/amidi-plug/i_backend.c -> audacious-plugins-2.4.4.tgz/src/amidi-plug/i_backend.c
Changed
@@ -20,6 +20,13 @@ #include "i_backend.h" +/* GCC does not like casting func * * to void * *. */ +static void * get_symbol (GModule * mod, const gchar * name) +{ + void * sym = NULL; + g_module_symbol (mod, name, & sym); + return sym; +} gboolean i_str_has_pref_and_suff( const gchar *str , gchar *pref , gchar *suff ) { @@ -55,7 +62,7 @@ else { /* try to get the module name */ - if ( g_module_symbol( module , "backend_info_get" , (gpointer*)&getapmoduleinfo ) ) + if ((getapmoduleinfo = get_symbol (module , "backend_info_get"))) { /* module name found, ok! add its name and filename to the list */ amidiplug_sequencer_backend_name_t * mn = g_malloc(sizeof(amidiplug_sequencer_backend_name_t)); @@ -112,35 +119,38 @@ { gchar * (*getapmoduleinfo)( gchar ** , gchar ** , gchar ** , gint * ); gboolean (*checkautonomousaudio)( void ); - g_module_symbol( backend.gmodule , "backend_init" , (gpointer *)&backend.init ); - g_module_symbol( backend.gmodule , "backend_cleanup" , (gpointer *)&backend.cleanup ); - g_module_symbol( backend.gmodule , "audio_info_get" , (gpointer*)&backend.audio_info_get ); - g_module_symbol( backend.gmodule , "audio_volume_get" , (gpointer *)&backend.audio_volume_get ); - g_module_symbol( backend.gmodule , "audio_volume_set" , (gpointer *)&backend.audio_volume_set ); - g_module_symbol( backend.gmodule , "sequencer_start" , (gpointer *)&backend.seq_start ); - g_module_symbol( backend.gmodule , "sequencer_stop" , (gpointer *)&backend.seq_stop ); - g_module_symbol( backend.gmodule , "sequencer_on" , (gpointer *)&backend.seq_on ); - g_module_symbol( backend.gmodule , "sequencer_off" , (gpointer *)&backend.seq_off ); - g_module_symbol( backend.gmodule , "sequencer_queue_tempo" , (gpointer *)&backend.seq_queue_tempo ); - g_module_symbol( backend.gmodule , "sequencer_queue_start" , (gpointer *)&backend.seq_queue_start ); - g_module_symbol( backend.gmodule , "sequencer_queue_stop" , (gpointer *)&backend.seq_queue_stop ); - g_module_symbol( backend.gmodule , "sequencer_event_init" , (gpointer *)&backend.seq_event_init ); - g_module_symbol( backend.gmodule , "sequencer_event_noteon" , (gpointer *)&backend.seq_event_noteon ); - g_module_symbol( backend.gmodule , "sequencer_event_noteoff" , (gpointer *)&backend.seq_event_noteoff ); - g_module_symbol( backend.gmodule , "sequencer_event_allnoteoff" , (gpointer *)&backend.seq_event_allnoteoff ); - g_module_symbol( backend.gmodule , "sequencer_event_keypress" , (gpointer *)&backend.seq_event_keypress ); - g_module_symbol( backend.gmodule , "sequencer_event_controller" , (gpointer *)&backend.seq_event_controller ); - g_module_symbol( backend.gmodule , "sequencer_event_pgmchange" , (gpointer *)&backend.seq_event_pgmchange ); - g_module_symbol( backend.gmodule , "sequencer_event_chanpress" , (gpointer *)&backend.seq_event_chanpress ); - g_module_symbol( backend.gmodule , "sequencer_event_pitchbend" , (gpointer *)&backend.seq_event_pitchbend ); - g_module_symbol( backend.gmodule , "sequencer_event_sysex" , (gpointer *)&backend.seq_event_sysex ); - g_module_symbol( backend.gmodule , "sequencer_event_tempo" , (gpointer *)&backend.seq_event_tempo ); - g_module_symbol( backend.gmodule , "sequencer_event_other" , (gpointer *)&backend.seq_event_other ); - g_module_symbol( backend.gmodule , "sequencer_output" , (gpointer *)&backend.seq_output ); - g_module_symbol( backend.gmodule , "sequencer_output_shut" , (gpointer *)&backend.seq_output_shut ); - g_module_symbol( backend.gmodule , "sequencer_get_port_count" , (gpointer *)&backend.seq_get_port_count ); - g_module_symbol( backend.gmodule , "backend_info_get" , (gpointer*)&getapmoduleinfo ); - g_module_symbol( backend.gmodule , "audio_check_autonomous" , (gpointer*)&checkautonomousaudio ); + + backend.init = get_symbol (backend.gmodule, "backend_init"); + backend.cleanup = get_symbol (backend.gmodule, "backend_cleanup"); + backend.audio_info_get = get_symbol (backend.gmodule, "audio_info_get"); + backend.audio_volume_get = get_symbol (backend.gmodule, "audio_volume_get"); + backend.audio_volume_set = get_symbol (backend.gmodule, "audio_volume_set"); + backend.seq_start = get_symbol (backend.gmodule, "sequencer_start"); + backend.seq_stop = get_symbol (backend.gmodule, "sequencer_stop"); + backend.seq_on = get_symbol (backend.gmodule, "sequencer_on"); + backend.seq_off = get_symbol (backend.gmodule, "sequencer_off"); + backend.seq_queue_tempo = get_symbol (backend.gmodule, "sequencer_queue_tempo"); + backend.seq_queue_start = get_symbol (backend.gmodule, "sequencer_queue_start"); + backend.seq_queue_stop = get_symbol (backend.gmodule, "sequencer_queue_stop"); + backend.seq_event_init = get_symbol (backend.gmodule, "sequencer_event_init"); + backend.seq_event_noteon = get_symbol (backend.gmodule, "sequencer_event_noteon"); + backend.seq_event_noteoff = get_symbol (backend.gmodule, "sequencer_event_noteoff"); + backend.seq_event_allnoteoff = get_symbol (backend.gmodule, "sequencer_event_allnoteoff"); + backend.seq_event_keypress = get_symbol (backend.gmodule, "sequencer_event_keypress"); + backend.seq_event_controller = get_symbol (backend.gmodule, "sequencer_event_controller"); + backend.seq_event_pgmchange = get_symbol (backend.gmodule, "sequencer_event_pgmchange"); + backend.seq_event_chanpress = get_symbol (backend.gmodule, "sequencer_event_chanpress"); + backend.seq_event_pitchbend = get_symbol (backend.gmodule, "sequencer_event_pitchbend"); + backend.seq_event_sysex = get_symbol (backend.gmodule, "sequencer_event_sysex"); + backend.seq_event_tempo = get_symbol (backend.gmodule, "sequencer_event_tempo"); + backend.seq_event_other = get_symbol (backend.gmodule, "sequencer_event_other"); + backend.seq_output = get_symbol (backend.gmodule, "sequencer_output"); + backend.seq_output_shut = get_symbol (backend.gmodule, "sequencer_output_shut"); + backend.seq_get_port_count = get_symbol (backend.gmodule, "sequencer_get_port_count"); + + getapmoduleinfo = get_symbol (backend.gmodule, "backend_info_get"); + checkautonomousaudio = get_symbol (backend.gmodule, "audio_check_autonomous"); + getapmoduleinfo( &backend.name , NULL , NULL , NULL ); backend.autonomous_audio = checkautonomousaudio(); DEBUGMSG( "backend %s (name '%s') successfully loaded\n" , module_pathfilename , backend.name );
View file
audacious-plugins-2.4.3.tgz/src/amidi-plug/i_configure-alsa.c -> audacious-plugins-2.4.4.tgz/src/amidi-plug/i_configure-alsa.c
Changed
@@ -49,6 +49,13 @@ LISTMIXER_N_COLUMNS }; +/* GCC does not like casting func * * to void * *. */ +static void * get_symbol (GModule * mod, const gchar * name) +{ + void * sym = NULL; + g_module_symbol (mod, name, & sym); + return sym; +} void i_configure_ev_portlv_changetoggle( GtkCellRendererToggle * rdtoggle , gchar * path_str , gpointer data ) @@ -271,10 +278,12 @@ /* it's legit to assume that this can't fail, since the module is present in the backend_list */ alsa_module = g_module_open( alsa_module_pathfilename , 0 ); - g_module_symbol( alsa_module , "sequencer_port_get_list" , (gpointer*)&get_port_list ); - g_module_symbol( alsa_module , "sequencer_port_free_list" , (gpointer*)&free_port_list ); - g_module_symbol( alsa_module , "alsa_card_get_list" , (gpointer*)&get_card_list ); - g_module_symbol( alsa_module , "alsa_card_free_list" , (gpointer*)&free_card_list ); + + get_port_list = get_symbol (alsa_module, "sequencer_port_get_list"); + free_port_list = get_symbol (alsa_module, "sequencer_port_free_list"); + get_card_list = get_symbol (alsa_module, "alsa_card_get_list"); + free_card_list = get_symbol (alsa_module, "alsa_card_free_list"); + /* get an updated list of writable ALSA MIDI ports and ALSA-enabled sound cards*/ wports = get_port_list(); wports_h = wports; scards = get_card_list(); scards_h = scards;
View file
audacious-plugins-2.4.3.tgz/src/amidi-plug/i_midi.c -> audacious-plugins-2.4.4.tgz/src/amidi-plug/i_midi.c
Changed
@@ -158,7 +158,8 @@ last_cmd = cmd; } else { /* running status */ - VFS_UNGETC(c, mf->file_pointer); + if (VFS_UNGETC (c, mf->file_pointer) < 0) + break; mf->file_offset--; cmd = last_cmd; if (!cmd)
View file
audacious-plugins-2.4.3.tgz/src/amidi-plug/i_utils.c -> audacious-plugins-2.4.4.tgz/src/amidi-plug/i_utils.c
Changed
@@ -124,10 +124,10 @@ } if ( parent_win != NULL ) - win = gtk_message_dialog_new( GTK_WINDOW(parent_win) , GTK_DIALOG_DESTROY_WITH_PARENT , - mtype , GTK_BUTTONS_OK , message ); + win = gtk_message_dialog_new ((GtkWindow *) parent_win, + GTK_DIALOG_DESTROY_WITH_PARENT, mtype, GTK_BUTTONS_OK, "%s", message); else - win = gtk_message_dialog_new( NULL , 0 , mtype , GTK_BUTTONS_OK , message ); + win = gtk_message_dialog_new (NULL, 0, mtype, GTK_BUTTONS_OK, "%s", message); gtk_window_set_title( GTK_WINDOW(win) , title ); g_signal_connect_swapped( G_OBJECT(win) , "response" , G_CALLBACK(gtk_widget_destroy) , win );
View file
audacious-plugins-2.4.3.tgz/src/console/Audacious_Driver.cxx -> audacious-plugins-2.4.4.tgz/src/console/Audacious_Driver.cxx
Changed
@@ -283,7 +283,7 @@ { length = tuple_get_int(ti, FIELD_LENGTH, NULL); tuple_free(ti); - playback->set_params(playback, NULL, NULL, fh.m_emu->voice_count() * 1000, sample_rate, 2); + playback->set_params(playback, NULL, 0, fh.m_emu->voice_count() * 1000, sample_rate, 2); } }
View file
audacious-plugins-2.4.3.tgz/src/console/Vfs_File.cxx -> audacious-plugins-2.4.4.tgz/src/console/Vfs_File.cxx
Changed
@@ -21,11 +21,7 @@ long Vfs_File_Reader::size() const { - long pos = tell(); - vfs_fseek( file_, 0, SEEK_END ); - long result = tell(); - vfs_fseek( file_, pos, SEEK_SET ); - return result; + return vfs_fsize (file_); } long Vfs_File_Reader::read_avail( void* p, long s )
View file
audacious-plugins-2.4.3.tgz/src/console/Ym2413_Emu.cxx -> audacious-plugins-2.4.4.tgz/src/console/Ym2413_Emu.cxx
Changed
@@ -2185,7 +2185,7 @@ assert( use_count == 0 ); use_count++; - opll = OPLL_new( clock_rate, sample_rate ); + opll = OPLL_new ((int) clock_rate, (int) sample_rate); if ( !opll ) return 1;
View file
audacious-plugins-2.4.3.tgz/src/console/configure.c -> audacious-plugins-2.4.4.tgz/src/console/configure.c
Changed
@@ -268,9 +268,11 @@ gtk_container_add( GTK_CONTAINER(hbuttonbox) , button_ok ); gtk_box_pack_start( GTK_BOX(configwin_vbox) , hbuttonbox , FALSE , FALSE , 0 ); +#if GTK_CHECK_VERSION (2, 12, 0) gtk_widget_set_tooltip_text( configwin_gen_playback_deflen_spbt , _("The default song length, expressed in seconds, is used for songs " "that do not provide length information (i.e. looping tracks).")); +#endif gtk_widget_show_all( configwin ); }
View file
audacious-plugins-2.4.3.tgz/src/ffaudio/ffaudio-audvfs.c -> audacious-plugins-2.4.4.tgz/src/ffaudio/ffaudio-audvfs.c
Changed
@@ -28,7 +28,11 @@ return vfs_fread(buf, 1, size, file); } -static int audvfs_write(URLContext *h, const unsigned char *buf, int size) +#if CHECK_LIBAVFORMAT_VERSION (52, 68, 0) +static int audvfs_write (URLContext * h, const unsigned char * buf, int size) +#else +static int audvfs_write (URLContext * h, unsigned char * buf, int size) +#endif { VFSFile *file; file = h->priv_data;
View file
audacious-plugins-2.4.3.tgz/src/ffaudio/ffaudio-core.c -> audacious-plugins-2.4.4.tgz/src/ffaudio/ffaudio-core.c
Changed
@@ -47,7 +47,11 @@ av_register_all(); AUDDBG("registering audvfsptr protocol\n"); - av_register_protocol(&audvfsptr_protocol); +#if CHECK_LIBAVFORMAT_VERSION (52, 69, 0) + av_register_protocol2 (& audvfsptr_protocol, sizeof audvfsptr_protocol); +#else + av_register_protocol (& audvfsptr_protocol); +#endif AUDDBG("creating seek mutex/cond\n"); ctrl_mutex = g_mutex_new(); @@ -267,8 +271,8 @@ if (t == NULL) return NULL; - vfs_fseek(fd, 0, SEEK_SET); - tag_tuple_read(t, fd); + if (! vfs_fseek (fd, 0, SEEK_SET)) + tag_tuple_read (t, fd); return t; } @@ -340,8 +344,14 @@ codec_opened = TRUE; /* Determine if audio conversion or resampling is needed */ - in_sample_size = av_get_bits_per_sample_format(c->sample_fmt) / 8; - out_sample_size = av_get_bits_per_sample_format(SAMPLE_FMT_S16) / 8; +#if CHECK_LIBAVCODEC_VERSION (52, 94, 3) + in_sample_size = av_get_bits_per_sample_fmt (c->sample_fmt) / 8; + out_sample_size = av_get_bits_per_sample_fmt (SAMPLE_FMT_S16) / 8; +#else + in_sample_size = av_get_bits_per_sample_format (c->sample_fmt) / 8; + out_sample_size = av_get_bits_per_sample_format (SAMPLE_FMT_S16) / 8; +#endif + chunk_size = out_sample_size * c->channels * (c->sample_rate / 50); switch (c->sample_fmt) {
View file
audacious-plugins-2.4.3.tgz/src/ffaudio/ffaudio-stdinc.h -> audacious-plugins-2.4.4.tgz/src/ffaudio/ffaudio-stdinc.h
Changed
@@ -27,6 +27,14 @@ #include <libavcodec/avcodec.h> #include <libavutil/avutil.h> +#define VERSION_INT(maj, min, mic) ((maj) * 1000000 + (min) * 1000 + (mic)) +#define CHECK_LIBAVCODEC_VERSION(maj, min, mic) (VERSION_INT \ + (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) \ + >= VERSION_INT (maj, min, mic)) +#define CHECK_LIBAVFORMAT_VERSION(maj, min, mic) (VERSION_INT \ + (LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, \ + LIBAVFORMAT_VERSION_MICRO) >= VERSION_INT (maj, min, mic)) + URLProtocol audvfsptr_protocol; #endif
View file
audacious-plugins-2.4.3.tgz/src/filewriter/flac.c -> audacious-plugins-2.4.4.tgz/src/filewriter/flac.c
Changed
@@ -45,7 +45,8 @@ static FLAC__StreamEncoderWriteStatus flac_write_cb(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, gpointer data) { - vfs_fwrite(buffer, bytes, 1, (VFSFile *) data); + if (vfs_fwrite (buffer, 1, bytes, data) != bytes) + return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR; return FLAC__STREAM_ENCODER_WRITE_STATUS_OK; }
View file
audacious-plugins-2.4.3.tgz/src/filewriter/wav.c -> audacious-plugins-2.4.4.tgz/src/filewriter/wav.c
Changed
@@ -36,7 +36,8 @@ .format_required = FMT_S16_LE, }; - +#pragma pack(push) /* must be byte-aligned */ +#pragma pack(1) struct wavhead { guint32 main_chunk; @@ -53,6 +54,8 @@ guint32 data_chunk; guint32 data_length; }; +#pragma pack(pop) + static struct wavhead header; static guint64 written; @@ -75,16 +78,20 @@ header.byte_p_spl = GUINT16_TO_LE((GUINT16_FROM_LE(header.bit_p_spl) / (8 / input.channels))); memcpy(&header.data_chunk, "data", 4); header.data_length = GUINT32_TO_LE(0); - vfs_fwrite(&header, sizeof (struct wavhead), 1, output_file); + + if (vfs_fwrite (& header, 1, sizeof header, output_file) != sizeof header) + return 0; written = 0; return 1; } -static void wav_write(void *ptr, gint length) +static void wav_write (void * data, gint len) { - written += vfs_fwrite(ptr, 1, length, output_file); + written += len; + if (vfs_fwrite (data, 1, len, output_file) != len) + fprintf (stderr, "Error while writing to .wav output file.\n"); } static void wav_close(void) @@ -92,9 +99,10 @@ if (output_file) { header.length = GUINT32_TO_LE(written + sizeof (struct wavhead) - 8); - header.data_length = GUINT32_TO_LE(written); - vfs_fseek(output_file, 0, SEEK_SET); - vfs_fwrite(&header, sizeof (struct wavhead), 1, output_file); + + if (vfs_fseek (output_file, 0, SEEK_SET) || vfs_fwrite (& header, 1, + sizeof header, output_file) != sizeof header) + fprintf (stderr, "Error while writing to .wav output file.\n"); } }
View file
audacious-plugins-2.4.3.tgz/src/flacng/plugin.c -> audacious-plugins-2.4.4.tgz/src/flacng/plugin.c
Changed
@@ -131,23 +131,11 @@ { AUDDBG("Probe for FLAC.\n"); - gchar *buf = g_new0(gchar, 4); - gboolean flac; - - if (vfs_fseek(fd, 0, SEEK_SET)) - { - g_free(buf); + gchar buf[4]; + if (vfs_fread (buf, 1, sizeof buf, fd) != sizeof buf) return FALSE; - } - - vfs_fread(buf, 4, 1, fd); - flac = strncmp(buf, "fLaC", 4); - g_free(buf); - if (!flac) - return TRUE; - else - return FALSE; + return ! strncmp (buf, "fLaC", sizeof buf); } static void squeeze_audio(gint32* src, void* dst, guint count, guint res) @@ -563,6 +551,7 @@ return TRUE; } +#ifdef FLAC__METADATA_TYPE_PICTURE static gboolean flac_get_image(const gchar *filename, VFSFile *fd, void **data, gint *length) { AUDDBG("Probe for song image.\n"); @@ -614,6 +603,7 @@ return has_image; } +#endif static const gchar *flac_fmts[] = { "flac", "fla", NULL }; @@ -630,7 +620,9 @@ .is_our_file_from_vfs = flac_is_our_fd, .vfs_extensions = flac_fmts, .update_song_tuple = flac_update_song_tuple, +#ifdef FLAC__METADATA_TYPE_PICTURE .get_song_image = flac_get_image, +#endif .priority = 1 };
View file
audacious-plugins-2.4.3.tgz/src/gtkui/gtkui_cfg.c -> audacious-plugins-2.4.4.tgz/src/gtkui/gtkui_cfg.c
Changed
@@ -72,7 +72,7 @@ {"player_y", &config.player_y, TRUE}, {"player_width", &config.player_width, TRUE}, {"player_height", &config.player_height, TRUE}, - {"vis_position", (gint *)&config.vis_position, TRUE}, + {"vis_position", & config.vis_position, TRUE}, {"playlist_width", &config.playlist_width, TRUE}, {"playlist_height", &config.playlist_height, TRUE}, };
View file
audacious-plugins-2.4.3.tgz/src/gtkui/gtkui_cfg.h -> audacious-plugins-2.4.4.tgz/src/gtkui/gtkui_cfg.h
Changed
@@ -28,13 +28,13 @@ #define MAINWIN_DEFAULT_POS_X 100 #define MAINWIN_DEFAULT_POS_Y 100 -typedef enum { +enum { VIS_IN_TABS = 0, VIS_ON_LEFT, VIS_ON_RIGHT, VIS_ON_TOP, VIS_ON_BOTTOM -} VisPosition; +}; typedef struct { @@ -44,7 +44,7 @@ gboolean save_window_position; gboolean player_visible; gboolean playlist_visible; - VisPosition vis_position; + gint vis_position; gboolean multi_column_view; gboolean infoarea_visible; gboolean menu_visible;
View file
audacious-plugins-2.4.3.tgz/src/gtkui/ui_gtk.c -> audacious-plugins-2.4.4.tgz/src/gtkui/ui_gtk.c
Changed
@@ -50,7 +50,15 @@ static GtkWidget *label_time; static GtkWidget *slider; + +#if GTK_CHECK_VERSION (2, 12, 0) +#define HAVE_VOLUME static GtkWidget *volume; +static gboolean volume_slider_is_moving = FALSE; +static guint update_volume_timeout_source = 0; +static gulong volume_change_handler_id; +#endif + static GtkWidget *visualizer = NULL; GtkWidget *playlist_box; GtkWidget *window; /* the main window */ @@ -63,11 +71,8 @@ static gulong slider_change_handler_id; static gboolean slider_is_moving = FALSE; -static gboolean volume_slider_is_moving = FALSE; static gint slider_position; static guint update_song_timeout_source = 0; -static guint update_volume_timeout_source = 0; -static gulong volume_change_handler_id; extern GtkWidget *ui_playlist_notebook_tab_title_editing; @@ -423,6 +428,7 @@ return FALSE; } +#ifdef HAVE_VOLUME static gboolean ui_volume_value_changed_cb(GtkButton * button, gdouble volume, gpointer user_data) { aud_drct_set_volume((gint) volume, (gint) volume); @@ -465,6 +471,13 @@ return TRUE; } +void set_volume_diff(gint diff) +{ + gint vol = gtk_scale_button_get_value(GTK_SCALE_BUTTON(volume)); + gtk_scale_button_set_value(GTK_SCALE_BUTTON(volume), CLAMP(vol + diff, 0, 100)); +} +#endif + static void set_slider_length (gint length) { if (g_signal_handler_is_connected (slider, slider_change_handler_id)) @@ -533,12 +546,6 @@ return label; } -void set_volume_diff(gint diff) -{ - gint vol = gtk_scale_button_get_value(GTK_SCALE_BUTTON(volume)); - gtk_scale_button_set_value(GTK_SCALE_BUTTON(volume), CLAMP(vol + diff, 0, 100)); -} - static gboolean ui_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { if (ui_playlist_notebook_tab_title_editing != NULL && @@ -558,6 +565,7 @@ ui_playlist_notebook_edit_tab_title(NULL); break; +#ifdef HAVE_VOLUME case GDK_minus: //FIXME set_volume_diff(-5); break; @@ -565,6 +573,7 @@ case GDK_plus: //FIXME set_volume_diff(5); break; +#endif case GDK_Left: case GDK_KP_Left: @@ -681,8 +690,6 @@ GtkWidget *evbox; GtkAccelGroup *accel; - gint lvol = 0, rvol = 0; /* Left and Right for the volume control */ - gtkui_cfg_load(); multi_column_view = config.multi_column_view; @@ -748,15 +755,18 @@ label_time = gtk_markup_label_new(NULL); gtk_box_pack_start(GTK_BOX(shbox), label_time, FALSE, FALSE, 5); +#ifdef HAVE_VOLUME volume = gtk_volume_button_new(); gtk_button_set_relief(GTK_BUTTON(volume), GTK_RELIEF_NONE); gtk_scale_button_set_adjustment(GTK_SCALE_BUTTON(volume), GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 100, 1, 5, 0))); gtk_widget_set_can_focus(volume, FALSE); /* Set the default volume to the balance average. (I'll add balance control later) -Ryan */ + gint lvol = 0, rvol = 0; aud_drct_get_volume(&lvol, &rvol); gtk_scale_button_set_value(GTK_SCALE_BUTTON(volume), (lvol + rvol) / 2); gtk_box_pack_start(GTK_BOX(shbox), volume, FALSE, FALSE, 0); +#endif playlist_box = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), playlist_box, TRUE, TRUE, 0); @@ -798,10 +808,12 @@ g_signal_connect(slider, "button-press-event", G_CALLBACK(ui_slider_button_press_cb), NULL); g_signal_connect(slider, "button-release-event", G_CALLBACK(ui_slider_button_release_cb), NULL); +#ifdef HAVE_VOLUME volume_change_handler_id = g_signal_connect(volume, "value-changed", G_CALLBACK(ui_volume_value_changed_cb), NULL); g_signal_connect(volume, "pressed", G_CALLBACK(ui_volume_pressed_cb), NULL); g_signal_connect(volume, "released", G_CALLBACK(ui_volume_released_cb), NULL); update_volume_timeout_source = g_timeout_add(250, (GSourceFunc) ui_volume_slider_update, volume); +#endif g_signal_connect(window, "key-press-event", G_CALLBACK(ui_key_press_cb), NULL); @@ -859,11 +871,13 @@ update_song_timeout_source = 0; } +#ifdef HAVE_VOLUME if (update_volume_timeout_source) { g_source_remove(update_volume_timeout_source); update_volume_timeout_source = 0; } +#endif save_window_size (); gtkui_cfg_save();
View file
audacious-plugins-2.4.3.tgz/src/gtkui/ui_playlist_notebook.c -> audacious-plugins-2.4.4.tgz/src/gtkui/ui_playlist_notebook.c
Changed
@@ -93,6 +93,7 @@ } } +#if GTK_CHECK_VERSION (2, 10, 0) static void tab_reordered(GtkNotebook *notebook, GtkWidget *child, guint page_num, gpointer user_data) { GtkTreeView *treeview = playlist_get_treeview_from_page(child); @@ -108,6 +109,7 @@ aud_playlist_reorder(model->playlist, page_num, 1); } +#endif static GtkLabel *get_tab_label(gint playlist) { @@ -201,7 +203,10 @@ gtk_notebook_append_page(UI_PLAYLIST_NOTEBOOK, scrollwin, ebox); gtk_notebook_set_show_tabs(UI_PLAYLIST_NOTEBOOK, index_count(pages) > 1 ? TRUE : FALSE); + +#if GTK_CHECK_VERSION (2, 10, 0) gtk_notebook_set_tab_reorderable(UI_PLAYLIST_NOTEBOOK, scrollwin, TRUE); +#endif if (position >= 0) { @@ -238,8 +243,11 @@ g_signal_connect (UI_PLAYLIST_NOTEBOOK, "switch-page", (GCallback) tab_changed, NULL); + +#if GTK_CHECK_VERSION (2, 10, 0) g_signal_connect (UI_PLAYLIST_NOTEBOOK, "page-reordered", (GCallback) tab_reordered, NULL); +#endif } void ui_playlist_notebook_update(gpointer hook_data, gpointer user_data)
View file
audacious-plugins-2.4.3.tgz/src/gtkui/ui_playlist_widget.c -> audacious-plugins-2.4.4.tgz/src/gtkui/ui_playlist_widget.c
Changed
@@ -33,6 +33,17 @@ #include "ui_playlist_model.h" #include "playlist_util.h" +#if ! GTK_CHECK_VERSION (2, 12, 0) +static void gtk_tree_view_convert_widget_to_bin_window_coords + (GtkTreeView * tree, gint wx, gint wy, gint * bx, gint * by) +{ + gint bx0, by0; + gdk_window_get_position (gtk_tree_view_get_bin_window (tree), & bx0, & by0); + * bx = wx - bx0; + * by = wy - by0; +} +#endif + typedef struct { GtkTreeView * source; @@ -65,9 +76,8 @@ static void _ui_playlist_widget_drag_motion(GtkTreeView * widget, GdkDragContext * context, gint x, gint y, guint time, gpointer user_data) { GdkRectangle win; - GtkAdjustment *vadj; GdkRectangle rect; - gint tx, ty, end_pos, dest_playlist; + gint end_pos, dest_playlist; if (t == NULL) { @@ -91,9 +101,9 @@ end_pos = aud_playlist_entry_count(dest_playlist) - 1; gdk_window_get_geometry(gtk_tree_view_get_bin_window(widget), NULL, NULL, NULL, &win.height, NULL); - gtk_tree_view_convert_widget_to_bin_window_coords(widget, x, y, &tx, &ty); - gtk_tree_view_get_path_at_pos (widget, tx, ty, & t->dest_path, NULL, NULL, + gtk_tree_view_convert_widget_to_bin_window_coords (widget, x, y, & x, & y); + gtk_tree_view_get_path_at_pos (widget, x, y, & t->dest_path, NULL, NULL, NULL); if (! t->dest_path && end_pos != -1) @@ -103,7 +113,7 @@ { gtk_tree_view_get_background_area (widget, t->dest_path, NULL, & rect); - if (ty - rect.y < rect.height / 2) + if (y - rect.y < rect.height / 2) gtk_tree_view_set_drag_dest_row (widget, t->dest_path, GTK_TREE_VIEW_DROP_BEFORE); else @@ -114,11 +124,12 @@ } gtk_tree_view_get_background_area (widget, t->dest_path, NULL, & rect); - vadj = gtk_tree_view_get_vadjustment(widget); + GtkAdjustment * vadj = gtk_tree_view_get_vadjustment (widget); - if (ty >= 0 && ty < rect.height * 2 && vadj->value > 0) + if (y >= 0 && y < rect.height * 2 && vadj->value > 0) gtk_adjustment_set_value(vadj, MAX(0, vadj->value - rect.height)); - else if (win.height - ty <= rect.height * 2 && vadj->value < vadj->upper - vadj->page_size) + else if (win.height - y <= rect.height * 2 && vadj->value < vadj->upper + - vadj->page_size) gtk_adjustment_set_value(vadj, MIN(vadj->upper - vadj->page_size, vadj->value + rect.height)); } } @@ -422,9 +433,7 @@ treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); g_object_unref(model); - gtk_tree_view_set_reorderable(GTK_TREE_VIEW(treeview), TRUE); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE); - gtk_drag_dest_set_track_motion(treeview, TRUE); if (multi_column_view) { @@ -485,7 +494,6 @@ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); - gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(treeview), FALSE); g_signal_connect (selection, "changed", (GCallback) _ui_playlist_widget_selection_changed, treeview);
View file
audacious-plugins-2.4.3.tgz/src/lyricwiki/lyricwiki.c -> audacious-plugins-2.4.4.tgz/src/lyricwiki/lyricwiki.c
Changed
@@ -120,10 +120,14 @@ g_free(ret); ret = NULL; } + + g_regex_unref(reg); } xmlFree(lyric); } + + xmlFreeDoc(doc); } return ret; @@ -169,6 +173,8 @@ xmlFree(lyric); } } + + xmlFreeDoc(doc); } return uri; @@ -202,6 +208,13 @@ gchar *uri; uri = scrape_uri_from_lyricwiki_search_result(buf, len); + if (uri == NULL) + { + update_lyrics_window(tu, NULL); + mowgli_object_unref(tu); + + return FALSE; + } vfs_async_file_get_contents(uri, (VFSConsumer) get_lyrics_step_3, tu);
View file
audacious-plugins-2.4.3.tgz/src/m3u/m3u.c -> audacious-plugins-2.4.4.tgz/src/m3u/m3u.c
Changed
@@ -43,10 +43,10 @@ static gchar * read_win_text (const gchar * path) { - gchar * raw; + void * raw; gint64 size; - vfs_file_get_contents (path, (void * *) & raw, & size); + vfs_file_get_contents (path, & raw, & size); if (raw == NULL) return NULL;
View file
audacious-plugins-2.4.3.tgz/src/mms/mms.c -> audacious-plugins-2.4.4.tgz/src/mms/mms.c
Changed
@@ -169,10 +169,7 @@ return EOF; } -gint -mms_vfs_fseek_impl(VFSFile * file, - glong offset, - gint whence) +static gint mms_vfs_fseek_impl (VFSFile * file, gint64 offset, gint whence) { return -1; } @@ -183,8 +180,7 @@ return; } -glong -mms_vfs_ftell_impl(VFSFile * file) +static gint64 mms_vfs_ftell_impl (VFSFile * file) { MMSHandle *handle = (MMSHandle *) file->handle; @@ -207,8 +203,7 @@ mmsh_get_length(handle->mmsh)); } -gint -mms_vfs_truncate_impl(VFSFile * file, glong size) +static gint mms_vfs_truncate_impl (VFSFile * file, gint64 size) { return -1; }
View file
audacious-plugins-2.4.3.tgz/src/modplug/archive/arch_raw.cxx -> audacious-plugins-2.4.4.tgz/src/modplug/archive/arch_raw.cxx
Changed
@@ -17,20 +17,29 @@ arch_Raw::arch_Raw(const string& aFileName) { - mFileDesc = vfs_fopen(aFileName.c_str(), "rb"); + mFileDesc = vfs_fopen(aFileName.c_str(), "r"); + if (!mFileDesc) + { + mSize = 0; + return; + } - //open and mmap the file - if(mFileDesc == NULL) + mSize = vfs_fsize(mFileDesc); + if (mSize <= 0) { + vfs_fclose(mFileDesc); mSize = 0; return; } - vfs_fseek(mFileDesc, 0, SEEK_END); - mSize = vfs_ftell(mFileDesc); - vfs_fseek(mFileDesc, 0, SEEK_SET); mMap = malloc(mSize); - vfs_fread(mMap, 1, mSize, mFileDesc); + if (vfs_fread(mMap, 1, mSize, mFileDesc) < mSize) + { + free(mMap); + vfs_fclose(mFileDesc); + mSize = 0; + return; + } } arch_Raw::~arch_Raw()
View file
audacious-plugins-2.4.3.tgz/src/modplug/modplugbmp.cxx -> audacious-plugins-2.4.4.tgz/src/modplug/modplugbmp.cxx
Changed
@@ -104,7 +104,8 @@ const int magicSize = 32; char magic[magicSize]; - vfs_fread(magic, 1, magicSize, file); + if (vfs_fread(magic, 1, magicSize, file) < magicSize) + return false; if (!memcmp(magic, UMX_MAGIC, 4)) return true; if (!memcmp(magic, "Extended Module:", 16)) @@ -118,13 +119,17 @@ if (!memcmp(magic, PSM_MAGIC, 4)) return true; - vfs_fseek(file, 44, SEEK_SET); - vfs_fread(magic, 1, 4, file); + if (vfs_fseek(file, 44, SEEK_SET)) + return false; + if (vfs_fread(magic, 1, 4, file) < 4) + return false; if (!memcmp(magic, S3M_MAGIC, 4)) return true; - vfs_fseek(file, 1080, SEEK_SET); - vfs_fread(magic, 1, 4, file); + if (vfs_fseek(file, 1080, SEEK_SET)) + return false; + if (vfs_fread(magic, 1, 4, file) < 4) + return false; // Check for Fast Tracker multichannel modules (xCHN, xxCH) if (magic[1] == 'C' && magic[2] == 'H' && magic[3] == 'N') {
View file
audacious-plugins-2.4.3.tgz/src/mpg123/mpg123.c -> audacious-plugins-2.4.4.tgz/src/mpg123/mpg123.c
Changed
@@ -196,8 +196,8 @@ if (! vfs_is_streaming (file)) { - vfs_fseek (file, 0, SEEK_SET); - tag_tuple_read (tuple, file); + if (! vfs_fseek (file, 0, SEEK_SET)) + tag_tuple_read (tuple, file); } return tuple; @@ -454,8 +454,13 @@ } AUDDBG ("seeking to %d (byte %d)\n", (gint) ctx.seek, (gint) byteoff); + if (vfs_fseek (ctx.fd, byteoff, SEEK_SET)) + { + g_mutex_unlock (ctrl_mutex); + goto decode_cleanup; + } + data->output->flush (ctx.seek); - vfs_fseek(ctx.fd, byteoff, SEEK_SET); ctx.seek = -1; g_cond_signal(ctrl_cond);
View file
audacious-plugins-2.4.3.tgz/src/mtp_up/filetype.c -> audacious-plugins-2.4.4.tgz/src/mtp_up/filetype.c
Changed
@@ -2,84 +2,76 @@ #include "string.h" #include "filetype.h" +typedef struct { + const char *ptype; + const LIBMTP_filetype_t filetype; +} file_entry_t; + +/* This need to be kept constantly updated as new file types arrive. */ +static const file_entry_t file_entries[] = { + { "wav", LIBMTP_FILETYPE_WAV }, + { "mp3", LIBMTP_FILETYPE_MP3 }, + { "wma", LIBMTP_FILETYPE_WMA }, + { "ogg", LIBMTP_FILETYPE_OGG }, + { "mp4", LIBMTP_FILETYPE_MP4 }, + { "wmv", LIBMTP_FILETYPE_WMV }, + { "avi", LIBMTP_FILETYPE_AVI }, + { "mpeg", LIBMTP_FILETYPE_MPEG }, + { "mpg", LIBMTP_FILETYPE_MPEG }, + { "asf", LIBMTP_FILETYPE_ASF }, + { "qt", LIBMTP_FILETYPE_QT }, + { "mov", LIBMTP_FILETYPE_QT }, + { "wma", LIBMTP_FILETYPE_WMA }, + { "jpg", LIBMTP_FILETYPE_JPEG }, + { "jpeg", LIBMTP_FILETYPE_JPEG }, + { "jfif", LIBMTP_FILETYPE_JFIF }, + { "tif", LIBMTP_FILETYPE_TIFF }, + { "tiff", LIBMTP_FILETYPE_TIFF }, + { "bmp", LIBMTP_FILETYPE_BMP }, + { "gif", LIBMTP_FILETYPE_GIF }, + { "pic", LIBMTP_FILETYPE_PICT }, + { "pict", LIBMTP_FILETYPE_PICT }, + { "png", LIBMTP_FILETYPE_PNG }, + { "wmf", LIBMTP_FILETYPE_WINDOWSIMAGEFORMAT }, + { "ics", LIBMTP_FILETYPE_VCALENDAR2 }, + { "exe", LIBMTP_FILETYPE_WINEXEC }, + { "com", LIBMTP_FILETYPE_WINEXEC }, + { "bat", LIBMTP_FILETYPE_WINEXEC }, + { "dll", LIBMTP_FILETYPE_WINEXEC }, + { "sys", LIBMTP_FILETYPE_WINEXEC }, + { "aac", LIBMTP_FILETYPE_AAC }, + { "mp2", LIBMTP_FILETYPE_MP2 }, + { "flac", LIBMTP_FILETYPE_FLAC }, + { "m4a", LIBMTP_FILETYPE_M4A }, + { "doc", LIBMTP_FILETYPE_DOC }, + { "xml", LIBMTP_FILETYPE_XML }, + { "xls", LIBMTP_FILETYPE_XLS }, + { "ppt", LIBMTP_FILETYPE_PPT }, + { "mht", LIBMTP_FILETYPE_MHT }, + { "jp2", LIBMTP_FILETYPE_JP2 }, + { "jpx", LIBMTP_FILETYPE_JPX } +}; + /* Find the file type based on extension */ LIBMTP_filetype_t find_filetype (const char * filename) { - char *ptype; - ptype = rindex(filename,'.')+1; - LIBMTP_filetype_t filetype; - /* This need to be kept constantly updated as new file types arrive. */ - if (!strcasecmp (ptype, "wav")) { - filetype = LIBMTP_FILETYPE_WAV; - } else if (!strcasecmp (ptype, "mp3")) { - filetype = LIBMTP_FILETYPE_MP3; - } else if (!strcasecmp (ptype, "wma")) { - filetype = LIBMTP_FILETYPE_WMA; - } else if (!strcasecmp (ptype, "ogg")) { - filetype = LIBMTP_FILETYPE_OGG; - } else if (!strcasecmp (ptype, "mp4")) { - filetype = LIBMTP_FILETYPE_MP4; - } else if (!strcasecmp (ptype, "wmv")) { - filetype = LIBMTP_FILETYPE_WMV; - } else if (!strcasecmp (ptype, "avi")) { - filetype = LIBMTP_FILETYPE_AVI; - } else if (!strcasecmp (ptype, "mpeg") || !strcasecmp (ptype, "mpg")) { - filetype = LIBMTP_FILETYPE_MPEG; - } else if (!strcasecmp (ptype, "asf")) { - filetype = LIBMTP_FILETYPE_ASF; - } else if (!strcasecmp (ptype, "qt") || !strcasecmp (ptype, "mov")) { - filetype = LIBMTP_FILETYPE_QT; - } else if (!strcasecmp (ptype, "wma")) { - filetype = LIBMTP_FILETYPE_WMA; - } else if (!strcasecmp (ptype, "jpg") || !strcasecmp (ptype, "jpeg")) { - filetype = LIBMTP_FILETYPE_JPEG; - } else if (!strcasecmp (ptype, "jfif")) { - filetype = LIBMTP_FILETYPE_JFIF; - } else if (!strcasecmp (ptype, "tif") || !strcasecmp (ptype, "tiff")) { - filetype = LIBMTP_FILETYPE_TIFF; - } else if (!strcasecmp (ptype, "bmp")) { - filetype = LIBMTP_FILETYPE_BMP; - } else if (!strcasecmp (ptype, "gif")) { - filetype = LIBMTP_FILETYPE_GIF; - } else if (!strcasecmp (ptype, "pic") || !strcasecmp (ptype, "pict")) { - filetype = LIBMTP_FILETYPE_PICT; - } else if (!strcasecmp (ptype, "png")) { - filetype = LIBMTP_FILETYPE_PNG; - } else if (!strcasecmp (ptype, "wmf")) { - filetype = LIBMTP_FILETYPE_WINDOWSIMAGEFORMAT; - } else if (!strcasecmp (ptype, "ics")) { - filetype = LIBMTP_FILETYPE_VCALENDAR2; - } else if (!strcasecmp (ptype, "exe") || !strcasecmp (ptype, "com") || - !strcasecmp (ptype, "bat") || !strcasecmp (ptype, "dll") || - !strcasecmp (ptype, "sys")) { - filetype = LIBMTP_FILETYPE_WINEXEC; - } else if (!strcasecmp (ptype, "aac")) { - filetype = LIBMTP_FILETYPE_AAC; - } else if (!strcasecmp (ptype, "mp2")) { - filetype = LIBMTP_FILETYPE_MP2; - } else if (!strcasecmp (ptype, "flac")) { - filetype = LIBMTP_FILETYPE_FLAC; - } else if (!strcasecmp (ptype, "m4a")) { - filetype = LIBMTP_FILETYPE_M4A; - } else if (!strcasecmp (ptype, "doc")) { - filetype = LIBMTP_FILETYPE_DOC; - } else if (!strcasecmp (ptype, "xml")) { - filetype = LIBMTP_FILETYPE_XML; - } else if (!strcasecmp (ptype, "xls")) { - filetype = LIBMTP_FILETYPE_XLS; - } else if (!strcasecmp (ptype, "ppt")) { - filetype = LIBMTP_FILETYPE_PPT; - } else if (!strcasecmp (ptype, "mht")) { - filetype = LIBMTP_FILETYPE_MHT; - } else if (!strcasecmp (ptype, "jp2")) { - filetype = LIBMTP_FILETYPE_JP2; - } else if (!strcasecmp (ptype, "jpx")) { - filetype = LIBMTP_FILETYPE_JPX; - } else { - /* Tagging as unknown file type */ - filetype = LIBMTP_FILETYPE_UNKNOWN; - } - return filetype; + char *ptype = strrchr(filename,'.'); + unsigned int n; + + if (ptype != NULL) + { + /* Skip '.' char */ + ptype++; + + /* Seach entry in the table */ + for (n=0; n<sizeof(file_entries)/sizeof(file_entries[0]); n++) + { + if (!strcasecmp (ptype, file_entries[n].ptype)) + return file_entries[n].filetype; + } + } + + return LIBMTP_FILETYPE_UNKNOWN; }
View file
audacious-plugins-2.4.3.tgz/src/mtp_up/mtp.c -> audacious-plugins-2.4.4.tgz/src/mtp_up/mtp.c
Changed
@@ -316,7 +316,6 @@ aud_menu_plugin_item_add(AUDACIOUS_MENU_MAIN, mtp_root_menuitem); - aud_menu_plugin_item_add(AUDACIOUS_MENU_PLAYLIST_RCLICK, mtp_root_menuitem); g_signal_connect (G_OBJECT (mtp_submenu_item_up), "button_press_event",G_CALLBACK (mtp_press), NULL); g_signal_connect (G_OBJECT (mtp_submenu_item_free), "button_press_event",G_CALLBACK (free_device), NULL); @@ -356,9 +355,6 @@ g_print("The MTP mutex has been unlocked\n"); #endif aud_menu_plugin_item_remove(AUDACIOUS_MENU_MAIN, mtp_root_menuitem); - aud_menu_plugin_item_remove(AUDACIOUS_MENU_PLAYLIST_RCLICK, mtp_root_menuitem); - - gtk_widget_destroy(mtp_submenu_item_up); gtk_widget_destroy(mtp_submenu_item_up); gtk_widget_destroy(mtp_submenu_item_free);
View file
audacious-plugins-2.4.3.tgz/src/notify/libnotify-aosd_osd.c -> audacious-plugins-2.4.4.tgz/src/notify/libnotify-aosd_osd.c
Changed
@@ -22,6 +22,10 @@ #include <libnotify/notify.h> #include "libnotify-aosd_common.h" +#ifndef NOTIFY_CHECK_VERSION +#define NOTIFY_CHECK_VERSION(x,y,z) 0 +#endif + NotifyNotification *notification = NULL; gboolean osd_init() { @@ -55,7 +59,12 @@ GError *error = NULL; if(notification == NULL) { - notification = notify_notification_new(title, message, pb == NULL ? icon : NULL, NULL); + notification = notify_notification_new(title, message, pb == NULL ? icon : NULL +#if NOTIFY_CHECK_VERSION (0, 7, 0) + ); +#else + , NULL); +#endif g_signal_connect(notification, "closed", G_CALLBACK(osd_closed_handler), NULL); AUDDBG("new osd created! (notification=%p)\n", notification); } else {
View file
audacious-plugins-2.4.3.tgz/src/paranormal/libcalc/parser.c -> audacious-plugins-2.4.4.tgz/src/paranormal/libcalc/parser.c
Changed
@@ -1,30 +1,39 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* A Bison parser, made by GNU Bison 2.4.1. */ - This program is free software; you can redistribute it and/or modify +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -36,37 +45,30 @@ /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "2.4.1" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - - +/* Push parsers. */ +#define YYPUSH 0 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - NAME = 258, - NUMBER = 259, - NEG = 260 - }; -#endif -#define NAME 258 -#define NUMBER 259 -#define NEG 260 +/* Pull parsers. */ +#define YYPULL 1 +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ -#line 26 "parser.y" + +/* Line 189 of yacc.c */ +#line 26 "parser.yacc" #include <ctype.h> #include <glib.h> @@ -92,6 +94,9 @@ YYABORT; +/* Line 189 of yacc.c */ +#line 99 "parser.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -105,78 +110,230 @@ # define YYERROR_VERBOSE 0 #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 54 "parser.y" -typedef union YYSTYPE { +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + NAME = 258, + NUMBER = 259, + NEG = 260 + }; +#endif +/* Tokens. */ +#define NAME 258 +#define NUMBER 259 +#define NEG 260 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 214 of yacc.c */ +#line 52 "parser.yacc" + char *s_value; char c_value; double d_value; int i_value; + + + +/* Line 214 of yacc.c */ +#line 154 "parser.c" } YYSTYPE; -/* Line 191 of yacc.c. */ -#line 118 "parser.c" +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ +/* Line 264 of yacc.c */ +#line 59 "parser.yacc" + +int yyerror (char * s); +int yylex (YYSTYPE * yylval, void * yyparam); + -/* Line 214 of yacc.c. */ -#line 130 "parser.c" +/* Line 264 of yacc.c */ +#line 172 "parser.c" -#if ! defined (yyoverflow) || YYERROR_VERBOSE +#ifdef short +# undef short +#endif -# ifndef YYFREE -# define YYFREE free +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif # endif -# ifndef YYMALLOC -# define YYMALLOC malloc +# ifndef YY_ +# define YY_(msgid) msgid # endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# endif -# else -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif +# else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short int yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -184,24 +341,24 @@ /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ +# if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ - register YYSIZE_T yyi; \ + YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif @@ -210,48 +367,42 @@ elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (0) + while (YYID (0)) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 65 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 18 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 5 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 22 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 37 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 260 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -285,15 +436,15 @@ #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned char yyprhs[] = +static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 7, 8, 10, 13, 16, 18, 22, 24, 26, 30, 35, 39, 43, 47, 51, 55, 59, 62, 66 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = { 19, 0, -1, -1, 19, 20, -1, -1, 22, -1, 20, 12, -1, 1, 12, -1, 22, -1, 21, 13, @@ -305,17 +456,17 @@ }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned char yyrline[] = +static const yytype_uint8 yyrline[] = { - 0, 76, 76, 77, 81, 82, 84, 85, 90, 93, - 98, 104, 110, 116, 123, 125, 128, 130, 132, 134, - 136, 138, 140 + 0, 81, 81, 82, 86, 87, 89, 90, 95, 98, + 103, 109, 115, 121, 128, 130, 133, 135, 137, 139, + 141, 143, 145 }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "NAME", "NUMBER", "'='", "'-'", "'+'", @@ -327,7 +478,7 @@ # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 61, 45, 43, 42, 47, 260, 94, 59, 44, 40, 41, 62, 60 @@ -335,7 +486,7 @@ # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 18, 19, 19, 20, 20, 20, 20, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, @@ -343,7 +494,7 @@ }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 0, 1, 2, 2, 1, 3, 1, 1, 3, 4, 3, 3, 3, 3, 3, 3, @@ -353,7 +504,7 @@ /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned char yydefact[] = +static const yytype_uint8 yydefact[] = { 2, 0, 1, 0, 11, 10, 0, 0, 3, 5, 7, 0, 0, 20, 0, 6, 0, 0, 0, 0, @@ -361,8 +512,8 @@ 19, 21, 14, 15, 0, 13, 9 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { -1, 1, 8, 24, 9 }; @@ -370,7 +521,7 @@ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -10 -static const yysigned_char yypact[] = +static const yytype_int8 yypact[] = { -10, 17, -10, -8, 22, -10, 47, 47, -3, 38, -10, 47, 47, -9, 26, -10, 47, 47, 47, 47, @@ -379,7 +530,7 @@ }; /* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = +static const yytype_int8 yypgoto[] = { -10, -10, -10, -10, -6 }; @@ -389,7 +540,7 @@ number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -5 -static const yysigned_char yytable[] = +static const yytype_int8 yytable[] = { 13, 14, 20, 0, 10, 23, 25, 21, 22, 15, 27, 28, 29, 30, 31, 32, 33, 2, 3, 0, @@ -400,7 +551,7 @@ 0, 7, 0, 0, 21, 22 }; -static const yysigned_char yycheck[] = +static const yytype_int8 yycheck[] = { 6, 7, 11, -1, 12, 11, 12, 16, 17, 12, 16, 17, 18, 19, 20, 21, 22, 0, 1, -1, @@ -413,7 +564,7 @@ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +static const yytype_uint8 yystos[] = { 0, 19, 0, 1, 3, 4, 6, 14, 20, 22, 12, 5, 14, 22, 22, 12, 6, 7, 8, 9, @@ -421,22 +572,6 @@ 22, 22, 22, 22, 13, 15, 22 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -462,37 +597,68 @@ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { \ - yyerror ("syntax error: cannot back up");\ + { \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) #endif + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM -int yylex (YYSTYPE *yylval, void *yyparam); # define YYLEX yylex (&yylval, YYLEX_PARAM) #else -int yylex (YYSTYPE *yylval); # define YYLEX yylex (&yylval) #endif @@ -508,43 +674,100 @@ do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short int *bottom, short int *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -552,45 +775,52 @@ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (0) +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void -yy_reduce_print (yyrule) +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; int yyrule; #endif { + int yynrhs = yyr2[yyrule]; int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -605,13 +835,9 @@ if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -621,45 +847,47 @@ #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static char * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -669,109 +897,231 @@ # endif # endif -#endif /* !YYERROR_VERBOSE */ +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } - + if (! yyres) + return yystrlen (yystr); -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ + return yystpcpy (yyres, yystr) - yyres; +} +# endif -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + int yyn = yypact[yystate]; - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) { - default: - break; + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; } - YYFPRINTF (yyoutput, ")"); } +#endif /* YYERROR_VERBOSE */ + -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: - break; + break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); -# else +#else int yyparse (); -# endif +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ -int yyerror (char *s); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else @@ -781,72 +1131,78 @@ #endif #endif { - /* The lookahead symbol. */ +/* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Number of syntax errors so far. */ + int yynerrs; - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - register short int *yyssp; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; -#define YYPOPSTACK (yyvsp--, yyssp--) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -854,8 +1210,7 @@ `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -868,21 +1223,19 @@ #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; - + yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -890,24 +1243,23 @@ } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -918,7 +1270,6 @@ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -928,6 +1279,9 @@ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -935,12 +1289,10 @@ `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; @@ -962,7 +1314,7 @@ else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -979,25 +1331,20 @@ goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -1033,123 +1380,156 @@ switch (yyn) { case 5: -#line 83 "parser.y" - { ;} + +/* Line 1455 of yacc.c */ +#line 88 "parser.yacc" + { } break; case 7: -#line 86 "parser.y" - { yyerrok; ;} + +/* Line 1455 of yacc.c */ +#line 91 "parser.yacc" + { yyerrok; } break; case 8: -#line 91 "parser.y" + +/* Line 1455 of yacc.c */ +#line 96 "parser.yacc" { - ;} + } break; case 9: -#line 94 "parser.y" + +/* Line 1455 of yacc.c */ +#line 99 "parser.yacc" { - ;} + } break; case 10: -#line 99 "parser.y" - { - char *buf = g_strdup_printf ("c%f:", yyvsp[0].d_value); - GENERATE (buf); + +/* Line 1455 of yacc.c */ +#line 104 "parser.yacc" + { + char *buf = g_strdup_printf ("c%f:", (yyvsp[(1) - (1)].d_value)); + GENERATE (buf); g_free (buf); - ;} + } break; case 11: -#line 105 "parser.y" - { - char *buf = g_strdup_printf ("l%s:", yyvsp[0].s_value); - GENERATE (buf); + +/* Line 1455 of yacc.c */ +#line 110 "parser.yacc" + { + char *buf = g_strdup_printf ("l%s:", (yyvsp[(1) - (1)].s_value)); + GENERATE (buf); g_free (buf); - ;} + } break; case 12: -#line 111 "parser.y" - { - char *buf = g_strdup_printf ("s%s:", yyvsp[-2].s_value); - GENERATE (buf); + +/* Line 1455 of yacc.c */ +#line 116 "parser.yacc" + { + char *buf = g_strdup_printf ("s%s:", (yyvsp[(1) - (3)].s_value)); + GENERATE (buf); g_free (buf); - ;} + } break; case 13: -#line 117 "parser.y" + +/* Line 1455 of yacc.c */ +#line 122 "parser.yacc" { - char *buf = g_strdup_printf ("f%s:", yyvsp[-3].s_value); - GENERATE (buf); + char *buf = g_strdup_printf ("f%s:", (yyvsp[(1) - (4)].s_value)); + GENERATE (buf); g_free (buf); - ;} + } break; case 14: -#line 124 "parser.y" - { GENERATE (">"); ;} + +/* Line 1455 of yacc.c */ +#line 129 "parser.yacc" + { GENERATE (">"); } break; case 15: -#line 126 "parser.y" - { GENERATE ("<"); ;} + +/* Line 1455 of yacc.c */ +#line 131 "parser.yacc" + { GENERATE ("<"); } break; case 16: -#line 129 "parser.y" - { GENERATE ("+"); ;} + +/* Line 1455 of yacc.c */ +#line 134 "parser.yacc" + { GENERATE ("+"); } break; case 17: -#line 131 "parser.y" - { GENERATE ("-"); ;} + +/* Line 1455 of yacc.c */ +#line 136 "parser.yacc" + { GENERATE ("-"); } break; case 18: -#line 133 "parser.y" - { GENERATE ("*"); ;} + +/* Line 1455 of yacc.c */ +#line 138 "parser.yacc" + { GENERATE ("*"); } break; case 19: -#line 135 "parser.y" - { GENERATE ("/"); ;} + +/* Line 1455 of yacc.c */ +#line 140 "parser.yacc" + { GENERATE ("/"); } break; case 20: -#line 137 "parser.y" - { GENERATE ("n"); ;} + +/* Line 1455 of yacc.c */ +#line 142 "parser.yacc" + { GENERATE ("n"); } break; case 21: -#line 139 "parser.y" - { GENERATE ("^"); ;} + +/* Line 1455 of yacc.c */ +#line 144 "parser.yacc" + { GENERATE ("^"); } break; case 22: -#line 141 "parser.y" - { ;} - break; +/* Line 1455 of yacc.c */ +#line 146 "parser.yacc" + { } + break; - } -/* Line 1010 of yacc.c. */ -#line 1140 "parser.c" - - yyvsp -= yylen; - yyssp -= yylen; +/* Line 1455 of yacc.c */ +#line 1523 "parser.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1173,66 +1553,41 @@ if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } @@ -1243,25 +1598,16 @@ error, discard it. */ if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ + { + /* Return failure if at end of input. */ if (yychar == YYEOF) - for (;;) - { - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - } - } + YYABORT; + } else { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); + yydestruct ("Error: discarding", + yytoken, &yylval); yychar = YYEMPTY; - } } @@ -1275,15 +1621,17 @@ `---------------------------------------------------*/ yyerrorlab: -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) goto yyerrorlab; -#endif - yyvsp -= yylen; - yyssp -= yylen; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; @@ -1312,21 +1660,20 @@ if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - YYPOPSTACK; + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -1345,26 +1692,46 @@ yyresult = 1; goto yyreturn; -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } -#line 144 "parser.y" + +/* Line 1675 of yacc.c */ +#line 149 "parser.yacc" /* End of grammar */ @@ -1378,57 +1745,63 @@ int yylex (YYSTYPE *yylval, void *yyparam) { int c; parser_control *pc = (parser_control *) yyparam; - + /* Ignore whitespace, get first nonwhite character. */ while ((c = vfs_getc (pc->input)) == ' ' || c == '\t' || c == '\n'); - + /* End of input ? */ if (c == EOF) return 0; /* Char starts a number => parse the number. */ if (isdigit (c)) { - vfs_fseek (pc->input, -1, SEEK_CUR); /* Put the char back. */ + if (vfs_ungetc (c, pc->input) == EOF) + return 0; + { char *old_locale, *saved_locale; old_locale = setlocale (LC_ALL, NULL); saved_locale = g_strdup (old_locale); setlocale (LC_ALL, "C"); - sscanf ((const char*)((VFSBuffer *)(pc->input->handle))->iter, "%lf", &yylval->d_value); + sscanf ((gchar *) ((VFSBuffer *)(pc->input->handle))->iter, "%lf", & yylval->d_value); while (isdigit(c) || c == '.') { c = vfs_getc(pc->input); } - vfs_fseek(pc->input, -1, SEEK_CUR); + if (c != EOF && vfs_ungetc (c, pc->input) == EOF) + return 0; setlocale (LC_ALL, saved_locale); g_free (saved_locale); } return NUMBER; } - + /* Char starts an identifier => read the name. */ if (isalpha (c)) { GString *sym_name; sym_name = g_string_new (NULL); - + do { sym_name = g_string_append_c (sym_name, c); /* Get another character. */ c = vfs_getc (pc->input); } while (c != EOF && isalnum (c)); - - vfs_fseek (pc->input, -1, SEEK_CUR); + + if (c != EOF && vfs_ungetc (c, pc->input) == EOF) { + g_string_free (sym_name, FALSE); + return 0; + } yylval->s_value = sym_name->str; - + g_string_free (sym_name, FALSE); - + return NAME; } @@ -1451,7 +1824,7 @@ return count; } -static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, +static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, char *str) { char op; double dval; @@ -1496,7 +1869,7 @@ return TRUE; } - + expression_t *expr_compile_string (const char* str, symbol_dict_t *dict) { parser_control pc; @@ -1521,4 +1894,3 @@ return pc.expr; } -
View file
audacious-plugins-2.4.3.tgz/src/paranormal/libcalc/parser.yacc -> audacious-plugins-2.4.4.tgz/src/paranormal/libcalc/parser.yacc
Changed
@@ -16,7 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* suppress conflict warnings */ @@ -48,8 +48,6 @@ YYABORT; %} -%pure_parser - /* Data types. */ %union { char *s_value; @@ -58,17 +56,24 @@ int i_value; } -/* Terminal symbols. */ +%{ +int yyerror (char * s); +int yylex (YYSTYPE * yylval, void * yyparam); +%} + +%pure_parser + +/* Terminal symbols. */ %token <s_value> NAME %token <d_value> NUMBER -/* Precedence rules. */ +/* Precedence rules. */ %right '=' %left '-' '+' %left '*' '/' %left NEG %right '^' - + /* Grammar follows */ %% @@ -80,9 +85,9 @@ /* expression_list is a ';' separated list of expressions. */ expression_list: /* empty */ | expression - { } + { } | expression_list ';' - | error ';' + | error ';' { yyerrok; } /* argument list is a comma separated list od expressions */ @@ -93,30 +98,30 @@ | argument_list ',' expression { } - + /* expression is a C-like expression. */ expression: NUMBER - { + { char *buf = g_strdup_printf ("c%f:", $1); - GENERATE (buf); + GENERATE (buf); g_free (buf); } | NAME - { + { char *buf = g_strdup_printf ("l%s:", $1); - GENERATE (buf); + GENERATE (buf); g_free (buf); } | NAME '=' expression - { + { char *buf = g_strdup_printf ("s%s:", $1); - GENERATE (buf); + GENERATE (buf); g_free (buf); } | NAME '(' argument_list ')' { char *buf = g_strdup_printf ("f%s:", $1); - GENERATE (buf); + GENERATE (buf); g_free (buf); } @@ -154,57 +159,63 @@ int yylex (YYSTYPE *yylval, void *yyparam) { int c; parser_control *pc = (parser_control *) yyparam; - + /* Ignore whitespace, get first nonwhite character. */ while ((c = vfs_getc (pc->input)) == ' ' || c == '\t' || c == '\n'); - + /* End of input ? */ if (c == EOF) return 0; /* Char starts a number => parse the number. */ if (isdigit (c)) { - vfs_fseek (pc->input, -1, SEEK_CUR); /* Put the char back. */ + if (vfs_ungetc (c, pc->input) == EOF) + return 0; + { char *old_locale, *saved_locale; old_locale = setlocale (LC_ALL, NULL); saved_locale = g_strdup (old_locale); setlocale (LC_ALL, "C"); - sscanf (((VFSBuffer *)(pc->input->handle))->iter, "%lf", &yylval->d_value); + sscanf ((gchar *) ((VFSBuffer *)(pc->input->handle))->iter, "%lf", & yylval->d_value); while (isdigit(c) || c == '.') { c = vfs_getc(pc->input); } - vfs_fseek(pc->input, -1, SEEK_CUR); + if (c != EOF && vfs_ungetc (c, pc->input) == EOF) + return 0; setlocale (LC_ALL, saved_locale); g_free (saved_locale); } return NUMBER; } - + /* Char starts an identifier => read the name. */ if (isalpha (c)) { GString *sym_name; sym_name = g_string_new (NULL); - + do { sym_name = g_string_append_c (sym_name, c); /* Get another character. */ c = vfs_getc (pc->input); } while (c != EOF && isalnum (c)); - - vfs_fseek (pc->input, -1, SEEK_CUR); + + if (c != EOF && vfs_ungetc (c, pc->input) == EOF) { + g_string_free (sym_name, FALSE); + return 0; + } yylval->s_value = sym_name->str; - + g_string_free (sym_name, FALSE); - + return NAME; } @@ -227,7 +238,7 @@ return count; } -static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, +static gboolean expr_add_compile (expression_t *expr, symbol_dict_t *dict, char *str) { char op; double dval; @@ -272,7 +283,7 @@ return TRUE; } - + expression_t *expr_compile_string (const char* str, symbol_dict_t *dict) { parser_control pc;
View file
audacious-plugins-2.4.3.tgz/src/pls/util.c -> audacious-plugins-2.4.4.tgz/src/pls/util.c
Changed
@@ -72,9 +72,12 @@ unsigned char x[] = { 0xff, 0xfe, 0x00 }; g_return_val_if_fail(filename, NULL); - vfs_file_get_contents(filename, (void * *) &buffer, &filesize); - if (buffer == NULL) + + void * vbuf = NULL; + vfs_file_get_contents (filename, & vbuf, & filesize); + if (! vbuf) return NULL; + buffer = vbuf; /* * Convert UTF-16 into something useful. Original implementation
View file
audacious-plugins-2.4.3.tgz/src/psf/eng_psf.c -> audacious-plugins-2.4.4.tgz/src/psf/eng_psf.c
Changed
@@ -134,6 +134,9 @@ } lib_raw_length = tmp_length; + if (lib_raw_file == NULL) + return AO_FAIL; + if (corlett_decode(lib_raw_file, lib_raw_length, &lib_decoded, &lib_len, &lib) != AO_SUCCESS) { free(lib_raw_file);
View file
audacious-plugins-2.4.3.tgz/src/psf/plugin.c -> audacious-plugins-2.4.4.tgz/src/psf/plugin.c
Changed
@@ -96,6 +96,7 @@ return AO_SUCCESS; } +static GStaticMutex mutex = G_STATIC_MUTEX_INIT; static gint seek = 0; gboolean stop_flag = FALSE; @@ -181,10 +182,7 @@ continue; } else - { - data->output->close_audio(); break; - } } f->stop(); @@ -192,15 +190,17 @@ while (!stop_flag && data->output->buffer_playing()) g_usleep(10000); - data->output->close_audio(); - break; } + g_static_mutex_lock (& mutex); + stop_flag = TRUE; + data->output->close_audio (); + g_static_mutex_unlock (& mutex); + g_free(buffer); g_free(path); - stop_flag = TRUE; return ! error; } @@ -232,8 +232,13 @@ void psf2_Stop(InputPlayback *playback) { - stop_flag = TRUE; - playback->output->abort_write(); + g_static_mutex_lock (& mutex); + if (! stop_flag) + { + stop_flag = TRUE; + playback->output->abort_write (); + } + g_static_mutex_unlock (& mutex); } void psf2_pause(InputPlayback *playback, gshort pause) @@ -245,7 +250,8 @@ int psf2_is_our_fd(const gchar *filename, VFSFile *file) { uint8 magic[4]; - vfs_fread(magic, 1, 4, file); + if (vfs_fread(magic, 1, 4, file) < 4) + return FALSE; return (psf_probe(magic) != ENG_NONE); }
View file
audacious-plugins-2.4.3.tgz/src/pulse_audio/pulse_audio.c -> audacious-plugins-2.4.4.tgz/src/pulse_audio/pulse_audio.c
Changed
@@ -372,6 +372,8 @@ timing->timestamp.tv_sec) * 1000) + (int) ((now.tv_usec - timing->timestamp.tv_usec) / 1000); +#ifdef PA_CHECK_VERSION +#if PA_CHECK_VERSION (0, 9, 11) if (pa_stream_is_corked(stream)) { int delta = time - cached_time; @@ -379,9 +381,11 @@ time = cached_time; else cached_time = time; - } else { - cached_time = time; } + else +#endif +#endif + cached_time = time; fail: pa_threaded_mainloop_unlock(mainloop); @@ -542,12 +546,15 @@ break; #endif +#ifdef PA_SAMPLE_S32LE case FMT_S32_LE: ss.format = PA_SAMPLE_S32LE; break; case FMT_S32_BE: ss.format = PA_SAMPLE_S32BE; break; +#endif + case FMT_FLOAT: ss.format = PA_SAMPLE_FLOAT32NE; break;
View file
audacious-plugins-2.4.3.tgz/src/scrobbler/configure.c -> audacious-plugins-2.4.4.tgz/src/scrobbler/configure.c
Changed
@@ -19,6 +19,10 @@ #include "plugin.h" +#if ! GLIB_CHECK_VERSION (2, 14, 0) +#define g_timeout_add_seconds(s, f, d) g_timeout_add (1000 * (s), (f), (d)) +#endif + GtkWidget *entry1, *entry2, *entry3, *cfgdlg; static GdkColor disabled_color; guint apply_timeout = 0; /* ID of timeout to save new config */
View file
audacious-plugins-2.4.3.tgz/src/scrobbler/plugin.c -> audacious-plugins-2.4.4.tgz/src/scrobbler/plugin.c
Changed
@@ -31,6 +31,10 @@ #include "scrobbler.h" #include "fmt.h" +#if ! GLIB_CHECK_VERSION (2, 14, 0) +#define g_timeout_add_seconds(s, f, d) g_timeout_add (1000 * (s), (f), (d)) +#endif + typedef struct submit_t { int dosubmit, pos_c, len;
View file
audacious-plugins-2.4.3.tgz/src/sid/xs_length.c -> audacious-plugins-2.4.4.tgz/src/sid/xs_length.c
Changed
@@ -1,8 +1,8 @@ -/* +/* XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) Get song length from SLDB for PSID/RSID files - + Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org> (C) Copyright 1999-2009 Tecnic Software productions (TNSP) @@ -121,7 +121,7 @@ sscanf(&inLine[linePos], "%2x", &tmpu); tmnode->md5Hash[i] = tmpu; } - + /* Get playtimes */ if (inLine[linePos] != 0) { if (inLine[linePos] != '=') { @@ -130,12 +130,12 @@ return NULL; } else { size_t tmpLen, savePos; - + /* First playtime is after '=' */ savePos = ++linePos; tmpLen = strlen(inLine); - - /* Get number of sub-tune lengths */ + + /* Get number of sub-tune lengths */ isOK = TRUE; while ((linePos < tmpLen) && isOK) { xs_findnext(inLine, &linePos); @@ -145,7 +145,7 @@ else isOK = FALSE; } - + /* Allocate memory for lengths */ if (tmnode->nlengths > 0) { tmnode->lengths = (gint *) g_malloc0(tmnode->nlengths * sizeof(gint)); @@ -158,14 +158,14 @@ xs_sldb_node_free(tmnode); return NULL; } - + /* Read lengths in */ i = 0; linePos = savePos; isOK = TRUE; while ((linePos < tmpLen) && (i < tmnode->nlengths) && isOK) { gint l; - + xs_findnext(inLine, &linePos); l = xs_sldb_gettime(inLine, &linePos); @@ -211,7 +211,7 @@ while (fgets(inLine, XS_BUF_SIZE, inFile) != NULL) { size_t linePos = 0; lineNum++; - + xs_findnext(inLine, &linePos); /* Check if it is datafield */ @@ -390,7 +390,11 @@ return -1; /* Read PSID header in */ - xs_fread(psidH.magicID, sizeof(psidH.magicID), 1, inFile); + if (xs_fread(psidH.magicID, 1, sizeof psidH.magicID, inFile) < sizeof psidH.magicID) { + xs_fclose(inFile); + return -1; + } + if (strncmp(psidH.magicID, "PSID", 4) && strncmp(psidH.magicID, "RSID", 4)) { xs_fclose(inFile); xs_error("Not a PSID or RSID file '%s'\n", filename); @@ -406,19 +410,17 @@ psidH.startSong = xs_fread_be16(inFile); psidH.speed = xs_fread_be32(inFile); - xs_fread(psidH.sidName, sizeof(gchar), sizeof(psidH.sidName), inFile); - xs_fread(psidH.sidAuthor, sizeof(gchar), sizeof(psidH.sidAuthor), inFile); - xs_fread(psidH.sidCopyright, sizeof(gchar), sizeof(psidH.sidCopyright), inFile); - - if (xs_feof(inFile) || xs_ferror(inFile)) { + if (xs_fread(psidH.sidName, 1, sizeof psidH.sidName, inFile) < sizeof psidH.sidName + || xs_fread(psidH.sidAuthor, 1, sizeof psidH.sidAuthor, inFile) < sizeof psidH.sidAuthor + || xs_fread(psidH.sidCopyright, 1, sizeof psidH.sidCopyright, inFile) < sizeof psidH.sidCopyright) { xs_fclose(inFile); xs_error("Error reading SID file header from '%s'\n", filename); return -4; } - + /* Check if we need to load PSIDv2NG header ... */ psidH2.flags = 0; /* Just silence a stupid gcc warning */ - + if (psidH.version == 2) { /* Yes, we need to */ psidH2.flags = xs_fread_be16(inFile); @@ -507,7 +509,7 @@ key = &keyItem; item = bsearch(&key, db->pindex, db->n, sizeof(db->pindex[0]), xs_sldb_cmp); - + if (item) return *item; else
View file
audacious-plugins-2.4.3.tgz/src/sid/xs_support.c -> audacious-plugins-2.4.4.tgz/src/sid/xs_support.c
Changed
@@ -1,8 +1,8 @@ -/* +/* XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) Miscellaneous support functions - + Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org> (C) Copyright 1999-2007 Tecnic Software productions (TNSP) @@ -23,6 +23,7 @@ #include "xs_support.h" #include <ctype.h> +#define __AUDACIOUS_NEWVFS__ guint16 xs_fread_be16(xs_file_t *f) { @@ -45,7 +46,7 @@ { xs_file_t *f; glong seekPos; - + /* Open file, get file size */ if ((f = xs_fopen(filename, "rb")) == NULL) return -1; @@ -56,7 +57,7 @@ xs_fseek(f, 0L, SEEK_END); seekPos = xs_ftell(f); #endif - + if (seekPos > 0) { size_t readSize = seekPos; if (readSize >= *bufSize || *buf == NULL) { @@ -65,21 +66,24 @@ g_free(*buf); *buf = NULL; } - + *bufSize = seekPos; - + *buf = (guint8 *) g_malloc(*bufSize * sizeof(guint8)); if (*buf == NULL) { xs_fclose(f); return -2; } } - - /* Read data */ - xs_fseek(f, 0, SEEK_SET); - readSize = xs_fread(*buf, sizeof(guint8), *bufSize, f); + + /* Read data */ + if (xs_fseek(f, 0, SEEK_SET)) + readSize = 0; + else + readSize = xs_fread(*buf, 1, *bufSize, f); + xs_fclose(f); - + if (readSize != *bufSize) return -3; else
View file
audacious-plugins-2.4.3.tgz/src/skins/ui_equalizer.c -> audacious-plugins-2.4.4.tgz/src/skins/ui_equalizer.c
Changed
@@ -900,8 +900,7 @@ vfs_fclose(file); } -static void -save_winamp_file(const gchar * filename) +static gboolean save_winamp_file (const gchar * filename) { VFSFile *file; @@ -910,21 +909,31 @@ guchar bands[11]; if (!(file = open_vfs_file(filename, "wb"))) - return; + return FALSE; - vfs_fwrite("Winamp EQ library file v1.1\x1a!--", 1, 31, file); + if (vfs_fwrite ("Winamp EQ library file v1.1\x1a!--", 1, 31, file) != 31) + goto ERR; memset(name, 0, 257); g_strlcpy(name, "Entry1", 257); - vfs_fwrite(name, 1, 257, file); + + if (vfs_fwrite (name, 1, 257, file) != 257) + goto ERR; for (i = 0; i < AUD_EQUALIZER_NBANDS; i++) bands[i] = 63 - (((equalizerwin_get_band(i) + EQUALIZER_MAX_GAIN) * 63) / EQUALIZER_MAX_GAIN / 2); bands[AUD_EQUALIZER_NBANDS] = 63 - (((equalizerwin_get_preamp() + EQUALIZER_MAX_GAIN) * 63) / EQUALIZER_MAX_GAIN / 2); - vfs_fwrite(bands, 1, 11, file); - vfs_fclose(file); + if (vfs_fwrite (bands, 1, 11, file) != 11) + goto ERR; + + vfs_fclose (file); + return TRUE; + +ERR: + vfs_fclose (file); + return FALSE; } static GtkWidget *
View file
audacious-plugins-2.4.3.tgz/src/skins/ui_skin.c -> audacious-plugins-2.4.4.tgz/src/skins/ui_skin.c
Changed
@@ -31,6 +31,7 @@ /* TODO: enforce default sizes! */ #include <glib.h> +#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -1469,17 +1470,18 @@ /* the way GTK does things can be very broken. --nenolod */ - gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(), - basename(skin->path)); + gchar path[PATH_MAX]; - gchar *troot = g_strdup_printf("%s/.themes", g_get_home_dir()); - g_mkdir_with_parents(troot, 0755); - g_free(troot); + snprintf (path, sizeof path, "%s/.themes", g_get_home_dir ()); + g_mkdir_with_parents (path, 0755); - symlink(skin->path, tmp); - gtk_settings_set_string_property(settings, "gtk-theme-name", - basename(tmp), "audacious"); - g_free(tmp); + snprintf (path, sizeof path, "%s/.themes/aud-%s", g_get_home_dir (), basename + (skin->path)); + if (! g_file_test (path, G_FILE_TEST_EXISTS) && symlink (skin->path, path)) + fprintf (stderr, "Failed to create symlink %s.\n", path); + + gtk_settings_set_string_property (settings, "gtk-theme-name", basename + (path), "audacious"); } /**
View file
audacious-plugins-2.4.3.tgz/src/skins/util.c -> audacious-plugins-2.4.4.tgz/src/skins/util.c
Changed
@@ -454,9 +454,12 @@ unsigned char x[] = { 0xff, 0xfe, 0x00 }; g_return_val_if_fail(filename, NULL); - vfs_file_get_contents(filename, (void * *) &buffer, &filesize); - if (buffer == NULL) + + void * vbuf = NULL; + vfs_file_get_contents (filename, & vbuf, & filesize); + if (! vbuf) return NULL; + buffer = vbuf; /* * Convert UTF-16 into something useful. Original implementation
View file
audacious-plugins-2.4.3.tgz/src/streambrowser/gui/streambrowser_win.c -> audacious-plugins-2.4.4.tgz/src/streambrowser/gui/streambrowser_win.c
Changed
@@ -298,7 +298,9 @@ gtk_tree_view_set_model(GTK_TREE_VIEW(tree_view), GTK_TREE_MODEL(store)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), TRUE); +#if GTK_CHECK_VERSION (2, 10, 0) gtk_tree_view_set_search_entry(GTK_TREE_VIEW(tree_view), GTK_ENTRY(search_entry)); +#endif gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(tree_view), tree_view_search_equal_func, NULL, NULL); gtk_tree_view_set_search_column(GTK_TREE_VIEW(tree_view), 1); g_signal_connect(G_OBJECT(tree_view), "key-press-event", G_CALLBACK(on_tree_view_key_pressed), NULL);
View file
audacious-plugins-2.4.3.tgz/src/streambrowser/xiph.c -> audacious-plugins-2.4.4.tgz/src/streambrowser/xiph.c
Changed
@@ -283,17 +283,21 @@ static gboolean genre_match (gchar * string1, gchar * string2) { - gchar *saveptr = NULL, *token; + gchar **genres = g_strsplit (string1, " ", -1); gboolean matched = FALSE; - gchar *temp1 = g_strdup (string1), *temp2 = g_strdup (string2); + gint n; - token = strtok_r (temp1, " ", &saveptr); - while (token != NULL) + if (genres != NULL) { - if (mystrcasestr (temp2, token)) - matched = TRUE; - - token = strtok_r (NULL, " ", &saveptr); + for (n = 0; genres[n] != NULL; n++) + { + if (mystrcasestr (string2, genres[n])) + { + matched = TRUE; + break; + } + } + g_strfreev (genres); } return matched;
View file
audacious-plugins-2.4.3.tgz/src/vtx/vtx.c -> audacious-plugins-2.4.4.tgz/src/vtx/vtx.c
Changed
@@ -70,8 +70,8 @@ vtx_is_our_fd (const gchar *filename, VFSFile *fp) { char buf[2]; - - vfs_fread (buf, 2, 1, fp); + if (vfs_fread(buf, 1, 2, fp) < 2) + return FALSE; return (!strncasecmp (buf, "ay", 2) || !strncasecmp (buf, "ym", 2)); }
View file
audacious-plugins-2.4.3.tgz/src/wavpack/wavpack.c -> audacious-plugins-2.4.4.tgz/src/wavpack/wavpack.c
Changed
@@ -345,10 +345,10 @@ AUDDBG("starting probe of %p\n", fd); - vfs_fseek(fd, 0, SEEK_SET); - tu = tuple_new_from_filename(filename); + if (vfs_fseek (fd, 0, SEEK_SET)) + return NULL; - vfs_fseek(fd, 0, SEEK_SET); + tu = tuple_new_from_filename(filename); tag_tuple_read(tu, fd); tuple_associate_int(tu, FIELD_LENGTH, NULL,
View file
audacious-plugins-2.4.3.tgz/src/xsf/plugin.c -> audacious-plugins-2.4.4.tgz/src/xsf/plugin.c
Changed
@@ -248,7 +248,8 @@ gint xsf_is_our_fd(const gchar *filename, VFSFile *file) { gchar magic[4]; - vfs_fread(magic, 1, 4, file); + if (vfs_fread(magic, 1, 4, file) < 4) + return FALSE; if (!memcmp(magic, "PSF$", 4)) return 1;
View file
audacious-plugins-2.4.3.tgz/src/xsf/vio2sf.c -> audacious-plugins-2.4.4.tgz/src/xsf/vio2sf.c
Changed
@@ -1,3 +1,4 @@ +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -41,7 +42,7 @@ } static int load_map(int issave, unsigned char *udata, unsigned usize) -{ +{ unsigned char *iptr; unsigned isize; unsigned char *xptr; @@ -246,7 +247,7 @@ } else { - if (!load_libs(pwork->level + 1, libbuf, libsize) || !load_psf_one(libbuf, libsize)) + if (!load_libs(pwork->level + 1, libbuf, libsize) || !load_psf_one(libbuf, libsize)) ret = xsf_tagenum_callback_returnvaluebreak; else { @@ -521,7 +522,7 @@ load_getu8 (ARM9Mem.MAIN_MEM, 0x400000); load_getu8 (ARM9Mem.ARM9_REG, 0x10000); load_getu8 (ARM9Mem.ARM9_VMEM, 0x800); - load_getu8 (ARM9Mem.ARM9_OAM, 0x800); + load_getu8 (ARM9Mem.ARM9_OAM, 0x800); load_getu8 (ARM9Mem.ARM9_ABG, 0x80000); load_getu8 (ARM9Mem.ARM9_BBG, 0x20000); load_getu8 (ARM9Mem.ARM9_AOBJ, 0x40000); @@ -574,7 +575,7 @@ sndifwork.pcmbufalloc = malloc(bufferbytes + 3); if (!sndifwork.pcmbufalloc) return -1; - sndifwork.pcmbuftop = sndifwork.pcmbufalloc + ((4 - (((int)sndifwork.pcmbufalloc) & 3)) & 3); + sndifwork.pcmbuftop = (void *) (((uintptr_t) sndifwork.pcmbufalloc + 3) & ~3); sndifwork.bufferbytes = bufferbytes; sndifwork.filled = 0; sndifwork.used = 0; @@ -634,7 +635,7 @@ sndifwork.sync_type = xsf_tagget_int("_vio2sf_sync_type", pfile, bytes, 0); sndifwork.arm9_clockdown_level = xsf_tagget_int("_vio2sf_arm9_clockdown_level", pfile, bytes, clockdown); sndifwork.arm7_clockdown_level = xsf_tagget_int("_vio2sf_arm7_clockdown_level", pfile, bytes, clockdown); - + sndifwork.xfs_load = 0; printf("load_psf... "); if (!load_psf(pfile, bytes))
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.