- Fix build
Reported by: miwi (Tcl/Tk 86 exp-run)
This commit is contained in:
parent
66e9a627c9
commit
e8826819bd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=318153
3 changed files with 77 additions and 56 deletions
12
audio/tclmidi/files/patch-TclmIntp.cxx
Normal file
12
audio/tclmidi/files/patch-TclmIntp.cxx
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- TclmIntp.cxx.orig 2013-05-14 11:25:42.000000000 +0200
|
||||
+++ TclmIntp.cxx 2013-05-14 11:25:49.000000000 +0200
|
||||
@@ -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);
|
9
audio/tclmidi/files/patch-TclmIntp.h
Normal file
9
audio/tclmidi/files/patch-TclmIntp.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
--- TclmIntp.h.orig 2013-05-14 11:24:39.000000000 +0200
|
||||
+++ TclmIntp.h 2013-05-14 11:25:36.000000000 +0200
|
||||
@@ -64,6 +64,5 @@
|
||||
int current_song;
|
||||
int current_dev;
|
||||
int current_patch;
|
||||
- Event *next_event;
|
||||
};
|
||||
#endif
|
|
@ -618,62 +618,6 @@
|
|||
+extern long VarToFix(const unsigned char *var, int *len);
|
||||
extern int FixToVar(long fix, unsigned char *var);
|
||||
#endif
|
||||
--- song/EvntTree.cxx 1996-08-04 23:47:38.000000000 -0400
|
||||
+++ song/EvntTree.cxx 2012-04-11 01:45:51.000000000 -0400
|
||||
@@ -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;
|
||||
--- 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 @@
|
||||
|
@ -2137,3 +2081,59 @@
|
|||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue