Fix compilation errors and warnings for NURBS support. (Robert Bergkvist)
diff --git a/src/glu/sgi/Makefile.win b/src/glu/sgi/Makefile.win
index 33349c3..9321732 100644
--- a/src/glu/sgi/Makefile.win
+++ b/src/glu/sgi/Makefile.win
@@ -1,14 +1,5 @@
 # Makefile for Win32
 
-#
-# Sept 12, 2001
-# Note: The nurbs code is not being built at this time.
-# If you want to work on it, uncomment the definitions
-# noted below to try to compile the sources.
-# There are numerous problems, some of which may be solved
-# by setting some #defines.
-#
-
 !include <win32.mak>
 
 .SUFFIXES : .cc
@@ -116,16 +107,14 @@
 
 gludll	: $(GLUDLL)
 
-CFLAGS	= $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -Iinclude -DBUILD_GL32
+CFLAGS	= $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -Iinclude -DBUILD_GL32 -DLIBRARYBUILD
 LFLAGS	= $(dlllflags) $(lcommon) $(LFLAGS)
 
-OBJS	= $(GLU_SRCS:.c=.obj)
 LIBS	= ../lib/$(MESALIB) winmm.lib $(guilibsdll)
 
-# Uncomment these definitions to try to compile the NURBS code.
-#OBJS	= $(GLU_SRCS_CC:.cc=.obj) $(GLU_SRCS:.c=.obj)
-#NURBSINC = -Ilibnurbs\interface -Ilibnurbs\internals -Ilibnurbs\nurbtess 
-#CFLAGS  = $(CFLAGS) $(NURBSINC)
+OBJS	= $(GLU_SRCS_CC:.cc=.obj) $(GLU_SRCS:.c=.obj)
+NURBSINC = -Ilibnurbs\interface -Ilibnurbs\internals -Ilibnurbs\nurbtess 
+CFLAGS  = $(CFLAGS) $(NURBSINC)
 
 $(GLUDLL): $(OBJS) glu.def
 	$(link) $(LFLAGS) -out:$(GLUDLL) -def:glu.def $(OBJS) $(LIBS)
diff --git a/src/glu/sgi/glu.def b/src/glu/sgi/glu.def
index 19da640..ca9daf7 100644
--- a/src/glu/sgi/glu.def
+++ b/src/glu/sgi/glu.def
@@ -2,7 +2,10 @@
 VERSION 3.5
 
 EXPORTS
+	gluBeginCurve
 	gluBeginPolygon
+	gluBeginSurface
+	gluBeginTrim
 	gluBuild1DMipmapLevels
 	gluBuild1DMipmaps
 	gluBuild2DMipmapLevels
@@ -11,22 +14,36 @@
 	gluBuild3DMipmaps
 	gluCheckExtension
 	gluCylinder
+	gluDeleteNurbsRenderer
 	gluDeleteQuadric
 	gluDeleteTess
 	gluDisk
+	gluEndCurve
 	gluEndPolygon
+	gluEndSurface
+	gluEndTrim
 	gluErrorString
+	gluGetNurbsProperty
 	gluGetString
 	gluGetTessProperty
+	gluLoadSamplingMatrices
 	gluLookAt
+	gluNewNurbsRenderer
 	gluNewQuadric
 	gluNewTess
 	gluNextContour
+	gluNurbsCallback
+	gluNurbsCallbackData
+	gluNurbsCallbackDataEXT
+	gluNurbsCurve
+	gluNurbsProperty
+	gluNurbsSurface
 	gluOrtho2D
 	gluPartialDisk
 	gluPerspective
 	gluPickMatrix
 	gluProject
+	gluPwlCurve
 	gluQuadricCallback
 	gluQuadricDrawStyle
 	gluQuadricNormals
diff --git a/src/glu/sgi/libnurbs/interface/bezierEval.cc b/src/glu/sgi/libnurbs/interface/bezierEval.cc
index 3f086c0..a1bbbf5 100644
--- a/src/glu/sgi/libnurbs/interface/bezierEval.cc
+++ b/src/glu/sgi/libnurbs/interface/bezierEval.cc
@@ -31,10 +31,10 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierEval.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierEval.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #include <stdlib.h>
@@ -72,8 +72,8 @@
 {
   float uprime = (u-u0)/(u1-u0);
   float *ctlptr = ctlpoints;
-  float oneMinusX = 1.0-uprime;
-  float XPower = 1.0;
+  float oneMinusX = 1.0f-uprime;
+  float XPower = 1.0f;
 
   int i,k;
   for(k=0; k<dimension; k++)
@@ -171,7 +171,7 @@
  */
 void bezierSurfEvalDerGen(int uder, int vder, float u0, float u1, int uorder, float v0, float v1, int vorder, int dimension, float *ctlpoints, int ustride, int vstride, float u, float v, float ret[])
 {
-  int i,j,k;
+  int i;
   float newPoints[MAX_ORDER][MAX_DIMENSION];
 
   for(i=0; i<uorder; i++){
@@ -229,7 +229,7 @@
 /*if size is 0, then nothing is done*/
 static void normalize(float vec[3])
 {
-  float size = sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
+  float size = (float)sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
 
   if(size < TOLERANCE) 
     {
diff --git a/src/glu/sgi/libnurbs/internals/mapdesc.cc b/src/glu/sgi/libnurbs/internals/mapdesc.cc
index 893ab74..14d0158 100644
--- a/src/glu/sgi/libnurbs/internals/mapdesc.cc
+++ b/src/glu/sgi/libnurbs/internals/mapdesc.cc
@@ -35,8 +35,8 @@
 /*
  * mapdesc.c++
  *
- * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdesc.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdesc.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
  */
 
 #include <stdio.h>
@@ -372,13 +372,13 @@
 	    unsigned int bits = clipbits( cpts );
 	    outbits |= bits;
 	    inbits &= bits;
-	    if( ( outbits == mask ) && ( inbits != mask ) ) return CULL_ACCEPT;
+	    if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
 	} 
     }
 
-    if( outbits != mask ) {
+    if( outbits != (unsigned int)mask ) {
 	return CULL_TRIVIAL_REJECT;
-    } else if( inbits == mask ) {
+    } else if( inbits == (unsigned int)mask ) {
 	return CULL_TRIVIAL_ACCEPT;
     } else {
 	return CULL_ACCEPT;
@@ -404,13 +404,13 @@
 	    unsigned int bits = clipbits( q );
 	    outbits |= bits;
 	    inbits &= bits;
-	    if( ( outbits == mask ) && ( inbits != mask ) ) return CULL_ACCEPT;
+	    if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
 	} 
     }
 
-    if( outbits != mask ) {
+    if( outbits != (unsigned int)mask ) {
 	return CULL_TRIVIAL_REJECT;
-    } else if( inbits == mask ) {
+    } else if( inbits == (unsigned int)mask ) {
 	return CULL_TRIVIAL_ACCEPT;
     } else {
 	return CULL_ACCEPT;
@@ -434,12 +434,12 @@
 	unsigned int bits = clipbits( p );
 	outbits |= bits;
 	inbits &= bits;
-	if( ( outbits == mask ) && ( inbits != mask ) ) return CULL_ACCEPT;
+	if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
     }
 
-    if( outbits != mask ) {
+    if( outbits != (unsigned int)mask ) {
 	return CULL_TRIVIAL_REJECT;
-    } else if( inbits == mask ) {
+    } else if( inbits == (unsigned int)mask ) {
 	return CULL_TRIVIAL_ACCEPT;
     } else {
 	return CULL_ACCEPT;
diff --git a/src/glu/sgi/libnurbs/internals/mesher.cc b/src/glu/sgi/libnurbs/internals/mesher.cc
index 17322a7..1178eeb 100644
--- a/src/glu/sgi/libnurbs/internals/mesher.cc
+++ b/src/glu/sgi/libnurbs/internals/mesher.cc
@@ -35,8 +35,8 @@
 /*
  * mesher.c++
  *
- * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mesher.cc,v 1.2 2001/08/07 17:34:11 brianp Exp $
+ * $Date: 2001/11/29 16:16:55 $ $Revision: 1.3 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mesher.cc,v 1.3 2001/11/29 16:16:55 kschultz Exp $
  */
 
 #include "glimports.h"
@@ -82,7 +82,7 @@
 inline void
 Mesher::push( GridTrimVertex *gt )
 {
-    assert( itop+1 != stacksize );
+    assert( itop+1 != (int)stacksize );
     vdata[++itop] = gt;
 }
 
diff --git a/src/glu/sgi/libnurbs/internals/sorter.cc b/src/glu/sgi/libnurbs/internals/sorter.cc
index 308f8e8..876b34b 100644
--- a/src/glu/sgi/libnurbs/internals/sorter.cc
+++ b/src/glu/sgi/libnurbs/internals/sorter.cc
@@ -35,8 +35,8 @@
 /*
  * sorter.c++
  *
- * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/sorter.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/sorter.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
  */
 
 #include "glimports.h"
@@ -84,7 +84,7 @@
     unsigned int n;
 
 start:
-    if((n=l-a) <= es)
+    if((n=l-a) <= (unsigned int)es)
 	    return;
     n = es * (n / (2*es));
     hp = lp = a+n;
diff --git a/src/glu/sgi/libnurbs/nurbtess/directedLine.cc b/src/glu/sgi/libnurbs/nurbtess/directedLine.cc
index af8d095..81e0104 100644
--- a/src/glu/sgi/libnurbs/nurbtess/directedLine.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/directedLine.cc
@@ -31,10 +31,10 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/directedLine.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/directedLine.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #include <stdlib.h>
@@ -596,7 +596,7 @@
       y2 = temp->next->head()[1];
       ret += -( x2*y1-x1*y2);
     }
-  return 0.5*ret;
+  return Real(0.5)*ret;
 }
 
 /*******************split or combine polygons begin********************/
diff --git a/src/glu/sgi/libnurbs/nurbtess/partitionY.cc b/src/glu/sgi/libnurbs/nurbtess/partitionY.cc
index d7e6bcb..216ac07 100644
--- a/src/glu/sgi/libnurbs/nurbtess/partitionY.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/partitionY.cc
@@ -31,10 +31,10 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #include <stdlib.h>
@@ -231,7 +231,7 @@
  */
 inline/*static*/ Real intersectHoriz(Real x1, Real y1, Real x2, Real y2, Real y)
 {
-  return ((y2==y1)? (x1+x2)*0.5 : x1 + ((y-y1)/(y2-y1)) * (x2-x1));
+  return ((y2==y1)? (x1+x2)*Real(0.5) : x1 + ((y-y1)/(y2-y1)) * (x2-x1));
 /*
   if(y2 == y1) return (x1+x2)*0.5;
   else return x1 + ((y-y1)/(y2-y1)) * (x2-x1);
@@ -309,7 +309,7 @@
   Real Ymax = min(e1_Ymax, e2_Ymax);
   Real Ymin = max(e1_Ymin, e2_Ymin);
     
-  Real y = 0.5*(Ymax + Ymin);
+  Real y = Real(0.5)*(Ymax + Ymin);
 
 /*  Real x1 = intersectHoriz(e1->head()[0], e1->head()[1], e1->tail()[0], e1->tail()[1], y);
   Real x2 = intersectHoriz(e2->head()[0], e2->head()[1], e2->tail()[0], e2->tail()[1], y);
diff --git a/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc b/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc
index bdf16ef..e4a65c2 100644
--- a/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc
@@ -31,10 +31,10 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #include <stdlib.h>
@@ -395,7 +395,7 @@
 */
   /*for debug purpose*/
   assert( (DBG_rayIntersectPoly(v,1,0,poly) % 2 )
-	 == (DBG_rayIntersectPoly(v,1,0.1234, poly) % 2 )
+	 == (DBG_rayIntersectPoly(v,1,Real(0.1234), poly) % 2 )
 	 );
   if(DBG_rayIntersectPoly(v, 1, 0, poly) % 2 == 1)
     return 1; 
diff --git a/src/glu/sgi/libnurbs/nurbtess/polyUtil.h b/src/glu/sgi/libnurbs/nurbtess/polyUtil.h
index a18a837..19c76d3 100644
--- a/src/glu/sgi/libnurbs/nurbtess/polyUtil.h
+++ b/src/glu/sgi/libnurbs/nurbtess/polyUtil.h
@@ -31,20 +31,24 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyUtil.h,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyUtil.h,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #ifndef _POLYUTIL_H
 #define _POLYUTIL_H
 
 #include "definitions.h"
-
+#ifdef __cplusplus
+extern "C" {
+#endif
 Real area(Real A[2], Real B[2], Real C[2]);
 
 Int pointLeftLine(Real A[2], Real B[2],  Real P[2]);
 Int pointLeft2Lines(Real A[2], Real B[2], Real C[2], Real P[2]);
-
+#ifdef __cplusplus
+}
+#endif
 #endif
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
index c3c6ee9..b66647a 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
@@ -31,10 +31,10 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #include <stdlib.h>
@@ -327,7 +327,7 @@
     {
       oldLeftI = leftCorner-1;
       oldRightI = rightCorner;
-      leftMax = leftChain->getVertex(leftCorner)[0] - 1.0 ; //initilize to be left of leftCorner
+      leftMax = leftChain->getVertex(leftCorner)[0] - Real(1.0) ; //initilize to be left of leftCorner
       rightMin = rightChain->getVertex(rightCorner)[0]; 
     }
   else //rightlower
@@ -335,7 +335,7 @@
       oldLeftI = leftCorner;
       oldRightI = rightCorner-1;
       leftMax = leftChain->getVertex(leftCorner)[0];
-      rightMin = rightChain->getVertex(rightCorner)[0] + 1.0;
+      rightMin = rightChain->getVertex(rightCorner)[0] + Real(1.0);
     }
 
   //i: the current working leftChain Index
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
index 76a36e0..0d012d4 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
@@ -31,10 +31,10 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #include <stdlib.h>
@@ -343,7 +343,7 @@
     {
       oldLeftI = leftEndIndex+1;
       oldRightI = rightEndIndex;
-      leftMax =  leftChain->getVertex(leftEndIndex)[0] - 1.0; //initilza to left of leftU
+      leftMax =  leftChain->getVertex(leftEndIndex)[0] - Real(1.0); //initilza to left of leftU
       rightMin = rightChain->getVertex(rightEndIndex)[0];
     }
   else
@@ -351,7 +351,7 @@
       oldLeftI = leftEndIndex;
       oldRightI = rightEndIndex+1;
       leftMax =  leftChain->getVertex(leftEndIndex)[0]; 
-      rightMin = rightChain->getVertex(rightEndIndex)[0] + 1.0;      
+      rightMin = rightChain->getVertex(rightEndIndex)[0] + Real(1.0);      
     }
   
   //i: the current working leftChain index, 
@@ -826,19 +826,19 @@
          //find l in [j, k-1] so that dec_chain[l][0] 0 is closest to
          // inc_chain[i]
          int l;
-         Real tempI = j;
-         Real tempMin = fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
+         Real tempI = Real(j);
+         Real tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
          for(l=j+1; l<= k-1; l++)
 	   {
 	     if(fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0])
 		<= tempMin)
 	       {
-		 tempMin = fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0]);
-		 tempI = l;
+		 tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0]);
+		 tempI = (Real)l;
 	       }
 	   }
 	 //inc_chain[i] and dec_chain[tempI] are connected.
-	 monoTriangulationRecGenOpt(dec_chain->getVertex(tempI),
+	 monoTriangulationRecGenOpt(dec_chain->getVertex((int)tempI),
 				    botVertex,
 				    inc_chain, i, inc_end,
 				    dec_chain, (int)(tempI+1), dec_end,
@@ -866,12 +866,12 @@
 	  //inc_chain[l][0] is the closet to dec_chain[j][0]
 	  int tempI = i;
 	  int l;
-	  Real tempMin = fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
+	  Real tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
 	  for(l=i+1; l<=k-1; l++)
 	    {
 	      if(fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]) <= tempMin)
 		{
-		  tempMin = fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]);
+		  tempMin = (Real)fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]);
 		  tempI = l;
 		}
 	    }				 	      
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc b/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc
index 66e1a7f..15332eb 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc
@@ -31,10 +31,10 @@
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
 */
 
 #include <stdlib.h>
@@ -96,7 +96,6 @@
 
 sampledLine::sampledLine(Real pt1[2], Real pt2[2])
 {
-  int i;
   npoints = 2;
   points = (Real2*) malloc(sizeof(Real2) * 2);
   assert(points);