dri: Rework planar image interface
[mesa.git] / src / glu / sgi / libnurbs / nurbtess / sampleMonoPoly.cc
index 1ddfa2ce45ea7e5b200c952883656d3a47fe1ab4..051f241083496e8975ac066b2022023ce738a288 100644 (file)
 ** 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 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
 */
 
 #include "gluos.h"
@@ -483,7 +481,7 @@ rightChain->print();
 
 
       Real tempMin = rightChain->getVertex(index2)[0];
-      Real tempI = index2;
+      Int tempI = index2;
       for(i=index2+1; i<= rightChainEndIndex; i++)
        if(rightChain->getVertex(i)[0] < tempMin)
          {
@@ -505,7 +503,7 @@ rightChain->print();
      else
        {
         ret_leftCornerWhere = 2; //right
-        ret_leftCornerIndex = (int)tempI;
+        ret_leftCornerIndex = tempI;
        }
     }
   else if(index2> rightChainEndIndex) /*index1<=leftChainEndIndex*/
@@ -517,7 +515,7 @@ rightChain->print();
        *either this vertex or the botvertex can be used as the right corner
        */
 
-      Real tempI;
+      Int tempI;
       //skip those points which are equal to v. (avoid degeneratcy)
       for(tempI = index1; tempI <= leftChainEndIndex; tempI++)
        if(leftChain->getVertex(tempI)[1] < v) 
@@ -527,7 +525,7 @@ rightChain->print();
       else
        {
          Real tempMax = leftChain->getVertex(tempI)[0];
-         for(i=(int)tempI; i<= leftChainEndIndex; i++)
+         for(i=tempI; i<= leftChainEndIndex; i++)
            if(leftChain->getVertex(i)[0] > tempMax)
              {
                tempI = i;
@@ -552,7 +550,7 @@ rightChain->print();
          else
            {
              ret_rightCornerWhere = 0;
-             ret_rightCornerIndex = (int)tempI;
+             ret_rightCornerIndex = tempI;
            }
        }
       
@@ -976,13 +974,15 @@ void findNeck(vertexArray *leftChain, Int botLeftIndex,
 void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid,  Int* ret_indices, Int* ret_innerIndices)
 {
 
-  Int i,k,isHoriz;
+  Int i,k,isHoriz = 0;
   Int n_ulines = grid->get_n_ulines();
   Real uMin = grid->get_u_min();
   Real uMax = grid->get_u_max();
+  /*
   Real vMin = grid->get_v_min();
   Real vMax = grid->get_v_max();
-  Real slop, uinterc;
+  */
+  Real slop = 0.0, uinterc;
 
 #ifdef SHORTEN_GRID_LINE
   //uintercBuf stores all the interction u value for each grid line
@@ -1096,9 +1096,11 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
   Int n_ulines = grid->get_n_ulines();
   Real uMin = grid->get_u_min();
   Real uMax = grid->get_u_max();
+  /*
   Real vMin = grid->get_v_min();
   Real vMax = grid->get_v_max();
-  Real slop, uinterc;
+  */
+  Real slop = 0.0, uinterc;
 
 #ifdef SHORTEN_GRID_LINE
   //uintercBuf stores all the interction u value for each grid line