From 815edf7a8fa94b2d576bade39ccb1b1178113f2f Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Fri, 14 Aug 2009 19:32:39 +0000 Subject: Modified to use dynamic memory allocation for the number of nodes. --- 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; -- cgit v0.8.3.1-22-g547a