<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- Array.h.orig	1995-12-19 13:24:31.000000000 -0600
+++ Array.h	2018-04-11 18:48:55.000000000 -0500
@@ -1,6 +1,9 @@
 #ifndef ARRAY_INCLUDED // -*- C++ -*-
 #define ARRAY_INCLUDED
 
+#include &lt;memory.h&gt;
+
+
 //
 // Array classes
 //
@@ -13,14 +16,14 @@
 
 
 template&lt;class T&gt;
-class array {
+class Array {
 protected:
     T *data;
     int len;
 public:
-    array() { data=NULL; len=0; }
-    array(int l) { init(l); }
-    ~array() { free(); }
+    Array() { data=NULL; len=0; }
+    Array(int l) { init(l); }
+    ~Array() { free(); }
 
 
     inline void init(int l);
@@ -35,14 +38,14 @@
 };
 
 template&lt;class T&gt;
-inline void array&lt;T&gt;::init(int l)
+inline void Array&lt;T&gt;::init(int l)
 {
     data = new T[l];
     len = l;
 }
 
 template&lt;class T&gt;
-inline void array&lt;T&gt;::free()
+inline void Array&lt;T&gt;::free()
 {
     if( data )
     {
@@ -52,7 +55,7 @@
 }
 
 template&lt;class T&gt;
-inline T&amp; array&lt;T&gt;::ref(int i)
+inline T&amp; Array&lt;T&gt;::ref(int i)
 {
 #ifdef SAFETY
     assert( data );
@@ -62,7 +65,7 @@
 }
 
 template&lt;class T&gt;
-inline void array&lt;T&gt;::resize(int l)
+inline void Array&lt;T&gt;::resize(int l)
 {
     T *old = data;
     data = new T[l];
--- GreedyInsert.cc.orig	1996-01-19 11:07:18.000000000 -0600
+++ GreedyInsert.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,9 +1,11 @@
-#include &lt;iostream.h&gt;
+#include &lt;iostream&gt;
 #include "GreedyInsert.h"
-
+#include &lt;assert.h&gt;
 #include "Mask.h"
 extern ImportMask *MASK;
 
+using namespace std;
+
 void TrackedTriangle::update(Subdivision&amp; s)
 {
     GreedySubdivision&amp; gs = (GreedySubdivision&amp;)s;
@@ -209,7 +211,11 @@
 
     is_used(sx,sy) = DATA_POINT_USED;
     count++;
+#if 0
     return insert(Vec2(sx,sy), t);
+#endif
+    Vec2 vec(sx,sy);
+    return insert(vec, t);
 }
 
 
--- Heap.cc.orig	1996-01-09 15:19:08.000000000 -0600
+++ Heap.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,7 +1,9 @@
 #include &lt;assert.h&gt;
-#include &lt;iostream.h&gt;
+#include &lt;iostream&gt;
 #include "Heap.h"
 
+using namespace std;
+
 
 void Heap::swap(int i,int j)
 {
--- Heap.h.orig	1996-01-30 10:35:18.000000000 -0600
+++ Heap.h	2018-04-11 18:48:55.000000000 -0500
@@ -24,10 +24,10 @@
 
 
 
-class Heap : public array&lt;heap_node&gt; {
+class Heap : public Array&lt;heap_node&gt; {
 
     //
-    // The actual size of the heap.  array::length()
+    // The actual size of the heap.  Array::length()
     // simply returns the amount of allocated space
     int size;
 
@@ -43,7 +43,7 @@
 public:
 
     Heap() { size=0; }
-    Heap(int s) : array&lt;heap_node&gt;(s) { size=0; }
+    Heap(int s) : Array&lt;heap_node&gt;(s) { size=0; }
 
 
     void insert(Labelled *, real);
--- Makefile.orig	1996-01-30 10:35:20.000000000 -0600
+++ Makefile	2018-04-11 18:48:55.000000000 -0500
@@ -4,23 +4,24 @@
 # You should change these to fit your system.
 #
 
-CC = cc
-C++ = CC
+CC = @CC@
+C++ = @CXX@
 
 # For compiling on SGI's with the pre-5.3 (ie. cfront-based) compiler:
 # add '-ptr/tmp/terra_ptrepository' to OPTFLAGS
 # add '-pte.cc' to LFLAGS
 
-OPTFLAGS = -g -mips2 
+# OPTFLAGS = -g -mips2 
 # OPTFLAGS = -O2 -mips2
+OPTFLAGS = -g -Wall @OPTFLAGS@
 
 GUI_LIBS = -lglut -lGLU -lGL -lXmu -lX11
-LIBS = -lmalloc -lmx
+LIBS = # -lmalloc -lmx
 
 #
 # This defines the location of the GLUT libraries
 #
-ANIM = /afs/cs/project/anim/garland
+ANIM = @PREFIX@
 GLUT_FLAGS = 
 GLUT_INCDIR = $(ANIM)/include
 GLUT_LIBDIR = $(ANIM)/lib
@@ -34,7 +35,7 @@
 #
 # These are the flags for compilation (CFLAGS) and linking (LFLAGS) 
 #
-CFLAGS = $(INCDIR) $(OPTFLAGS) -DSAFETY
+CFLAGS = $(INCDIR) $(OPTFLAGS) -DIOSTREAMH # -DSAFETY
 LFLAGS = $(LIBDIR) $(OPTFLAGS)
 
 
@@ -81,7 +82,7 @@
 
 depend :
 	touch Makefile.depend
-	makedepend -fMakefile.depend $(INCDIR) -I/usr/include/CC $(BASE_SRCS) $(GUI_SRCS)
+	makedepend -fMakefile.depend $(INCDIR) $(BASE_SRCS) $(GUI_SRCS)
 	/bin/rm -f Makefile.depend.bak
 
 sinclude Makefile.depend
--- Map.h.orig	1996-01-30 10:35:21.000000000 -0600
+++ Map.h	2018-04-11 18:48:55.000000000 -0500
@@ -2,10 +2,13 @@
 #define MAP_INCLUDED
 
 #include &lt;stdlib.h&gt;
-#include &lt;iostream.h&gt;
+#include &lt;iostream&gt;
 
 #include "Geom.h"
 
+using namespace std;
+
+
 class Map
 {
 public:
--- Mask.cc.orig	1996-01-17 10:03:13.000000000 -0600
+++ Mask.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,10 +1,12 @@
 #include &lt;math.h&gt;
 #include &lt;stdlib.h&gt;
-#include &lt;iostream.h&gt;
+#include &lt;iostream&gt;
 
 #include "Geom.h"
 #include "Mask.h"
 
+using namespace std;
+
 
 RealMask *readMask(istream&amp; in)
 {
--- Mask.h.orig	1996-01-17 10:03:14.000000000 -0600
+++ Mask.h	2018-04-11 18:48:55.000000000 -0500
@@ -1,6 +1,11 @@
 #ifndef MASK_INCLUDED // -*- C++ -*-
 #define MASK_INCLUDED
 
+#include &lt;istream&gt;
+
+using namespace std;
+
+
 class ImportMask
 {
 
--- Quadedge.cc.orig	1995-12-19 16:05:48.000000000 -0600
+++ Quadedge.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,8 +1,10 @@
 #include &lt;stdlib.h&gt;
-#include &lt;iostream.h&gt;
+#include &lt;iostream&gt;
 
 #include "Quadedge.h"
 
+using namespace std;
+
 Edge::Edge(const Edge&amp;)
 {
     cerr &lt;&lt; "Edge: Edge assignments are forbidden." &lt;&lt; endl;
--- Subdivision.cc.orig	1996-01-30 10:35:22.000000000 -0600
+++ Subdivision.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,9 +1,10 @@
 #include &lt;stdlib.h&gt;
-#include &lt;iostream.h&gt;
+#include &lt;iostream&gt;
 #include &lt;assert.h&gt;
 
 #include "Subdivision.h"
 
+using namespace std;
 
 
 Edge *Subdivision::makeEdge(Vec2&amp; org, Vec2&amp; dest)
@@ -105,7 +106,7 @@
 
 static void overEdge(Edge *e, edge_callback fn, void *closure)
 {
-    if( e-&gt;token != timestamp )
+    if( static_cast&lt;decltype(timestamp)&gt;(e-&gt;token) != timestamp )
     {
 	e-&gt;token = timestamp;
 	e-&gt;Sym()-&gt;token = timestamp;
@@ -214,7 +215,7 @@
         real td = triArea(x, ed-&gt;Dest(), ed-&gt;Org());
 
         if (td&gt;0)                       // x is below ed
-            if (to&gt;0 || to==0 &amp;&amp; t==0) {// x is interior, or origin endpoint
+            if (to&gt;0 || (to==0 &amp;&amp; t==0)) {// x is interior, or origin endpoint
                 startingEdge = e;
                 return e;
             }
@@ -259,10 +260,12 @@
 
     if ( (x == e-&gt;Org()) || (x == e-&gt;Dest()) ) {
         // point is already in the mesh
+#if 0
 	//
         cerr &lt;&lt; "WARNING: Tried to reinsert point: " &lt;&lt; x &lt;&lt; endl;
 	cerr &lt;&lt; "         org: " &lt;&lt; e-&gt;Org() &lt;&lt; endl;
 	cerr &lt;&lt; "        dest: " &lt;&lt; e-&gt;Dest() &lt;&lt; endl;
+#endif
         return NULL;
     }
 
@@ -338,7 +341,9 @@
     do {
 
 	Edge *e = spoke-&gt;Lnext();
+#if 0
 	Edge *t = e-&gt;Oprev();
+#endif
 
 	if( isInterior(e) &amp;&amp; shouldSwap(x, e) )
 	    swap(e);
--- Vec2.h.orig	1996-01-30 10:35:24.000000000 -0600
+++ Vec2.h	2018-04-11 18:48:55.000000000 -0500
@@ -1,6 +1,11 @@
 #ifndef VEC2_INCLUDED // -*- C++ -*-
 #define VEC2_INCLUDED
 
+#include &lt;iostream&gt;
+
+using namespace std;
+
+
 class Vec2 {
 protected:
     real elt[2];
@@ -163,7 +168,13 @@
 
 inline istream&amp; operator&gt;&gt;(istream&amp; in, Vec2&amp; v)
 {
+#if 0
     return in &gt;&gt; "[" &gt;&gt; v[0] &gt;&gt; v[1] &gt;&gt; "]";
+#endif
+    in.ignore(1, '[');
+    in &gt;&gt; v[0] &gt;&gt; v[1];
+    in.ignore(1, ']');
+    return in;
 }
 #endif
 
--- Vec3.h.orig	1995-12-19 13:24:37.000000000 -0600
+++ Vec3.h	2018-04-11 18:48:55.000000000 -0500
@@ -1,6 +1,11 @@
 #ifndef VEC3_INCLUDED // -*- C++ -*-
 #define VEC3_INCLUDED
 
+#include &lt;iostream&gt;
+
+using namespace std;
+
+
 class Vec3 {
 protected:
     real elt[3];
@@ -173,7 +178,13 @@
 
 inline istream&amp; operator&gt;&gt;(istream&amp; in, Vec3&amp; v)
 {
+#if 0
     return in &gt;&gt; "[" &gt;&gt; v[0] &gt;&gt; v[1] &gt;&gt; v[2] &gt;&gt; "]";
+#endif
+    in.ignore(1, '[');
+    in &gt;&gt; v[0] &gt;&gt; v[1];
+    in.ignore(1, ']');
+    return in;
 }
 #endif
 
--- cmdline.cc.orig	1996-01-19 12:34:14.000000000 -0600
+++ cmdline.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,7 +1,9 @@
 #include &lt;stdlib.h&gt;
-#include &lt;fstream.h&gt;
+#include &lt;fstream&gt;
 #include &lt;string.h&gt;
 #include "terra.h"
+#include &lt;getopt.h&gt;
+
 
 GreedySubdivision *mesh;
 Map *DEM;
@@ -18,9 +20,9 @@
 char *mask_filename   = NULL;
 char *script_filename = NULL;
 
-static char *options = "e:p:h:o:m:s:";
+static const char *options = "e:p:h:o:m:s:";
 
-static char *usage_string =
+static const char *usage_string =
 "-e &lt;thresh&gt;      Sets the tolerable error threshold\n"
 "-p &lt;count&gt;       Sets the maximum number of allowable points\n"
 "-h &lt;factor&gt;      Sets the height scaling factor.  For example,\n"
@@ -31,7 +33,7 @@
 "-s &lt;file&gt;        Execute preinsertion script from &lt;file&gt;\n"
 "\n";
 
-static void usage_error(char *msg = NULL)
+static void usage_error(const char *msg = NULL)
 {
     if( msg )
 	cerr &lt;&lt; msg &lt;&lt; endl;
--- glHacks.h.orig	1996-01-30 10:35:27.000000000 -0600
+++ glHacks.h	2018-04-11 18:48:55.000000000 -0500
@@ -4,6 +4,9 @@
 #include &lt;GL/glx.h&gt;
 #include &lt;GL/gl.h&gt;
 #include &lt;GL/glu.h&gt;
+#include &lt;iostream&gt;
+
+using namespace std;
 
 
 /*************************************************************************
--- greedy.cc.orig	1996-01-19 12:34:15.000000000 -0600
+++ greedy.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,4 +1,6 @@
 #include "terra.h"
+#include &lt;fstream&gt;
+
 
 void scripted_preinsertion(istream&amp; script)
 {
@@ -64,7 +66,7 @@
 inline int goal_not_met()
 {
     return mesh-&gt;maxError() &gt; error_threshold &amp;&amp;
-	   mesh-&gt;pointCount() &lt; point_limit;
+      static_cast&lt;decltype(point_limit)&gt;(mesh-&gt;pointCount()) &lt; point_limit;
 }
 
 static void announce_goal()
--- output.cc.orig	1996-01-30 10:35:30.000000000 -0600
+++ output.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,8 +1,8 @@
 #include "terra.h"
-#include &lt;fstream.h&gt;
+#include &lt;fstream&gt;
 
 
-void generate_output(char *filename, FileFormat format)
+void generate_output(const char *filename, FileFormat format)
 {
     if( !filename )
 	filename = output_filename;
--- terra.cc.orig	1996-01-10 15:22:59.000000000 -0600
+++ terra.cc	2018-04-11 18:48:55.000000000 -0500
@@ -1,10 +1,12 @@
 #include "terra.h"
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
     process_cmdline(argc, argv);
 
     greedy_insertion();
 
     generate_output();
+
+    return 0;
 }
--- terra.h.orig	1996-01-19 12:34:17.000000000 -0600
+++ terra.h	2018-04-11 18:48:55.000000000 -0500
@@ -24,7 +24,7 @@
 extern void scripted_preinsertion(istream&amp;);
 extern void subsample_insertion(int target_width);
 
-extern void generate_output(char *filename=NULL,
+extern void generate_output(const char *filename=NULL,
 			    FileFormat format=NULLfile);
 extern void output_tin(ostream&amp;);
 extern void output_eps(ostream&amp;);
--- xterra.cc.orig	1995-12-15 13:26:34.000000000 -0600
+++ xterra.cc	2018-04-11 18:48:55.000000000 -0500
@@ -5,7 +5,7 @@
 
 
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
     glutInit(&amp;argc, argv);
     process_cmdline(argc, argv);
@@ -15,4 +15,6 @@
 
 
     gui_interact();
+
+    return 0;
 }
</pre></body></html>