summaryrefslogtreecommitdiffstats
authorDon 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)
commit43cb049cf8216a2cb2df50e60791aaa8059381c7 (patch) (side-by-side diff)
tree73808f2ac3a9bb5f30b2751113a0af2eaacf3af7
parent873945533e5d66583f1acc9b0d1580cef5856728 (diff)
downloadexp005-43cb049cf8216a2cb2df50e60791aaa8059381c7.zip
exp005-43cb049cf8216a2cb2df50e60791aaa8059381c7.tar.gz
exp005-43cb049cf8216a2cb2df50e60791aaa8059381c7.tar.bz2
Trivial changes for readability.
-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)
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++;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.