From: curt Date: Tue, 3 Mar 1998 16:00:52 +0000 (+0000) Subject: More c++ compile tweaks. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d6ba1a71880b46a2edfa99038b24b54db8bebede;p=flightgear.git More c++ compile tweaks. --- diff --git a/AssemTris/assemtris.c b/AssemTris/assemtris.c index e1e1413a1..ab53c1a1c 100644 --- a/AssemTris/assemtris.c +++ b/AssemTris/assemtris.c @@ -41,7 +41,7 @@ int nodecount = 0; -double nodes[MAX_NODES][3]; +static double nodes[MAX_NODES][3]; struct fgBUCKET my_index; @@ -454,9 +454,12 @@ int main(int argc, char **argv) { /* $Log$ -/* Revision 1.4 1998/01/31 00:41:23 curt -/* Made a few changes converting floats to doubles. +/* Revision 1.5 1998/03/03 16:00:52 curt +/* More c++ compile tweaks. /* + * Revision 1.4 1998/01/31 00:41:23 curt + * Made a few changes converting floats to doubles. + * * Revision 1.3 1998/01/27 18:37:00 curt * Lots of updates to get back in sync with changes made over in .../Src/ * diff --git a/FixNode/fixnode.c b/FixNode/fixnode.c index 8c3aee33a..afd707082 100644 --- a/FixNode/fixnode.c +++ b/FixNode/fixnode.c @@ -34,7 +34,7 @@ /* load the node information */ -void fixnodes(char *filename, struct MESH *m) { +void fixnodes(char *filename, struct MESH *m, double nodes[MAX_NODES][3]) { char toname[256]; FILE *fd; int i; @@ -77,9 +77,12 @@ void fixnodes(char *filename, struct MESH *m) { /* $Log$ -/* Revision 1.3 1998/01/09 23:03:08 curt -/* Restructured to split 1deg x 1deg dem's into 64 subsections. +/* Revision 1.4 1998/03/03 16:00:57 curt +/* More c++ compile tweaks. /* + * Revision 1.3 1998/01/09 23:03:08 curt + * Restructured to split 1deg x 1deg dem's into 64 subsections. + * * Revision 1.2 1997/12/02 13:12:07 curt * Updated to fix every node. * diff --git a/FixNode/fixnode.h b/FixNode/fixnode.h index 303eb6286..ee6501ac3 100644 --- a/FixNode/fixnode.h +++ b/FixNode/fixnode.h @@ -31,21 +31,24 @@ #include #include -/* #include "fixnode.h" */ +#include "triload.h" #include "../Dem2node/mesh.h" /* load the node information */ -void fixnodes(char *basename, struct MESH *m); +void fixnodes(char *basename, struct MESH *m, double nodes[MAX_NODES][3]); #endif /* FIXNODE_H */ /* $Log$ -/* Revision 1.2 1997/12/02 13:12:07 curt -/* Updated to fix every node. +/* Revision 1.3 1998/03/03 16:00:58 curt +/* More c++ compile tweaks. /* + * Revision 1.2 1997/12/02 13:12:07 curt + * Updated to fix every node. + * * Revision 1.1 1997/11/27 00:17:33 curt * Initial revision. * diff --git a/FixNode/main.c b/FixNode/main.c index 002c495cf..c2caca7e1 100644 --- a/FixNode/main.c +++ b/FixNode/main.c @@ -35,8 +35,10 @@ /* Original DEM which is used to interpolate z values */ -struct MESH dem_mesh; +static struct MESH dem_mesh; +/* Node list */ +static double nodes[MAX_NODES][3]; /* find all the matching files in the specified directory and fix them */ void process_files(char *root_path) { @@ -65,9 +67,9 @@ void process_files(char *root_path) { printf("File = %s\n", file_path); /* load the input data files */ - triload(file_path); + triload(file_path, nodes); - fixnodes(file_path, &dem_mesh); + fixnodes(file_path, &dem_mesh, nodes); } } } @@ -97,9 +99,12 @@ int main(int argc, char **argv) { /* $Log$ -/* Revision 1.3 1998/01/09 23:03:08 curt -/* Restructured to split 1deg x 1deg dem's into 64 subsections. +/* Revision 1.4 1998/03/03 16:00:58 curt +/* More c++ compile tweaks. /* + * Revision 1.3 1998/01/09 23:03:08 curt + * Restructured to split 1deg x 1deg dem's into 64 subsections. + * * Revision 1.2 1997/12/02 13:12:07 curt * Updated to fix every node. * diff --git a/FixNode/triload.c b/FixNode/triload.c index f0510bd27..72d9427f9 100644 --- a/FixNode/triload.c +++ b/FixNode/triload.c @@ -31,11 +31,10 @@ int nodecount; -double nodes[MAX_NODES][3]; /* load the node information */ -void triload(char *filename) { +void triload(char *filename, double nodes[MAX_NODES][3]) { FILE *node; int dim, junk1, junk2; int i; @@ -67,9 +66,12 @@ void triload(char *filename) { /* $Log$ -/* Revision 1.2 1998/01/09 23:03:09 curt -/* Restructured to split 1deg x 1deg dem's into 64 subsections. +/* Revision 1.3 1998/03/03 16:00:59 curt +/* More c++ compile tweaks. /* + * Revision 1.2 1998/01/09 23:03:09 curt + * Restructured to split 1deg x 1deg dem's into 64 subsections. + * * Revision 1.1 1997/11/27 00:17:35 curt * Initial revision. * diff --git a/FixNode/triload.h b/FixNode/triload.h index 2d84f8e74..8b5e32451 100644 --- a/FixNode/triload.h +++ b/FixNode/triload.h @@ -37,20 +37,22 @@ extern int nodecount, tricount; -double nodes[MAX_NODES][3]; /* Initialize a new mesh structure */ -void triload(char *basename); +void triload(char *basename, double nodes[MAX_NODES][3]); #endif /* TRILOAD_H */ /* $Log$ -/* Revision 1.2 1998/01/09 23:03:09 curt -/* Restructured to split 1deg x 1deg dem's into 64 subsections. +/* Revision 1.3 1998/03/03 16:00:59 curt +/* More c++ compile tweaks. /* + * Revision 1.2 1998/01/09 23:03:09 curt + * Restructured to split 1deg x 1deg dem's into 64 subsections. + * * Revision 1.1 1997/11/27 00:17:35 curt * Initial revision. * diff --git a/Tri2obj/tri2obj.c b/Tri2obj/tri2obj.c index 93fb4f9b6..e44f5559d 100644 --- a/Tri2obj/tri2obj.c +++ b/Tri2obj/tri2obj.c @@ -42,11 +42,10 @@ int nodecount, tricount; int normalcount = 0; -struct fgCartesianPoint nodes[MAX_NODES]; -int tris[MAX_TRIS][3]; -int new_tris[MAX_TRIS][3]; +static struct fgCartesianPoint nodes[MAX_NODES]; +static int tris[MAX_TRIS][3]; -double normals[MAX_NODES][3]; +static double normals[MAX_NODES][3]; struct fgBUCKET my_index; struct fgBUCKET ne_index, nw_index, sw_index, se_index; @@ -640,9 +639,12 @@ int main(int argc, char **argv) { /* $Log$ -/* Revision 1.10 1998/01/31 00:41:27 curt -/* Made a few changes converting floats to doubles. +/* Revision 1.11 1998/03/03 16:01:00 curt +/* More c++ compile tweaks. /* + * Revision 1.10 1998/01/31 00:41:27 curt + * Made a few changes converting floats to doubles. + * * Revision 1.9 1998/01/27 18:37:04 curt * Lots of updates to get back in sync with changes made over in .../Src/ * diff --git a/Tri2obj/tri2obj.h b/Tri2obj/tri2obj.h index 0b867edaf..e53ae1d0d 100644 --- a/Tri2obj/tri2obj.h +++ b/Tri2obj/tri2obj.h @@ -36,12 +36,6 @@ #define MAX_TRIS 400000 -extern int nodecount, tricount; -extern struct fgCartesianPoint nodes[MAX_NODES]; -extern int tris[MAX_TRIS][3]; -extern int new_tris[MAX_TRIS][3]; - - /* Initialize a new mesh structure */ void triload(char *basename, char *basepath); @@ -50,9 +44,12 @@ void triload(char *basename, char *basepath); /* $Log$ -/* Revision 1.4 1998/01/17 01:25:40 curt -/* Added support for shared normals. +/* Revision 1.5 1998/03/03 16:01:00 curt +/* More c++ compile tweaks. /* + * Revision 1.4 1998/01/17 01:25:40 curt + * Added support for shared normals. + * * Revision 1.3 1997/11/15 18:05:06 curt * minor tweaks ... *