Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "m_pd.h"
#include "g_canvas.h"
#include <stdio.h>
t_undo_action *canvas_undo_init(t_canvas *x)
{
t_undo_action *a = (t_undo_action *)getbytes(sizeof(*a));
if (!x->u_queue) {
//this is the first init
a->type = 0;
a->x = x;
a->prev = NULL;
a->next = NULL;
x->u_queue = a;
x->u_last = a;
}
fprintf(stderr,"canvas_undo_init\n");
return(a);
}
t_undo_action *canvas_undo_add(t_canvas *x)
{
t_undo_action *a;
return(a);
}
void canvas_undo_undo(t_canvas *x)
{
}
void canvas_undo_redo(t_canvas *x)
{
}
void canvas_undo_rebranch(t_undo_action *u)
{
}
void canvas_undo_check_canvas_pointers(t_canvas *x)
{
}
void canvas_undo_purge_abstraction_actions(t_canvas *x)
{
}
void canvas_undo_free(t_canvas *x)
{
fprintf(stderr,"canvas_undo_free\n");
if (x->u_queue) {
t_undo_action *a;
for(a = x->u_queue; a; a = a->next) {
fprintf(stderr,"freeing t_undo_action queue member\n");
freebytes(a, sizeof(*a));
}
}
}