#include <Include/fg_constants.h>
#include <Include/fg_types.h>
-#include <Math/fg_geodesy.h>
-#include <Math/mat3.h>
-#include <Math/polar.h>
-#include <Scenery/bucketutils.h>
+#include <Bucket/bucketutils.h>
+#include "fg_geodesy.h"
+#include "mat3.h"
+#include "polar.h"
int nodecount, tricount;
double xmin, xmax, ymin, ymax;
-double nodes_orig[MAX_NODES][3];
-int tris[MAX_TRIS][3];
-int new_tris[MAX_TRIS][3];
+static double nodes_orig[MAX_NODES][3];
+static int tris[MAX_TRIS][3];
+/* static int new_tris[MAX_TRIS][3]; */
-struct fgCartesianPoint nodes_cart[MAX_NODES];
+static struct fgCartesianPoint nodes_cart[MAX_NODES];
struct fgBUCKET ne_index, nw_index, sw_index, se_index;
struct fgBUCKET north_index, south_index, east_index, west_index;
} else {
fp = body;
}
- fprintf(fp, "gdn %.2f %.2f %.2f\n",
- nodes_orig[i][0], nodes_orig[i][1], nodes_orig[i][2]);
+
+ if ( fp != NULL ) {
+ fprintf(fp, "gdn %.2f %.2f %.2f\n",
+ nodes_orig[i][0], nodes_orig[i][1], nodes_orig[i][2]);
+ }
}
printf(" calculating and writing normals\n");
}
}
- fclose(sw);
- fclose(se);
- fclose(ne);
- fclose(nw);
+ if ( sw ) { fclose(sw); }
+ if ( se ) { fclose(se); }
+ if ( ne ) { fclose(ne); }
+ if ( nw ) { fclose(nw); }
- fclose(north);
- fclose(south);
- fclose(east);
- fclose(west);
+ if ( north ) { fclose(north); }
+ if ( south ) { fclose(south); }
+ if ( east ) { fclose(east); }
+ if ( west ) { fclose(west); }
- fclose(body);
+ if ( body ) { fclose(body); }
}
/* $Log$
-/* Revision 1.4 1998/01/31 00:41:26 curt
-/* Made a few changes converting floats to doubles.
+/* Revision 1.8 1998/04/14 02:26:08 curt
+/* Code reorganizations. Added a Lib/ directory for more general libraries.
/*
+ * Revision 1.7 1998/04/08 23:21:13 curt
+ * Adopted Gnu automake/autoconf system.
+ *
+ * Revision 1.6 1998/03/03 15:36:13 curt
+ * Tweaks for compiling with g++
+ *
+ * Revision 1.5 1998/03/03 03:37:04 curt
+ * Cumulative tweaks.
+ *
+ * Revision 1.4 1998/01/31 00:41:26 curt
+ * Made a few changes converting floats to doubles.
+ *
* Revision 1.3 1998/01/27 18:37:04 curt
* Lots of updates to get back in sync with changes made over in .../Src/
*