load_instrument(): Close the file before returning in error cases.
Add support for Microsoft RMID format.
common.c (safe_malloc): Fixed -Wformat in debug msg.
Make the library to not add common timidity.cfg system locations to
its search path any longer: callers of mid_init() is responsible
for it from now on. If filename argument to mid_init() contains a
directory, only that one will be added to timidity search path. The
helper routine add_to_pathlist() now requires a length argument, so
it can now duplicate and add parts of paths, too.
* timidity_internal.h (struct _MidSong): Renamed the patches member
  to dlspatches.
* timidity.h: Typo fixes.
* timidity.c: Adjusted for the struct _MidSong change.
* instrum_dls.c: Whitespace tidy-up. Removed the RIFF and DLS
  information printing functions. If compiling for windows,
  used windows native headers instead of defining the windows types.
  Adjusted for the struct _MidSong patches member name change.
* instrum_dls.c (load_instrument_dls): Merged changes from vavoom
  svn repo rev. 4175 to fix loading of drums.
* instrum_dls.c (load_connection): Merged some of the changes from
  vavoom svn repo revisions 4425 and 4428 to somewhat improve
  timidity's dls use: still sounds horrible with many midi files.
  Rest of the changes from those two vavoom revisions may (or may
  not) be merged later.
Made DLS instruments support optional. Default is no, because the
dls code we inherited from libtimidity and SDL_sound isn't good
enough and it isn't used in unix installations where timidity is
normally needed, either.
* Add filenames.h with several macros and inlines to address
  pathname handling differences between different operating
  systems.
* timidity.c (mid_init): Include directory separator character
  when adding the path of the config file to the pathlist.
  Use the filename.h macros.
* common.c (open_file): Use the filename.h macros.
use autoconf WORDS_BIGENDIAN
instrum.c (load_instrument): allocate sp data with 2
additional bytes. Timidity++ changelog from 1999-10-26 notes this
patch by E.A.Welsh as: "It is possible that (OFS>>FRACTION_BITS)+1
will yield a value which is 1 beyond the length of the sample.
This happens when OFS < data_length, but (OFS>>FRACTION_BITS) ==
(data_length>>FRACTION_BITS)." This fixes a valgrind error report
for an invalid read of 2 bytes in resample.c:rs_plain().
instrum.c (load_instrument): initialize the added extra sample
space (the +2 bytes in added in the previous patch) using the
last actual sample.  while we are there, re-order the 8-to-16
bit conversion code a little and apply the same +2 bytes patch
there as well.
fixed a few -Wempty-body warnings.
rest of the timidity-0.2i fixes from the timidity-0.2i-bugfix.pat patch found at the onicos.com site.
resample.c (pre_resample): some simplification/tidy-ups.
resample.c (pre_resample): some safe-guards taken from
Timidity++-2.11.3. went back to the Timidity++ way for
the first sample case in the cubic interpolation loop.
added safe_free() as a new macro which expands to simply free()