From 873945533e5d66583f1acc9b0d1580cef5856728 Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Fri, 14 Aug 2009 19:40:35 +0000 Subject: Modified to use dynamic memory allocation based on the number of nodes to process. --- 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 @@ #include "selection_purposes.h" #include -/* - * Vertices in the graph. - */ -#define ROWS 83905 - typedef struct { /* * Selection list. */ - bool set[ROWS]; + bool *set; /* * 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 @@ void selection_info_init (SELECTION_INFO * s) { - memset (s->set, 0, sizeof (bool) * ROWS); + s->set = NULL; s->active = false; s->purpose = SET; 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) * Initialize default values, zero memory and NULL pointers. */ S.rows = 0; + S.gi_data = NULL; S.base_vertices_data = NULL; S.base_colors_data = NULL; selection_info_init (&S.selection); -- cgit v0.8.3.1-22-g547a