summaryrefslogtreecommitdiff
path: root/audio/tclmidi
diff options
context:
space:
mode:
Diffstat (limited to 'audio/tclmidi')
-rw-r--r--audio/tclmidi/Makefile40
-rw-r--r--audio/tclmidi/distinfo2
-rw-r--r--audio/tclmidi/files/BSDmakefile36
-rw-r--r--audio/tclmidi/files/patch-Makefile.ins133
-rw-r--r--audio/tclmidi/files/patch-TclmIntp.cxx12
-rw-r--r--audio/tclmidi/files/patch-TclmIntp.h9
-rw-r--r--audio/tclmidi/files/patch-configure26
-rw-r--r--audio/tclmidi/files/patch-modern2145
-rw-r--r--audio/tclmidi/files/patch-rb456
-rw-r--r--audio/tclmidi/files/patch-smf_Makefile.in31
-rw-r--r--audio/tclmidi/files/patch-smf_SMFHead.cxx13
-rw-r--r--audio/tclmidi/files/patch-smf_SMFHead.h15
-rw-r--r--audio/tclmidi/files/patch-smf_SMFTrack.cxx12
-rw-r--r--audio/tclmidi/files/patch-song_Makefile.in30
-rw-r--r--audio/tclmidi/files/patch-tclmUtil.cxx30
-rw-r--r--audio/tclmidi/files/pkg-message.in6
-rw-r--r--audio/tclmidi/files/strstream.h45
-rw-r--r--audio/tclmidi/pkg-descr7
-rw-r--r--audio/tclmidi/pkg-plist35
19 files changed, 0 insertions, 3083 deletions
diff --git a/audio/tclmidi/Makefile b/audio/tclmidi/Makefile
deleted file mode 100644
index 79c09742ccea..000000000000
--- a/audio/tclmidi/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# Created by: Andreas Kohout <shanee@augusta.de>
-# $FreeBSD$
-
-PORTNAME= tclmidi
-PORTVERSION= 3.1
-PORTREVISION= 1
-CATEGORIES= audio
-MASTER_SITES= http://ringtail.its.monash.edu.au/pub/midi/PROGRAMS/
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Language designed for creating and editing standard MIDI files
-
-BROKEN= does not fetch, upstream gone
-DEPRECATED= Broken for more than 6 months
-EXPIRATION_DATE= 2017-11-09
-
-USES+= tcl uidfix
-MAKE_ENV= TCL_INCLUDEDIR="${TCL_INCLUDEDIR}" TCL_LIBDIR="${TCL_LIBDIR}"
-MAKE_ENV+= TCLSH=${TCLSH} FILESDIR="${FILESDIR}" MAN="${MAN1} ${MANN}"
-PKGMESSAGE= ${WRKDIR}/pkg-message
-SUB_FILES= pkg-message
-MAKEFILE= ${FILESDIR}/BSDmakefile
-
-post-patch:
- ${FIND} ${WRKSRC} -type f | ${XARGS} \
- ${REINPLACE_CMD} -e 's|iostream.h|iostream|g; s|iomanip.h|iomanip|g'
-
-post-build:
- cd ${WRKSRC} && echo pkg_mkIndex . tclmidi31.so | ${TCLSH}
-
-pre-su-install:
-.for s in mplay mrec minfo midtotcl
- ${SED} 's|/usr/local/bin/tclsh|${TCLSH}|' \
- < ${WRKSRC}/${s}.dist > ${STAGEDIR}${PREFIX}/bin/${s}
- ${CHMOD} 755 ${STAGEDIR}${PREFIX}/bin/${s}
-.endfor
- @${MKDIR} ${STAGEDIR}${PREFIX}/lib/tclmidi
- ${INSTALL_DATA} ${WRKSRC}/pkgIndex.tcl ${STAGEDIR}${PREFIX}/lib/tclmidi
-
-.include <bsd.port.mk>
diff --git a/audio/tclmidi/distinfo b/audio/tclmidi/distinfo
deleted file mode 100644
index 5067b742e292..000000000000
--- a/audio/tclmidi/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (tclmidi-3.1.tar.gz) = 7da611e4b98aceae996029a00f408e8c6ed4718afc167b7c1a63b881fd9fce4e
-SIZE (tclmidi-3.1.tar.gz) = 214458
diff --git a/audio/tclmidi/files/BSDmakefile b/audio/tclmidi/files/BSDmakefile
deleted file mode 100644
index d6ded61b0493..000000000000
--- a/audio/tclmidi/files/BSDmakefile
+++ /dev/null
@@ -1,36 +0,0 @@
-SRCS= MidiDev.cxx TclmDr75.cxx ChanPres.cxx Event.cxx MChanPrf.cxx \
- MCopy.cxx MCue.cxx MEOT.cxx MEvent.cxx MInstNam.cxx MKey.cxx \
- MLyric.cxx MMarker.cxx MPortNum.cxx MSMPTE.cxx MSeqNam.cxx \
- MSeqNum.cxx MSeqSpec.cxx MTempo.cxx MText.cxx MTime.cxx \
- NormEvnt.cxx NoteOff.cxx NoteOn.cxx KeyPres.cxx Param.cxx \
- PitchWhl.cxx Program.cxx SysEx.cxx MUnknown.cxx EvntUtil.cxx \
- Note.cxx GusPatch.cxx SMFUtils.cxx SMFHead.cxx SMFTrack.cxx \
- EvntTree.cxx Song.cxx
-
-SRCS+= TclmIntp.cxx tclmCmd.cxx tclmEvnt.cxx tclmPlay.cxx \
- tclmPtch.cxx tclmUtil.cxx
-
-MAN= mplay.1 mrec.1 tclmidi.1 minfo.1 midtotcl.1 \
- midiconf.n midievnt.n midifree.n midiget.n midigrep.n \
- midimake.n midimerg.n midiplay.n midiput.n midiread.n \
- midirec.n midirew.n midisplt.n midistop.n midiwait.n \
- midiwrit.n midivers.n midimove.n midicopy.n mididel.n \
- miditrck.n mididev.n miditime.n midifeat.n
-
-SRCS+= rb.c list.c
-SHLIB_NAME= tclmidi31.so
-MANDIR= ${PREFIX}/man/man
-LIBDIR= ${PREFIX}/lib/tclmidi
-LDADD= -lstdc++
-
-SUBDIRS=events device patch smf song rb
-INCLUDES= -I${TCL_INCLUDEDIR} ${SUBDIRS:S/^/-I/}
-CFLAGS+= ${INCLUDES}
-CXXFLAGS+= -Wall -Wno-deprecated ${INCLUDES} -I${FILESDIR}
-CXXFLAGS+= -DHAVE_UNISTD_H -DHAVE_SYS_FILIO_H -DHAVE_SYS_TIME_H
-NO_WERROR= yes
-
-.PATH: ${SUBDIRS} man
-WARNS= 5
-
-.include <bsd.lib.mk>
diff --git a/audio/tclmidi/files/patch-Makefile.ins b/audio/tclmidi/files/patch-Makefile.ins
deleted file mode 100644
index 39cdd3df4cfc..000000000000
--- a/audio/tclmidi/files/patch-Makefile.ins
+++ /dev/null
@@ -1,133 +0,0 @@
---- Makefile.in.orig 1996-10-10 03:32:36 UTC
-+++ Makefile.in
-@@ -11,7 +11,7 @@ SCRIPTS = midtotcl minfo mplay mrec
-
- # The directory containing the Tcl library archive file appropriate
- # for this version of Tk:
--TCL_BIN_DIR = @TCL_BIN_DIR@
-+TCL_BIN_DIR = ${TCL_LIBDIR}
-
- #----------------------------------------------------------------
- # The information below is modified by the configure script when
-@@ -35,8 +35,9 @@ srcdir = @srcdir@
- VPATH = @srcdir@
-
- CFLAGS = @CFLAGS@ @DEFS@
--CC_SWITCHES = @CFLAGS@ @DEFS@ ${SHLIB_CFLAGS} \
-+CC_SWITCHES = @CFLAGS@ @DEFS@ ${SHLIB_CFLAGS} -I${TCL_GENERIC_DIR} \
- -Idevice -Ievents -Irb -Ipatch -Ismf -Isong -I.
-+CXX_SWITCHES= ${CC_SWITCHES} ${CXXFLAGS}
-
- TCLMFILES = tclmCmd.o tclmUtil.o tclmEvnt.o tclmPlay.o tclmPtch.o TclmIntp.o
- TCLMFILES_SRC = tclmCmd.cxx tclmUtil.cxx tclmEvnt.cxx tclmPlay.cxx \
-@@ -61,7 +62,7 @@ pkgIndex.tcl: $(PROJ_LIB_NAME)
- @echo 'pkg_mkIndex . $(PROJ_LIB_NAME)' | @TCLSH_PATH@
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- $(PROJ_LIB_NAME): events/objs smf/objs \
- song/objs device/objs patch/objs rb/objs $(TCLMFILES)
-@@ -101,7 +102,7 @@ midtotcl: midtotcl.dist
-
- install: $(PROJ_LIB_NAME) $(SCRIPTS)
- -mkdir -p $(prefix)$(libdir)/tclmidi
-- @INSTALL_DATA@ $(PROJ_LIB_NAME) $(prefix)$(libdir)/tclmidi
-+ @INSTALL_DATA@ -s $(PROJ_LIB_NAME) $(prefix)$(libdir)/tclmidi
- echo 'pkg_mkIndex $(prefix)$(libdir)/tclmidi \
- $(PROJECT)*${SHLIB_SUFFIX}' | @TCLSH_PATH@
- cd man; $(MAKE) install
-@@ -128,7 +129,7 @@ depend:
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(TCLMFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(TCLMFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
-
---- device/Makefile.in.orig 1996-10-10 03:32:40 UTC
-+++ device/Makefile.in
-@@ -17,6 +17,7 @@ CFLAGS = @CFLAGS@ @DEFS@
- CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
- -I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../patch \
- -I$(srcdir)/../smf -I$(srcdir)/../song -I$(srcdir)/.. -I$(srcdir)
-+CXX_SWITCHES= ${CC_SWITCHES} ${CXXFLAGS}
-
- DEVICEFILES = MidiDev.o TclmDr75.o
- DEVICEFILES_SRC = MidiDev.cxx TclmDr75.cxx
-@@ -24,7 +25,7 @@ DEVICEFILES_SRC = MidiDev.cxx TclmDr75.c
- .SUFFIXES: .cxx $(SUFFIXES)
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- objs: $(DEVICEFILES)
- for f in $(DEVICEFILES) ; do echo device/$$f ; done > objs
-@@ -33,7 +34,7 @@ depend:
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(DEVICEFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(DEVICEFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
-
---- events/Makefile.in.orig 1996-10-10 03:32:42 UTC
-+++ events/Makefile.in
-@@ -16,6 +16,7 @@ VPATH = @srcdir@
- CFLAGS = @CFLAGS@ @DEFS@
- CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
- -I$(srcdir)/../smf -I$(srcdir)/../song -I$(srcdir)/.. -I$(srcdir)
-+CXX_SWITCHES = ${CC_SWITCHES} ${CXXFLAGS}
-
- EVENTFILES = ChanPres.o Event.o MChanPrf.o MCopy.o MCue.o \
- MEOT.o MEvent.o MInstNam.o MKey.o MLyric.o \
-@@ -35,7 +36,7 @@ EVENTFILES_SRC = ChanPres.cxx Event.cxx
- .SUFFIXES: .cxx $(SUFFIXES)
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- objs: $(EVENTFILES)
- for f in $(EVENTFILES) ; do echo events/$$f ; done > objs
-@@ -44,7 +45,7 @@ depend:
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(EVENTFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(EVENTFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
-
---- patch/Makefile.in.orig 1996-10-10 03:32:43 UTC
-+++ patch/Makefile.in
-@@ -16,6 +16,7 @@ VPATH = @srcdir@
- CFLAGS = @CFLAGS@ @DEFS@
- CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
- -I. -I..
-+CXX_SWITCHES = ${CC_SWITCHES} ${CXXFLAGS}
-
- PATCHFILES = GusPatch.o
- PATCHFILES_SRC = GusPatch.cxx
-@@ -23,7 +24,7 @@ PATCHFILES_SRC = GusPatch.cxx
- .SUFFIXES: .cxx $(SUFFIXES)
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- objs: $(PATCHFILES)
- for f in $(PATCHFILES) ; do echo patch/$$f ; done > objs
-@@ -32,7 +33,7 @@ depend:
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(PATCHFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(PATCHFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
-
diff --git a/audio/tclmidi/files/patch-TclmIntp.cxx b/audio/tclmidi/files/patch-TclmIntp.cxx
deleted file mode 100644
index 528a8a6c37ae..000000000000
--- a/audio/tclmidi/files/patch-TclmIntp.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
---- TclmIntp.cxx.orig 1996-07-28 19:09:03 UTC
-+++ TclmIntp.cxx
-@@ -37,8 +37,7 @@
- #endif
- #include "TclmIntp.h"
-
--TclmInterp::TclmInterp() : current_song(0), current_dev(0), current_patch(0),
-- next_event(0)
-+TclmInterp::TclmInterp() : current_song(0), current_dev(0), current_patch(0)
- {
-
- Tcl_InitHashTable(&song_ht, TCL_STRING_KEYS);
diff --git a/audio/tclmidi/files/patch-TclmIntp.h b/audio/tclmidi/files/patch-TclmIntp.h
deleted file mode 100644
index dcecbffbab5a..000000000000
--- a/audio/tclmidi/files/patch-TclmIntp.h
+++ /dev/null
@@ -1,9 +0,0 @@
---- TclmIntp.h.orig 1996-07-28 18:53:08 UTC
-+++ TclmIntp.h
-@@ -64,6 +64,5 @@ private:
- int current_song;
- int current_dev;
- int current_patch;
-- Event *next_event;
- };
- #endif
diff --git a/audio/tclmidi/files/patch-configure b/audio/tclmidi/files/patch-configure
deleted file mode 100644
index c813021d7fe8..000000000000
--- a/audio/tclmidi/files/patch-configure
+++ /dev/null
@@ -1,26 +0,0 @@
---- configure.orig 1996-10-11 02:57:27 UTC
-+++ configure
-@@ -1604,7 +1604,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
- # Greg figured out how to use gcc instead of ld..
- # -lgcc can be found in /usr/lib/gcc-lib/i486-linux/2.7.0/
- # or something similar.
-- SHLIB_LD_CXX="-Bstatic -lg++ -lstdc++ -lgcc"
-+ SHLIB_LD_CXX="-lg++ -lstdc++ -lgcc"
- DL_OBJS="tclLoadDld.o"
- DL_LIBS="-ldld"
- LD_FLAGS=""
-@@ -1727,12 +1727,12 @@ fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
-
-- SHLIB_LD_CXX="-Bstatic -lg++ -lstdc++ -lgcc 2> /dev/null"
-+ SHLIB_LD_CXX="-lstdc++ -lgcc 2> /dev/null"
-
- else
- echo "$ac_t""no" 1>&6
-
-- SHLIB_LD_CXX="-Bstatic -lg++ -lgcc 2> /dev/null"
-+ SHLIB_LD_CXX="-lg++ -lgcc 2> /dev/null"
-
- fi
-
diff --git a/audio/tclmidi/files/patch-modern b/audio/tclmidi/files/patch-modern
deleted file mode 100644
index dd065e6adbdc..000000000000
--- a/audio/tclmidi/files/patch-modern
+++ /dev/null
@@ -1,2145 +0,0 @@
---- events/ChanPres.h 1996-02-18 19:57:20.000000000 -0500
-+++ events/ChanPres.h 2012-04-07 14:08:43.000000000 -0400
-@@ -44,7 +44,7 @@
- {return (new ChannelPressureEvent(*this));}
-
- virtual EventType GetType(void) const {return (CHANNELPRESSURE);}
-- virtual char *GetTypeStr(void) const {return ("ChannelPressureEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("ChannelPressureEvent");}
- virtual char *GetEventStr(void) const;
- int GetPressure(void) const {
- if (GetWildcard(wc_pressure))
---- events/Event.h 1996-07-28 14:51:08.000000000 -0400
-+++ events/Event.h 2012-04-11 01:04:43.000000000 -0400
-@@ -81,12 +81,13 @@
- else
- return (time);
- }
-+ virtual ~Event() {};
- virtual EventType GetType(void) const {return (NOTYPE);}
-- virtual char *GetTypeStr(void) const {return ("NoType");}
-+ virtual const char *GetTypeStr(void) const {return ("NoType");}
- virtual char *GetEventStr(void) const;
- Event *GetNextEvent(void) const {return (next_event);}
- Event *GetPrevEvent(void) const {return (prev_event);}
-- const EventTreeNode *GetEventTreeNode(void) const {return (node);}
-+ EventTreeNode *GetEventTreeNode(void) const {return (node);}
-
- void SetTime(unsigned long t) {
- if (t == WC_TIME)
-@@ -96,7 +97,7 @@
- }
- void SetNextEvent(Event *n) {next_event = n;}
- void SetPrevEvent(Event *p) {prev_event = p;}
-- void SetEventTreeNode(const EventTreeNode *n) {node = n;}
-+ void SetEventTreeNode(EventTreeNode *n) {node = n;}
-
- Event &operator=(const Event &e);
- int operator==(const Event &e) const;
-@@ -120,6 +121,6 @@
- static const unsigned long wc_time;
- Event *next_event;
- Event *prev_event;
-- const EventTreeNode *node;
-+ EventTreeNode *node;
- };
- #endif
---- events/KeyPres.h 1996-02-18 19:57:26.000000000 -0500
-+++ events/KeyPres.h 2012-04-07 14:08:43.000000000 -0400
-@@ -45,7 +45,7 @@
- virtual Event *Dup(void) const {return (new KeyPressureEvent(*this));}
-
- virtual EventType GetType(void) const {return (KEYPRESSURE);}
-- virtual char *GetTypeStr(void) const {return ("KeyPressureEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("KeyPressureEvent");}
- virtual char *GetEventStr(void) const;
- int GetPitch(void) const {
- if (GetWildcard(wc_pitch))
---- events/MChanPrf.cxx 1996-07-28 15:09:16.000000000 -0400
-+++ events/MChanPrf.cxx 2012-04-07 15:41:59.000000000 -0400
-@@ -74,7 +74,7 @@
- MetaChannelPrefixEvent::~MetaChannelPrefixEvent()
- {
-
-- delete data;
-+ delete[] data;
- }
-
- void
-@@ -82,7 +82,7 @@
- {
-
- if (data != 0)
-- delete data;
-+ delete[] data;
- if (dat == WC_DATA || len == WC_LENGTH) {
- SetWildcard(wc_data);
- data = 0;
-@@ -101,7 +101,7 @@
-
- (MetaEvent)*this = (MetaEvent)e;
- if (data != 0)
-- delete data;
-+ delete[] data;
- if (e.GetWildcard(wc_data)) {
- data = 0;
- length = -1;
-@@ -129,7 +129,7 @@
- buf.setf(ios::showbase | ios::internal);
- for (i = 0; i < length; i++)
- buf << " " << hex << setw(4) << setfill('0') <<
-- (int)data[i];
-+ (intptr_t)data[i];
- }
- buf << ends;
- delete tbuf;
-@@ -142,7 +142,7 @@
- const unsigned char *ptr;
-
- if (data != 0)
-- delete data;
-+ delete[] data;
- if ((length = t.GetVarValue()) == -1)
- return ("Incomplete MetaChannelPrefixEvent - bad length");
- data = new unsigned char[length];
---- events/MChanPrf.h 1996-02-18 19:57:29.000000000 -0500
-+++ events/MChanPrf.h 2012-04-07 14:36:23.000000000 -0400
-@@ -46,7 +46,7 @@
- {return (new MetaChannelPrefixEvent(*this));}
-
- virtual EventType GetType(void) const {return (METACHANNELPREFIX);}
-- virtual char *GetTypeStr(void) const
-+ virtual const char *GetTypeStr(void) const
- {return ("MetaChannelPrefixEvent");}
- virtual char *GetEventStr(void) const;
- const unsigned char *GetData(void) const {
---- events/MCopy.h 1996-02-12 19:25:36.000000000 -0500
-+++ events/MCopy.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new MetaCopyrightEvent(*this));}
-
- virtual EventType GetType(void) const {return (METACOPYRIGHT);}
-- virtual char *GetTypeStr(void) const {return ("MetaCopyrightEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaCopyrightEvent");}
- virtual char *GetEventStr(void) const;
-
- MetaCopyrightEvent &operator=(const MetaCopyrightEvent &e);
---- events/MCue.h 1996-02-12 19:25:37.000000000 -0500
-+++ events/MCue.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new MetaCueEvent(*this));}
-
- virtual EventType GetType(void) const {return (METACUE);}
-- virtual char *GetTypeStr(void) const {return ("MetaCueEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaCueEvent");}
- virtual char *GetEventStr(void) const;
-
- MetaCueEvent &operator=(const MetaCueEvent &e);
---- events/MEOT.h 1996-02-12 19:25:38.000000000 -0500
-+++ events/MEOT.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- {return (new MetaEndOfTrackEvent(*this));}
-
- virtual EventType GetType(void) const {return (METAENDOFTRACK);}
-- virtual char *GetTypeStr(void) const {return ("MetaEndOfTrackEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaEndOfTrackEvent");}
- virtual char *GetEventStr(void) const;
-
- MetaEndOfTrackEvent &operator=(const MetaEndOfTrackEvent &e);
---- events/MEvent.h 1996-02-12 19:25:39.000000000 -0500
-+++ events/MEvent.h 2012-04-07 14:08:43.000000000 -0400
-@@ -42,7 +42,7 @@
- virtual Event *Dup(void) const {return (new MetaEvent(*this));}
-
- virtual EventType GetType(void) const {return (META);}
-- virtual char *GetTypeStr(void) const {return ("MetaEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaEvent");}
- virtual char *GetEventStr(void) const;
-
- MetaEvent &operator=(const MetaEvent &e);
---- events/MInstNam.h 1996-02-12 19:25:39.000000000 -0500
-+++ events/MInstNam.h 2012-04-07 14:08:43.000000000 -0400
-@@ -45,7 +45,7 @@
- {return (new MetaInstrumentNameEvent(*this));}
-
- virtual EventType GetType(void) const {return (METAINSTRUMENTNAME);}
-- virtual char *GetTypeStr(void) const {return ("MetaInstrumentName");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaInstrumentName");}
- virtual char *GetEventStr(void) const;
-
- MetaInstrumentNameEvent &operator=(const MetaInstrumentNameEvent &e);
---- events/MKey.cxx 1996-07-28 15:09:19.000000000 -0400
-+++ events/MKey.cxx 2012-04-07 15:51:06.000000000 -0400
-@@ -396,7 +396,7 @@
- badkey = 1;
- }
-
-- delete keystr;
-+ delete[] keystr;
- if (badkey)
- *match = 0;
- else
-@@ -409,21 +409,13 @@
- StrToMode(const char *str, int *match)
- {
- Mode mode;
-- char *modestr;
-- int i, modelen;
--
-- modelen = strlen(str);
-- modestr = new char[modelen + 1];
-- for (i = 0; i < modelen; i++)
-- modestr[i] = tolower(str[i]);
-- modestr[i] = '\0';
-
- *match = 1;
-- if (strcmp(modestr, "minor") == 0)
-+ if (strcasecmp(str, "minor") == 0)
- mode = MODE_MINOR;
-- else if (strcmp(modestr, "major") == 0)
-+ else if (strcasecmp(str, "major") == 0)
- mode = MODE_MAJOR;
-- else if (strcmp(modestr, "*") == 0)
-+ else if (strcasecmp(str, "*") == 0)
- mode = MODE_WC;
- else {
- mode = MODE_MAJOR;
---- events/MKey.h 1996-02-18 19:57:33.000000000 -0500
-+++ events/MKey.h 2012-04-07 14:08:43.000000000 -0400
-@@ -57,7 +57,7 @@
- virtual Event *Dup(void) const {return (new MetaKeyEvent(*this));}
-
- virtual EventType GetType(void) const {return (METAKEY);}
-- virtual char *GetTypeStr(void) const {return ("MetaKeyEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaKeyEvent");}
- virtual char *GetEventStr(void) const;
- Key GetKey(void) const {
- if (GetWildcard(wc_key))
---- events/MLyric.h 1996-02-12 19:25:41.000000000 -0500
-+++ events/MLyric.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new MetaLyricEvent(*this));}
-
- virtual EventType GetType(void) const {return (METALYRIC);}
-- virtual char *GetTypeStr(void) const {return ("MetaLyricEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaLyricEvent");}
- virtual char *GetEventStr(void) const;
-
- MetaLyricEvent &operator=(const MetaLyricEvent &e);
---- events/MMarker.h 1996-02-12 19:25:42.000000000 -0500
-+++ events/MMarker.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new MetaMarkerEvent(*this));}
-
- virtual EventType GetType(void) const {return (METAMARKER);}
-- virtual char *GetTypeStr(void) const {return ("MetaMarkerEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaMarkerEvent");}
- virtual char *GetEventStr(void) const;
-
- MetaMarkerEvent &operator=(const MetaMarkerEvent &e);
---- events/MPortNum.h 1996-02-18 19:57:36.000000000 -0500
-+++ events/MPortNum.h 2012-04-07 14:08:43.000000000 -0400
-@@ -44,7 +44,7 @@
- {return (new MetaPortNumberEvent(*this));}
-
- virtual EventType GetType(void) const {return (METAPORTNUMBER);}
-- virtual char *GetTypeStr(void) const
-+ virtual const char *GetTypeStr(void) const
- {return ("MetaPortNumberEvent");}
- virtual char *GetEventStr(void) const;
- int GetPort(void) const {
---- events/MSMPTE.h 1996-02-18 19:57:40.000000000 -0500
-+++ events/MSMPTE.h 2012-04-07 14:08:43.000000000 -0400
-@@ -42,7 +42,7 @@
- virtual Event *Dup(void) const {return (new MetaSMPTEEvent(*this));}
-
- virtual EventType GetType(void) const {return (METASMPTE);}
-- virtual char *GetTypeStr(void) const {return ("MetaSMPTEEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaSMPTEEvent");}
- virtual char *GetEventStr(void) const;
- int GetHour(void) const {
- if (GetWildcard(wc_hour))
---- events/MSeqNam.h 1996-02-12 19:25:44.000000000 -0500
-+++ events/MSeqNam.h 2012-04-07 14:08:43.000000000 -0400
-@@ -44,7 +44,7 @@
- {return (new MetaSequenceNameEvent(*this));}
-
- virtual EventType GetType(void) const {return (METASEQUENCENAME);}
-- virtual char *GetTypeStr(void) const {return ("MetaSequenceNameEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaSequenceNameEvent");}
- virtual char *GetEventStr(void) const;
-
- MetaSequenceNameEvent &operator=(const MetaSequenceNameEvent &e);
---- events/MSeqNum.h 1996-02-18 19:57:43.000000000 -0500
-+++ events/MSeqNum.h 2012-04-07 14:08:43.000000000 -0400
-@@ -44,7 +44,7 @@
- {return (new MetaSequenceNumberEvent(*this));}
-
- virtual EventType GetType(void) const {return (METASEQUENCENUMBER);}
-- virtual char *GetTypeStr(void) const
-+ virtual const char *GetTypeStr(void) const
- {return ("MetaSequenceNumberEvent");}
- virtual char *GetEventStr(void) const;
- long GetNumber(void) const {
---- events/MSeqSpec.cxx 1996-07-28 15:09:24.000000000 -0400
-+++ events/MSeqSpec.cxx 2012-04-07 15:47:09.000000000 -0400
-@@ -74,7 +74,7 @@
- MetaSequencerSpecificEvent::~MetaSequencerSpecificEvent()
- {
-
-- delete data;
-+ delete[] data;
- }
-
- void
-@@ -82,7 +82,7 @@
- {
-
- if (data != 0)
-- delete data;
-+ delete[] data;
- if (dat == WC_DATA || len == WC_LENGTH) {
- SetWildcard(wc_data);
- data = 0;
-@@ -102,7 +102,7 @@
-
- (MetaEvent)*this = (MetaEvent)e;
- if (data != 0)
-- delete data;
-+ delete[] data;
- if (e.GetWildcard(wc_data)) {
- data = 0;
- length = -1;
-@@ -144,7 +144,7 @@
- const unsigned char *ptr;
-
- if (data != 0)
-- delete data;
-+ delete[] data;
- if ((length = t.GetVarValue()) == -1)
- return ("Incomplete MetaSequenceSpecificEvent - bad length");
- data = new unsigned char[length];
---- events/MSeqSpec.h 1996-02-18 19:57:45.000000000 -0500
-+++ events/MSeqSpec.h 2012-04-07 14:08:43.000000000 -0400
-@@ -46,7 +46,7 @@
- {return (new MetaSequencerSpecificEvent(*this));}
-
- virtual EventType GetType(void) const {return (METASEQUENCERSPECIFIC);}
-- virtual char *GetTypeStr(void) const
-+ virtual const char *GetTypeStr(void) const
- {return ("MetaSequencerSpecificEvent");}
- virtual char *GetEventStr(void) const;
- const unsigned char *GetData(void) const {
---- events/MTempo.h 1996-02-18 19:57:49.000000000 -0500
-+++ events/MTempo.h 2012-04-07 14:08:43.000000000 -0400
-@@ -42,7 +42,7 @@
- virtual Event *Dup(void) const {return (new MetaTempoEvent(*this));}
-
- virtual EventType GetType(void) const {return (METATEMPO);}
-- virtual char *GetTypeStr(void) const {return ("MetaTempoEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaTempoEvent");}
- virtual char *GetEventStr(void) const;
- short GetTempo(void) const {
- if (GetWildcard(wc_tempo))
---- events/MText.cxx 1996-07-28 15:09:25.000000000 -0400
-+++ events/MText.cxx 2012-04-07 15:46:17.000000000 -0400
-@@ -83,14 +83,14 @@
- MetaTextEvent::~MetaTextEvent()
- {
-
-- delete string;
-+ delete[] string;
- }
-
- void
- MetaTextEvent::SetString(const char *str)
- {
-
-- delete string;
-+ delete[] string;
- if (str == WC_STRING) {
- string = 0;
- length = -1;
-@@ -110,7 +110,7 @@
-
- (MetaEvent)*this = (MetaEvent)e;
- length = e.length;
-- delete string;
-+ delete[] string;
- if (e.GetWildcard(wc_string)) {
- string = 0;
- return (*this);
-@@ -144,7 +144,7 @@
- const unsigned char *ptr;
-
- if (string != 0)
-- delete string;
-+ delete[] string;
- if ((length = t.GetVarValue()) == -1)
- return ("Incomplete MetaTextEvent - bad length");
- string = new char[length + 1];
---- events/MText.h 1996-02-18 19:57:52.000000000 -0500
-+++ events/MText.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new MetaTextEvent(*this));}
-
- virtual EventType GetType(void) const {return (METATEXT);}
-- virtual char *GetTypeStr(void) const {return ("MetaTextEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaTextEvent");}
- virtual char *GetEventStr(void) const;
- const char *GetString(void) const {
- if (GetWildcard(wc_string))
---- events/MTime.h 1996-02-18 19:57:55.000000000 -0500
-+++ events/MTime.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new MetaTimeEvent(*this));}
-
- virtual EventType GetType(void) const {return (METATIME);}
-- virtual char *GetTypeStr(void) const {return ("MetaTimeEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaTimeEvent");}
- virtual char *GetEventStr(void) const;
- int GetNumerator(void) const {
- if (GetWildcard(wc_numerator))
---- events/MUnknown.cxx 1996-07-28 15:09:26.000000000 -0400
-+++ events/MUnknown.cxx 2012-04-07 15:48:00.000000000 -0400
-@@ -86,14 +86,14 @@
- MetaUnknownEvent::~MetaUnknownEvent()
- {
-
-- delete data;
-+ delete[] data;
- }
-
- void
- MetaUnknownEvent::SetData(const unsigned char *dat, long len)
- {
-
-- delete data;
-+ delete[] data;
- if (dat == WC_DATA || len == WC_LENGTH) {
- SetWildcard(wc_data);
- data = 0;
-@@ -111,7 +111,7 @@
- {
-
- (MetaEvent)*this = (MetaEvent)e;
-- delete data;
-+ delete[] data;
- type = e.type;
- if (e.GetWildcard(wc_data)) {
- data = 0;
-@@ -158,7 +158,7 @@
- const unsigned char *ptr;
-
- if (data != 0)
-- delete data;
-+ delete[] data;
- if ((length = t.GetVarValue()) == -1)
- return ("Incomplete MetaUnknownEvent - bad length");
- data = new unsigned char[length];
---- events/MUnknown.h 1996-02-25 18:09:15.000000000 -0500
-+++ events/MUnknown.h 2012-04-07 14:08:43.000000000 -0400
-@@ -45,7 +45,7 @@
- virtual Event *Dup(void) const {return (new MetaUnknownEvent(*this));}
-
- virtual EventType GetType(void) const {return (METAUNKNOWN);}
-- virtual char *GetTypeStr(void) const {return ("MetaUnknownEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("MetaUnknownEvent");}
- virtual char *GetEventStr(void) const;
- const unsigned char *GetData(void) const {
- if (GetWildcard(wc_data))
---- events/NormEvnt.h 1996-02-18 19:58:01.000000000 -0500
-+++ events/NormEvnt.h 2012-04-07 14:08:43.000000000 -0400
-@@ -42,7 +42,7 @@
- virtual Event *Dup(void) const {return (new NormalEvent(*this));}
-
- virtual EventType GetType(void) const {return (NORMAL);}
-- virtual char *GetTypeStr(void) const {return ("NormalEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("NormalEvent");}
- virtual char *GetEventStr(void) const;
- int GetChannel(void) const {
- if (GetWildcard(wc_channel))
---- events/Note.h 1996-02-25 18:09:19.000000000 -0500
-+++ events/Note.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new NoteEvent(*this));}
-
- virtual EventType GetType(void) const {return (NOTE);}
-- virtual char *GetTypeStr(void) const {return ("NoteEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("NoteEvent");}
- virtual char *GetEventStr(void) const;
- int GetPitch(void) const {
- if (GetWildcard(wc_pitch))
---- events/NoteOff.h 1996-02-18 19:58:07.000000000 -0500
-+++ events/NoteOff.h 2012-04-07 14:08:43.000000000 -0400
-@@ -43,7 +43,7 @@
- virtual Event *Dup(void) const {return (new NoteOffEvent(*this));}
-
- virtual EventType GetType(void) const {return (NOTEOFF);}
-- virtual char *GetTypeStr(void) const {return ("NoteOffEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("NoteOffEvent");}
- virtual char *GetEventStr(void) const;
-
- NoteOffEvent &operator=(const NoteOffEvent &e);
---- events/NoteOn.h 1996-02-25 18:09:22.000000000 -0500
-+++ events/NoteOn.h 2012-04-07 14:08:43.000000000 -0400
-@@ -45,7 +45,7 @@
- virtual Event *Dup(void) const {return (new NoteOnEvent(*this));}
-
- virtual EventType GetType(void) const {return (NOTEON);}
-- virtual char *GetTypeStr(void) const {return ("NoteOnEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("NoteOnEvent");}
- virtual char *GetEventStr(void) const;
-
- unsigned long GetDuration(void) const {
---- events/Param.h 1996-02-18 19:58:13.000000000 -0500
-+++ events/Param.h 2012-04-07 14:08:43.000000000 -0400
-@@ -42,7 +42,7 @@
- virtual Event *Dup(void) const {return (new ParameterEvent(*this));}
-
- virtual EventType GetType(void) const {return (PARAMETER);}
-- virtual char *GetTypeStr(void) const {return ("ParameterEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("ParameterEvent");}
- virtual char *GetEventStr(void) const;
- int GetParameter(void) const {
- if (GetWildcard(wc_parameter))
---- events/PitchWhl.h 1996-02-18 19:58:16.000000000 -0500
-+++ events/PitchWhl.h 2012-04-07 14:08:43.000000000 -0400
-@@ -42,7 +42,7 @@
- virtual Event *Dup(void) const {return (new PitchWheelEvent(*this));}
-
- virtual EventType GetType(void) const {return (PITCHWHEEL);}
-- virtual char *GetTypeStr(void) const {return ("PitchWheelEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("PitchWheelEvent");}
- virtual char *GetEventStr(void) const;
- long GetValue(void) const {
- if (GetWildcard(wc_value))
---- events/Program.h 1996-02-18 19:58:19.000000000 -0500
-+++ events/Program.h 2012-04-07 14:08:43.000000000 -0400
-@@ -42,7 +42,7 @@
- virtual Event *Dup(void) const {return (new ProgramEvent(*this));}
-
- virtual EventType GetType(void) const {return (PROGRAM);}
-- virtual char *GetTypeStr(void) const {return ("ProgramEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("ProgramEvent");}
- virtual char *GetEventStr(void) const;
- int GetValue(void) const {
- if (GetWildcard(wc_value))
---- events/SysEx.cxx 1996-07-28 15:09:30.000000000 -0400
-+++ events/SysEx.cxx 2012-04-07 15:44:56.000000000 -0400
-@@ -81,7 +81,7 @@
- SystemExclusiveEvent::~SystemExclusiveEvent()
- {
-
-- delete data;
-+ delete[] data;
- }
-
- void
-@@ -89,7 +89,7 @@
- {
-
- if (data != 0)
-- delete data;
-+ delete[] data;
- if (len == WC_LENGTH || dat == WC_DATA) {
- SetWildcard(wc_data);
- data = 0;
-@@ -107,7 +107,7 @@
-
- (Event)*this = (Event)e;
- if (data != 0)
-- delete data;
-+ delete[] data;
- continued = e.continued;
- length = e.length;
- if (e.GetWildcard(wc_data)) {
-@@ -148,7 +148,7 @@
- const unsigned char *ptr;
-
- if (data != 0)
-- delete data;
-+ delete[] data;
- if ((length = t.GetVarValue()) == -1)
- return ("Incomplete SystemExclusiveEvent - bad length");
- data = new unsigned char[length];
---- events/SysEx.h 1996-02-18 19:58:22.000000000 -0500
-+++ events/SysEx.h 2012-04-07 14:08:43.000000000 -0400
-@@ -46,7 +46,7 @@
- {return (new SystemExclusiveEvent(*this));}
-
- virtual EventType GetType(void) const {return (SYSTEMEXCLUSIVE);}
-- virtual char *GetTypeStr(void) const {return ("SystemExclusiveEvent");}
-+ virtual const char *GetTypeStr(void) const {return ("SystemExclusiveEvent");}
- virtual char *GetEventStr(void) const;
- const unsigned char *GetData(void) const {
- if (GetWildcard(wc_data))
---- smf/SMFUtils.cxx 1996-08-04 23:47:36.000000000 -0400
-+++ smf/SMFUtils.cxx 2012-04-07 14:08:43.000000000 -0400
-@@ -59,7 +59,7 @@
- }
-
- long
--MWrite(int fd, char *data, long len)
-+MWrite(int fd, const char *data, long len)
- {
- int num_written;
- int total_written;
-@@ -96,7 +96,7 @@
- }
-
- long
--MWrite(Tcl_Channel channel, char *data, long len)
-+MWrite(Tcl_Channel channel, const char *data, long len)
- {
- int num_written;
- int total_written;
-@@ -116,7 +116,7 @@
-
-
- long
--VarToFix(unsigned char *var, int *len)
-+VarToFix(const unsigned char *var, int *len)
- {
- long fix;
-
---- smf/SMFUtils.h 1996-08-04 23:47:36.000000000 -0400
-+++ smf/SMFUtils.h 2012-04-07 14:08:43.000000000 -0400
-@@ -147,9 +147,9 @@
-
-
- extern long MRead(int fd, char *data, long len);
--extern long MWrite(int fd, char *data, long len);
-+extern long MWrite(int fd, const char *data, long len);
- extern long MRead(Tcl_Channel channel, char *data, long len);
--extern long MWrite(Tcl_Channel channel, char *data, long len);
--extern long VarToFix(unsigned char *var, int *len);
-+extern long MWrite(Tcl_Channel channel, const char *data, long len);
-+extern long VarToFix(const unsigned char *var, int *len);
- extern int FixToVar(long fix, unsigned char *var);
- #endif
---- song/Song.cxx 1996-08-04 23:47:39.000000000 -0400
-+++ song/Song.cxx 2012-04-11 01:02:09.000000000 -0400
-@@ -51,7 +51,7 @@
- }
- for (i = 0; i < s.num_tracks; i++) {
- tracks[i] = new EventTree(*s.tracks[i]);
-- assert(tracks[1] != 0);
-+ assert(tracks[i] != 0);
- }
- }
-
-@@ -102,7 +102,7 @@
-
- for (i = 0; i < num_tracks; i++)
- delete tracks[i];
-- delete tracks;
-+ delete[] tracks;
- }
-
- Event *
---- tclmEvnt.cxx 1996-07-29 20:14:11.000000000 -0400
-+++ tclmEvnt.cxx 2012-04-07 15:42:14.000000000 -0400
-@@ -44,6 +44,9 @@
- #include "tclmidi.h"
- #include "tclmEvnt.h"
-
-+#define SET_CONST_RESULT(string) \
-+ Tcl_SetResult(interp, (char *)(void *)string, TCL_STATIC)
-+
- void
- Tclm_PrintEvent(ostream &buf, Event *e)
- {
-@@ -148,7 +151,7 @@
- buf << "* " << str << ends;
- else
- buf << e->GetTime() << " " << str << ends;
-- delete str;
-+ delete[] str;
- }
-
- char *
-@@ -552,13 +555,9 @@
- }
-
- char *
--Tclm_PrintMetaEndOfTrack(MetaEndOfTrackEvent *e)
-+Tclm_PrintMetaEndOfTrack(MetaEndOfTrackEvent *)
- {
- ostrstream buf;
-- MetaEndOfTrackEvent *dummy;
--
-- // shut up a warning
-- dummy = e;
-
- buf << "MetaEndOfTrack" << ends;
- return (buf.str());
-@@ -722,11 +721,11 @@
- }
-
- Event *
--Tclm_ParseEvent(Tcl_Interp *interp, char *str)
-+Tclm_ParseEvent(Tcl_Interp *interp, const char *str)
- {
- Event *event;
-- Event *(*pfunc)(Tcl_Interp *, long, int, char **);
-- char **argv, **aptr;;
-+ Event *(*pfunc)(Tcl_Interp *, long, int, const char **);
-+ const char **argv, **aptr;
- char *name;
- long time;
- int argc, i, length;
-@@ -852,18 +851,19 @@
- }
- event = pfunc(interp, time, argc, argv);
- Tcl_Ckfree((char *)aptr);
-- delete name;
-+ delete[] name;
- return (event);
- }
-
- Event *
--Tclm_ParseNoteOff(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseNoteOff(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int channel, pitch, velocity;
-
- if (argc != 3 && argc != 4) {
-- Tcl_SetResult(interp, "bad event: should be \"time NoteOff "
-- "channel pitch ?velocity?\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time NoteOff "
-+ "channel pitch ?velocity?\"");
- return (0);
- }
-
-@@ -886,13 +886,14 @@
- }
-
- Event *
--Tclm_ParseNoteOn(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseNoteOn(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int channel, pitch, velocity;
-
- if (argc != 4) {
-- Tcl_SetResult(interp, "bad event: should be \"time NoteOn "
-- "channel pitch velocity\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time NoteOn "
-+ "channel pitch velocity\"");
- return (0);
- }
-
-@@ -913,7 +914,8 @@
- }
-
- Event *
--Tclm_ParseNote(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseNote(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- NoteOnEvent *event;
- NoteOffEvent *off;
-@@ -921,8 +923,8 @@
- int channel, pitch, velocity;
-
- if (argc != 5) {
-- Tcl_SetResult(interp, "bad event: should be \"time Note "
-- "channel pitch velocity duration\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time Note "
-+ "channel pitch velocity duration\"");
- return (0);
- }
-
-@@ -964,13 +966,14 @@
- }
-
- Event *
--Tclm_ParseKeyPressure(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseKeyPressure(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int channel, pitch, pressure;
-
- if (argc != 4) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time KeyPressure channel pitch pressure\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time KeyPressure channel pitch pressure\"");
- return (0);
- }
-
-@@ -991,13 +994,14 @@
- }
-
- Event *
--Tclm_ParseParameter(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseParameter(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int channel, parameter, value;
-
- if (argc != 4) {
-- Tcl_SetResult(interp, "bad event: should be \"time Parameter "
-- "channel parameter value\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time Parameter "
-+ "channel parameter value\"");
- return (0);
- }
-
-@@ -1018,13 +1022,14 @@
- }
-
- Event *
--Tclm_ParseProgram(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseProgram(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int channel, value;
-
- if (argc != 3) {
-- Tcl_SetResult(interp, "bad event: should be \"time Program "
-- "channel value\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time Program "
-+ "channel value\"");
- return (0);
- }
-
-@@ -1041,13 +1046,14 @@
- }
-
- Event *
--Tclm_ParseChannelPressure(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseChannelPressure(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int channel, pressure;
-
- if (argc != 3) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time ChannelPressure channel pressure\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time ChannelPressure channel pressure\"");
- return (0);
- }
-
-@@ -1064,14 +1070,15 @@
- }
-
- Event *
--Tclm_ParsePitchWheel(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParsePitchWheel(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int channel;
- long value;
-
- if (argc != 3) {
-- Tcl_SetResult(interp, "bad event: should be \"time PitchWheel "
-- "channel value\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time PitchWheel "
-+ "channel value\"");
- return (0);
- }
-
-@@ -1088,19 +1095,19 @@
- }
-
- Event *
--Tclm_ParseSystemExclusive(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseSystemExclusive(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
-- char **str;
-+ const char **str;
- SystemExclusiveEvent *event;
- unsigned char *data;
-- long len;
-+ int len;
- int i, val;
-
- if ((argc != 2 && argc != 3) || (argc == 3 && strncmp(argv[1], "cont",
- 4) != 0)) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time SystemExclusive ?continued? {data ?data ...?}\"",
-- TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time SystemExclusive ?continued? {data ?data ...?}\"");
- return (0);
- }
-
-@@ -1111,7 +1118,7 @@
- event = new SystemExclusiveEvent(time, data, len);
- return (event);
- }
-- if (Tcl_SplitList(interp, argv[1], (int *)&len, &str) != TCL_OK)
-+ if (Tcl_SplitList(interp, argv[1], &len, &str) != TCL_OK)
- return (0);
- } else {
- if (strcmp(argv[2], "*") == 0) {
-@@ -1121,7 +1128,7 @@
- event->SetContinued(1);
- return (event);
- }
-- if (Tcl_SplitList(interp, argv[2], (int *)&len, &str) != TCL_OK)
-+ if (Tcl_SplitList(interp, argv[2], &len, &str) != TCL_OK)
- return (0);
- }
-
-@@ -1139,20 +1146,20 @@
- event = new SystemExclusiveEvent(time, data, len);
- if (argc == 3)
- event->SetContinued(1);
-- delete data;
-+ delete[] data;
-
- return (event);
- }
-
- Event *
- Tclm_ParseMetaSequenceNumber(Tcl_Interp *interp, long time, int argc,
-- char **argv)
-+ const char **argv)
- {
- long num;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaSequenceNumber number\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaSequenceNumber number\"");
- return (0);
- }
-
-@@ -1165,13 +1172,14 @@
- }
-
- Event *
--Tclm_ParseMetaText(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaText(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- const char *t;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaText "
-- "string\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaText "
-+ "string\"");
- return (0);
- }
- if (strcmp(argv[1], "*") == 0)
-@@ -1183,13 +1191,14 @@
- }
-
- Event *
--Tclm_ParseMetaCopyright(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaCopyright(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- const char *t;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaCopyright string\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaCopyright string\"");
- return (0);
- }
-
-@@ -1203,13 +1212,13 @@
-
- Event *
- Tclm_ParseMetaSequenceName(Tcl_Interp *interp, long time, int argc,
-- char **argv)
-+ const char **argv)
- {
- const char *t;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaSequenceName string\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaSequenceName string\"");
- return (0);
- }
-
-@@ -1223,13 +1232,13 @@
-
- Event *
- Tclm_ParseMetaInstrumentName(Tcl_Interp *interp, long time, int argc,
-- char **argv)
-+ const char **argv)
- {
- const char *t;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaInstrumentName string\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaInstrumentName string\"");
- return (0);
- }
-
-@@ -1242,13 +1251,14 @@
- }
-
- Event *
--Tclm_ParseMetaLyric(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaLyric(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- const char *t;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaLyric "
-- "string\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaLyric "
-+ "string\"");
- return (0);
- }
-
-@@ -1261,13 +1271,14 @@
- }
-
- Event *
--Tclm_ParseMetaMarker(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaMarker(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- const char *t;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaMarker "
-- "string\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaMarker "
-+ "string\"");
- return (0);
- }
-
-@@ -1280,13 +1291,14 @@
- }
-
- Event *
--Tclm_ParseMetaCue(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaCue(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- const char *t;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaCue "
-- "string\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaCue "
-+ "string\"");
- return (0);
- }
-
-@@ -1300,17 +1312,17 @@
-
- Event *
- Tclm_ParseMetaChannelPrefix(Tcl_Interp *interp, long time, int argc,
-- char **argv)
-+ const char **argv)
- {
-- char **str;
-+ const char **str;
- MetaChannelPrefixEvent *event;
- unsigned char *data;
-- long len;
-+ int len;
- int i, val;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaChannelPrefix {data ?data ...?}\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaChannelPrefix {data ?data ...?}\"");
- return (0);
- }
-
-@@ -1319,7 +1331,7 @@
- len = MetaChannelPrefixEvent::WC_LENGTH;
- return (new MetaChannelPrefixEvent(time, data, len));
- }
-- if (Tcl_SplitList(interp, argv[1], (int *)&len, &str) != TCL_OK)
-+ if (Tcl_SplitList(interp, argv[1], &len, &str) != TCL_OK)
- return (0);
-
- data = new unsigned char[len];
-@@ -1334,19 +1346,20 @@
-
- Tcl_Ckfree((char *)str);
- event = new MetaChannelPrefixEvent(time, data, len);
-- delete data;
-+ delete[] data;
-
- return (event);
- }
-
- Event *
--Tclm_ParseMetaPortNumber(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaPortNumber(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int port;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaPortNumber port\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaPortNumber port\"");
- return (0);
- }
-
-@@ -1359,16 +1372,13 @@
- }
-
- Event *
--Tclm_ParseMetaEndOfTrack(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaEndOfTrack(Tcl_Interp *interp, long time, int argc,
-+ const char **)
- {
-- char *dummy;
--
-- // shut up a warning
-- dummy = argv[0];
-
- if (argc != 1) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaEndOfTrack\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaEndOfTrack\"");
- return (0);
- }
-
-@@ -1376,13 +1386,14 @@
- }
-
- Event *
--Tclm_ParseMetaTempo(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaTempo(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int tempo;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaTempo "
-- "tempo\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaTempo "
-+ "tempo\"");
- return (0);
- }
-
-@@ -1395,13 +1406,14 @@
- }
-
- Event *
--Tclm_ParseMetaSMPTE(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaSMPTE(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int hour, minute, second, frame, fractional_frame;
-
- if (argc != 6) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaSMPTE "
-- "hour minute second frame fractional_frame\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaSMPTE "
-+ "hour minute second frame fractional_frame\"");
- return (0);
- }
-
-@@ -1431,14 +1443,14 @@
- }
-
- Event *
--Tclm_ParseMetaTime(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaTime(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- int numerator, denominator, clocks, thirty_seconds;
-
- if (argc != 5) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaTime "
-- "numerator denominator clocks/beat 32nds/quarter\"",
-- TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaTime "
-+ "numerator denominator clocks/beat 32nds/quarter\"");
- return (0);
- }
-
-@@ -1464,15 +1476,16 @@
- }
-
- Event *
--Tclm_ParseMetaKey(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaKey(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
- Key key;
- Mode mode;
- int match;
-
- if (argc != 3) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaKey "
-- "key mode\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaKey "
-+ "key mode\"");
- return (0);
- }
-
-@@ -1500,18 +1513,17 @@
-
- Event *
- Tclm_ParseMetaSequencerSpecific(Tcl_Interp *interp, long time, int argc,
-- char **argv)
-+ const char **argv)
- {
-- char **str;
-+ const char **str;
- MetaSequencerSpecificEvent *event;
- unsigned char *data;
-- long len;
-+ int len;
- int i, val;
-
- if (argc != 2) {
-- Tcl_SetResult(interp, "bad event: should be "
-- "\"time MetaSequencerSpecific {data ?data ...?}\"",
-- TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be "
-+ "\"time MetaSequencerSpecific {data ?data ...?}\"");
- return (0);
- }
-
-@@ -1520,7 +1532,7 @@
- len = MetaSequencerSpecificEvent::WC_LENGTH;
- return (new MetaSequencerSpecificEvent(time, data, len));
- }
-- if (Tcl_SplitList(interp, argv[1], (int *)&len, &str) != TCL_OK)
-+ if (Tcl_SplitList(interp, argv[1], &len, &str) != TCL_OK)
- return (0);
-
- data = new unsigned char[len];
-@@ -1535,23 +1547,24 @@
-
- Tcl_Ckfree((char *)str);
- event = new MetaSequencerSpecificEvent(time, data, len);
-- delete data;
-+ delete[] data;
-
- return (event);
- }
-
- Event *
--Tclm_ParseMetaUnknown(Tcl_Interp *interp, long time, int argc, char **argv)
-+Tclm_ParseMetaUnknown(Tcl_Interp *interp, long time, int argc,
-+ const char **argv)
- {
-- char **str;
-+ const char **str;
- MetaUnknownEvent *event;
- unsigned char *data;
-- long len;
-+ int len;
- int i, type, val;
-
- if (argc != 3) {
-- Tcl_SetResult(interp, "bad event: should be \"time MetaUnknown "
-- "type {data ?data ...?}\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad event: should be \"time MetaUnknown "
-+ "type {data ?data ...?}\"");
- return (0);
- }
-
-@@ -1565,7 +1578,7 @@
- len = MetaUnknownEvent::WC_LENGTH;
- return (new MetaUnknownEvent(time, data, len, type));
- }
-- if (Tcl_SplitList(interp, argv[2], (int *)&len, &str) != TCL_OK)
-+ if (Tcl_SplitList(interp, argv[2], &len, &str) != TCL_OK)
- return (0);
-
- data = new unsigned char[len];
-@@ -1580,7 +1593,7 @@
-
- Tcl_Ckfree((char *)str);
- event = new MetaUnknownEvent(time, data, len, type);
-- delete data;
-+ delete[] data;
-
- return (event);
- }
---- tclmEvnt.h 1996-02-12 19:25:00.000000000 -0500
-+++ tclmEvnt.h 2012-04-07 14:08:43.000000000 -0400
-@@ -61,57 +61,57 @@
- extern char *Tclm_PrintMetaKey(MetaKeyEvent *e);
- extern char *Tclm_PrintMetaSequencerSpecific(MetaSequencerSpecificEvent *e);
- extern char *Tclm_PrintMetaUnknown(MetaUnknownEvent *e);
--extern Event *Tclm_ParseEvent(Tcl_Interp *interp, char *str);
-+extern Event *Tclm_ParseEvent(Tcl_Interp *interp, const char *str);
- extern Event *Tclm_ParseNoteOff(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseNoteOn(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseNote(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseKeyPressure(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseParameter(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseProgram(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseChannelPressure(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParsePitchWheel(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseSystemExclusive(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaSequenceNumber(Tcl_Interp *interp, long time,
-- int argc, char **argv);
-+ int argc, const char **argv);
- extern Event *Tclm_ParseMetaText(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaCopyright(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaSequenceName(Tcl_Interp *interp, long time,
-- int argc, char **argv);
-+ int argc, const char **argv);
- extern Event *Tclm_ParseMetaInstrumentName(Tcl_Interp *interp, long time,
-- int argc, char **argv);
-+ int argc, const char **argv);
- extern Event *Tclm_ParseMetaLyric(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaMarker(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaCue(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaChannelPrefix(Tcl_Interp *interp, long time,
-- int argc, char **argv);
-+ int argc, const char **argv);
- extern Event *Tclm_ParseMetaPortNumber(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaEndOfTrack(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaTempo(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaSMPTE(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaTime(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaKey(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- extern Event *Tclm_ParseMetaSequencerSpecific(Tcl_Interp *interp, long time,
-- int argc, char **argv);
-+ int argc, const char **argv);
- extern Event *Tclm_ParseMetaUnknown(Tcl_Interp *interp, long time, int argc,
-- char **argv);
-+ const char **argv);
- #endif
---- tclmPtch.cxx 1996-08-04 23:47:13.000000000 -0400
-+++ tclmPtch.cxx 2012-04-07 14:08:43.000000000 -0400
-@@ -37,10 +37,8 @@
- #include "tclmidi.h"
- #include "TclmIntp.h"
-
--static int Tclm_PatchRead(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_PatchFree(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
-+static Tcl_CmdProc Tclm_PatchRead;
-+static Tcl_CmdProc Tclm_PatchFree;
-
- int
- Tclm_PatchInit(Tcl_Interp *interp, TclmInterp *tclm_interp)
-@@ -53,7 +51,7 @@
-
- int
- Tclm_PatchRead(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- Tcl_Channel channel;
- int mode;
-@@ -96,7 +94,7 @@
-
- int
- Tclm_PatchFree(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
-
---- song/EvntTree.cxx.orig 1996-08-05 05:47:38.000000000 +0200
-+++ song/EvntTree.cxx 2013-05-14 11:22:45.000000000 +0200
-@@ -611,7 +611,7 @@
- for (j = 0; j < num_found; j++)
- new_found[j] = found[j];
- new_found[j] = e;
-- delete found;
-+ delete[] found;
- found = new_found;
- num_found++;
- }
-@@ -631,7 +631,7 @@
- for (j = 0; j < num_found; j++)
- new_found[j] = found[j];
- new_found[j] = e;
-- delete found;
-+ delete[] found;
- found = new_found;
- num_found++;
- }
-@@ -735,6 +735,7 @@
- assert(new_event != 0);
- place = rb_insert_b(place, (char *)time, (char *)new_event);
- }
-+
- curr_event = new_event;
- new_event->SetEventTreeNode(place);
- return (new_event);
-@@ -746,7 +747,7 @@
- Event *e, *events, *prev;
- EventTreeNode *n, *next_n;
-
-- n = (EventTreeNode *)event.GetEventTreeNode();
-+ n = event.GetEventTreeNode();
- if (n != 0) {
- e = &event;
- prev = e->GetPrevEvent();
-@@ -785,6 +786,9 @@
- }
-
- }
-+ if (e->GetNextEvent() == 0 ||
-+ (prev && prev->GetEventTreeNode() != n))
-+ rb_delete_node(n);
- } else {
- // This is the only event in the node
- if (curr_event == e) {
-@@ -818,7 +822,7 @@
- /* get each event in order and delete it */
- while ((e = NextEvent()) != 0)
- DeleteEvent(*e);
--
-+
- /* then free head */
- free(head);
- head = 0;
---- tclmPlay.cxx.orig 1996-08-05 05:47:12.000000000 +0200
-+++ tclmPlay.cxx 2013-06-05 15:46:23.000000000 +0200
-@@ -43,30 +43,24 @@
- #include "TclmDr75.h"
- #endif
-
-+#define SET_CONST_RESULT(string) \
-+ Tcl_SetResult(interp, (char *)(void *)string, TCL_STATIC)
-+
- #if defined(HAVE_SYS_MIDIIOCTL_H)
- static const int DeviceConfigured = 1;
- #else
- static const int DeviceConfigured = 0;
- #endif
-
--static int Tclm_MidiPlay(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiRecord(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiStop(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiWait(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiDevice(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiTime(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiFeature(ClientData client_data, Tcl_Interp *interp,
-- int argc, char **argv);
--static int Tclm_MidiSend(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiRecv(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
-+static Tcl_CmdProc Tclm_MidiPlay;
-+static Tcl_CmdProc Tclm_MidiRecord;
-+static Tcl_CmdProc Tclm_MidiStop;
-+static Tcl_CmdProc Tclm_MidiWait;
-+static Tcl_CmdProc Tclm_MidiDevice;
-+static Tcl_CmdProc Tclm_MidiTime;
-+static Tcl_CmdProc Tclm_MidiFeature;
-+static Tcl_CmdProc Tclm_MidiSend;
-+static Tcl_CmdProc Tclm_MidiRecv;
-
- int
- Tclm_PlayInit(Tcl_Interp *interp, TclmInterp *tclm_interp)
-@@ -89,7 +83,7 @@
-
- int
- Tclm_MidiPlay(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *song;
-@@ -130,13 +124,13 @@
- dev->GetError(), 0);
- return (TCL_ERROR);
- }
-- Tcl_SetResult(interp, "1", TCL_STATIC);
-+ SET_CONST_RESULT("1");
- return (TCL_OK);
- }
-
- int
- Tclm_MidiRecord(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *rsong, *psong;
-@@ -185,13 +179,13 @@
- dev->GetError(), 0);
- return (TCL_ERROR);
- }
-- Tcl_SetResult(interp, "1", TCL_STATIC);
-+ SET_CONST_RESULT("1");
- return (TCL_OK);
- }
-
- int
- Tclm_MidiStop(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- MidiDevice *dev;
-@@ -214,13 +208,13 @@
- dev->GetError(), 0);
- return (TCL_ERROR);
- }
-- Tcl_SetResult(interp, "1", TCL_STATIC);
-+ SET_CONST_RESULT("1");
- return (TCL_OK);
- }
-
- int
- Tclm_MidiWait(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- MidiDevice *dev;
-@@ -241,19 +235,20 @@
- "to stop\n", dev->GetError(), 0);
- return (TCL_ERROR);
- }
-- Tcl_SetResult(interp, "1", TCL_STATIC);
-+ SET_CONST_RESULT("1");
- return (TCL_OK);
- }
-
- int
- Tclm_MidiDevice(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- MidiDevice *dev;
- ostrstream *buf;
- unsigned short mask;
-- char *dev_key, *str, **sub_argv;
-+ const char *dev_key, **sub_argv;
-+ char *str;
- int con, i, imask, j, mt, sub_argc, value;
-
- tclm_interp = (TclmInterp *)client_data;
-@@ -293,7 +288,7 @@
- dev = 0;
- #endif
- if (dev == 0) {
-- Tcl_SetResult(interp, "Out of memory", TCL_STATIC);
-+ SET_CONST_RESULT("Out of memory");
- return (TCL_ERROR);
- }
- if (!dev->Open(argv[1])) {
-@@ -303,8 +298,7 @@
- }
- dev_key = tclm_interp->AddDevice(dev);
- if (dev_key == 0) {
-- Tcl_SetResult(interp, "Couldn't add device",
-- TCL_STATIC);
-+ SET_CONST_RESULT("Couldn't add device");
- return (TCL_ERROR);
- }
- Tcl_AppendResult(interp, dev_key, 0);
-@@ -317,13 +311,13 @@
- return (TCL_ERROR);
- if (strcmp(sub_argv[0], "close") == 0) {
- if (i != argc - 1) {
-- Tcl_SetResult(interp, "Can't perform ops after "
-- "closing device", TCL_STATIC);
-+ SET_CONST_RESULT("Can't perform ops after "
-+ "closing device");
- return (TCL_ERROR);
- }
- if (dev_key == 0) {
-- Tcl_SetResult(interp, "Can't close until after "
-- "device has been opened", TCL_STATIC);
-+ SET_CONST_RESULT("Can't close until after "
-+ "device has been opened");
- return (TCL_ERROR);
- }
- tclm_interp->DeleteDevice(dev_key);
-@@ -465,7 +459,7 @@
-
- int
- Tclm_MidiTime(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- ostrstream tbuf;
- unsigned long t;
-@@ -498,11 +492,11 @@
-
- int
- Tclm_MidiFeature(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- MidiDevice *dev;
-- char **sub_argv;
-+ const char **sub_argv;
- int i, sub_argc;
-
- if (argc < 3) {
-@@ -542,7 +536,7 @@
-
- int
- Tclm_MidiSend(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- MidiDevice *dev;
-@@ -564,7 +558,7 @@
-
- events = new Event *[argc - 2];
- if (events == 0) {
-- Tcl_SetResult(interp, "Out of memory", TCL_STATIC);
-+ SET_CONST_RESULT("Out of memory");
- return (TCL_ERROR);
- }
- num_events = 0;
-@@ -584,9 +578,8 @@
- num_events++;
- }
- } else {
-- if (strlen(interp->result) == 0) {
-- Tcl_SetResult(interp, "Out of memory",
-- TCL_STATIC);
-+ if (strlen(Tcl_GetStringResult(interp)) == 0) {
-+ SET_CONST_RESULT("Out of memory");
- return (TCL_ERROR);
- }
- }
-@@ -603,7 +596,7 @@
-
- int
- Tclm_MidiRecv(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- ostrstream *buf;
- TclmInterp *tclm_interp;
---- tclmCmd.cxx.orig 1996-08-05 05:47:12.000000000 +0200
-+++ tclmCmd.cxx 2013-06-05 15:46:37.000000000 +0200
-@@ -41,39 +41,27 @@
- #include "tclmEvnt.h"
- #include "patchlvl.h"
-
--static int Tclm_MidiMake(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiFree(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiRead(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiWrite(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiConfig(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiRewind(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiGet(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiPut(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiDelete(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiMerge(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiSplit(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiCopy(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv);
--static int Tclm_MidiVersion(ClientData client_data, Tcl_Interp *interp,
-- int argc, char **argv);
--static int Tclm_MidiTrack(ClientData client_data, Tcl_Interp *interp,
-- int argc, char **argv);
--static int Tclm_MidiGrep(ClientData client_data, Tcl_Interp *interp,
-- int argc, char **argv);
-+static Tcl_CmdProc Tclm_MidiMake;
-+static Tcl_CmdProc Tclm_MidiFree;
-+static Tcl_CmdProc Tclm_MidiRead;
-+static Tcl_CmdProc Tclm_MidiWrite;
-+static Tcl_CmdProc Tclm_MidiConfig;
-+static Tcl_CmdProc Tclm_MidiRewind;
-+static Tcl_CmdProc Tclm_MidiGet;
-+static Tcl_CmdProc Tclm_MidiPut;
-+static Tcl_CmdProc Tclm_MidiDelete;
-+static Tcl_CmdProc Tclm_MidiMerge;
-+static Tcl_CmdProc Tclm_MidiSplit;
-+static Tcl_CmdProc Tclm_MidiCopy;
-+static Tcl_CmdProc Tclm_MidiVersion;
-+static Tcl_CmdProc Tclm_MidiTrack;
-+static Tcl_CmdProc Tclm_MidiGrep;
- static int Tclm_GetTrack(TclmInterp *tclm_interp, Tcl_Interp *interp,
- const char *str, Song **song, int *track);
-
-+#define SET_CONST_RESULT(string) \
-+ Tcl_SetResult(interp, (char *)(void *)string, TCL_STATIC)
-+
-
- /*
- * DllEntryPoint --
-@@ -98,8 +86,7 @@
-
- ti = new TclmInterp;
- if (ti == 0) {
-- Tcl_SetResult(interp, "Out of memory in Tclmidi_Init",
-- TCL_STATIC);
-+ SET_CONST_RESULT("Out of memory in Tclmidi_Init");
- return (TCL_ERROR);
- }
- Tcl_CreateCommand(interp, "midimake", Tclm_MidiMake, ti, 0);
-@@ -129,7 +116,7 @@
-
- int
- Tclm_MidiMake(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *s;
-@@ -145,13 +132,13 @@
- s = new Song;
- key = tclm_interp->AddSong(s);
- Tcl_SetResult(interp, key, TCL_VOLATILE);
-- delete key;
-+ delete[] key;
- return (TCL_OK);
- }
-
- int
- Tclm_MidiFree(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
-
-@@ -171,7 +158,7 @@
-
- int
- Tclm_MidiRead(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- Tcl_Channel channel;
- int mode;
-@@ -211,7 +198,7 @@
-
- int
- Tclm_MidiWrite(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *song;
-@@ -250,12 +237,13 @@
-
- int
- Tclm_MidiConfig(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- ostrstream *buf;
- TclmInterp *tclm_interp;
- Song *song;
-- char *str, **sub_argv;
-+ char *str;
-+ const char **sub_argv;
- int i, sub_argc, value;
-
- if (argc < 2) {
-@@ -338,8 +326,8 @@
- }
- break;
- default:
-- Tcl_SetResult(interp, "wrong # args: should be "
-- "{format|division|tracks ?value?}", TCL_STATIC);
-+ SET_CONST_RESULT("wrong # args: should be "
-+ "{format|division|tracks ?value?}");
- return (TCL_ERROR);
- break;
- }
-@@ -350,7 +338,7 @@
-
- int
- Tclm_MidiRewind(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *song;
-@@ -380,7 +368,7 @@
-
- int
- Tclm_MidiGet(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- ostrstream *buf;
- long time;
-@@ -421,7 +409,7 @@
- printable = 0;
- while (!printable) {
- if ((e = song->NextEvent(track)) == 0) {
-- Tcl_SetResult(interp, "EOT", TCL_STATIC);
-+ SET_CONST_RESULT("EOT");
- printable = 1;
- } else {
- buf = new ostrstream;
-@@ -432,7 +420,7 @@
- TCL_VOLATILE);
- printable = 1;
- }
-- delete str;
-+ delete[] str;
- delete buf;
- }
- }
-@@ -440,7 +428,7 @@
- printable = 0;
- while (!printable) {
- if ((e = song->PrevEvent(track)) == 0) {
-- Tcl_SetResult(interp, "EOT", TCL_STATIC);
-+ SET_CONST_RESULT("EOT");
- printable = 1;
- } else {
- buf = new ostrstream;
-@@ -459,7 +447,7 @@
- if (Tcl_GetLong(interp, argv[3], &time) != TCL_OK)
- return (TCL_ERROR);
- if ((events = song->GetEvents((short)track, time)) == 0)
-- Tcl_SetResult(interp, "EOT", TCL_STATIC);
-+ SET_CONST_RESULT("EOT");
- else {
- for (e = events; e != 0; e = e->GetNextEvent()) {
- buf = new ostrstream;
-@@ -477,7 +465,7 @@
-
- int
- Tclm_MidiPut(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *song;
-@@ -513,18 +501,17 @@
- }
-
- if ((event = Tclm_ParseEvent(interp, argv[3])) == 0) {
-- if (strlen(interp->result) == 0)
-- Tcl_SetResult(interp, "No more memory", TCL_STATIC);
-+ if (strlen(Tcl_GetStringResult(interp)) == 0)
-+ SET_CONST_RESULT("No more memory");
- return (TCL_ERROR);
- }
- if (event->IsWildcard()) {
-- Tcl_SetResult(interp, "Can't put wildcard events in a song",
-- TCL_STATIC);
-+ SET_CONST_RESULT("Can't put wildcard events in a song");
- return (TCL_ERROR);
- }
- new_e1 = song->PutEvent(track, *event);
- if (new_e1 == 0) {
-- Tcl_SetResult(interp, "Couldn't put event", TCL_STATIC);
-+ SET_CONST_RESULT("Couldn't put event");
- return (TCL_ERROR);
- }
- // check to see if it has a note off too
-@@ -534,8 +521,7 @@
- if (np != 0) {
- new_e2 = (NoteEvent *)song->PutEvent(track, *np);
- if (new_e2 == 0) {
-- Tcl_SetResult(interp, "Couldn't put event",
-- TCL_STATIC);
-+ SET_CONST_RESULT("Couldn't put event");
- return (TCL_ERROR);
- }
- ((NoteEvent *)new_e1)->SetNotePair(new_e2);
-@@ -549,7 +535,7 @@
-
- int
- Tclm_MidiDelete(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *song;
-@@ -592,17 +578,16 @@
- if (Tcl_GetLong(interp, argv[5], (long *)&end) != TCL_OK)
- return (TCL_ERROR);
- if (!song->DeleteRange(track, start, end)) {
-- Tcl_SetResult(interp, "couldn't delete range",
-- TCL_STATIC);
-+ SET_CONST_RESULT("couldn't delete range");
- return (TCL_ERROR);
- }
-- Tcl_SetResult(interp, "1", TCL_STATIC);
-+ SET_CONST_RESULT("1");
- return (TCL_OK);
- }
-
- if ((event = Tclm_ParseEvent(interp, argv[3])) == 0) {
-- if (strlen(interp->result) == 0)
-- Tcl_SetResult(interp, "No more memory", TCL_STATIC);
-+ if (strlen(Tcl_GetStringResult(interp)) == 0)
-+ SET_CONST_RESULT("No more memory");
- return (TCL_ERROR);
- }
- // If this is a NoteOn/NoteOff pair, get real NoteOff from tree
-@@ -616,7 +601,7 @@
- for (e = events; e != 0 && !(*event == *e);
- e = e->GetNextEvent());
- if (e == 0) {
-- Tcl_SetResult(interp, "0", TCL_STATIC);
-+ SET_CONST_RESULT("0");
- delete ((NoteEvent *)event)->GetNotePair();
- delete event;
- return (TCL_OK);
-@@ -625,7 +610,7 @@
- // find real NoteOff pair and delete it
- note_off = ((NoteEvent *)e)->GetNotePair();
- if (!song->DeleteEvent(track, *note_off)) {
-- Tcl_SetResult(interp, "0", TCL_STATIC);
-+ SET_CONST_RESULT("0");
- delete ((NoteEvent *)event)->GetNotePair();
- delete event;
- return (TCL_OK);
-@@ -633,7 +618,7 @@
- delete ((NoteEvent *)event)->GetNotePair();
- }
- if (!song->DeleteEvent(track, *event)) {
-- Tcl_SetResult(interp, "0", TCL_STATIC);
-+ SET_CONST_RESULT("0");
- if (event->GetType() == NOTEON &&
- ((NoteEvent *)event)->GetNotePair() != 0)
- delete ((NoteEvent *)event)->GetNotePair();
-@@ -641,13 +626,13 @@
- return (TCL_OK);
- }
- delete event;
-- Tcl_SetResult(interp, "1", TCL_STATIC);
-+ SET_CONST_RESULT("1");
- return (TCL_OK);
- }
-
- int
- Tclm_MidiMerge(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *dest_song, *src_song;
-@@ -680,7 +665,7 @@
-
- int
- Tclm_MidiSplit(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *src_song, *meta_song, *normal_song;
-@@ -715,7 +700,7 @@
-
- int
- Tclm_MidiCopy(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- EventTree *tmp_track;
-@@ -748,6 +733,7 @@
- scalar = (double)dest_song->GetDivision() / src_song->GetDivision();
-
- tmp_track = src_song->GetRange(src_track, sstart, send);
-+fprintf(stderr, "Got tmp_track as %p\n", tmp_track);
- if (tmp_track == 0) {
- Tcl_AppendResult(interp, "Couldn't get range from: ", argv[3],
- " to ", argv[4], 0);
-@@ -757,20 +743,23 @@
- if (!src_song->DeleteRange(src_track, sstart, send)) {
- Tcl_AppendResult(interp, "Couldn't remove events "
- "from source track", 0);
-+ delete tmp_track;
- return (TCL_ERROR);
- }
- }
- if (!dest_song->Add(dest_track, *tmp_track, dstart, scalar)) {
- Tcl_AppendResult(interp, "Couldn't add range", 0);
-+ delete tmp_track;
- return (TCL_ERROR);
- }
-+fprintf(stderr, "Deleting tmp_track %p\n", tmp_track);
- delete tmp_track;
- return (TCL_OK);
- }
-
- int
- Tclm_MidiVersion(ClientData client_data, Tcl_Interp *interp, int argc,
-- char *argv[])
-+ const char *argv[])
- {
- ClientData *dummy;
-
-@@ -782,13 +771,13 @@
- argv[0], "\"", 0);
- return (TCL_ERROR);
- }
-- Tcl_SetResult(interp, (char *)TCLMIDI_VERSION, TCL_STATIC);
-+ SET_CONST_RESULT(TCLMIDI_VERSION);
- return (TCL_OK);
- }
-
- int
- Tclm_MidiTrack(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *song;
-@@ -848,7 +837,7 @@
-
- int
- Tclm_MidiGrep(ClientData client_data, Tcl_Interp *interp, int argc,
-- char **argv)
-+ const char **argv)
- {
- TclmInterp *tclm_interp;
- Song *song;
-@@ -857,6 +846,7 @@
- NoteEvent *np;
- ostrstream *buf;
- char *str;
-+ int result;
-
- if (argc < 4) {
- Tcl_AppendResult(interp, "wrong # args: should be \"",
-@@ -888,16 +878,15 @@
- num_events = argc - 3;
- events = new Event *[num_events];
- if (events == 0) {
-- Tcl_SetResult(interp, "No more memory", TCL_STATIC);
-+ SET_CONST_RESULT("No more memory");
- return (TCL_ERROR);
- }
- for (i = 0; i < num_events; i++) {
- // parse events
- events[i] = Tclm_ParseEvent(interp, argv[i + 3]);
- if (events[i] == 0) {
-- if (strlen(interp->result) == 0)
-- Tcl_SetResult(interp, "No more memory",
-- TCL_STATIC);
-+ if (strlen(Tcl_GetStringResult(interp)) == 0)
-+ SET_CONST_RESULT("No more memory");
- i--;
- for (; i >= 0; i--) {
- if (events[i]->GetType() == NOTEON) {
-@@ -913,9 +902,11 @@
- }
- }
- if (!song->Grep(track, events, num_events, &matched, &num_matched)) {
-- Tcl_SetResult(interp, "midigrep failed", TCL_STATIC);
-- return (TCL_ERROR);
-- }
-+ SET_CONST_RESULT("midigrep failed");
-+ result = TCL_ERROR;
-+ } else
-+ result = TCL_OK;
-+
- for (i = 0; i < num_events; i++) {
- if (events[i]->GetType() == NOTEON) {
- np = ((NoteEvent *)events[i])->GetNotePair();
-@@ -924,33 +915,33 @@
- }
- delete events[i];
- }
-- delete events;
-+ delete[] events;
- for (i = 0; i < num_matched; i++) {
- buf = new ostrstream;
- Tclm_PrintEvent(*buf, matched[i]);
- str = buf->str();
- if (str != 0 && str[0] != '\0')
- Tcl_AppendElement(interp, str);
-- delete str;
-+ delete[] str;
- delete buf;
- }
-- delete matched;
-+ delete[] matched;
-+ return (result);
- return (TCL_OK);
- }
-
--
- int
- Tclm_GetTrack(TclmInterp *tclm_interp, Tcl_Interp *interp, const char *str,
- Song **song, int *track)
- {
-- char **sub_argv;
-+ const char **sub_argv;
- int sub_argc;
-
-- if (Tcl_SplitList(interp, (char *)str, &sub_argc, &sub_argv) != TCL_OK)
-+ if (Tcl_SplitList(interp, str, &sub_argc, &sub_argv) != TCL_OK)
- return (TCL_ERROR);
- if (sub_argc != 2) {
-- Tcl_SetResult(interp, "bad track designation: "
-- "should be \"{MidiID Track}\"", TCL_STATIC);
-+ SET_CONST_RESULT("bad track designation: "
-+ "should be \"{MidiID Track}\"");
- Tcl_Ckfree((char *)sub_argv);
- return (TCL_ERROR);
- }
diff --git a/audio/tclmidi/files/patch-rb b/audio/tclmidi/files/patch-rb
deleted file mode 100644
index 1d9107628373..000000000000
--- a/audio/tclmidi/files/patch-rb
+++ /dev/null
@@ -1,456 +0,0 @@
---- rb/rb.h 1994-12-05 16:57:58.000000000 -0500
-+++ rb/rb.h 2012-04-07 13:21:08.000000000 -0400
-@@ -34,38 +34,38 @@
- } v;
- } *Rb_node;
-
--#ifndef __P
--#if defined(__STDC__) || defined(__cplusplus)
--#define __P(protos) protos
--#else
--#define __P(protos) ()
--#endif
--#endif
--
-+#ifndef EXTERN
- #ifdef __cplusplus
- #define EXTERN extern "C"
- #else
- #define EXTERN extern
- #endif
-+#endif
-
--EXTERN Rb_node make_rb __P(());
--EXTERN Rb_node rb_insert_b __P((Rb_node node, char *key, char *value));
--
--EXTERN Rb_node rb_find_key __P((Rb_node tree, char *key));
--EXTERN Rb_node rb_find_ikey __P((Rb_node tree, int ikey));
--EXTERN Rb_node rb_find_ukey __P((Rb_node tree, unsigned long ukey));
--EXTERN Rb_node rb_find_gkey __P((Rb_node tree, char *key, int (*fxn)()));
--
--EXTERN Rb_node rb_find_key_n __P((Rb_node tree, char *key, int *found));
--EXTERN Rb_node rb_find_ikey_n __P((Rb_node tree, int ikey, int *found));
--EXTERN Rb_node rb_find_ukey_n __P((Rb_node tree, unsigned long ukey,
-- int *found));
--EXTERN Rb_node rb_find_gkey_n __P((Rb_node tree, char *key, int (*fxn)(),
-- int *found));
--EXTERN void rb_delete_node __P((Rb_node node));
--EXTERN void rb_free_tree __P((Rb_node node)); /* Deletes and frees an entire tree */
--EXTERN char *rb_val __P((Rb_node node)); /* Returns node->v.val
-+typedef int (*Rb_cmp)(const char *key1, const char *key2);
-+EXTERN Rb_node make_rb(void);
-+EXTERN Rb_node rb_insert_b(Rb_node node, char *key, char *value);
-+
-+EXTERN Rb_node rb_find_key(Rb_node tree, const char *key);
-+EXTERN Rb_node rb_find_ikey(Rb_node tree, int ikey);
-+EXTERN Rb_node rb_find_ukey(Rb_node tree, unsigned long ukey);
-+EXTERN Rb_node rb_find_gkey(Rb_node tree, const char *key, Rb_cmp);
-+
-+EXTERN Rb_node rb_find_key_n(Rb_node tree, const char *key, int *found);
-+EXTERN Rb_node rb_find_ikey_n(Rb_node tree, int ikey, int *found);
-+EXTERN Rb_node rb_find_ukey_n(Rb_node tree, unsigned long ukey,
-+ int *found);
-+EXTERN Rb_node rb_find_gkey_n(Rb_node tree, const char *key, Rb_cmp,
-+ int *found);
-+EXTERN void rb_delete_node(Rb_node node);
-+EXTERN void rb_free_tree(Rb_node node); /* Deletes and frees an entire tree */
-+EXTERN char *rb_val(Rb_node node); /* Returns node->v.val
- (this is to shut lint up */
-+EXTERN void rb_print_tree(const struct rb_node * const t, int level);
-+EXTERN void rb_iprint_tree(const struct rb_node * const t, int level);
-+EXTERN void rb_uprint_tree(const struct rb_node * const t, int level);
-+EXTERN int rb_nblack(const struct rb_node *t);
-+EXTERN int rb_plength(const struct rb_node *t);
-
- #define rb_insert_a(n, k, v) rb_insert_b(n->c.list.flink, k, v)
- #define rb_insert(t, k, v) rb_insert_b(rb_find_key(t, k), k, v)
-@@ -84,5 +84,5 @@
- #define rb_traverse(ptr, lst) \
- for(ptr = rb_first(lst); ptr != nil(lst); ptr = rb_next(ptr))
-
--EXTERN void recolor __P(());
--EXTERN void single_rotate __P(());
-+EXTERN void recolor(Rb_node);
-+EXTERN void single_rotate(Rb_node, int);
---- rb/rb.c 1994-12-05 16:57:57.000000000 -0500
-+++ rb/rb.c 2012-04-07 13:22:05.000000000 -0400
-@@ -37,10 +37,8 @@
- setnormal(new);\
- }
-
--void
--mk_new_int(l, r, p, il)
-- Rb_node l, r, p;
-- int il;
-+static void
-+mk_new_int(Rb_node l, Rb_node r, Rb_node p, int il)
- {
- Rb_node new;
-
-@@ -71,9 +69,8 @@
- }
-
-
--Rb_node
--lprev(n)
-- Rb_node n;
-+static Rb_node
-+lprev(Rb_node n)
- {
- if (ishead(n))
- return (n);
-@@ -85,9 +82,8 @@
- return (n->p.parent);
- }
-
--Rb_node
--rprev(n)
-- Rb_node n;
-+static Rb_node
-+rprev(Rb_node n)
- {
- if (ishead(n))
- return (n);
-@@ -109,24 +105,20 @@
- head->c.list.flink = head;
- head->c.list.blink = head;
- head->p.root = head;
-- head->k.key = "";
-+ /* head->k.key = ""; */
- head->v.val = NULL;
- sethead(head);
- return (head);
- }
-
- Rb_node
--rb_find_key_n(n, key, fnd)
-- Rb_node n;
-- char *key;
-- int *fnd;
-+rb_find_key_n(Rb_node n, const char *key, int *fnd)
- {
- int cmp;
-
- *fnd = 0;
- if (!ishead(n)) {
-- fprintf(stderr, "rb_find_key_n called on non-head 0x%x\n",
-- (int)n);
-+ fprintf(stderr, "%s called on non-head %p\n", __func__, n);
- exit(1);
- }
- if (n->p.root == n)
-@@ -156,9 +148,7 @@
- }
-
- Rb_node
--rb_find_key(n, key)
-- Rb_node n;
-- char *key;
-+rb_find_key(Rb_node n, const char *key)
- {
- int fnd;
-
-@@ -173,8 +163,7 @@
- {
- *fnd = 0;
- if (!ishead(n)) {
-- fprintf(stderr, "rb_find_ikey_n called on non-head 0x%x\n",
-- (int)n);
-+ fprintf(stderr, "%s called on non-head %p\n", __func__, n);
- exit(1);
- }
- if (n->p.root == n)
-@@ -208,8 +197,7 @@
-
- *fnd = 0;
- if (!ishead(n)) {
-- fprintf(stderr, "rb_find_ukey_n called on non-head 0x%x\n",
-- (int)n);
-+ fprintf(stderr, "%s called on non-head %p\n", __func__, n);
- exit(1);
- }
- if (n->p.root == n)
-@@ -255,18 +243,13 @@
- }
-
- Rb_node
--rb_find_gkey_n(n, key, fxn, fnd)
-- Rb_node n;
-- char *key;
-- int (*fxn)();
-- int *fnd;
-+rb_find_gkey_n(Rb_node n, const char *key, Rb_cmp fxn, int *fnd)
- {
- int cmp;
-
- *fnd = 0;
- if (!ishead(n)) {
-- fprintf(stderr, "rb_find_key_n called on non-head 0x%x\n",
-- (int)n);
-+ fprintf(stderr, "%s called on non-head %p\n", __func__, n);
- exit(1);
- }
- if (n->p.root == n)
-@@ -296,20 +279,15 @@
- }
-
- Rb_node
--rb_find_gkey(n, key, fxn)
-- Rb_node n;
-- char *key;
-- int (*fxn)();
-+rb_find_gkey(Rb_node n, const char *key, Rb_cmp fxn)
- {
- int fnd;
-
- return (rb_find_gkey_n(n, key, fxn, &fnd));
- }
-+
- Rb_node
--rb_insert_b(n, key, val)
-- Rb_node n;
-- char *key;
-- char *val;
-+rb_insert_b(Rb_node n, char *key, char *val)
- {
- Rb_node newleft, newright, newnode, p;
-
-@@ -346,8 +324,7 @@
- }
-
- void
--recolor(n)
-- Rb_node n;
-+recolor(Rb_node n)
- {
- Rb_node p, gp, s;
- int done = 0;
-@@ -392,9 +369,7 @@
- }
-
- void
--single_rotate(y, l)
-- Rb_node y;
-- int l;
-+single_rotate(Rb_node y, int l)
- {
- int rl, ir;
- Rb_node x, yp;
-@@ -440,20 +415,17 @@
- }
-
- void
--rb_delete_node(n)
-- Rb_node n;
-+rb_delete_node(Rb_node n)
- {
- Rb_node s, p, gp;
- char ir;
-
- if (isint(n)) {
-- fprintf(stderr, "Cannot delete an internal node: 0x%x\n",
-- (int)n);
-+ fprintf(stderr, "Cannot delete an internal node: %p\n", n);
- exit(1);
- }
- if (ishead(n)) {
-- fprintf(stderr, "Cannot delete the head of an rb_tree: 0x%x\n",
-- (int)n);
-+ fprintf(stderr, "Cannot delete the head of an rb_tree: %p\n", n);
- exit(1);
- }
- delete_item((List)n); /* Delete it from the list */
-@@ -579,120 +551,112 @@
- }
-
- void
--rb_print_tree(t, level)
-- Rb_node t;
-- int level;
-+rb_print_tree(const struct rb_node * const t, int level)
- {
- int i;
-
- if (ishead(t) && t->p.parent == t) {
-- printf("tree 0x%x is empty\n",
-- (int)t);
-+ printf("tree %p is empty\n", t);
- } else if (ishead(t)) {
-- printf("Head: 0x%x. Root = 0x%x\n", (int)t, (int)t->p.root);
-+ printf("Head: %p. Root = %p\n", t, t->p.root);
- rb_print_tree(t->p.root, 0);
- } else {
- if (isext(t)) {
- for (i = 0; i < level; i++)
- putchar(' ');
-- printf("Ext node 0x%x: %c,%c: p=0x%x, k=%s\n", (int)t,
-+ printf("Ext node %p: %c,%c: p=%p, k=%s\n", t,
- isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-- (int)t->p.parent, t->k.key);
-+ t->p.parent, t->k.key);
- } else {
- rb_print_tree(t->c.child.left, level + 2);
- rb_print_tree(t->c.child.right, level + 2);
- for (i = 0; i < level; i++)
- putchar(' ');
-- printf("Int node 0x%x: %c,%c: l=0x%x, r=0x%x, p=0x%x, lr=(%s,%s)\n",
-- (int)t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-- (int)t->c.child.left, (int)t->c.child.right,
-- (int)t->p.parent, t->k.lext->k.key,
-+ printf("Int node %p: %c,%c: l=%p, r=%p, p=%p, lr=(%s,%s)\n",
-+ t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-+ t->c.child.left, t->c.child.right,
-+ t->p.parent, t->k.lext->k.key,
- t->v.rext->k.key);
- }
- }
- }
-
- void
--rb_iprint_tree(t, level)
-- Rb_node t;
-- int level;
-+rb_iprint_tree(const struct rb_node * const t, int level)
- {
- int i;
-
- if (ishead(t) && t->p.parent == t) {
-- printf("tree 0x%x is empty\n", (int)t);
-+ printf("tree %p is empty\n", t);
- } else if (ishead(t)) {
-- printf("Head: 0x%x. Root = 0x%x, < = 0x%x, > = 0x%x\n",
-- (int)t, (int)t->p.root, (int)t->c.list.blink,
-- (int)t->c.list.flink);
-+ printf("Head: %p. Root = %p, < = %p, > = %p\n",
-+ t, t->p.root, t->c.list.blink,
-+ t->c.list.flink);
- rb_iprint_tree(t->p.root, 0);
- } else {
- if (isext(t)) {
- for (i = 0; i < level; i++)
- putchar(' ');
-- printf("Ext node 0x%x: %c,%c: p=0x%x, <=0x%x, >=0x%x k=%d\n",
-- (int)t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-- (int)t->p.parent, (int)t->c.list.blink,
-- (int)t->c.list.flink, t->k.ikey);
-+ printf("Ext node %p: %c,%c: p=%p, <=%p, >=%p k=%d\n",
-+ t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-+ t->p.parent, t->c.list.blink,
-+ t->c.list.flink, t->k.ikey);
- } else {
- rb_iprint_tree(t->c.child.left, level + 2);
- rb_iprint_tree(t->c.child.right, level + 2);
- for (i = 0; i < level; i++)
- putchar(' ');
-- printf("Int node 0x%x: %c,%c: l=0x%x, r=0x%x, p=0x%x, lr=(%d,%d)\n",
-- (int)t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-- (int)t->c.child.left, (int)t->c.child.right,
-- (int)t->p.parent, t->k.lext->k.ikey,
-+ printf("Int node %p: %c,%c: l=%p, r=%p, p=%p, lr=(%d,%d)\n",
-+ t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-+ t->c.child.left, t->c.child.right,
-+ t->p.parent, t->k.lext->k.ikey,
- t->v.rext->k.ikey);
- }
- }
- }
-
- void
--rb_uprint_tree(t, level)
-- Rb_node t;
-- int level;
-+rb_uprint_tree(const struct rb_node * const t, int level)
- {
- int i;
- if (ishead(t) && t->p.parent == t) {
-- printf("tree 0x%x is empty\n", (int)t);
-+ printf("tree %p is empty\n", t);
- } else if (ishead(t)) {
-- printf("Head: 0x%x. Root = 0x%x, < = 0x%x, > = 0x%x\n",
-- (int)t, (int)t->p.root, (int)t->c.list.blink,
-- (int)t->c.list.flink);
-+ printf("Head: %p. Root = %p, < = %p, > = %p\n",
-+ t, t->p.root, t->c.list.blink,
-+ t->c.list.flink);
- rb_uprint_tree(t->p.root, 0);
- } else {
- if (isext(t)) {
- for (i = 0; i < level; i++)
- putchar(' ');
-- printf("Ext node 0x%x: %c,%c: p=0x%x, <=0x%x, >=0x%x k=%lu\n",
-- (int)t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-- (int)t->p.parent, (int)t->c.list.blink,
-- (int)t->c.list.flink, t->k.ukey);
-+ printf("Ext node %p: %c,%c: p=%p, <=%p, >=%p k=%lu\n",
-+ t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-+ t->p.parent, t->c.list.blink,
-+ t->c.list.flink, t->k.ukey);
- } else {
- rb_uprint_tree(t->c.child.left, level + 2);
- rb_uprint_tree(t->c.child.right, level + 2);
- for (i = 0; i < level; i++)
- putchar(' ');
-- printf("Int node 0x%x: %c,%c: l=0x%x, r=0x%x, p=0x%x, lr=(%lu,%lu)\n",
-- (int)t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-- (int)t->c.child.left, (int)t->c.child.right,
-- (int)t->p.parent, t->k.lext->k.ukey,
-+ printf("Int node %p: %c,%c: l=%p, r=%p, p=%p, lr=(%lu,%lu)\n",
-+ t, isred(t) ? 'R' : 'B', isleft(t) ? 'l' : 'r',
-+ t->c.child.left, t->c.child.right,
-+ t->p.parent, t->k.lext->k.ukey,
- t->v.rext->k.ukey);
- }
- }
- }
-
- int
--rb_nblack(n)
-- Rb_node(n);
-+rb_nblack(const struct rb_node *n)
- {
- int nb;
-
- if (ishead(n) || isint(n)) {
- fprintf(stderr,
-- "ERROR: rb_nblack called on a non-external node 0x%x\n",
-- (int)n);
-+ "ERROR: %s called on a non-external node %p\n",
-+ __func__, n);
- exit(1);
- }
- nb = 0;
-@@ -705,15 +669,14 @@
- }
-
- int
--rb_plength(n)
-- Rb_node(n);
-+rb_plength(const struct rb_node *n)
- {
- int pl;
-
- if (ishead(n) || isint(n)) {
- fprintf(stderr,
-- "ERROR: rb_plength called on a non-external node 0x%x\n",
-- (int)n);
-+ "ERROR: %s called on a non-external node %p\n",
-+ __func__, n);
- exit(1);
- }
- pl = 0;
-@@ -725,13 +688,11 @@
- }
-
- void
--rb_free_tree(n)
-- Rb_node(n);
-+rb_free_tree(Rb_node n)
- {
-
- if (!ishead(n)) {
-- fprintf(stderr,
-- "ERROR: Rb_free_tree called on a non-head node\n");
-+ fprintf(stderr, "%s called on non-head %p\n", __func__, n);
- exit(1);
- }
- while (rb_first(n) != nil(n)) {
diff --git a/audio/tclmidi/files/patch-smf_Makefile.in b/audio/tclmidi/files/patch-smf_Makefile.in
deleted file mode 100644
index 1039412dd897..000000000000
--- a/audio/tclmidi/files/patch-smf_Makefile.in
+++ /dev/null
@@ -1,31 +0,0 @@
---- smf/Makefile.in.orig 1996-10-10 03:32:53 UTC
-+++ smf/Makefile.in
-@@ -14,7 +14,9 @@ srcdir = @srcdir@
- VPATH = @srcdir@
-
- CFLAGS = @CFLAGS@ @DEFS@
--CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS}
-+CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
-+ -I$(srcdir)/../smf -I$(srcdir)/../song -I$(srcdir)/.. -I$(srcdir)
-+CXX_SWITCHES= ${CC_SWITCHES} ${CXXFLAGS}
-
- SMFFILES = SMFUtils.o SMFHead.o SMFTrack.o
- SMFFILES_SRC = SMFUtils.cxx SMFHead.cxx SMFTrack.cxx
-@@ -22,7 +24,7 @@ SMFFILES_SRC = SMFUtils.cxx SMFHead.cxx
- .SUFFIXES: .cxx $(SUFFIXES)
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- objs: $(SMFFILES)
- for f in $(SMFFILES) ; do echo smf/$$f ; done > objs
-@@ -31,7 +33,7 @@ depend:
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(SMFFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(SMFFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
-
diff --git a/audio/tclmidi/files/patch-smf_SMFHead.cxx b/audio/tclmidi/files/patch-smf_SMFHead.cxx
deleted file mode 100644
index 5f5d03b0a8b7..000000000000
--- a/audio/tclmidi/files/patch-smf_SMFHead.cxx
+++ /dev/null
@@ -1,13 +0,0 @@
---- smf/SMFHead.cxx.orig 1996-08-05 03:47:35 UTC
-+++ smf/SMFHead.cxx
-@@ -160,8 +160,8 @@ SMFHead::Write(Tcl_Channel channel) cons
- return (1);
- }
-
--ostream &
--operator<<(ostream &os, const SMFHead &h)
-+std::ostream &
-+operator<<(std::ostream &os, const SMFHead &h)
- {
-
- os << "Format: " << h.format << " Num. Tracks: " << h.num_tracks
diff --git a/audio/tclmidi/files/patch-smf_SMFHead.h b/audio/tclmidi/files/patch-smf_SMFHead.h
deleted file mode 100644
index c913ffc57b0d..000000000000
--- a/audio/tclmidi/files/patch-smf_SMFHead.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- smf/SMFHead.h.orig 1996-08-05 03:47:35 UTC
-+++ smf/SMFHead.h
-@@ -34,10 +34,10 @@
- extern "C" {
- #include <tcl.h>
- }
--#include <iostream.h>
-+#include <iostream>
-
- class SMFHead {
-- friend ostream &operator<<(ostream &os, const SMFHead &h);
-+ friend std::ostream &operator<<(std::ostream &os, const SMFHead &h);
- public:
- SMFHead();
- SMFHead(short form, short num, short div);
diff --git a/audio/tclmidi/files/patch-smf_SMFTrack.cxx b/audio/tclmidi/files/patch-smf_SMFTrack.cxx
deleted file mode 100644
index 37944d6a0f3c..000000000000
--- a/audio/tclmidi/files/patch-smf_SMFTrack.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
---- smf/SMFTrack.cxx.orig 1996-08-05 03:47:36 UTC
-+++ smf/SMFTrack.cxx
-@@ -355,7 +355,8 @@ SMFTrack::IncreaseSize(long len)
- ostream &
- operator<<(ostream &os, const SMFTrack &t)
- {
-- long i, prev_flags;
-+ std::ios_base::fmtflags prev_flags;
-+ long i;
- int prev_width;
- unsigned char *ptr;
-
diff --git a/audio/tclmidi/files/patch-song_Makefile.in b/audio/tclmidi/files/patch-song_Makefile.in
deleted file mode 100644
index f0ff02970f63..000000000000
--- a/audio/tclmidi/files/patch-song_Makefile.in
+++ /dev/null
@@ -1,30 +0,0 @@
---- song/Makefile.in.orig 1996-10-10 03:32:55 UTC
-+++ song/Makefile.in
-@@ -15,7 +15,8 @@ VPATH = @srcdir@
-
- CFLAGS = @CFLAGS@ @DEFS@
- CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
-- -I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../smf -I$(srcdir)
-+ -I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../smf -I$(srcdir)/.. -I$(srcdir)
-+CXX_SWITCHES = ${CC_SWITCHES} ${CXXFLAGS}
-
- SONGFILES = EvntTree.o Song.o
- SONGFILES_SRC = EvntTree.cxx Song.cxx
-@@ -23,7 +24,7 @@ SONGFILES_SRC = EvntTree.cxx Song.cxx
- .SUFFIXES: .cxx $(SUFFIXES)
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- objs: $(SONGFILES)
- for f in $(SONGFILES) ; do echo song/$$f ; done > objs
-@@ -32,7 +33,7 @@ depend:
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(SONGFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(SONGFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
-
diff --git a/audio/tclmidi/files/patch-tclmUtil.cxx b/audio/tclmidi/files/patch-tclmUtil.cxx
deleted file mode 100644
index f0ebd5511152..000000000000
--- a/audio/tclmidi/files/patch-tclmUtil.cxx
+++ /dev/null
@@ -1,30 +0,0 @@
---- tclmUtil.cxx.orig 1996-07-28 19:09:06 UTC
-+++ tclmUtil.cxx
-@@ -31,8 +31,8 @@
- extern "C" {
- #include <tcl.h>
- }
--#include <iostream.h>
--#include <iomanip.h>
-+#include <iostream>
-+#include <iomanip>
- #include <stdlib.h>
- #include <ctype.h>
- #include <string.h>
-@@ -99,12 +99,12 @@ Tclm_ParseDataByte(Tcl_Interp *interp, c
- }
-
- void
--Tclm_PrintData(ostream &buf, const unsigned char *data, long length)
-+Tclm_PrintData(std::ostream &buf, const unsigned char *data, long length)
- {
- long i;
-
-- buf.setf(ios::showbase | ios::internal);
-- buf << hex << setw(4) << setfill('0') << (int)data[0];
-+ buf.setf(std::ios::showbase | std::ios::internal);
-+ buf << std::hex << std::setw(4) << std::setfill('0') << (int)data[0];
- for (i = 1; i < length; i++)
-- buf << " " << hex << setw(4) << setfill('0') << (int)data[i];
-+ buf << " " << std::hex << std::setw(4) << std::setfill('0') << (int)data[i];
- }
diff --git a/audio/tclmidi/files/pkg-message.in b/audio/tclmidi/files/pkg-message.in
deleted file mode 100644
index e0ed1ea1ddfe..000000000000
--- a/audio/tclmidi/files/pkg-message.in
+++ /dev/null
@@ -1,6 +0,0 @@
-IMPORTANT:
-Now you should add %%PREFIX%%/lib/tclmidi to your
-TCLLIBPATH environment variable!
-
-For example (with [t]csh:
-setenv TCLLIBPATH "%%PREFIX%%/lib/tclmidi %%PREFIX%%/lib/tcl8.0"
diff --git a/audio/tclmidi/files/strstream.h b/audio/tclmidi/files/strstream.h
deleted file mode 100644
index 75480ede00a8..000000000000
--- a/audio/tclmidi/files/strstream.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is NOT an official part of the GNU ISO C++ Library. This
-// library is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _CPP_BACKWARD_STRSTREAM_H
-#define _CPP_BACKWARD_STRSTREAM_H 1
-
-// Backward warning isn't needed here, you'll get it from strstream anyway.
-//#include "backward_warning.h"
-#include <strstream>
-
-using std::strstreambuf;
-using std::istrstream;
-using std::ostrstream;
-using std::strstream;
-using namespace std;
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/audio/tclmidi/pkg-descr b/audio/tclmidi/pkg-descr
deleted file mode 100644
index a2d3f9c4b6b4..000000000000
--- a/audio/tclmidi/pkg-descr
+++ /dev/null
@@ -1,7 +0,0 @@
-Tclmidi is language designed for creating and editing standard
-MIDI files. With the proper device interface it will also play
-and record MIDI files. Since tclmidi is a language supporting
-function calls, recursion and conditionals, you can use these
-features for editing, sequencing and writing complex scripts.
-The brave might even want to try their hand at algorithmic
-composition.
diff --git a/audio/tclmidi/pkg-plist b/audio/tclmidi/pkg-plist
deleted file mode 100644
index 71943d2edb9e..000000000000
--- a/audio/tclmidi/pkg-plist
+++ /dev/null
@@ -1,35 +0,0 @@
-bin/midtotcl
-bin/minfo
-bin/mplay
-bin/mrec
-lib/tclmidi/pkgIndex.tcl
-lib/tclmidi/tclmidi31.so
-man/man1/midtotcl.1.gz
-man/man1/minfo.1.gz
-man/man1/mplay.1.gz
-man/man1/mrec.1.gz
-man/man1/tclmidi.1.gz
-man/mann/midiconf.n.gz
-man/mann/midicopy.n.gz
-man/mann/mididel.n.gz
-man/mann/mididev.n.gz
-man/mann/midievnt.n.gz
-man/mann/midifeat.n.gz
-man/mann/midifree.n.gz
-man/mann/midiget.n.gz
-man/mann/midigrep.n.gz
-man/mann/midimake.n.gz
-man/mann/midimerg.n.gz
-man/mann/midimove.n.gz
-man/mann/midiplay.n.gz
-man/mann/midiput.n.gz
-man/mann/midiread.n.gz
-man/mann/midirec.n.gz
-man/mann/midirew.n.gz
-man/mann/midisplt.n.gz
-man/mann/midistop.n.gz
-man/mann/miditime.n.gz
-man/mann/miditrck.n.gz
-man/mann/midivers.n.gz
-man/mann/midiwait.n.gz
-man/mann/midiwrit.n.gz