From 9125f724499c137f1eff5d7d8834ed218d82966f Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 3 Mar 1998 15:36:11 +0000 Subject: [PATCH] Tweaks for compiling with g++ --- FixObj/obj.c | 15 +++++++++------ FixObj/obj.h | 11 +++++------ SplitTris/splittris.c | 15 +++++++++------ SplitTris/splittris.h | 10 +++++----- Tools/Makefile | 7 +++++-- 5 files changed, 33 insertions(+), 25 deletions(-) diff --git a/FixObj/obj.c b/FixObj/obj.c index 8f704957f..3971aac83 100644 --- a/FixObj/obj.c +++ b/FixObj/obj.c @@ -33,13 +33,13 @@ /* what do ya' know, here's some global variables */ -double nodes[MAXNODES][3]; -double normals[MAXNODES][3]; +static double nodes[MAXNODES][3]; +static double normals[MAXNODES][3]; -int ccw_list[MAXNODES]; +static int ccw_list[MAXNODES]; int ccw_list_ptr; -int cw_list[MAXNODES]; +static int cw_list[MAXNODES]; int cw_list_ptr; FILE *in, *out; @@ -288,9 +288,12 @@ void obj_fix(char *infile, char *outfile) { /* $Log$ -/* Revision 1.5 1998/03/03 03:37:03 curt -/* Cumulative tweaks. +/* Revision 1.6 1998/03/03 15:36:12 curt +/* Tweaks for compiling with g++ /* + * Revision 1.5 1998/03/03 03:37:03 curt + * Cumulative tweaks. + * * Revision 1.4 1998/01/31 00:41:25 curt * Made a few changes converting floats to doubles. * diff --git a/FixObj/obj.h b/FixObj/obj.h index 954a088a7..4fd07f42f 100644 --- a/FixObj/obj.h +++ b/FixObj/obj.h @@ -30,10 +30,6 @@ #define MAXNODES 100000 -extern double nodes[MAXNODES][3]; -extern double normals[MAXNODES][3]; -extern int stack[MAXNODES]; - /* Load a .obj file */ void obj_fix(char *infile, char *outfile); @@ -43,9 +39,12 @@ void obj_fix(char *infile, char *outfile); /* $Log$ -/* Revision 1.3 1998/01/31 00:41:25 curt -/* Made a few changes converting floats to doubles. +/* Revision 1.4 1998/03/03 15:36:13 curt +/* Tweaks for compiling with g++ /* + * Revision 1.3 1998/01/31 00:41:25 curt + * Made a few changes converting floats to doubles. + * * Revision 1.2 1998/01/09 23:03:13 curt * Restructured to split 1deg x 1deg dem's into 64 subsections. * diff --git a/SplitTris/splittris.c b/SplitTris/splittris.c index 9c8f7bfb1..36b8db356 100644 --- a/SplitTris/splittris.c +++ b/SplitTris/splittris.c @@ -45,11 +45,11 @@ 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; @@ -612,9 +612,12 @@ int main(int argc, char **argv) { /* $Log$ -/* Revision 1.5 1998/03/03 03:37:04 curt -/* Cumulative tweaks. +/* 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. * diff --git a/SplitTris/splittris.h b/SplitTris/splittris.h index abd7621b4..6ed50d672 100644 --- a/SplitTris/splittris.h +++ b/SplitTris/splittris.h @@ -37,9 +37,6 @@ 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 */ @@ -50,9 +47,12 @@ void triload(char *basename); /* $Log$ -/* Revision 1.2 1998/01/15 02:49:25 curt -/* Misc. housekeeping. +/* Revision 1.3 1998/03/03 15:36:13 curt +/* Tweaks for compiling with g++ /* + * Revision 1.2 1998/01/15 02:49:25 curt + * Misc. housekeeping. + * * Revision 1.1 1998/01/14 02:11:32 curt * Initial revision. * diff --git a/Tools/Makefile b/Tools/Makefile index 15a75ef91..25970e183 100644 --- a/Tools/Makefile +++ b/Tools/Makefile @@ -27,8 +27,8 @@ include $(FG_ROOT_SRC)/commondefs -SUBDIRS = AssemTris Dem2node DemRaw2Ascii FixNode FixObj SplitTris Stripe_u \ - Tri2obj Triangle +SUBDIRS = AssemTris Dem2node DemRaw2Ascii FixNode FixObj SplitTris \ + Stripe_u Tri2obj Triangle ORDEREDDIRS = $(SUBDIRS) @@ -90,6 +90,9 @@ bin-zip: #--------------------------------------------------------------------------- # $Log$ +# Revision 1.10 1998/03/03 15:36:11 curt +# Tweaks for compiling with g++ +# # Revision 1.9 1998/03/03 01:21:17 curt # Added DemRaw2Ascii # -- 2.39.2