Hello community,
here is the log from the commit of package libmodplug for openSUSE:Factory
checked in at Thu Aug 11 09:58:31 CEST 2011.
--------
--- libmodplug/libmodplug.changes 2011-05-25 16:29:02.000000000 +0200
+++ /mounts/work_src_done/STABLE/libmodplug/libmodplug.changes 2011-08-08 20:47:12.000000000 +0200
@@ -1,0 +2,13 @@
+Mon Aug 8 20:08:13 CEST 2011 - sbrabec@suse.cz
+
+- Update to version 0.8.8.4 (bnc#710726):
+ * Improve timidity.cfg parsing capability
+ * Add source command capability in timidity.cfg
+ (useful for debian default)
+ * Fix integer overflow in WAV reader (SA45131/A)
+ * Fix S3M stack overflow possibility (SA45131/B)
+ * Bound seeking and reading in PAT files
+ * Fix AMS/AMSv2 and DSM too large by one (SA45131/C)
+ * Use bmpvalues in Octamed files when calcuting default tempo
+
+-------------------------------------------------------------------
@@ -5,0 +19,4 @@
+ * Improve compatibility with MSVC 2010
+ * Improve PTM playback (Fix byteswapping)
+ * Improve S3M support (ignore corrupted data, bnc#686624)
+ * Improve AMF support (bounds checking)
calling whatdependson for head-i586
Old:
----
_service:recompress:download_url:libmodplug-0.8.8.3.tar.bz2
New:
----
_service:recompress:download_url:libmodplug-0.8.8.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _service:set_version:libmodplug.spec ++++++
--- /var/tmp/diff_new_pack.jfSHV5/_old 2011-08-11 09:57:34.000000000 +0200
+++ /var/tmp/diff_new_pack.jfSHV5/_new 2011-08-11 09:57:34.000000000 +0200
@@ -20,7 +20,7 @@
Name: libmodplug
Summary: A MOD playing library
-Version: 0.8.8.3
+Version: 0.8.8.4
Release: 0
Group: System/Libraries
License: Public Domain
++++++ libmodplug.spec ++++++
--- /var/tmp/diff_new_pack.jfSHV5/_old 2011-08-11 09:57:34.000000000 +0200
+++ /var/tmp/diff_new_pack.jfSHV5/_new 2011-08-11 09:57:34.000000000 +0200
@@ -21,7 +21,7 @@
Name: libmodplug
Summary: A MOD playing library
Version: to_be_filled_by_service
-Release: 4
+Release: 5
Group: System/Libraries
License: Public Domain
Url: http://modplug-xmms.sourceforge.net
++++++ _service ++++++
--- /var/tmp/diff_new_pack.jfSHV5/_old 2011-08-11 09:57:34.000000000 +0200
+++ /var/tmp/diff_new_pack.jfSHV5/_new 2011-08-11 09:57:34.000000000 +0200
@@ -3,12 +3,12 @@
<service name="download_url">
<param name="protocol">http</param>
<param name="host">downloads.sourceforge.net</param>
- <param name="path">/project/modplug-xmms/libmodplug/0.8.8.3/libmodplug-0.8.8.3.tar.gz</param>
+ <param name="path">/project/modplug-xmms/libmodplug/0.8.8.4/libmodplug-0.8.8.4.tar.gz</param>
</service>
<service name="verify_file">
- <param name="file">_service:download_url:libmodplug-0.8.8.3.tar.gz</param>
+ <param name="file">_service:download_url:libmodplug-0.8.8.4.tar.gz</param>
<param name="verifier">sha256</param>
- <param name="checksum">0d52a259e85c4f50491d66128d7c476bc67a44d3930b965014954289c0c3f4a5</param>
+ <param name="checksum">5c5ee13dddbed144be26276e5f102da17ff5b1c992f3100389983082da2264f7</param>
</service>
<service name="recompress">
<param name="file">*.gz</param>
++++++ _service:recompress:download_url:libmodplug-0.8.8.3.tar.bz2 -> _service:recompress:download_url:libmodplug-0.8.8.4.tar.bz2 ++++++
++++ 12863 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/INSTALL new/libmodplug-0.8.8.4/INSTALL
--- old/libmodplug-0.8.8.3/INSTALL 2009-05-10 05:05:27.000000000 +0200
+++ new/libmodplug-0.8.8.4/INSTALL 2011-07-17 14:52:38.000000000 +0200
@@ -1,3 +1,365 @@
-(1) ./configure
-(2) make
-(3) su -c "make install"
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/configure.in new/libmodplug-0.8.8.4/configure.in
--- old/libmodplug-0.8.8.3/configure.in 2011-05-08 15:42:58.000000000 +0200
+++ new/libmodplug-0.8.8.4/configure.in 2011-07-18 01:55:51.000000000 +0200
@@ -3,7 +3,7 @@
AC_PREREQ(2.63)
AC_CONFIG_SRCDIR([Makefile.am])
-AM_INIT_AUTOMAKE(libmodplug, 0.8.8.3)
+AM_INIT_AUTOMAKE(libmodplug, 0.8.8.4)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AC_CONFIG_HEADERS([src/config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/missing new/libmodplug-0.8.8.4/missing
--- old/libmodplug-0.8.8.3/missing 2009-05-10 05:05:27.000000000 +0200
+++ new/libmodplug-0.8.8.4/missing 2011-07-17 14:52:38.000000000 +0200
@@ -1,6 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
@@ -14,9 +18,7 @@
# 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., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# along with this program. If not, see http://www.gnu.org/licenses/.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -29,6 +31,8 @@
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -38,18 +42,24 @@
configure_ac=configure.in
fi
-case "$1" in
+msg="missing on your system"
+
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -67,6 +77,7 @@
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -74,11 +85,18 @@
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to ."
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.4 - GNU automake"
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
;;
-*)
@@ -87,42 +105,69 @@
exit 1
;;
- aclocal*)
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
- autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autoconf*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
- autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autoheader*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@@ -130,7 +175,7 @@
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -140,13 +185,8 @@
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@@ -155,21 +195,16 @@
while read f; do touch "$f"; done
;;
- autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autom4te*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
proper tools for further handling them.
- You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -183,111 +218,108 @@
fi
;;
- bison|yacc)
+ bison*|yacc*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
- lex|flex)
+ lex*|flex*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
- help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ help2man*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
- exit 1
+ exit $?
fi
;;
- makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
+ makeinfo*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
touch $file
;;
- tar)
+ tar*)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -300,13 +332,13 @@
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
@@ -323,10 +355,10 @@
*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
+ it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
@@ -334,3 +366,11 @@
esac
exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/src/load_ams.cpp new/libmodplug-0.8.8.4/src/load_ams.cpp
--- old/libmodplug-0.8.8.3/src/load_ams.cpp 2009-05-10 05:05:27.000000000 +0200
+++ new/libmodplug-0.8.8.4/src/load_ams.cpp 2011-07-25 00:21:24.000000000 +0200
@@ -52,7 +52,7 @@
if ((!lpStream) || (dwMemLength < 1024)) return FALSE;
if ((pfh->verhi != 0x01) || (strncmp(pfh->szHeader, "Extreme", 7))
- || (!pfh->patterns) || (!pfh->orders) || (!pfh->samples) || (pfh->samples > MAX_SAMPLES)
+ || (!pfh->patterns) || (!pfh->orders) || (!pfh->samples) || (pfh->samples >= MAX_SAMPLES)
|| (pfh->patterns > MAX_PATTERNS) || (pfh->orders > MAX_ORDERS))
{
return ReadAMS2(lpStream, dwMemLength);
@@ -321,7 +321,7 @@
dwMemPos = pfh->titlelen + 8;
psh = (AMS2SONGHEADER *)(lpStream + dwMemPos);
if (((psh->version & 0xFF00) != 0x0200) || (!psh->instruments)
- || (psh->instruments > MAX_INSTRUMENTS) || (!psh->patterns) || (!psh->orders)) return FALSE;
+ || (psh->instruments >= MAX_INSTRUMENTS) || (!psh->patterns) || (!psh->orders)) return FALSE;
dwMemPos += sizeof(AMS2SONGHEADER);
if (pfh->titlelen)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/src/load_dsm.cpp new/libmodplug-0.8.8.4/src/load_dsm.cpp
--- old/libmodplug-0.8.8.3/src/load_dsm.cpp 2009-05-10 05:05:27.000000000 +0200
+++ new/libmodplug-0.8.8.4/src/load_dsm.cpp 2011-07-19 15:19:56.000000000 +0200
@@ -101,7 +101,7 @@
if (m_nChannels < 4) m_nChannels = 4;
if (m_nChannels > 16) m_nChannels = 16;
m_nSamples = psong->numsmp;
- if (m_nSamples > MAX_SAMPLES) m_nSamples = MAX_SAMPLES;
+ if (m_nSamples >= MAX_SAMPLES) m_nSamples = MAX_SAMPLES - 1;
m_nDefaultSpeed = psong->speed;
m_nDefaultTempo = psong->bpm;
m_nDefaultGlobalVolume = psong->globalvol << 2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/src/load_med.cpp new/libmodplug-0.8.8.4/src/load_med.cpp
--- old/libmodplug-0.8.8.3/src/load_med.cpp 2011-05-01 05:34:21.000000000 +0200
+++ new/libmodplug-0.8.8.4/src/load_med.cpp 2011-08-04 13:58:55.000000000 +0200
@@ -16,6 +16,10 @@
//////////////////////////////////////////////////////////
// OctaMed MED file support (import only)
+//
+// Lookup table for bpm values.
+static const BYTE bpmvals[10] = { 179,164,152,141,131,123,116,110,104,99 };
+
// flags
#define MMD_FLAG_FILTERON 0x1
@@ -265,8 +269,6 @@
static void MedConvert(MODCOMMAND *p, const MMD0SONGHEADER *pmsh)
//---------------------------------------------------------------
{
- const BYTE bpmvals[9] = { 179,164,152,141,131,123,116,110,104};
-
UINT command = p->command;
UINT param = p->param;
switch(command)
@@ -587,7 +589,12 @@
#endif
} else
{
- deftempo = _muldiv(deftempo, 5*715909, 2*474326);
+ if (pmsh->flags & MMD_FLAG_8CHANNEL && deftempo > 0 && deftempo <= 10)
+ {
+ deftempo = bpmvals[deftempo-1];
+ } else {
+ deftempo = _muldiv(deftempo, 5*715909, 2*474326);
+ }
#ifdef MED_LOG
Log("oldtempo: %3d bpm (bpm=%3d)\n", deftempo, bswapBE16(pmsh->deftempo));
#endif
@@ -684,11 +691,11 @@
if (pmex)
{
// Channel Split
- if ((m_nChannels == 4) && (pmsh->flags & 0x40))
+ if ((m_nChannels == 4) && (pmsh->flags & MMD_FLAG_8CHANNEL))
{
for (UINT i8ch=0; i8ch<4; i8ch++)
{
- if (pmex->channelsplit[i8ch]) m_nChannels++;
+ if (pmex->channelsplit[i8ch]) --m_nChannels;
}
}
// Song Comments
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/src/load_pat.cpp new/libmodplug-0.8.8.4/src/load_pat.cpp
--- old/libmodplug-0.8.8.3/src/load_pat.cpp 2011-05-08 16:44:04.000000000 +0200
+++ new/libmodplug-0.8.8.4/src/load_pat.cpp 2011-07-25 00:17:40.000000000 +0200
@@ -67,7 +67,6 @@
// 128 gm and 63 drum
#define MAXSMP 191
-static int isabspath = 0;
static char midipat[MAXSMP][128];
static char pathforpat[128];
static char timiditycfg[128];
@@ -323,6 +322,7 @@
char *mm;
int sz;
int pos;
+ int error;
} MMFILE;
static long mmftell(MMFILE *mmfile)
@@ -332,38 +332,60 @@
static void mmfseek(MMFILE *mmfile, long p, int whence)
{
+ int newpos = mmfile->pos;
switch(whence) {
case SEEK_SET:
- mmfile->pos = p;
+ newpos = p;
break;
case SEEK_CUR:
- mmfile->pos += p;
+ newpos += p;
break;
case SEEK_END:
- mmfile->pos = mmfile->sz + p;
+ newpos = mmfile->sz + p;
break;
}
+ if (newpos < mmfile->sz)
+ mmfile->pos = newpos;
+ else {
+ mmfile->error = 1;
+// printf("WARNING: seeking too far\n");
+ }
}
static void mmreadUBYTES(BYTE *buf, long sz, MMFILE *mmfile)
{
+ // do not overread.
+ if (sz > mmfile->sz - mmfile->pos)
+ sz = mmfile->sz - mmfile->pos;
memcpy(buf, &mmfile->mm[mmfile->pos], sz);
mmfile->pos += sz;
}
static void mmreadSBYTES(char *buf, long sz, MMFILE *mmfile)
{
+ // do not overread.
+ if (sz > mmfile->sz - mmfile->pos)
+ sz = mmfile->sz - mmfile->pos;
memcpy(buf, &mmfile->mm[mmfile->pos], sz);
mmfile->pos += sz;
}
#endif
+long _mm_getfsize(MMSTREAM *mmpat) {
+ long fsize;
+ _mm_fseek(mmpat, 0L, SEEK_END);
+ fsize = _mm_ftell(mmpat);
+ _mm_fseek(mmpat, 0L, SEEK_SET);
+ return(fsize);
+}
+
void pat_init_patnames(void)
{
- int i,j, pfnlen, ndir;
+ int z, i, nsources, isdrumset, nskip, pfnlen;
char *p, *q;
char line[PATH_MAX];
+ char cfgsources[5][PATH_MAX] = {{0}, {0}, {0}, {0}, {0}};
MMSTREAM *mmcfg;
strcpy(pathforpat, PATHFORPAT);
strcpy(timiditycfg, TIMIDITYCFG);
@@ -374,69 +396,88 @@
strcat(timiditycfg,"/timidity.cfg");
strcat(pathforpat,"/instruments");
}
- mmcfg = _mm_fopen(timiditycfg,"r");
+ strncpy(cfgsources[0], timiditycfg, PATH_MAX);
+ nsources = 1;
+
for( i=0; i= 0 ) {
- p = strchr(line,'/') + 1;
- if(j)
- q = midipat[pat_gm_drumnr(i)-1];
- else
- q = midipat[i];
+
+ for ( z=0; z<5; z++ ) {
+ if (cfgsources[z][0] == 0) continue;
+ mmcfg = _mm_fopen(cfgsources[z],"r");
+ if( !mmcfg ) {
+ pat_message("can not open %s, use environment variable " PAT_ENV_PATH2CFG " for the directory", cfgsources[z]);
+ }
+ else {
+ // read in bank 0 and drum patches
+ isdrumset = 0;
+ _mm_fgets(mmcfg, line, PATH_MAX);
+ while( !_mm_feof(mmcfg) ) {
+ if( isdigit(line[0]) || (isblank(line[0]) && isdigit(line[1])) ) {
+ p = line;
+ // get pat number
+ while ( isspace(*p) ) p ++;
+ i = atoi(p);
+ while ( isdigit(*p) ) p ++;
+ while ( isspace(*p) ) p ++;
+ // get pat file name
+ if( *p && i < MAXSMP && i >= 0 && *p != '#' ) {
+ q = isdrumset ? midipat[pat_gm_drumnr(i)-1] : midipat[i];
pfnlen = 0;
- ndir = 0;
- while( *p && !isspace(*p) && pfnlen < 128 ) {
- if (*p == DIRDELIM) ndir++;
+ while( *p && !isspace(*p) && *p != '#' && pfnlen < 128 ) {
pfnlen ++;
*q++ = *p++;
}
- if (ndir > 2) isabspath = 1;
if( isblank(*p) && *(p+1) != '#' && pfnlen < 128 ) {
- *q++ = ':';
+ *q++ = ':'; pfnlen ++;
while( isspace(*p) ) {
while( isspace(*p) ) p++;
if ( *p == '#' ) { // comment
-
+
} else while( *p && !isspace(*p) && pfnlen < 128 ) {
pfnlen ++;
*q++ = *p++;
}
- if( isspace(*p) ) *q++ = ' ';
+ if( isspace(*p) ) { *q++ = ' '; pfnlen++; }
}
}
*q++ = '\0';
}
}
- if( !strncmp(line,"drumset",7) ) j = 1;
+ if( !strncmp(line,"drumset",7) ) isdrumset = 1;
+ if( !strncmp(line,"source",6) && nsources < 5 ) {
+ q = cfgsources[nsources];
+ p = &line[7];
+ while ( isspace(*p) ) p ++;
+ pfnlen = 0;
+ while ( *p && *p != '#' && !isspace(*p) && pfnlen < 128 ) {
+ pfnlen ++;
+ *q++ = *p++;
+ }
+ *q = 0; // null termination
+ nsources++;
+ }
_mm_fgets(mmcfg, line, PATH_MAX);
+
+ } /* end file parsing */
+ _mm_fclose(mmcfg);
}
- _mm_fclose(mmcfg);
}
q = midipat[0];
- j = 0;
- // make all empty patches duplicate the previous valid one.
+ nskip = 0;
+ // make all empty patches duplicates the previous valid one.
for( i=0; i 0; ) {
if( midipat[i][0] ) q = midipat[i];
else if( midipat[i] != q )
- strcpy(midipat[i],q);
+ strcpy(midipat[i], q);
}
}
}
@@ -444,14 +485,16 @@
static char *pat_build_path(char *fname, int pat)
{
char *ps;
- ps = strrchr(midipat[pat], ':');
-
+ char *patfile = midipat[pat];
+ int isabspath = (patfile[0] == '/');
+ if ( isabspath ) patfile ++;
+ ps = strrchr(patfile, ':');
if( ps ) {
- sprintf(fname, "%s%c%s", isabspath ? "" : pathforpat, DIRDELIM, midipat[pat]);
+ sprintf(fname, "%s%c%s", isabspath ? "" : pathforpat, DIRDELIM, patfile);
strcpy(strrchr(fname, ':'), ".pat");
return ps;
}
- sprintf(fname, "%s%c%s.pat", isabspath ? "" : pathforpat, DIRDELIM, midipat[pat]);
+ sprintf(fname, "%s%c%s.pat", isabspath ? "" : pathforpat, DIRDELIM, patfile);
return 0;
}
@@ -544,6 +587,10 @@
for( i=1; iwave_size, SEEK_CUR);
+ if ( mmpat->error ) {
+ hw->wave_size = 0;
+ return;
+ }
}
}
else {
@@ -578,13 +625,17 @@
static int pat_readpat_attr(int pat, WaveHeader *hw, int layer)
{
char fname[128];
+ int fsize;
MMSTREAM *mmpat;
pat_build_path(fname, pat);
mmpat = _mm_fopen(fname, "r");
if( !mmpat )
return 0;
+ fsize = _mm_getfsize(mmpat);
pat_read_waveheader(mmpat, hw, layer);
_mm_fclose(mmpat);
+ if (hw->wave_size > fsize)
+ return 0;
return 1;
}
@@ -603,7 +654,7 @@
for( i=0; i 0x7fff ) v = 0x7fff;
+ if( v > 0x7fff ) v = 0x7fff;
*pw++ = v + 0x8000;
}
}
@@ -612,7 +663,7 @@
for( i=0; i 0x7fff ) v = 0x7fff;
+ if( v > 0x7fff ) v = 0x7fff;
*pi++ = v;
}
}
@@ -797,7 +848,7 @@
PATHANDLE *retval;
#ifdef NEWMIKMOD
MM_ALLOC *allochandle;
-
+
allochandle = _mmalloc_create("Load_PAT", NULL);
retval = (PATHANDLE *)_mm_calloc(allochandle, 1,sizeof(PATHANDLE));
if( !retval ) return NULL;
@@ -1057,7 +1108,7 @@
{
int u, inuse;
int envpoint[6], envvolume[6];
- for(u=0; u<120; u++) {
+ for(u=0; u<120; u++) {
d->samplenumber[u] = smp;
d->samplenote[u] = smp;
}
@@ -1269,7 +1320,7 @@
// Enable aggressive declicking for songs that do not loop and that
// are long enough that they won't be adversely affected.
-
+
q->flags |= SL_LOOP;
q->format |= SF_16BITS;
q->format |= SF_SIGNED;
@@ -1395,6 +1446,7 @@
mm.mm = (char *)lpStream;
mm.sz = dwMemLength;
mm.pos = 0;
+ mm.error = 0;
#endif
while( avoid_reentry ) sleep(1);
avoid_reentry = 1;
@@ -1475,7 +1527,7 @@
m_nDefaultSpeed = 6;
m_nChannels = h->samples;
numpat = t;
-
+
m_dwSongFlags = SONG_LINEARSLIDES;
m_nMinPeriod = 28 << 2;
m_nMaxPeriod = 1712 << 3;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/src/load_s3m.cpp new/libmodplug-0.8.8.4/src/load_s3m.cpp
--- old/libmodplug-0.8.8.3/src/load_s3m.cpp 2011-05-08 00:17:06.000000000 +0200
+++ new/libmodplug-0.8.8.4/src/load_s3m.cpp 2011-07-17 13:54:52.000000000 +0200
@@ -195,10 +195,10 @@
//---------------------------------------------------------------
{
UINT insnum,patnum,nins,npat;
- DWORD insfile[128];
+ DWORD insfile[MAX_SAMPLES];
WORD ptr[256];
DWORD dwMemPos;
- BYTE insflags[128], inspack[128];
+ BYTE insflags[MAX_SAMPLES], inspack[MAX_SAMPLES];
if ((!lpStream) || (dwMemLength <= sizeof(S3MFILEHEADER)+sizeof(S3MSAMPLESTRUCT)+64)) return FALSE;
S3MFILEHEADER psfh = *(S3MFILEHEADER *)lpStream;
@@ -312,7 +312,14 @@
if (j < 1024) j = 1024;
Ins[iSmp].nC4Speed = j;
insfile[iSmp] = (pSmp.hmem << 20) + (bswapLE16(pSmp.memseg) << 4);
- if (insfile[iSmp] > dwMemLength) insfile[iSmp] &= 0xFFFF;
+ // offset is invalid - ignore this sample.
+ if (insfile[iSmp] > dwMemLength) insfile[iSmp] = 0;
+ else if (insfile[iSmp]) {
+ // ignore duplicate samples.
+ for (int z=iSmp-1; z>=0; z--)
+ if (insfile[iSmp] == insfile[z])
+ insfile[iSmp] = 0;
+ }
if ((Ins[iSmp].nLoopStart >= Ins[iSmp].nLoopEnd) || (Ins[iSmp].nLoopEnd - Ins[iSmp].nLoopStart < 8))
Ins[iSmp].nLoopStart = Ins[iSmp].nLoopEnd = 0;
Ins[iSmp].nPan = 0x80;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/src/load_wav.cpp new/libmodplug-0.8.8.4/src/load_wav.cpp
--- old/libmodplug-0.8.8.3/src/load_wav.cpp 2009-05-10 05:05:27.000000000 +0200
+++ new/libmodplug-0.8.8.4/src/load_wav.cpp 2011-07-17 13:54:52.000000000 +0200
@@ -54,7 +54,7 @@
if ((Patterns[1] = AllocatePattern(64, 4)) == NULL) return TRUE;
UINT samplesize = (pfmt->channels * pfmt->bitspersample) >> 3;
UINT len = pdata->length, bytelen;
- if (dwMemPos + len > dwMemLength - 8) len = dwMemLength - dwMemPos - 8;
+ if (len > dwMemLength - 8 - dwMemPos) len = dwMemLength - dwMemPos - 8;
len /= samplesize;
bytelen = len;
if (pfmt->bitspersample >= 16) bytelen *= 2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmodplug-0.8.8.3/src/load_xm.cpp new/libmodplug-0.8.8.4/src/load_xm.cpp
--- old/libmodplug-0.8.8.3/src/load_xm.cpp 2009-05-10 05:05:27.000000000 +0200
+++ new/libmodplug-0.8.8.4/src/load_xm.cpp 2011-07-20 11:42:02.000000000 +0200
@@ -85,35 +85,36 @@
BYTE pattern_map[256];
BOOL samples_used[MAX_SAMPLES];
UINT unused_samples;
+ tagXMFILEHEADER xmhead;
m_nChannels = 0;
if ((!lpStream) || (dwMemLength < 0x200)) return FALSE;
if (strnicmp((LPCSTR)lpStream, "Extended Module", 15)) return FALSE;
memcpy(m_szNames[0], lpStream+17, 20);
- dwHdrSize = bswapLE32(*((DWORD *)(lpStream+60)));
- norders = bswapLE16(*((WORD *)(lpStream+64)));
+ xmhead = *(tagXMFILEHEADER *)(lpStream+60);
+ dwHdrSize = bswapLE32(xmhead.size);
+ norders = bswapLE16(xmhead.norder);
if ((!norders) || (norders > MAX_ORDERS)) return FALSE;
- restartpos = bswapLE16(*((WORD *)(lpStream+66)));
- channels = bswapLE16(*((WORD *)(lpStream+68)));
+ restartpos = bswapLE16(xmhead.restartpos);
+ channels = bswapLE16(xmhead.channels);
if ((!channels) || (channels > 64)) return FALSE;
m_nType = MOD_TYPE_XM;
m_nMinPeriod = 27;
m_nMaxPeriod = 54784;
m_nChannels = channels;
if (restartpos < norders) m_nRestartPos = restartpos;
- patterns = bswapLE16(*((WORD *)(lpStream+70)));
+ patterns = bswapLE16(xmhead.patterns);
if (patterns > 256) patterns = 256;
- instruments = bswapLE16(*((WORD *)(lpStream+72)));
+ instruments = bswapLE16(xmhead.instruments);
if (instruments >= MAX_INSTRUMENTS) instruments = MAX_INSTRUMENTS-1;
m_nInstruments = instruments;
m_nSamples = 0;
- memcpy(&xmflags, lpStream+74, 2);
- xmflags = bswapLE16(xmflags);
+ xmflags = bswapLE16(xmhead.flags);
if (xmflags & 1) m_dwSongFlags |= SONG_LINEARSLIDES;
if (xmflags & 0x1000) m_dwSongFlags |= SONG_EXFILTERRANGE;
- defspeed = bswapLE16(*((WORD *)(lpStream+76)));
- deftempo = bswapLE16(*((WORD *)(lpStream+78)));
+ defspeed = bswapLE16(xmhead.speed);
+ deftempo = bswapLE16(xmhead.tempo);
if ((deftempo >= 32) && (deftempo < 256)) m_nDefaultTempo = deftempo;
if ((defspeed > 0) && (defspeed < 40)) m_nDefaultSpeed = defspeed;
memcpy(Order, lpStream+80, norders);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org