summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:40:35 (GMT)
committer Don Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:40:35 (GMT)
commit873945533e5d66583f1acc9b0d1580cef5856728 (patch) (unidiff)
tree2a994647d087a228685616493df3754a572fc00e
parent8de1ddca2733630a20b2663928084d209632d88f (diff)
downloadexp005-873945533e5d66583f1acc9b0d1580cef5856728.zip
exp005-873945533e5d66583f1acc9b0d1580cef5856728.tar.gz
exp005-873945533e5d66583f1acc9b0d1580cef5856728.tar.bz2
Modified to use dynamic memory allocation based on the number of nodes to process.
-rw-r--r--src/model/selection_info.h7
-rw-r--r--src/model/selection_info_init.c2
-rw-r--r--src/view/exp004init.c1
3 files changed, 3 insertions, 7 deletions
diff --git a/src/model/selection_info.h b/src/model/selection_info.h
index ccd3f7a..73a1c34 100644
--- a/src/model/selection_info.h
+++ b/src/model/selection_info.h
@@ -4,18 +4,13 @@
4#include "selection_purposes.h"4#include "selection_purposes.h"
5#include <stdbool.h>5#include <stdbool.h>
66
7/*
8 * Vertices in the graph.
9 */
10#define ROWS 83905
11
12typedef struct7typedef struct
13{8{
149
15 /*10 /*
16 * Selection list.11 * Selection list.
17 */12 */
18 bool set[ROWS];13 bool *set;
1914
20 /*15 /*
21 * A selection is being performed.16 * A selection is being performed.
diff --git a/src/model/selection_info_init.c b/src/model/selection_info_init.c
index 33b3bb5..40d00aa 100644
--- a/src/model/selection_info_init.c
+++ b/src/model/selection_info_init.c
@@ -4,7 +4,7 @@
4void4void
5selection_info_init (SELECTION_INFO * s)5selection_info_init (SELECTION_INFO * s)
6{6{
7 memset (s->set, 0, sizeof (bool) * ROWS);7 s->set = NULL;
8 s->active = false;8 s->active = false;
9 s->purpose = SET;9 s->purpose = SET;
10 s->x = 0;10 s->x = 0;
diff --git a/src/view/exp004init.c b/src/view/exp004init.c
index 5a6ddd0..af66623 100644
--- a/src/view/exp004init.c
+++ b/src/view/exp004init.c
@@ -18,6 +18,7 @@ exp004init (void)
18 * Initialize default values, zero memory and NULL pointers.18 * Initialize default values, zero memory and NULL pointers.
19 */19 */
20 S.rows = 0;20 S.rows = 0;
21 S.gi_data = NULL;
21 S.base_vertices_data = NULL;22 S.base_vertices_data = NULL;
22 S.base_colors_data = NULL;23 S.base_colors_data = NULL;
23 selection_info_init (&S.selection);24 selection_info_init (&S.selection);

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.