summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:32:39 (GMT)
committer Don Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:32:39 (GMT)
commit815edf7a8fa94b2d576bade39ccb1b1178113f2f (patch) (side-by-side diff)
treed8e06545daec12c683357b214f5254dab7d6cfdf
parentcae64edae40d4a432fed62ea3d0b9adc3a75049d (diff)
downloadexp005-815edf7a8fa94b2d576bade39ccb1b1178113f2f.zip
exp005-815edf7a8fa94b2d576bade39ccb1b1178113f2f.tar.gz
exp005-815edf7a8fa94b2d576bade39ccb1b1178113f2f.tar.bz2
Modified to use dynamic memory allocation for the number of nodes.
-rw-r--r--src/model/exp004state.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/model/exp004state.h b/src/model/exp004state.h
index f6e99c0..1173f87 100644
--- a/src/model/exp004state.h
+++ b/src/model/exp004state.h
@@ -25,7 +25,8 @@
typedef enum
{ PROTEIN_GEOMETRY, PROTEIN_SELECTED_GEOMETRY, DENSITY_LEGEND_GEOMETRY,
- MAP_GEOMETRY } LISTS;
+ MAP_GEOMETRY
+} LISTS;
#define NUM_LISTS 2
/*
@@ -33,6 +34,11 @@ typedef enum
*/
typedef struct
{
+ /*
+ * Number of nodes having coordinates assigned.
+ */
+ unsigned int rows;
+
/*
* Display lists.
*/
@@ -85,19 +91,19 @@ typedef struct
unsigned int buffers[1];
/*
- * GI Identifiers indexed by row.
+ * GI Identifiers indexed by row. Storage is [rows][20].
*/
- char gi_data[ROWS][20];
+ char *gi_data;
/*
- * 2D coordinates for each protein.
+ * 2D coordinates for each protein. Storage is [rows][2].
*/
- float base_vertices_data[ROWS][2];
+ float *base_vertices_data;
/*
- * RGB color for each protein.
+ * RGB color for each protein. Storage is [rows][4].
*/
- float base_colors_data[ROWS][4];
+ float *base_colors_data;
SELECTION_INFO selection;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.