summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/model/exp004base.sqc14
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)
34 EXEC SQL END DECLARE SECTION;34 EXEC SQL END DECLARE SECTION;
3535
36 /* Determine how many nodes have coordinates assigned to them. */36 /* Determine how many nodes have coordinates assigned to them. */
37 EXEC SQL SELECT COUNT(*) INTO :rows FROM coordinates;37 EXEC SQL SELECT COUNT (*) INTO:rows FROM coordinates;
3838
39 /* Free any existing coordinates and allocate memory to store the39 /* Free any existing coordinates and allocate memory to store the
40 new values. */40 new values. */
@@ -44,13 +44,13 @@ exp004base (void)
44 S.selection.set = calloc (rows, sizeof (bool));44 S.selection.set = calloc (rows, sizeof (bool));
4545
46 free (S.gi_data);46 free (S.gi_data);
47 S.gi_data = calloc (rows * 20, sizeof (char));47 S.gi_data = calloc (rows, sizeof (char) * 20);
4848
49 free (S.base_vertices_data);49 free (S.base_vertices_data);
50 S.base_vertices_data = calloc (rows * 2, sizeof (float));50 S.base_vertices_data = calloc (rows, sizeof (float) * 2);
5151
52 free (S.base_colors_data);52 free (S.base_colors_data);
53 S.base_colors_data = calloc (rows * 4, sizeof (float));53 S.base_colors_data = calloc (rows, sizeof (float) * 4);
5454
55 EXEC SQL DECLARE c2 CURSOR FOR SELECT *FROM coordinates;55 EXEC SQL DECLARE c2 CURSOR FOR SELECT *FROM coordinates;
5656
@@ -71,7 +71,7 @@ exp004base (void)
7171
72 strncpy (S.gi_data + i, coordinates.gi.data, sizeof (S.gi_data[i]));72 strncpy (S.gi_data + i, coordinates.gi.data, sizeof (S.gi_data[i]));
7373
74 float* v = S.base_vertices_data + (i * 2);74 float *v = S.base_vertices_data + (i * 2);
75 *v = coordinates.x;75 *v = coordinates.x;
76 v++;76 v++;
77 *v = coordinates.y;77 *v = coordinates.y;
@@ -93,7 +93,7 @@ exp004base (void)
93 */93 */
94 S.selection.set[i] = false;94 S.selection.set[i] = false;
9595
96 float* c = S.base_colors_data + (i * 4);96 float *c = S.base_colors_data + (i * 4);
97 *c = DEFAULT_COLOR_R;97 *c = DEFAULT_COLOR_R;
98 c++;98 c++;
99 *c = DEFAULT_COLOR_G;99 *c = DEFAULT_COLOR_G;
@@ -131,7 +131,7 @@ exp004base (void)
131 S.ortho_max++;131 S.ortho_max++;
132132
133 // Invert the y coordinate to match up with the LGL Java viewer.133 // Invert the y coordinate to match up with the LGL Java viewer.
134 float* v = S.base_vertices_data;134 float *v = S.base_vertices_data;
135 for (int i = 0; i < S.rows; i++)135 for (int i = 0; i < S.rows; i++)
136 {136 {
137 v++;137 v++;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.