diff options
Diffstat (limited to 'src/construction.c')
| -rw-r--r-- | src/construction.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/construction.c b/src/construction.c index 090a36f..dc80359 100644 --- a/src/construction.c +++ b/src/construction.c @@ -197,4 +197,16 @@ void place_points(struct drawing *drawing, double inputs[]) { } } +void free_drawing(struct drawing *drawing) { + struct command *c = drawing->root; + while (c) { + struct command *next = c->next; + free(c); + c = next; + } + drawing->root = NULL; + drawing->tail = NULL; + drawing->error = NULL; +} + |
