]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed a bug that was triggering a seg fault.
authorcurt <curt>
Wed, 22 Jul 1998 21:46:40 +0000 (21:46 +0000)
committercurt <curt>
Wed, 22 Jul 1998 21:46:40 +0000 (21:46 +0000)
FixNode/fixnode.cxx
FixNode/fixnode.hxx
FixNode/main.cxx

index b4408fbe6810f59baa129661167e2149184fe16e..86e6ac8cd3b17464de0f8b4a4de1a5b1707f0377 100644 (file)
@@ -33,9 +33,7 @@
 
 
 /* load the node information */
-void fixnodes( char *filename, fgDEM dem, 
-              float dem_data[DEM_SIZE_1][DEM_SIZE_1], 
-              double nodes[MAX_NODES][3] )
+void fixnodes( char *filename, fgDEM *dem, double nodes[MAX_NODES][3] )
 {
     char toname[256];
     FILE *fd;
@@ -53,7 +51,7 @@ void fixnodes( char *filename, fgDEM dem,
               nodes[i][1], nodes[i][2]); */
 
        nodes[i][2] = 
-           dem.interpolate_altitude(nodes[i][0], nodes[i][1]);
+           dem->interpolate_altitude(nodes[i][0], nodes[i][1]);
 
        /* printf("Fixed: %d %.2f %.2f %.2f\n", i, nodes[i][0],
               nodes[i][1], nodes[i][2]); */
@@ -80,9 +78,12 @@ void fixnodes( char *filename, fgDEM dem,
 
 
 /* $Log$
-/* Revision 1.2  1998/04/14 02:26:03  curt
-/* Code reorganizations.  Added a Lib/ directory for more general libraries.
+/* Revision 1.3  1998/07/22 21:46:40  curt
+/* Fixed a bug that was triggering a seg fault.
 /*
+ * Revision 1.2  1998/04/14 02:26:03  curt
+ * Code reorganizations.  Added a Lib/ directory for more general libraries.
+ *
  * Revision 1.1  1998/04/08 23:05:56  curt
  * Adopted Gnu automake/autoconf system.
  *
index 370e136a5f9109ce30ed63f14506d4c8167f3864..236875fab0043b824cf38f02ba07d7dba7c7c0ae 100644 (file)
 
 
 // load the node information
-void fixnodes( char *basename, fgDEM dem, 
-              float dem_data[DEM_SIZE_1][DEM_SIZE_1], 
-              double nodes[MAX_NODES][3] );
+void fixnodes( char *basename, fgDEM *dem, double nodes[MAX_NODES][3] );
 
 
 #endif // _FIXNODE_H
 
 
 // $Log$
+// Revision 1.2  1998/07/22 21:46:41  curt
+// Fixed a bug that was triggering a seg fault.
+//
 // Revision 1.1  1998/04/08 23:05:56  curt
 // Adopted Gnu automake/autoconf system.
 //
index 9a3d3b32d8aaa5ca474493ad4d83e9376440653a..92441ec8eba698fa8f0ef27584f51ca4fdc06e64 100644 (file)
@@ -40,8 +40,7 @@
 
 
 // Storage for the original DEM data which is used to interpolate z values
-static fgDEM dem;
-static float dem_data[DEM_SIZE_1][DEM_SIZE_1];
+fgDEM dem;
 
 // Node list
 static double nodes[MAX_NODES][3];
@@ -76,7 +75,7 @@ void process_files(char *root_path) {
                // load the input data files
                triload(file_path, nodes);
 
-               fixnodes(file_path, dem, dem_data, nodes);
+               fixnodes(file_path, &dem, nodes);
            }
        }
     }
@@ -92,6 +91,8 @@ int main(int argc, char **argv) {
        exit(-1);
     }
 
+    printf("Starting fixnode\n");
+
     strcpy(demfile, argv[1]);
     strcpy(root_path, argv[2]);
 
@@ -108,6 +109,9 @@ int main(int argc, char **argv) {
 
 
 // $Log$
+// Revision 1.5  1998/07/22 21:46:41  curt
+// Fixed a bug that was triggering a seg fault.
+//
 // Revision 1.4  1998/06/27 16:55:24  curt
 // Changed include order for <sys/types.h>
 //