Hello community,

here is the log from the commit of package libtimidity for openSUSE:Factory 
checked in at 2019-12-05 17:33:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libtimidity (Old)
 and      /work/SRC/openSUSE:Factory/.libtimidity.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libtimidity"

Thu Dec  5 17:33:25 2019 rev:12 rq:743581 version:0.2.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/libtimidity/libtimidity.changes  2017-02-26 
17:05:11.420906247 +0100
+++ /work/SRC/openSUSE:Factory/.libtimidity.new.4691/libtimidity.changes        
2019-12-05 17:33:29.273455410 +0100
@@ -1,0 +2,22 @@
+Mon Oct 28 15:53:58 CET 2019 - [email protected]
+
+- Drop sourceforge download URL that doesn't work any longer...
+
+-------------------------------------------------------------------
+Sat Oct 26 17:03:46 UTC 2019 - Luigi Baldoni <[email protected]>
+
+- Update to version 0.2.6
+  * fixed a possibly signed integer overflow with crafted midi
+    files.
+  * other minor clean-ups, etc.
+  version 0.2.5:
+  * allow dual-licensing as LGPL / Artistic.
+  version 0.2.4:
+  * fixes to the pkg-config file.
+  version 0.2.3:
+  * fixed a potential buffer overrun in timi_fgets() which might
+    have led to a crash during config parsing.
+
+- Spec cleanup
+
+-------------------------------------------------------------------

Old:
----
  libtimidity-0.2.2.tar.gz

New:
----
  libtimidity-0.2.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libtimidity.spec ++++++
--- /var/tmp/diff_new_pack.Kzcxz6/_old  2019-12-05 17:33:30.453455242 +0100
+++ /var/tmp/diff_new_pack.Kzcxz6/_new  2019-12-05 17:33:30.453455242 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libtimidity
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,20 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %define sover 2
-
 Name:           libtimidity
-Version:        0.2.2
+Version:        0.2.6
 Release:        0
 Summary:        MIDI to WAVE converter library
-License:        LGPL-2.1+
-Group:          Development/Libraries/C and C++
-Url:            http://libtimidity.sourceforge.net/
-Source0:        
http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+License:        LGPL-2.1-or-later
+URL:            http://libtimidity.sourceforge.net/
+Source0:        %{name}/%{name}-%{version}.tar.gz
 Source1:        baselibs.conf
-BuildRequires:  pkg-config
+BuildRequires:  pkgconfig
 
 %description
 This library is based on the TiMidity decoder from SDL_sound library.
@@ -40,7 +38,6 @@
 
 %package -n libtimidity%{sover}
 Summary:        MIDI to WAVE converter library
-Group:          System/Libraries
 
 %description -n libtimidity%{sover}
 This library is based on the TiMidity decoder from SDL_sound library.
@@ -53,7 +50,6 @@
 
 %package        devel
 Summary:        MIDI to WAVE converter library - Development Files
-Group:          Development/Libraries/C and C++
 Requires:       libtimidity%{sover} = %{version}
 
 %description    devel
@@ -75,26 +71,21 @@
        --disable-ao \
        --disable-aotest \
        --disable-static
-%__make %{?_smp_mflags}
+make %{?_smp_mflags}
 
 %install
-%makeinstall
-find %{buildroot}%{_libdir} -name '*.la' -delete -print
-
-%clean
-rm -rf %{buildroot}
+%make_install
+find %{buildroot} -type f -name "*.la" -delete -print
 
 %post -n libtimidity%{sover} -p /sbin/ldconfig
-
 %postun -n libtimidity%{sover} -p /sbin/ldconfig
 
 %files -n libtimidity%{sover}
-%defattr(-,root,root,-)
-%doc AUTHORS CHANGES COPYING README*
+%license COPYING
+%doc AUTHORS CHANGES README*
 %{_libdir}/libtimidity*.so.*
 
 %files devel
-%defattr(-,root,root,-)
 %{_includedir}/timidity.h
 %{_libdir}/libtimidity*.so
 %{_libdir}/pkgconfig/libtimidity.pc

++++++ libtimidity-0.2.2.tar.gz -> libtimidity-0.2.6.tar.gz ++++++
++++ 8133 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/libtimidity-0.2.2/AUTHORS new/libtimidity-0.2.6/AUTHORS
--- old/libtimidity-0.2.2/AUTHORS       2016-10-01 11:01:40.000000000 +0200
+++ new/libtimidity-0.2.6/AUTHORS       2017-10-25 16:04:00.000000000 +0200
@@ -4,7 +4,7 @@
 * Torbj�rn Andersson <[email protected]>
   code cleanup and import it to the SDL_sound library as MIDI decoder.
 
-* Konstantin Korikov <[email protected]>
+* Konstantin Korikov <[email protected]>
   make a separate library from SDL_sound MIDI decoder.
 
 * Ozkan Sezer <[email protected]>
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/libtimidity-0.2.2/CHANGES new/libtimidity-0.2.6/CHANGES
--- old/libtimidity-0.2.2/CHANGES       2016-12-05 16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/CHANGES       2018-09-14 09:11:50.000000000 +0200
@@ -1,3 +1,29 @@
+Changes by libtimidity-0.2.6:
+-----------------------------
+
+* fixed a possibly signed integer overflow with crafted midi files.
+* other minor clean-ups, etc.
+
+
+Changes by libtimidity-0.2.5:
+-----------------------------
+
+* allow dual-licensing as LGPL / Artistic.
+
+
+Changes by libtimidity-0.2.4:
+-----------------------------
+
+* fixes to the pkg-config file.
+
+
+Changes by libtimidity-0.2.3:
+-----------------------------
+
+* fixed a potential buffer overrun in timi_fgets() which might have led
+  to a crash during config parsing.
+
+
 Changes by libtimidity-0.2.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/libtimidity-0.2.2/COPYING new/libtimidity-0.2.6/COPYING
--- old/libtimidity-0.2.2/COPYING       2016-10-01 11:01:40.000000000 +0200
+++ new/libtimidity-0.2.6/COPYING       2017-10-25 16:04:00.000000000 +0200
@@ -1,11 +1,19 @@
 libTiMidity is licensed under the terms of the GNU Lesser General Public
 License:  it is inlined below.
 
+You can also use libtimidity under the Perl Artistic License, if you so
+choose:  see the COPYING.artistic file for details on the Perl Artistic
+License.
+
 Note that the included TiMidity source, based on timidity-0.2i, was
 originally licensed under the GPL, but the author extended it so it
 can also be used separately under the GNU LGPL or the Perl Artistic
 License: see the notice by Tuukka Toivonen as it appears on the web
 at http://ieee.uwaterloo.ca/sca/www.cgs.fi/tt/timidity/ .
+Direct quote from his notice:  "I'm hereby extending the TiMidity
+license agreement: you can now select the most convenient license
+for your needs from (1) the GNU GPL, (2) the GNU LGPL, or (3) the
+Perl Artistic License."
 
 
 -------------------
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/libtimidity-0.2.2/COPYING.artistic new/libtimidity-0.2.6/COPYING.artistic
--- old/libtimidity-0.2.2/COPYING.artistic      1970-01-01 01:00:00.000000000 
+0100
+++ new/libtimidity-0.2.6/COPYING.artistic      2017-10-25 16:04:00.000000000 
+0200
@@ -0,0 +1,131 @@
+
+
+
+
+                         The "Artistic License"
+
+                                Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
+
+Definitions:
+
+        "Package" refers to the collection of files distributed by the
+        Copyright Holder, and derivatives of that collection of files
+        created through textual modification.
+
+        "Standard Version" refers to such a Package if it has not been
+        modified, or has been modified in accordance with the wishes
+        of the Copyright Holder as specified below.
+
+        "Copyright Holder" is whoever is named in the copyright or
+        copyrights for the package.
+
+        "You" is you, if you're thinking about copying or distributing
+        this Package.
+
+        "Reasonable copying fee" is whatever you can justify on the
+        basis of media cost, duplication charges, time of people involved,
+        and so on.  (You will not be required to justify it to the
+        Copyright Holder, but only to the computing community at large
+        as a market that must bear the fee.)
+
+        "Freely Available" means that no fee is charged for the item
+        itself, though there may be fees involved in handling the item.
+        It also means that recipients of the item may redistribute it
+        under the same conditions they received it.
+
+1. You may make and give away verbatim copies of the source form of the
+Standard Version of this Package without restriction, provided that you
+duplicate all of the original copyright notices and associated disclaimers.
+
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder.  A Package
+modified in such a way shall still be considered the Standard Version.
+
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
+
+    a) place your modifications in the Public Domain or otherwise make them
+    Freely Available, such as by posting said modifications to Usenet or
+    an equivalent medium, or placing the modifications on a major archive
+    site such as uunet.uu.net, or by allowing the Copyright Holder to include
+    your modifications in the Standard Version of the Package.
+
+    b) use the modified Package only within your corporation or organization.
+
+    c) rename any non-standard executables so the names do not conflict
+    with standard executables, which must also be provided, and provide
+    a separate manual page for each non-standard executable that clearly
+    documents how it differs from the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
+
+    a) distribute a Standard Version of the executables and library files,
+    together with instructions (in the manual page or equivalent) on where
+    to get the Standard Version.
+
+    b) accompany the distribution with the machine-readable source of
+    the Package with your modifications.
+
+    c) give non-standard executables non-standard names, and clearly
+    document the differences in manual pages (or equivalent), together
+    with instructions on where to get the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+Package.  You may charge any fee you choose for support of this
+Package.  You may not charge a fee for this Package itself.  However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own.  You may embed this Package's interpreter within
+an executable of yours (by linking); this shall be construed as a mere
+form of aggregation, provided that the complete Standard Version of the
+interpreter is so embedded.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whoever generated
+them, and may be sold commercially, and may be aggregated with this
+Package.  If such scripts or library files are aggregated with this
+Package via the so-called "undump" or "unexec" methods of producing a
+binary executable image, then distribution of such an image shall
+neither be construed as a distribution of this Package nor shall it
+fall under the restrictions of Paragraphs 3 and 4, provided that you do
+not represent such an executable image as a Standard Version of this
+Package.
+
+7. C subroutines (or comparably compiled subroutines in other
+languages) supplied by you and linked into this Package in order to
+emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. Aggregation of this Package with a commercial distribution is always
+permitted provided that the use of this Package is embedded; that is,
+when no overt attempt is made to make this Package's interfaces visible
+to the end user of the commercial distribution.  Such use shall not be
+construed as a distribution of this Package.
+
+9. The name of the Copyright Holder may not be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+                                The 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/libtimidity-0.2.2/Makefile.am new/libtimidity-0.2.6/Makefile.am
--- old/libtimidity-0.2.2/Makefile.am   2016-10-01 11:01:40.000000000 +0200
+++ new/libtimidity-0.2.6/Makefile.am   2017-10-25 16:04:00.000000000 +0200
@@ -5,7 +5,7 @@
 pcdata_DATA= libtimidity.pc
 pcdatadir = $(libdir)/pkgconfig
 
-EXTRA_DIST = CHANGES README.timidity TODO
+EXTRA_DIST = CHANGES COPYING.artistic README.timidity TODO
 
 dist-hook:
        cp libtimidity.spec $(distdir)
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/libtimidity-0.2.2/configure.ac new/libtimidity-0.2.6/configure.ac
--- old/libtimidity-0.2.2/configure.ac  2016-12-05 16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/configure.ac  2018-09-14 09:11:50.000000000 +0200
@@ -2,10 +2,10 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([libtimidity],[0.2.2])
+AC_INIT([libtimidity],[0.2.6])
 LIBTIMIDITY_MAJOR_VERSION=0
 LIBTIMIDITY_MINOR_VERSION=2
-LIBTIMIDITY_MICRO_VERSION=2
+LIBTIMIDITY_MICRO_VERSION=6
 
LIBTIMIDITY_VERSION=$LIBTIMIDITY_MAJOR_VERSION.$LIBTIMIDITY_MINOR_VERSION.$LIBTIMIDITY_MICRO_VERSION
 
 AC_CONFIG_AUX_DIR([autotools])
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/libtimidity-0.2.2/libtimidity.pc.in new/libtimidity-0.2.6/libtimidity.pc.in
--- old/libtimidity-0.2.2/libtimidity.pc.in     2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/libtimidity.pc.in     2017-03-18 21:51:56.000000000 
+0100
@@ -1,11 +1,12 @@
 prefix=@prefix@
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
 
 Name: libtimidity
 Description: MIDI to WAVE converter library
 Version: @LIBTIMIDITY_VERSION@
+URL: http://libtimidity.sourceforge.net/
 Libs: -L${libdir} -ltimidity
 Libs.private: @LIBTIMIDITY_LIBS@
 Cflags: -I${includedir}
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/libtimidity-0.2.2/libtimidity.spec new/libtimidity-0.2.6/libtimidity.spec
--- old/libtimidity-0.2.2/libtimidity.spec      2016-12-05 16:55:50.000000000 
+0100
+++ new/libtimidity-0.2.6/libtimidity.spec      2018-09-15 00:55:50.000000000 
+0200
@@ -1,6 +1,6 @@
 Summary:   MIDI to WAVE converter library
 Name:      libtimidity
-Version:   0.2.2
+Version:   0.2.6
 Release:   1
 License:   LGPL
 Group:     System Environment/Libraries
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/libtimidity-0.2.2/m4/libtool.m4 new/libtimidity-0.2.6/m4/libtool.m4
--- old/libtimidity-0.2.2/m4/libtool.m4 2016-10-01 11:01:40.000000000 +0200
+++ new/libtimidity-0.2.6/m4/libtool.m4 2018-06-25 10:11:00.000000000 +0200
@@ -2876,6 +2876,9 @@
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
   # Ideally, we could use ldconfig to report *all* directores which are
   # searched for libraries, however this is still not possible.  Aside from not
   # being certain /sbin/ldconfig is available, command
@@ -2884,7 +2887,7 @@
   # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 
2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < 
/etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ 
/g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
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/libtimidity-0.2.2/src/Makefile.am new/libtimidity-0.2.6/src/Makefile.am
--- old/libtimidity-0.2.2/src/Makefile.am       2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/Makefile.am       2017-10-25 16:04:00.000000000 
+0200
@@ -1,4 +1,3 @@
-
 AM_CPPFLAGS = -I$(top_srcdir)
 
 SYM_VISIBILITY = @SYM_VISIBILITY@
@@ -17,23 +16,25 @@
        Makefile.lcc \
        timidity.def \
        Makefile.os2 \
+       Makefile.emx \
        Makefile.dj \
        Makefile.morphos \
        Makefile.amigaos \
        Makefile.vbcc \
        Makefile.aros \
+       OWMakefile.win32 \
        VisualStudio \
        XCode
 
 libtimidity_la_SOURCES = \
        common.c \
        common.h \
-       filenames.h \
        instrum.c \
        instrum.h \
        mix.c \
        mix.h \
        options.h \
+       ospaths.h \
        output.c \
        output.h \
        playmidi.c \
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/libtimidity-0.2.2/src/Makefile.emx new/libtimidity-0.2.6/src/Makefile.emx
--- old/libtimidity-0.2.2/src/Makefile.emx      1970-01-01 01:00:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/Makefile.emx      2017-02-07 19:21:00.000000000 
+0100
@@ -0,0 +1,40 @@
+# Makefile for OS/2 using EMX environment.
+# builds timidity.a static library
+
+CC=gcc
+AS=as
+AR=ar
+RANLIB=ranlib
+LD=$(CC)
+
+CFLAGS = -I. -Wall -Zmt
+CPPFLAGS = -DTIMIDITY_BUILD
+# to build a debug version:
+#CPPFLAGS+= -DTIMIDITY_DEBUG
+LDFLAGS = -Zmt
+ARFLAGS = cr
+
+ifeq ($(DEBUG),1)
+CFLAGS += -g
+else
+CFLAGS += -O2 -ffast-math
+LDFLAGS+= -s
+endif
+
+LIBSTATIC=timidity.a
+
+OBJ=common.o instrum.o mix.o output.o playmidi.o readmidi.o resample.o 
stream.o tables.o timidity.o
+
+all: $(LIBSTATIC)
+
+$(LIBSTATIC): $(OBJ)
+       $(AR) $(ARFLAGS) $@ $^
+       -$(RANLIB) $@
+
+%.o: %.c
+       $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
+
+clean:
+       $(RM) *.o
+distclean: clean
+       $(RM) $(LIBSTATIC)
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/libtimidity-0.2.2/src/Makefile.os2 new/libtimidity-0.2.6/src/Makefile.os2
--- old/libtimidity-0.2.2/src/Makefile.os2      2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/Makefile.os2      2018-06-20 10:56:00.000000000 
+0200
@@ -12,10 +12,10 @@
 
 INCLUDES=-I.
 CPPFLAGS=-DTIMIDITY_BUILD
-# to build a debug version :
+# to build a debug version  :
 #CPPFLAGS+= -DTIMIDITY_DEBUG
 
-CFLAGS = -bt=os2 -bm -fp5 -fpi87 -mf -oeatxh -w4 -ei -zp8
+CFLAGS = -bt=os2 -bm -fp5 -fpi87 -mf -oeatxh -w4 -ei -zp8 -zq
 # -5s  :  Pentium stack calling conventions.
 # -5r  :  Pentium register calling conventions.
 CFLAGS+= -5s
@@ -36,24 +36,34 @@
 BLD_TARGET=$(DLLNAME)
 !endif
 
-COMPILE=wcc386 -q $(CFLAGS) $(CPPFLAGS) $(INCLUDES)
+COMPILE=wcc386 $(CFLAGS) $(CPPFLAGS) $(INCLUDES)
 
 OBJ=common.obj instrum.obj mix.obj output.obj playmidi.obj readmidi.obj 
resample.obj stream.obj tables.obj timidity.obj
 
 all: $(BLD_TARGET)
 
-clean:
-       FOR %F IN ( $(DLLNAME) $(EXPNAME) $(LIBNAME) $(LIBSTATIC) $(OBJ) ) DO 
IF EXIST %F ERASE %F
-
+# rely on symbol name, not ordinal: -irn switch of wlib is default, but -inn 
is not.
 $(DLLNAME): $(OBJ)
-       wlink NAM $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE FIL {$(OBJ)} 
OPTION IMPF=$(EXPNAME)
-       wlib -q -b -iro -inn $(LIBNAME) +$(DLLNAME)
-#      wlib -l $(LIBNAME)
-#EXP=$(EXPNAME)
-#OPTION IMPL=$(LIBNAME)
+       wlink NAM $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE OPTION 
MANYAUTODATA FIL {$(OBJ)} OPTION IMPF=$(EXPNAME)
+       wlib -q -b -n -c -pa -s -t -zld -ii -io -inn $(LIBNAME) +$(DLLNAME)
 
 $(LIBSTATIC): $(OBJ)
-       wlib -q -b -n $@ $(OBJ)
+       wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(OBJ)
 
 .c.obj:
        $(COMPILE) -fo=$^@ $<
+
+!ifndef __UNIX__
+distclean: clean .symbolic
+       @if exist $(LIBSTATIC) del $(LIBSTATIC)
+       @if exist $(DLLNAME) del $(DLLNAME)
+       @if exist $(EXPNAME) del $(EXPNAME)
+       @if exist $(LIBNAME) del $(LIBNAME)
+clean: .symbolic
+       @if exist *.obj del *.obj
+!else
+distclean: clean .symbolic
+       rm -f $(DLLNAME) $(EXPNAME) $(LIBNAME) $(LIBSTATIC)
+clean: .symbolic
+       rm -f *.obj
+!endif
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/libtimidity-0.2.2/src/OWMakefile.win32 
new/libtimidity-0.2.6/src/OWMakefile.win32
--- old/libtimidity-0.2.2/src/OWMakefile.win32  1970-01-01 01:00:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/OWMakefile.win32  2018-06-20 10:56:00.000000000 
+0200
@@ -0,0 +1,71 @@
+# Makefile for Windows using Open Watcom compiler.
+#
+# wmake -f OWMakefile.win32
+# - builds timidity.dll and its import library timidity.lib
+#
+# wmake -f OWMakefile.win32 target=static
+# - builds the static library timidity_static.lib
+
+!ifndef target
+target = dll
+!endif
+
+INCLUDES=-I.
+CPPFLAGS=-DTIMIDITY_BUILD
+# to build a debug version  :
+#CPPFLAGS+= -DTIMIDITY_DEBUG
+
+CFLAGS = -bt=nt -bm -fp5 -fpi87 -mf -oeatxh -w4 -ei -zp8 -zq
+# -5s  :  Pentium stack calling conventions.
+# -5r  :  Pentium register calling conventions.
+CFLAGS+= -5s
+DLLFLAGS=-bd
+
+.SUFFIXES:
+.SUFFIXES: .obj .c
+
+DLLNAME=timidity.dll
+EXPNAME=timidity.exp
+LIBNAME=timidity.lib
+LIBSTATIC=timidity_static.lib
+
+!ifeq target static
+CPPFLAGS+= -DTIMIDITY_STATIC
+BLD_TARGET=$(LIBSTATIC)
+!else
+CPPFLAGS+= -DDLL_EXPORT
+CFLAGS+= $(DLLFLAGS)
+BLD_TARGET=$(DLLNAME)
+!endif
+
+COMPILE=wcc386 $(CFLAGS) $(CPPFLAGS) $(INCLUDES)
+
+OBJ=common.obj instrum.obj mix.obj output.obj playmidi.obj readmidi.obj 
resample.obj stream.obj tables.obj timidity.obj
+
+all: $(BLD_TARGET)
+
+# rely on symbol name, not ordinal: -irn switch of wlib is default, but -inn 
is not.
+$(DLLNAME): $(OBJ)
+       wlink NAM $@ SYSTEM nt_dll INITINSTANCE TERMINSTANCE FIL {$(OBJ)} 
OPTION IMPF=$(EXPNAME)
+       wlib -q -b -n -c -pa -s -t -zld -ii -io -inn $(LIBNAME) +$(DLLNAME)
+
+$(LIBSTATIC): $(OBJ)
+       wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(OBJ)
+
+.c.obj:
+       $(COMPILE) -fo=$^@ $<
+
+!ifndef __UNIX__
+distclean: clean .symbolic
+       @if exist $(LIBSTATIC) del $(LIBSTATIC)
+       @if exist $(DLLNAME) del $(DLLNAME)
+       @if exist $(EXPNAME) del $(EXPNAME)
+       @if exist $(LIBNAME) del $(LIBNAME)
+clean: .symbolic
+       @if exist *.obj del *.obj
+!else
+distclean: clean .symbolic
+       rm -f $(DLLNAME) $(EXPNAME) $(LIBNAME) $(LIBSTATIC)
+clean: .symbolic
+       rm -f *.obj
+!endif
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/libtimidity-0.2.2/src/VisualStudio/libtimidity.vcproj 
new/libtimidity-0.2.6/src/VisualStudio/libtimidity.vcproj
--- old/libtimidity-0.2.2/src/VisualStudio/libtimidity.vcproj   2016-12-05 
16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/src/VisualStudio/libtimidity.vcproj   2017-10-25 
16:04:00.000000000 +0200
@@ -360,10 +360,6 @@
                                >
                        </File>
                        <File
-                               RelativePath="..\filenames.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\instrum.h"
                                >
                        </File>
@@ -376,6 +372,10 @@
                                >
                        </File>
                        <File
+                               RelativePath="..\ospaths.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\output.h"
                                >
                        </File>
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/libtimidity-0.2.2/src/VisualStudio/timidity_static.vcproj 
new/libtimidity-0.2.6/src/VisualStudio/timidity_static.vcproj
--- old/libtimidity-0.2.2/src/VisualStudio/timidity_static.vcproj       
2016-12-05 16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/src/VisualStudio/timidity_static.vcproj       
2017-10-25 16:04:00.000000000 +0200
@@ -316,10 +316,6 @@
                                >
                        </File>
                        <File
-                               RelativePath="..\filenames.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\instrum.h"
                                >
                        </File>
@@ -332,6 +328,10 @@
                                >
                        </File>
                        <File
+                               RelativePath="..\ospaths.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\output.h"
                                >
                        </File>
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/libtimidity-0.2.2/src/XCode/Info.plist 
new/libtimidity-0.2.6/src/XCode/Info.plist
--- old/libtimidity-0.2.2/src/XCode/Info.plist  2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/XCode/Info.plist  2018-09-14 09:11:50.000000000 
+0200
@@ -19,9 +19,9 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>0.2.2</string>
+       <string>0.2.6</string>
        <key>CFBundleShortVersionString</key>
-       <string>0.2.2</string>
+       <string>0.2.6</string>
        <key>NSPrincipalClass</key>
        <string></string>
 </dict>
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/libtimidity-0.2.2/src/XCode/InfoPlist.strings 
new/libtimidity-0.2.6/src/XCode/InfoPlist.strings
--- old/libtimidity-0.2.2/src/XCode/InfoPlist.strings   2016-12-05 
16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/src/XCode/InfoPlist.strings   2018-09-14 
09:11:50.000000000 +0200
@@ -1,5 +1,5 @@
 /* Localized versions of Info.plist keys */
 
 CFBundleName = "libtimidity";
-CFBundleShortVersionString = "libtimidity version 0.2.2";
-CFBundleGetInfoString = "libtimidity version 0.2.2";
+CFBundleShortVersionString = "libtimidity version 0.2.6";
+CFBundleGetInfoString = "libtimidity version 0.2.6";
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/libtimidity-0.2.2/src/XCode/libtimidity.xcodeproj/project.pbxproj 
new/libtimidity-0.2.6/src/XCode/libtimidity.xcodeproj/project.pbxproj
--- old/libtimidity-0.2.2/src/XCode/libtimidity.xcodeproj/project.pbxproj       
2016-12-05 16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/src/XCode/libtimidity.xcodeproj/project.pbxproj       
2017-10-25 16:04:00.000000000 +0200
@@ -11,7 +11,7 @@
                636ED3401D9B1CBA00577E46 /* timidity.h in CopyFiles */ = {isa = 
PBXBuildFile; fileRef = 63EEA9A61D9B0B1E00A956E0 /* timidity.h */; };
                63EEA9A71D9B0B1E00A956E0 /* common.c in Sources */ = {isa = 
PBXBuildFile; fileRef = 63EEA9861D9B0B1E00A956E0 /* common.c */; };
                63EEA9A81D9B0B1E00A956E0 /* common.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA9871D9B0B1E00A956E0 /* common.h */; };
-               63EEA9AC1D9B0B1E00A956E0 /* filenames.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA98B1D9B0B1E00A956E0 /* filenames.h */; };
+               63EEA9AC1D9B0B1E00A956E0 /* ospaths.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA98B1D9B0B1E00A956E0 /* ospaths.h */; };
                63EEA9AF1D9B0B1E00A956E0 /* instrum.c in Sources */ = {isa = 
PBXBuildFile; fileRef = 63EEA98E1D9B0B1E00A956E0 /* instrum.c */; };
                63EEA9B01D9B0B1E00A956E0 /* instrum.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA98F1D9B0B1E00A956E0 /* instrum.h */; };
                63EEA9B11D9B0B1E00A956E0 /* mix.c in Sources */ = {isa = 
PBXBuildFile; fileRef = 63EEA9901D9B0B1E00A956E0 /* mix.c */; };
@@ -34,7 +34,7 @@
                63EEA9C71D9B0B1E00A956E0 /* timidity.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA9A61D9B0B1E00A956E0 /* timidity.h */; settings = 
{ATTRIBUTES = (Public, ); }; };
                63EEA9C81D9B0B1E00A956E0 /* common.c in Sources */ = {isa = 
PBXBuildFile; fileRef = 63EEA9861D9B0B1E00A956E0 /* common.c */; };
                63EEA9C91D9B0B1E00A956E0 /* common.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA9871D9B0B1E00A956E0 /* common.h */; };
-               63EEA9CD1D9B0B1E00A956E0 /* filenames.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA98B1D9B0B1E00A956E0 /* filenames.h */; };
+               63EEA9CD1D9B0B1E00A956E0 /* ospaths.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA98B1D9B0B1E00A956E0 /* ospaths.h */; };
                63EEA9D01D9B0B1E00A956E0 /* instrum.c in Sources */ = {isa = 
PBXBuildFile; fileRef = 63EEA98E1D9B0B1E00A956E0 /* instrum.c */; };
                63EEA9D11D9B0B1E00A956E0 /* instrum.h in Headers */ = {isa = 
PBXBuildFile; fileRef = 63EEA98F1D9B0B1E00A956E0 /* instrum.h */; };
                63EEA9D21D9B0B1E00A956E0 /* mix.c in Sources */ = {isa = 
PBXBuildFile; fileRef = 63EEA9901D9B0B1E00A956E0 /* mix.c */; };
@@ -75,7 +75,7 @@
                63A00BC51D9B09CA00C50EA5 /* libtimidity.a */ = {isa = 
PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = 
libtimidity.a; sourceTree = BUILT_PRODUCTS_DIR; };
                63EEA9861D9B0B1E00A956E0 /* common.c */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = 
common.c; path = ../common.c; sourceTree = SOURCE_ROOT; };
                63EEA9871D9B0B1E00A956E0 /* common.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
common.h; path = ../common.h; sourceTree = SOURCE_ROOT; };
-               63EEA98B1D9B0B1E00A956E0 /* filenames.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
filenames.h; path = ../filenames.h; sourceTree = SOURCE_ROOT; };
+               63EEA98B1D9B0B1E00A956E0 /* ospaths.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
ospaths.h; path = ../ospaths.h; sourceTree = SOURCE_ROOT; };
                63EEA98E1D9B0B1E00A956E0 /* instrum.c */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = 
instrum.c; path = ../instrum.c; sourceTree = SOURCE_ROOT; };
                63EEA98F1D9B0B1E00A956E0 /* instrum.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
instrum.h; path = ../instrum.h; sourceTree = SOURCE_ROOT; };
                63EEA9901D9B0B1E00A956E0 /* mix.c */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mix.c; path = 
../mix.c; sourceTree = SOURCE_ROOT; };
@@ -175,7 +175,7 @@
                        children = (
                                63EEA9861D9B0B1E00A956E0 /* common.c */,
                                63EEA9871D9B0B1E00A956E0 /* common.h */,
-                               63EEA98B1D9B0B1E00A956E0 /* filenames.h */,
+                               63EEA98B1D9B0B1E00A956E0 /* ospaths.h */,
                                63EEA98E1D9B0B1E00A956E0 /* instrum.c */,
                                63EEA98F1D9B0B1E00A956E0 /* instrum.h */,
                                63EEA9901D9B0B1E00A956E0 /* mix.c */,
@@ -208,7 +208,7 @@
                        buildActionMask = 2147483647;
                        files = (
                                63EEA9C91D9B0B1E00A956E0 /* common.h in Headers 
*/,
-                               63EEA9CD1D9B0B1E00A956E0 /* filenames.h in 
Headers */,
+                               63EEA9CD1D9B0B1E00A956E0 /* ospaths.h in 
Headers */,
                                63EEA9D11D9B0B1E00A956E0 /* instrum.h in 
Headers */,
                                63EEA9D31D9B0B1E00A956E0 /* mix.h in Headers */,
                                63EEA9D41D9B0B1E00A956E0 /* options.h in 
Headers */,
@@ -228,7 +228,7 @@
                        buildActionMask = 2147483647;
                        files = (
                                63EEA9A81D9B0B1E00A956E0 /* common.h in Headers 
*/,
-                               63EEA9AC1D9B0B1E00A956E0 /* filenames.h in 
Headers */,
+                               63EEA9AC1D9B0B1E00A956E0 /* ospaths.h in 
Headers */,
                                63EEA9B01D9B0B1E00A956E0 /* instrum.h in 
Headers */,
                                63EEA9B21D9B0B1E00A956E0 /* mix.h in Headers */,
                                63EEA9B31D9B0B1E00A956E0 /* options.h in 
Headers */,
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/libtimidity-0.2.2/src/common.c new/libtimidity-0.2.6/src/common.c
--- old/libtimidity-0.2.2/src/common.c  2016-10-01 11:01:40.000000000 +0200
+++ new/libtimidity-0.2.6/src/common.c  2017-10-25 16:04:00.000000000 +0200
@@ -45,7 +45,7 @@
 
 #include "timidity_internal.h"
 #include "common.h"
-#include "filenames.h"
+#include "ospaths.h"
 
 /* The paths in this list will be tried by timi_openfile() */
 struct _PathList {
@@ -71,7 +71,7 @@
   if ((fp = fopen(name, OPEN_MODE)) != NULL)
     return fp;
 
-  if (!IS_ABSOLUTE_PATH(name))
+  if (!is_abspath(name))
   {
     char current_filename[TIM_MAXPATH];
     PathList *plp = pathlist;
@@ -83,9 +83,9 @@
        if(l)
          {
            strcpy(current_filename, plp->path);
-           if (!IS_DIR_SEPARATOR(current_filename[l - 1]))
+           if (!is_dirsep(current_filename[l - 1]))
            {
-             current_filename[l] = DIR_SEPARATOR_CHAR;
+             current_filename[l] = CHAR_DIRSEP;
              current_filename[l + 1] = '\0';
            }
          }
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/libtimidity-0.2.2/src/filenames.h new/libtimidity-0.2.6/src/filenames.h
--- old/libtimidity-0.2.2/src/filenames.h       2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/filenames.h       1970-01-01 01:00:00.000000000 
+0100
@@ -1,197 +0,0 @@
-/* Macros for taking apart, interpreting and processing file names.
- *
- * These are here because some non-Posix (a.k.a. DOSish) systems have
- * drive letter brain-damage at the beginning of an absolute file name,
- * use forward- and back-slash in path names interchangeably, and
- * some of them have case-insensitive file names.
- *
- * This was based on filenames.h from BFD, the Binary File Descriptor
- * library, Copyright (C) 2000-2016 Free Software Foundation, Inc.,
- * and changed by O. Sezer <[email protected]> for our needs.
- * The original version of this header in binutils/gcc is GPL licensed,
- * this modified version was authorized to be LGPL in our LGPL projects:
- * http://gcc.gnu.org/ml/gcc-patches/2016-09/msg02007.html
- * http://gcc.gnu.org/ml/gcc-patches/2016-09/msg02179.html
- *
- * This program 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 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 Lesser
- * General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser 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
- */
-
-#ifndef FILENAMES_H
-#define FILENAMES_H
-
-#include <string.h>
-
-/* ---------------------- Windows, DOS, OS2: ---------------------- */
-#if defined(__MSDOS__) || defined(__DOS__) || defined(__DJGPP__) || \
-    defined(_MSDOS) || defined(__OS2__) || defined(__EMX__) || \
-    defined(_WIN32) || defined(_Windows) || defined(__WINDOWS__) || \
-    defined(__NT__) || defined(__CYGWIN__)
-
-#define HAVE_DOS_BASED_FILE_SYSTEM 1
-#define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
-
-#define HAS_DRIVE_SPEC(f)      ((f)[0] && ((f)[1] == ':'))
-#define STRIP_DRIVE_SPEC(f)    ((f) + 2)
-#define IS_DIR_SEPARATOR(c)    ((c) == '/' || (c) == '\\')
-/* both '/' and '\\' work as dir separator.  djgpp likes changing
- * '\\' into '/', so I define DIR_SEPARATOR_CHAR as '/' for djgpp,
- * '\\' otherwise.  */
-#ifdef __DJGPP__
-#define DIR_SEPARATOR_CHAR     '/'
-#define DIR_SEPARATOR_STR      "/"
-#else
-#define DIR_SEPARATOR_CHAR     '\\'
-#define DIR_SEPARATOR_STR      "\\"
-#endif
-/* Note that IS_ABSOLUTE_PATH accepts d:foo as well, although it is
-   only semi-absolute.  This is because the users of IS_ABSOLUTE_PATH
-   want to know whether to prepend the current working directory to
-   a file name, which should not be done with a name like d:foo.  */
-#define IS_ABSOLUTE_PATH(f)    (IS_DIR_SEPARATOR((f)[0]) || 
HAS_DRIVE_SPEC((f)))
-
-#ifdef __cplusplus
-static inline char *FIND_FIRST_DIRSEP(char *_the_path) {
-/* FIXME: What about C:FOO ? */
-    char *p1 = strchr(_the_path, '/');
-    char *p2 = strchr(_the_path, '\\');
-    if (p1 == NULL) return p2;
-    if (p2 == NULL) return p1;
-    return (p1 < p2)? p1 : p2;
-}
-static inline char *FIND_LAST_DIRSEP (char *_the_path) {
-/* FIXME: What about C:FOO ? */
-    char *p1 = strrchr(_the_path, '/');
-    char *p2 = strrchr(_the_path, '\\');
-    if (p1 == NULL) return p2;
-    if (p2 == NULL) return p1;
-    return (p1 > p2)? p1 : p2;
-}
-static inline const char *FIND_FIRST_DIRSEP(const char *_the_path) {
-/* FIXME: What about C:FOO ? */
-    const char *p1 = strchr(_the_path, '/');
-    const char *p2 = strchr(_the_path, '\\');
-    if (p1 == NULL) return p2;
-    if (p2 == NULL) return p1;
-    return (p1 < p2)? p1 : p2;
-}
-static inline const char *FIND_LAST_DIRSEP (const char *_the_path) {
-/* FIXME: What about C:FOO ? */
-    const char *p1 = strrchr(_the_path, '/');
-    const char *p2 = strrchr(_the_path, '\\');
-    if (p1 == NULL) return p2;
-    if (p2 == NULL) return p1;
-    return (p1 > p2)? p1 : p2;
-}
-#else
-static inline char *FIND_FIRST_DIRSEP(const char *_the_path) {
-/* FIXME: What about C:FOO ? */
-    char *p1 = strchr(_the_path, '/');
-    char *p2 = strchr(_the_path, '\\');
-    if (p1 == NULL) return p2;
-    if (p2 == NULL) return p1;
-    return (p1 < p2)? p1 : p2;
-}
-static inline char *FIND_LAST_DIRSEP (const char *_the_path) {
-/* FIXME: What about C:FOO ? */
-    char *p1 = strrchr(_the_path, '/');
-    char *p2 = strrchr(_the_path, '\\');
-    if (p1 == NULL) return p2;
-    if (p2 == NULL) return p1;
-    return (p1 > p2)? p1 : p2;
-}
-#endif /* C++ */
-
-/* ----------------- AmigaOS, MorphOS, AROS, etc: ----------------- */
-#elif defined(__MORPHOS__) || defined(__AROS__) || defined(AMIGAOS)    || \
-      defined(__amigaos__) || defined(__amigaos4__) ||defined(__amigados__) || 
\
-      defined(AMIGA) || defined(_AMIGA) || defined(__AMIGA__)
-
-#define HAS_DRIVE_SPEC(f)      (0) /* */
-#define STRIP_DRIVE_SPEC(f)    (f) /* */
-#define IS_DIR_SEPARATOR(c)    ((c) == '/' || (c) == ':')
-#define DIR_SEPARATOR_CHAR     '/'
-#define DIR_SEPARATOR_STR      "/"
-#define IS_ABSOLUTE_PATH(f)    (IS_DIR_SEPARATOR((f)[0]) || (strchr((f), ':')))
-#define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
-
-#ifdef __cplusplus
-static inline char *FIND_FIRST_DIRSEP(char *_the_path) {
-    char *p = strchr(_the_path, ':');
-    if (p != NULL) return p;
-    return strchr(_the_path, '/');
-}
-static inline char *FIND_LAST_DIRSEP (char *_the_path) {
-    char *p = strrchr(_the_path, '/');
-    if (p != NULL) return p;
-    return strchr(_the_path, ':');
-}
-static inline const char *FIND_FIRST_DIRSEP(const char *_the_path) {
-    const char *p = strchr(_the_path, ':');
-    if (p != NULL) return p;
-    return strchr(_the_path, '/');
-}
-static inline const char *FIND_LAST_DIRSEP (const char *_the_path) {
-    const char *p = strrchr(_the_path, '/');
-    if (p != NULL) return p;
-    return strchr(_the_path, ':');
-}
-#else
-static inline char *FIND_FIRST_DIRSEP(const char *_the_path) {
-    char *p = strchr(_the_path, ':');
-    if (p != NULL) return p;
-    return strchr(_the_path, '/');
-}
-static inline char *FIND_LAST_DIRSEP (const char *_the_path) {
-    char *p = strrchr(_the_path, '/');
-    if (p != NULL) return p;
-    return strchr(_the_path, ':');
-}
-#endif /* C++ */
-
-/* ---------------------- assumed UNIX-ish : ---------------------- */
-#else /* */
-
-#define IS_DIR_SEPARATOR(c)    ((c) == '/')
-#define DIR_SEPARATOR_CHAR     '/'
-#define DIR_SEPARATOR_STR      "/"
-#define IS_ABSOLUTE_PATH(f)    (IS_DIR_SEPARATOR((f)[0]))
-#define HAS_DRIVE_SPEC(f)      (0)
-#define STRIP_DRIVE_SPEC(f)    (f)
-
-#ifdef __cplusplus
-static inline char *FIND_FIRST_DIRSEP(char *_the_path) {
-    return strchr(_the_path, '/');
-}
-static inline char *FIND_LAST_DIRSEP (char *_the_path) {
-    return strrchr(_the_path, '/');
-}
-static inline const char *FIND_FIRST_DIRSEP(const char *_the_path) {
-    return strchr(_the_path, '/');
-}
-static inline const char *FIND_LAST_DIRSEP (const char *_the_path) {
-    return strrchr(_the_path, '/');
-}
-#else
-static inline char *FIND_FIRST_DIRSEP(const char *_the_path) {
-    return strchr(_the_path, '/');
-}
-static inline char *FIND_LAST_DIRSEP (const char *_the_path) {
-    return strrchr(_the_path, '/');
-}
-#endif /* C++ */
-
-#endif
-
-#endif /* FILENAMES_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/libtimidity-0.2.2/src/instrum.c new/libtimidity-0.2.6/src/instrum.c
--- old/libtimidity-0.2.2/src/instrum.c 2016-12-05 16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/src/instrum.c 2018-09-09 16:28:56.000000000 +0200
@@ -174,10 +174,15 @@
                                   int strip_loop, int strip_envelope,
                                   int strip_tail)
 {
+#if (TIM_MAXPATH < 256)
+#define TMPSIZE 256
+#else
+#define TMPSIZE TIM_MAXPATH
+#endif
   MidInstrument *ip;
   MidSample *sp;
   FILE *fp;
-  char tmp[TIM_MAXPATH];
+  char tmp[TMPSIZE];
   int i,j;
   static const char *patch_ext[] = PATCH_EXT_LIST;
 
@@ -185,27 +190,26 @@
   if (!name) return;
 
   /* Open patch file */
-  if ((song->ifp=timi_openfile(name)) == NULL)
+  if ((fp=timi_openfile(name)) == NULL)
     {
       /* Try with various extensions */
       for (i=0; patch_ext[i]; i++)
        {
-         if (strlen(name)+strlen(patch_ext[i])<TIM_MAXPATH)
+         if (strlen(name)+strlen(patch_ext[i])<sizeof(tmp))
            {
              strcpy(tmp, name);
              strcat(tmp, patch_ext[i]);
-             if ((song->ifp=timi_openfile(tmp)) != NULL)
+             if ((fp=timi_openfile(tmp)) != NULL)
                break;
            }
        }
     }
 
-  if (song->ifp == NULL)
+  if (fp == NULL)
     {
       DEBUG_MSG("Instrument `%s' can't be found.\n", name);
       return;
     }
-  fp = song->ifp;
 
   DEBUG_MSG("Loading instrument %s\n", tmp);
 
@@ -519,7 +523,6 @@
     }
 
   fclose(fp);
-  song->ifp = NULL;
   return;
 
 nomem:
@@ -531,7 +534,6 @@
   free_instrument (ip);
 badpat:
   fclose(fp);
-  song->ifp = NULL;
   *out = NULL;
 }
 
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/libtimidity-0.2.2/src/ospaths.h new/libtimidity-0.2.6/src/ospaths.h
--- old/libtimidity-0.2.2/src/ospaths.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libtimidity-0.2.6/src/ospaths.h 2017-10-25 16:04:00.000000000 +0200
@@ -0,0 +1,101 @@
+/* macros and inlines to manipulate path names OS-specifically in libtimidity.
+ * written by O. Sezer <[email protected]>  using public knowledge,
+ * put into public domain.
+ */
+
+#ifndef OSPATHS_H
+#define OSPATHS_H
+
+#include <string.h>
+
+/* ---------------------- Windows, DOS, OS2: ---------------------- */
+#if defined(__MSDOS__) || defined(__DOS__) || defined(__DJGPP__) || \
+    defined(_MSDOS) || defined(__OS2__) || defined(__EMX__) || \
+    defined(_WIN32) || defined(_Windows) || defined(__WINDOWS__) || \
+    defined(__NT__) || defined(__CYGWIN__)
+
+#if defined(__DJGPP__)
+#define CHAR_DIRSEP '/'
+#else
+#define CHAR_DIRSEP '\\'
+#endif
+#define is_dirsep(c) ((c) == '/' || (c) == '\\')
+#define is_abspath(p) ((p)[0] == '/' || (p)[0] == '\\' || ((p)[0] && (p)[1] == 
':'))
+
+#ifndef __cplusplus
+/* FIXME: What about C:FOO ? */
+static inline char *get_last_dirsep (const char *p) {
+    char *p1 = strrchr(p, '/');
+    char *p2 = strrchr(p, '\\');
+    if (!p1) return p2;
+    if (!p2) return p1;
+    return (p1 > p2)? p1 : p2;
+}
+#else
+static inline char *get_last_dirsep (char *p) {
+    char *p1 = strrchr(p, '/');
+    char *p2 = strrchr(p, '\\');
+    if (!p1) return p2;
+    if (!p2) return p1;
+    return (p1 > p2)? p1 : p2;
+}
+static inline const char *get_last_dirsep (const char *p) {
+    const char *p1 = strrchr(p, '/');
+    const char *p2 = strrchr(p, '\\');
+    if (!p1) return p2;
+    if (!p2) return p1;
+    return (p1 > p2)? p1 : p2;
+}
+#endif /* C++ */
+
+/* ----------------- AmigaOS, MorphOS, AROS, etc: ----------------- */
+#elif defined(__MORPHOS__) || defined(__AROS__) || defined(AMIGAOS)    || \
+      defined(__amigaos__) || defined(__amigaos4__) ||defined(__amigados__) || 
\
+      defined(AMIGA) || defined(_AMIGA) || defined(__AMIGA__)
+
+#define CHAR_DIRSEP '/'
+#define is_dirsep(c) ((c) == '/' || (c) == ':')
+#define is_abspath(p) ((p)[0] == '/' || (strchr((p), ':') != NULL))
+
+#ifndef __cplusplus
+static inline char *get_last_dirsep (const char *p) {
+    char *p1 = strrchr(p, '/');
+    if (p1) return p1;
+    return  strchr(p, ':');
+}
+#else
+static inline char *get_last_dirsep (char *p) {
+    char *p1 = strrchr(p, '/');
+    if (p1) return p1;
+    return  strchr(p, ':');
+}
+static inline const char *get_last_dirsep (const char *p) {
+    const char *p1 = strrchr(p, '/');
+    if (p1) return p1;
+    return  strchr(p, ':');
+}
+#endif /* C++ */
+
+/* ---------------------- assumed UNIX-ish : ---------------------- */
+#else /* */
+
+#define CHAR_DIRSEP '/'
+#define is_dirsep(c) ((c) == '/')
+#define is_abspath(p) ((p)[0] == '/')
+
+#ifndef __cplusplus
+static inline char *get_last_dirsep (const char *p) {
+    return strrchr(p, '/');
+}
+#else
+static inline char *get_last_dirsep (char *p) {
+    return strrchr(p, '/');
+}
+static inline const char *get_last_dirsep (const char *p) {
+    return strrchr(p, '/');
+}
+#endif /* C++ */
+
+#endif
+
+#endif /* OSPATHS_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/libtimidity-0.2.2/src/readmidi.c new/libtimidity-0.2.6/src/readmidi.c
--- old/libtimidity-0.2.2/src/readmidi.c        2016-10-01 11:01:40.000000000 
+0200
+++ new/libtimidity-0.2.6/src/readmidi.c        2018-09-14 09:00:02.000000000 
+0200
@@ -502,6 +502,10 @@
       /* Recompute time in samples*/
       if ((dt=meep->event.time - at) && !counting_time)
        {
+         if (song->sample_increment  > 2147483647/dt ||
+             song->sample_correction > 2147483647/dt) {
+             goto _overflow;
+           }
          samples_to_do = song->sample_increment * dt;
          sample_cum += song->sample_correction * dt;
          if (sample_cum & 0xFFFF0000)
@@ -509,6 +513,13 @@
              samples_to_do += ((sample_cum >> 16) & 0xFFFF);
              sample_cum &= 0x0000FFFF;
            }
+         if (st >= 2147483647 - samples_to_do) {
+         _overflow:
+             DEBUG_MSG("Overflow in sample counter\n");
+             free_midi_list(song);
+             timi_free(groomed_list);
+             return NULL;
+           }
          st += samples_to_do;
        }
       else if (counting_time==1) counting_time=0;
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/libtimidity-0.2.2/src/stream.c new/libtimidity-0.2.6/src/stream.c
--- old/libtimidity-0.2.2/src/stream.c  2016-10-01 11:01:40.000000000 +0200
+++ new/libtimidity-0.2.6/src/stream.c  2017-10-25 16:04:00.000000000 +0200
@@ -1,3 +1,13 @@
+/* libTiMidity is licensed under the terms of the GNU Lesser General
+ * Public License: see COPYING for details.
+ *
+ * Note that the included TiMidity source, based on timidity-0.2i, was
+ * originally licensed under the GPL, but the author extended it so it
+ * can also be used separately under the GNU LGPL or the Perl Artistic
+ * License: see the notice by Tuukka Toivonen as it appears on the web
+ * at http://ieee.uwaterloo.ca/sca/www.cgs.fi/tt/timidity/ .
+ */
+
 /* libTiMidity -- MIDI to WAVE converter library
  * Copyright (C) 2004 Konstantin Korikov <[email protected]>
  * Copyright (C) 2014 O.Sezer <[email protected]>
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/libtimidity-0.2.2/src/timi_endian.h new/libtimidity-0.2.6/src/timi_endian.h
--- old/libtimidity-0.2.2/src/timi_endian.h     2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/timi_endian.h     2017-11-11 15:03:00.000000000 
+0100
@@ -1,3 +1,13 @@
+/* libTiMidity is licensed under the terms of the GNU Lesser General
+ * Public License: see COPYING for details.
+ *
+ * Note that the included TiMidity source, based on timidity-0.2i, was
+ * originally licensed under the GPL, but the author extended it so it
+ * can also be used separately under the GNU LGPL or the Perl Artistic
+ * License: see the notice by Tuukka Toivonen as it appears on the web
+ * at http://ieee.uwaterloo.ca/sca/www.cgs.fi/tt/timidity/ .
+ */
+
 /* timi_endian.h -- endianness detection
  * Copyright (C) 2007-2016  O.Sezer <[email protected]>
  *
@@ -44,7 +54,9 @@
 #  include <sys/param.h>
 # elif defined(__DJGPP__)
 #  include <machine/endian.h>
-# elif defined(__OS2__) && defined(__WATCOM__)
+# elif defined(__EMX__)
+#  include <machine/endian.h>
+# elif defined(__OS2__) && defined(__WATCOMC__)
 #  include <machine/endian.h>
 # elif defined(__amigaos__) && defined(__NEWLIB__)
 #  include <machine/endian.h>
@@ -169,10 +181,10 @@
 /* assumptions based on OS and/or architecture macros.
  * proceed carefully: many of these are bi-endian CPUs.
  */
-# if defined (__ppc__) || defined(__POWERPC__) || defined(__PPC__)
+# if defined(__ppc__) || defined(__powerpc__) || defined(__POWERPC__) || 
defined(__PPC__)
 #  define BYTE_ORDER BIG_ENDIAN
 
-# elif (defined(__alpha__) || defined(__alpha))
+# elif defined(__alpha__) || defined(__alpha)
 #  define BYTE_ORDER LITTLE_ENDIAN
 
 # elif defined(__mips__) || defined(__MIPS__)
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/libtimidity-0.2.2/src/timidity.c new/libtimidity-0.2.6/src/timidity.c
--- old/libtimidity-0.2.2/src/timidity.c        2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/timidity.c        2018-09-09 16:28:56.000000000 
+0200
@@ -48,7 +48,7 @@
 #include "output.h"
 #include "tables.h"
 
-#include "filenames.h"
+#include "ospaths.h"
 
 static MidToneBank *master_tonebank[128], *master_drumset[128];
 
@@ -62,29 +62,31 @@
 static char *timi_fgets(char *s, int size, FILE *fp)
 {
     int num_read = 0;
-    int newline = 0;
+    char *p = s;
 
-    while (num_read < size && !newline)
+    --size;/* so that we nul terminate properly */
+
+    for (; num_read < size; ++p)
     {
-       if (fread(&s[num_read], 1, 1, fp) != 1)
+       if (fread(p, 1, 1, fp) != 1)
            break;
 
+       num_read++;
+
        /* Unlike fgets(), don't store newline. Under Windows/DOS we'll
         * probably get an extra blank line for every line that's being
         * read, but that should be ok.
         */
-       if (s[num_read] == '\n' || s[num_read] == '\r')
+       if (*p == '\n' || *p == '\r')
        {
-           s[num_read] = '\0';
-           newline = 1;
+           *p = '\0';
+           return s;
        }
-
-       num_read++;
     }
 
-    s[num_read] = '\0';
+    *p = '\0';
 
-    return (num_read != 0) ? s : NULL;
+    return (num_read != 0)? s : NULL;
 }
 
 static FILE **rcf_fp;
@@ -439,7 +441,7 @@
   rcf_fp = (FILE **) timi_calloc(MAX_RCFCOUNT * sizeof(FILE*));
   if (!rcf_fp)
       return -2;
-  p = FIND_LAST_DIRSEP(cf);
+  p = get_last_dirsep(cf);
   if (p != NULL)
       return timi_add_pathlist(cf, p - cf + 1); /* including DIRSEP */
 
@@ -621,8 +623,6 @@
   if (!song) return;
 
   free_instruments(song);
-  if (song->ifp)
-    fclose(song->ifp);
 
   for (i = 0; i < 128; i++) {
     timi_free(song->tonebank[i]);
@@ -701,4 +701,3 @@
 {
   return NULL;
 }
-
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/libtimidity-0.2.2/src/timidity.h new/libtimidity-0.2.6/src/timidity.h
--- old/libtimidity-0.2.2/src/timidity.h        2016-12-05 16:50:00.000000000 
+0100
+++ new/libtimidity-0.2.6/src/timidity.h        2018-09-14 09:11:50.000000000 
+0200
@@ -44,7 +44,7 @@
 
 #define LIBTIMIDITY_VERSION_MAJOR 0L
 #define LIBTIMIDITY_VERSION_MINOR 2L
-#define LIBTIMIDITY_PATCHLEVEL    2L
+#define LIBTIMIDITY_PATCHLEVEL    6L
 
 #define LIBTIMIDITY_VERSION               \
         ((LIBTIMIDITY_VERSION_MAJOR<<16)| \
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/libtimidity-0.2.2/src/timidity_internal.h 
new/libtimidity-0.2.6/src/timidity_internal.h
--- old/libtimidity-0.2.2/src/timidity_internal.h       2016-12-05 
16:50:00.000000000 +0100
+++ new/libtimidity-0.2.6/src/timidity_internal.h       2018-09-09 
16:28:56.000000000 +0200
@@ -53,6 +53,36 @@
 
 /* Instrument files are little-endian, MIDI files big-endian, so we
    need to do some conversions. */
+#if defined(__VBCC__) && defined(__M68K__)
+uint16 XCHG_SHORT(__reg("d0") uint16) =
+    "\trol.w\t#8,d0";
+sint32 XCHG_LONG (__reg("d0") sint32) =
+    "\trol.w\t#8,d0\n"
+    "\tswap\td0\n"
+    "\trol.w\t#8,d0";
+
+#elif defined(__WATCOMC__) && defined(__386__)
+extern uint16 XCHG_SHORT(uint16);
+extern sint32 XCHG_LONG (sint32);
+#ifndef __SW_3 /* 486+ */
+#pragma aux XCHG_LONG = \
+    "bswap eax"  \
+    parm   [eax] \
+    modify [eax];
+#else  /* 386-only */
+#pragma aux XCHG_LONG = \
+    "xchg al, ah"  \
+    "ror  eax, 16" \
+    "xchg al, ah"  \
+    parm   [eax]   \
+    modify [eax];
+#endif
+#pragma aux XCHG_SHORT = \
+    "xchg al, ah" \
+    parm   [ax]   \
+    modify [ax];
+
+#else
 #define XCHG_SHORT(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
 #ifdef __i486__
 # define XCHG_LONG(x) \
@@ -65,6 +95,7 @@
                      (((x)&0xFF0000)>>8) | \
                      (((x)>>24)&0xFF))
 #endif
+#endif
 
 #if !defined(WORDS_BIGENDIAN)
 #define SWAPLE16(x) x
@@ -189,7 +220,7 @@
 
 struct _MidSong
 {
-  int oom;/* malloc failed */
+  int oom; /* malloc() failed */
   int playing;
   sint32 rate;
   sint32 encoding;
@@ -198,7 +229,6 @@
   sint32 amplification;
   MidToneBank *tonebank[128];
   MidToneBank *drumset[128];
-  FILE *ifp; /* patch file pointer used by the instrument loader */
   MidInstrument *default_instrument;
   int default_program;
   void (*write) (void *dp, sint32 *lp, sint32 c);


Reply via email to