68 |
}; |
}; |
69 |
|
|
70 |
|
|
71 |
/* we keep the adress and the old value */ |
/* we keep the address and the old value */ |
72 |
struct change_stack_entry { |
struct change_stack_entry { |
73 |
int *address; |
int *address; |
74 |
int value; |
int value; |
75 |
}; |
}; |
76 |
|
|
77 |
/* we keep the adress and the old value */ |
/* we keep the address and the old value */ |
78 |
struct vertex_stack_entry { |
struct vertex_stack_entry { |
79 |
Intersection *address; |
Intersection *address; |
80 |
int value; |
int value; |
93 |
(change_stack_pointer = change_stack, \ |
(change_stack_pointer = change_stack, \ |
94 |
vertex_stack_pointer = vertex_stack) |
vertex_stack_pointer = vertex_stack) |
95 |
|
|
96 |
/* Begin a record : adress == NULL */ |
/* Begin a record : address == NULL */ |
97 |
#define BEGIN_CHANGE_RECORD()\ |
#define BEGIN_CHANGE_RECORD()\ |
98 |
((change_stack_pointer++)->address = NULL,\ |
((change_stack_pointer++)->address = NULL,\ |
99 |
(vertex_stack_pointer++)->address = NULL) |
(vertex_stack_pointer++)->address = NULL) |
100 |
|
|
101 |
/* Save a value : store the adress and the value in the stack */ |
/* Save a value : store the address and the value in the stack */ |
102 |
#define PUSH_VALUE(v)\ |
#define PUSH_VALUE(v)\ |
103 |
(change_stack_pointer->address = &(v),\ |
(change_stack_pointer->address = &(v),\ |
104 |
(change_stack_pointer++)->value = (v)) |
(change_stack_pointer++)->value = (v)) |
105 |
|
|
106 |
/* Save a board value : store the adress and the value in the stack */ |
/* Save a board value : store the address and the value in the stack */ |
107 |
#define PUSH_VERTEX(v)\ |
#define PUSH_VERTEX(v)\ |
108 |
(vertex_stack_pointer->address = &(v),\ |
(vertex_stack_pointer->address = &(v),\ |
109 |
(vertex_stack_pointer++)->value = (v)) |
(vertex_stack_pointer++)->value = (v)) |