author | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-08-14 19:41:30 (GMT) |
---|---|---|
committer | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-08-14 19:41:30 (GMT) |
commit | 43cb049cf8216a2cb2df50e60791aaa8059381c7 (patch) (unidiff) | |
tree | 73808f2ac3a9bb5f30b2751113a0af2eaacf3af7 | |
parent | 873945533e5d66583f1acc9b0d1580cef5856728 (diff) | |
download | exp005-43cb049cf8216a2cb2df50e60791aaa8059381c7.zip exp005-43cb049cf8216a2cb2df50e60791aaa8059381c7.tar.gz exp005-43cb049cf8216a2cb2df50e60791aaa8059381c7.tar.bz2 |
Trivial changes for readability.
-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) | |||
34 | EXEC SQL END DECLARE SECTION; | 34 | EXEC SQL END DECLARE SECTION; |
35 | 35 | ||
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; |
38 | 38 | ||
39 | /* Free any existing coordinates and allocate memory to store the | 39 | /* 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)); |
45 | 45 | ||
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); |
48 | 48 | ||
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); |
51 | 51 | ||
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); |
54 | 54 | ||
55 | EXEC SQL DECLARE c2 CURSOR FOR SELECT *FROM coordinates; | 55 | EXEC SQL DECLARE c2 CURSOR FOR SELECT *FROM coordinates; |
56 | 56 | ||
@@ -71,7 +71,7 @@ exp004base (void) | |||
71 | 71 | ||
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])); |
73 | 73 | ||
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; |
95 | 95 | ||
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++; |
132 | 132 | ||
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++; |