-rw-r--r-- | src/model/exp004base.sqc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/model/exp004base.sqc b/src/model/exp004base.sqc index 2879263..4f3d06c 100644 --- a/src/model/exp004base.sqc +++ b/src/model/exp004base.sqc @@ -34,7 +34,7 @@ exp004base (void) EXEC SQL END DECLARE SECTION; /* Determine how many nodes have coordinates assigned to them. */ - EXEC SQL SELECT COUNT(*) INTO :rows FROM coordinates; + EXEC SQL SELECT COUNT (*) INTO:rows FROM coordinates; /* Free any existing coordinates and allocate memory to store the new values. */ @@ -44,13 +44,13 @@ exp004base (void) S.selection.set = calloc (rows, sizeof (bool)); free (S.gi_data); - S.gi_data = calloc (rows * 20, sizeof (char)); + S.gi_data = calloc (rows, sizeof (char) * 20); free (S.base_vertices_data); - S.base_vertices_data = calloc (rows * 2, sizeof (float)); + S.base_vertices_data = calloc (rows, sizeof (float) * 2); free (S.base_colors_data); - S.base_colors_data = calloc (rows * 4, sizeof (float)); + S.base_colors_data = calloc (rows, sizeof (float) * 4); EXEC SQL DECLARE c2 CURSOR FOR SELECT *FROM coordinates; @@ -71,7 +71,7 @@ exp004base (void) strncpy (S.gi_data + i, coordinates.gi.data, sizeof (S.gi_data[i])); - float* v = S.base_vertices_data + (i * 2); + float *v = S.base_vertices_data + (i * 2); *v = coordinates.x; v++; *v = coordinates.y; @@ -93,7 +93,7 @@ exp004base (void) */ S.selection.set[i] = false; - float* c = S.base_colors_data + (i * 4); + float *c = S.base_colors_data + (i * 4); *c = DEFAULT_COLOR_R; c++; *c = DEFAULT_COLOR_G; @@ -131,7 +131,7 @@ exp004base (void) S.ortho_max++; // Invert the y coordinate to match up with the LGL Java viewer. - float* v = S.base_vertices_data; + float *v = S.base_vertices_data; for (int i = 0; i < S.rows; i++) { v++; |