summaryrefslogtreecommitdiff
path: root/src/glu/sgi/libnurbs/internals
diff options
context:
space:
mode:
authorKendall Bennett <KendallB@scitechsoft.com>2003-10-14 23:48:57 +0000
committerKendall Bennett <KendallB@scitechsoft.com>2003-10-14 23:48:57 +0000
commit596d57c42a24430e72e225c051270918d0b2e864 (patch)
tree98b771dd11e637f88107682adb3797c4731b548d /src/glu/sgi/libnurbs/internals
parent9b77fb7dab3fd4e4a9228e5c0609cc494aa01211 (diff)
Updates to SGI GLU code to get it to compile clean with the Open Watcom compiler.
Most of the changes were to get rid of warnings, but many of the warnings could not be removed in the code so I also added #pragma's to disable the warnings. Someone really should clean up this code, but I didn't want to mess with it that much (and potentially break it).
Diffstat (limited to 'src/glu/sgi/libnurbs/internals')
-rw-r--r--src/glu/sgi/libnurbs/internals/arc.cc71
-rw-r--r--src/glu/sgi/libnurbs/internals/basiccrveval.cc30
-rw-r--r--src/glu/sgi/libnurbs/internals/basicsurfeval.cc56
-rw-r--r--src/glu/sgi/libnurbs/internals/coveandtiler.cc84
-rw-r--r--src/glu/sgi/libnurbs/internals/knotvector.cc41
5 files changed, 141 insertions, 141 deletions
diff --git a/src/glu/sgi/libnurbs/internals/arc.cc b/src/glu/sgi/libnurbs/internals/arc.cc
index 845f05fab9..3b968303bd 100644
--- a/src/glu/sgi/libnurbs/internals/arc.cc
+++ b/src/glu/sgi/libnurbs/internals/arc.cc
@@ -35,8 +35,8 @@
/*
* arc.c++
*
- * $Date: 2002/11/01 23:35:07 $ $Revision: 1.2 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/arc.cc,v 1.2 2002/11/01 23:35:07 brianp Exp $
+ * $Date: 2003/10/14 23:48:57 $ $Revision: 1.3 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/arc.cc,v 1.3 2003/10/14 23:48:57 kendallb Exp $
*/
#include <stdio.h>
@@ -50,11 +50,11 @@
#include "simplemath.h"
/* local preprocessor definitions */
-#define ZERO 0.00001/*0.000001*/
+#define ZERO 0.00001/*0.000001*/
-const int Arc::bezier_tag = (1<<13);
-const int Arc::arc_tag = (1<<3);
-const int Arc::tail_tag = (1<<6);
+const int Arc::bezier_tag = (1<<13);
+const int Arc::arc_tag = (1<<3);
+const int Arc::tail_tag = (1<<6);
/*--------------------------------------------------------------------------
* makeSide - attach a pwl arc to an arc and mark it as a border arc
@@ -72,7 +72,7 @@ Arc::makeSide( PwlArc *pwl, arc_side side )
clearbezier();
setside( side );
}
-
+
/*--------------------------------------------------------------------------
* numpts - count number of points on arc loop
@@ -100,7 +100,7 @@ void
Arc::markverts( void )
{
Arc_ptr jarc = this;
-
+
do {
TrimVertex *p = jarc->pwlArc->pts;
for( int i=0; i<jarc->pwlArc->npts; i++ )
@@ -125,22 +125,22 @@ Arc::getextrema( Arc_ptr extrema[4] )
botpt = toppt = this->tail()[1];
for( Arc_ptr jarc = this->next; jarc != this; jarc = jarc->next ) {
- if ( jarc->tail()[0] < leftpt ||
+ if ( jarc->tail()[0] < leftpt ||
(jarc->tail()[0] <= leftpt && jarc->rhead()[0]<=leftpt)) {
leftpt = jarc->pwlArc->pts->param[0];
extrema[1] = jarc;
}
- if ( jarc->tail()[0] > rightpt ||
+ if ( jarc->tail()[0] > rightpt ||
(jarc->tail()[0] >= rightpt && jarc->rhead()[0] >= rightpt)) {
rightpt = jarc->pwlArc->pts->param[0];
extrema[3] = jarc;
}
- if ( jarc->tail()[1] < botpt ||
- (jarc->tail()[1] <= botpt && jarc->rhead()[1] <= botpt )) {
+ if ( jarc->tail()[1] < botpt ||
+ (jarc->tail()[1] <= botpt && jarc->rhead()[1] <= botpt )) {
botpt = jarc->pwlArc->pts->param[1];
extrema[2] = jarc;
}
- if ( jarc->tail()[1] > toppt ||
+ if ( jarc->tail()[1] > toppt ||
(jarc->tail()[1] >= toppt && jarc->rhead()[1] >= toppt)) {
toppt = jarc->pwlArc->pts->param[1];
extrema[0] = jarc;
@@ -160,7 +160,7 @@ Arc::show()
#ifndef NDEBUG
dprintf( "\tPWLARC NP: %d FL: 1\n", pwlArc->npts );
for( int i = 0; i < pwlArc->npts; i++ ) {
- dprintf( "\t\tVERTEX %f %f\n", pwlArc->pts[i].param[0],
+ dprintf( "\t\tVERTEX %f %f\n", pwlArc->pts[i].param[0],
pwlArc->pts[i].param[1] );
}
#endif
@@ -176,13 +176,6 @@ Arc::print( void )
{
Arc_ptr jarc = this;
- if( ! this ) {
-#ifndef NDEBUG
- dprintf( "\n\nEMPTY TRIM\n\n" );
-#endif
- return;
- }
-
#ifndef NDEBUG
dprintf( "BGNTRIM\n" );
#endif
@@ -217,10 +210,10 @@ Arc::isDisconnected( void )
#endif
return 1;
} else {
- /* average two points together */
- p0[0] = p1[0] = (p1[0] + p0[0]) * 0.5;
- p0[1] = p1[1] = (p1[1] + p0[1]) * 0.5;
- return 0;
+ /* average two points together */
+ p0[0] = p1[0] = (p1[0] + p0[0]) * 0.5;
+ p0[1] = p1[1] = (p1[1] + p0[1]) * 0.5;
+ return 0;
}
}
@@ -251,29 +244,29 @@ Arc::check( void )
do {
assert( (jarc->pwlArc != 0) || (jarc->bezierArc != 0) );
- if (jarc->prev == 0 || jarc->next == 0) {
+ if (jarc->prev == 0 || jarc->next == 0) {
#ifndef NDEBUG
dprintf( "checkjarc:null next/prev pointer\n");
jarc->print( );
#endif
return 0;
- }
+ }
- if (jarc->next->prev != jarc) {
+ if (jarc->next->prev != jarc) {
#ifndef NDEBUG
dprintf( "checkjarc: pointer linkage screwed up\n");
jarc->print( );
#endif
return 0;
- }
+ }
- if( jarc->pwlArc ) {
+ if( jarc->pwlArc ) {
#ifndef NDEBUG
assert( jarc->pwlArc->npts >= 1 );
assert( jarc->pwlArc->npts < 100000 );
/*
for( int i=0; i < jarc->pwlArc->npts-1; i++ )
- assert( neq_vert( jarc->pwlArc->pts[i].param,
+ assert( neq_vert( jarc->pwlArc->pts[i].param,
jarc->pwlArc->pts[i+1].param) );
*/
#endif
@@ -287,7 +280,7 @@ Arc::check( void )
return 0;
}
if( jarc->tail()[0] != jarc->prev->rhead()[0] ) {
-
+
#ifndef NDEBUG
dprintf( "checkjarc: geometric linkage screwed up 2\n");
jarc->prev->show();
@@ -316,13 +309,13 @@ Arc::check( void )
}
if( jarc->isbezier() ) {
assert( jarc->pwlArc->npts == 2 );
- assert( (jarc->pwlArc->pts[0].param[0] == \
- jarc->pwlArc->pts[1].param[0]) ||\
- (jarc->pwlArc->pts[0].param[1] == \
- jarc->pwlArc->pts[1].param[1]) );
+ assert( (jarc->pwlArc->pts[0].param[0] == \
+ jarc->pwlArc->pts[1].param[0]) ||\
+ (jarc->pwlArc->pts[0].param[1] == \
+ jarc->pwlArc->pts[1].param[1]) );
}
}
- jarc = jarc->next;
+ jarc = jarc->next;
} while (jarc != this);
return 1;
}
@@ -347,9 +340,9 @@ Arc::append( Arc_ptr jarc )
if( jarc != 0 ) {
next = jarc->next;
prev = jarc;
- next->prev = prev->next = this;
+ next->prev = prev->next = this;
} else {
- next = prev = this;
+ next = prev = this;
}
return this;
}
diff --git a/src/glu/sgi/libnurbs/internals/basiccrveval.cc b/src/glu/sgi/libnurbs/internals/basiccrveval.cc
index 0d3d5aa8d3..24b33f0667 100644
--- a/src/glu/sgi/libnurbs/internals/basiccrveval.cc
+++ b/src/glu/sgi/libnurbs/internals/basiccrveval.cc
@@ -35,15 +35,15 @@
/*
* basiccrveval.c++
*
- * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/basiccrveval.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
+ * $Date: 2003/10/14 23:48:57 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/basiccrveval.cc,v 1.2 2003/10/14 23:48:57 kendallb Exp $
*/
#include "mystdio.h"
#include "types.h"
#include "basiccrveval.h"
-void
+void
BasicCurveEvaluator::domain1f( REAL, REAL )
{
#ifndef NDEBUG
@@ -51,15 +51,15 @@ BasicCurveEvaluator::domain1f( REAL, REAL )
#endif
}
-void
-BasicCurveEvaluator::range1f( long type, REAL *, REAL * )
+void
+BasicCurveEvaluator::range1f( long , REAL *, REAL * )
{
#ifndef NDEBUG
dprintf( "range1f\n" );
#endif
}
-void
+void
BasicCurveEvaluator::enable( long )
{
#ifndef NDEBUG
@@ -67,7 +67,7 @@ BasicCurveEvaluator::enable( long )
#endif
}
-void
+void
BasicCurveEvaluator::disable( long )
{
#ifndef NDEBUG
@@ -75,7 +75,7 @@ BasicCurveEvaluator::disable( long )
#endif
}
-void
+void
BasicCurveEvaluator::bgnmap1f( long )
{
#ifndef NDEBUG
@@ -83,7 +83,7 @@ BasicCurveEvaluator::bgnmap1f( long )
#endif
}
-void
+void
BasicCurveEvaluator::map1f( long, REAL, REAL, long, long, REAL * )
{
#ifndef NDEBUG
@@ -91,7 +91,7 @@ BasicCurveEvaluator::map1f( long, REAL, REAL, long, long, REAL * )
#endif
}
-void
+void
BasicCurveEvaluator::mapgrid1f( long, REAL, REAL )
{
#ifndef NDEBUG
@@ -99,7 +99,7 @@ BasicCurveEvaluator::mapgrid1f( long, REAL, REAL )
#endif
}
-void
+void
BasicCurveEvaluator::mapmesh1f( long, long, long )
{
#ifndef NDEBUG
@@ -107,7 +107,7 @@ BasicCurveEvaluator::mapmesh1f( long, long, long )
#endif
}
-void
+void
BasicCurveEvaluator::evalcoord1f( long, REAL )
{
#ifndef NDEBUG
@@ -115,7 +115,7 @@ BasicCurveEvaluator::evalcoord1f( long, REAL )
#endif
}
-void
+void
BasicCurveEvaluator::endmap1f( void )
{
#ifndef NDEBUG
@@ -123,7 +123,7 @@ BasicCurveEvaluator::endmap1f( void )
#endif
}
-void
+void
BasicCurveEvaluator::bgnline( void )
{
#ifndef NDEBUG
@@ -131,7 +131,7 @@ BasicCurveEvaluator::bgnline( void )
#endif
}
-void
+void
BasicCurveEvaluator::endline( void )
{
#ifndef NDEBUG
diff --git a/src/glu/sgi/libnurbs/internals/basicsurfeval.cc b/src/glu/sgi/libnurbs/internals/basicsurfeval.cc
index 0ade6fa8f7..f84d3b6074 100644
--- a/src/glu/sgi/libnurbs/internals/basicsurfeval.cc
+++ b/src/glu/sgi/libnurbs/internals/basicsurfeval.cc
@@ -35,15 +35,19 @@
/*
* basicsurfaceevaluator.c++
*
- * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/basicsurfeval.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
+ * $Date: 2003/10/14 23:48:57 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/basicsurfeval.cc,v 1.2 2003/10/14 23:48:57 kendallb Exp $
*/
#include "mystdio.h"
#include "types.h"
#include "basicsurfeval.h"
-void
+#ifdef __WATCOMC__
+#pragma warning 726 10
+#endif
+
+void
BasicSurfaceEvaluator::domain2f( REAL, REAL, REAL, REAL )
{
#ifndef NDEBUG
@@ -51,7 +55,7 @@ BasicSurfaceEvaluator::domain2f( REAL, REAL, REAL, REAL )
#endif
}
-void
+void
BasicSurfaceEvaluator::polymode( long )
{
#ifndef NDEBUG
@@ -63,12 +67,12 @@ void
BasicSurfaceEvaluator::range2f( long type, REAL *from, REAL *to )
{
#ifndef NDEBUG
- dprintf( "range2f type %ld, from (%g,%g), to (%g,%g)\n",
+ dprintf( "range2f type %ld, from (%g,%g), to (%g,%g)\n",
type, from[0], from[1], to[0], to[1] );
#endif
}
-void
+void
BasicSurfaceEvaluator::enable( long )
{
#ifndef NDEBUG
@@ -76,7 +80,7 @@ BasicSurfaceEvaluator::enable( long )
#endif
}
-void
+void
BasicSurfaceEvaluator::disable( long )
{
#ifndef NDEBUG
@@ -84,7 +88,7 @@ BasicSurfaceEvaluator::disable( long )
#endif
}
-void
+void
BasicSurfaceEvaluator::bgnmap2f( long )
{
#ifndef NDEBUG
@@ -92,7 +96,7 @@ BasicSurfaceEvaluator::bgnmap2f( long )
#endif
}
-void
+void
BasicSurfaceEvaluator::endmap2f( void )
{
#ifndef NDEBUG
@@ -100,8 +104,8 @@ BasicSurfaceEvaluator::endmap2f( void )
#endif
}
-void
-BasicSurfaceEvaluator::map2f( long, REAL, REAL, long, long,
+void
+BasicSurfaceEvaluator::map2f( long, REAL, REAL, long, long,
REAL, REAL, long, long,
REAL * )
{
@@ -110,7 +114,7 @@ BasicSurfaceEvaluator::map2f( long, REAL, REAL, long, long,
#endif
}
-void
+void
BasicSurfaceEvaluator::mapgrid2f( long, REAL, REAL, long, REAL, REAL )
{
#ifndef NDEBUG
@@ -118,7 +122,7 @@ BasicSurfaceEvaluator::mapgrid2f( long, REAL, REAL, long, REAL, REAL )
#endif
}
-void
+void
BasicSurfaceEvaluator::mapmesh2f( long, long, long, long, long )
{
#ifndef NDEBUG
@@ -126,7 +130,7 @@ BasicSurfaceEvaluator::mapmesh2f( long, long, long, long, long )
#endif
}
-void
+void
BasicSurfaceEvaluator::evalcoord2f( long, REAL, REAL )
{
#ifndef NDEBUG
@@ -134,7 +138,7 @@ BasicSurfaceEvaluator::evalcoord2f( long, REAL, REAL )
#endif
}
-void
+void
BasicSurfaceEvaluator::evalpoint2i( long, long )
{
#ifndef NDEBUG
@@ -142,7 +146,7 @@ BasicSurfaceEvaluator::evalpoint2i( long, long )
#endif
}
-void
+void
BasicSurfaceEvaluator::bgnline( void )
{
#ifndef NDEBUG
@@ -150,7 +154,7 @@ BasicSurfaceEvaluator::bgnline( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::endline( void )
{
#ifndef NDEBUG
@@ -158,7 +162,7 @@ BasicSurfaceEvaluator::endline( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::bgnclosedline( void )
{
#ifndef NDEBUG
@@ -166,7 +170,7 @@ BasicSurfaceEvaluator::bgnclosedline( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::endclosedline( void )
{
#ifndef NDEBUG
@@ -174,7 +178,7 @@ BasicSurfaceEvaluator::endclosedline( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::bgntfan( void )
{
#ifndef NDEBUG
@@ -182,13 +186,13 @@ BasicSurfaceEvaluator::bgntfan( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::endtfan( void )
{
}
-void
+void
BasicSurfaceEvaluator::bgntmesh( void )
{
#ifndef NDEBUG
@@ -196,7 +200,7 @@ BasicSurfaceEvaluator::bgntmesh( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::swaptmesh( void )
{
#ifndef NDEBUG
@@ -204,7 +208,7 @@ BasicSurfaceEvaluator::swaptmesh( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::endtmesh( void )
{
#ifndef NDEBUG
@@ -212,7 +216,7 @@ BasicSurfaceEvaluator::endtmesh( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::bgnqstrip( void )
{
#ifndef NDEBUG
@@ -220,7 +224,7 @@ BasicSurfaceEvaluator::bgnqstrip( void )
#endif
}
-void
+void
BasicSurfaceEvaluator::endqstrip( void )
{
#ifndef NDEBUG
diff --git a/src/glu/sgi/libnurbs/internals/coveandtiler.cc b/src/glu/sgi/libnurbs/internals/coveandtiler.cc
index 61ca3b8f70..9297d3fc21 100644
--- a/src/glu/sgi/libnurbs/internals/coveandtiler.cc
+++ b/src/glu/sgi/libnurbs/internals/coveandtiler.cc
@@ -35,8 +35,8 @@
/*
* coveandtiler.c++
*
- * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/coveandtiler.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
+ * $Date: 2003/10/14 23:48:57 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/coveandtiler.cc,v 1.2 2003/10/14 23:48:57 kendallb Exp $
*/
#include "glimports.h"
@@ -52,7 +52,7 @@
const int CoveAndTiler::MAXSTRIPSIZE = 1000;
CoveAndTiler::CoveAndTiler( Backend& b )
- : backend( b )
+ : backend( b )
{ }
CoveAndTiler::~CoveAndTiler( void )
@@ -76,19 +76,19 @@ CoveAndTiler::output( GridTrimVertex& g )
backend.tmeshvert( &g );
}
-void
+void
CoveAndTiler::coveAndTile( void )
{
long ustart = (top.ustart >= bot.ustart) ? top.ustart : bot.ustart;
- long uend = (top.uend <= bot.uend) ? top.uend : bot.uend;
+ long uend = (top.uend <= bot.uend) ? top.uend : bot.uend;
if( ustart <= uend ) {
tile( bot.vindex, ustart, uend );
- if( top.ustart >= bot.ustart )
+ if( top.ustart >= bot.ustart )
coveUpperLeft();
- else
+ else
coveLowerLeft();
-
- if( top.uend <= bot.uend )
+
+ if( top.uend <= bot.uend )
coveUpperRight();
else
coveLowerRight();
@@ -126,7 +126,7 @@ CoveAndTiler::coveAndTile( void )
} else {
tllv.set( bot.ustart-1, top.vindex );
}
- coveLowerLeftNoGrid( tl );
+ coveLowerLeftNoGrid( tl );
}
TrimVertex brv, trv, *br, *tr;
@@ -158,7 +158,7 @@ CoveAndTiler::coveAndTile( void )
br = rl;
brrv.set( rl );
if( rf->param[0] < uarray.uarray[bot.uend+1] ) {
- assert( rf->param[0] >= uarray.uarray[bot.uend] );
+ assert( rf->param[0] >= uarray.uarray[bot.uend] );
trrv.set( rf );
} else {
trrv.set( bot.uend+1, top.vindex );
@@ -179,7 +179,7 @@ CoveAndTiler::coveAndTile( void )
}
}
-void
+void
CoveAndTiler::tile( long vindex, long ustart, long uend )
{
long numsteps = uend - ustart;
@@ -195,7 +195,7 @@ CoveAndTiler::tile( long vindex, long ustart, long uend )
}
}
-void
+void
CoveAndTiler::coveUpperRight( void )
{
GridVertex tgv( top.uend, top.vindex );
@@ -207,7 +207,7 @@ CoveAndTiler::coveUpperRight( void )
output( tgv );
backend.swaptmesh();
output( gv );
- coveUR();
+ coveUR();
backend.endtmesh();
}
@@ -215,15 +215,15 @@ void
CoveAndTiler::coveUpperRightNoGrid( TrimVertex* br )
{
backend.bgntmesh( "coveUpperRight" );
- output( right.first() );
+ output( right.first() );
output( right.next() );
backend.swaptmesh();
output( br );
- coveUR();
+ coveUR();
backend.endtmesh();
}
-void
+void
CoveAndTiler::coveUR( )
{
GridVertex gv( top.uend, bot.vindex );
@@ -238,7 +238,7 @@ CoveAndTiler::coveUR( )
backend.swaptmesh();
}
} else while( 1 ) {
- if( vert->param[0] < uarray.uarray[gv.gparam[0]] ) {
+ if( vert->param[0] < uarray.uarray[gv.gparam[0]] ) {
output( vert );
backend.swaptmesh();
vert = right.next();
@@ -250,7 +250,7 @@ CoveAndTiler::coveUR( )
for( ; vert; vert = right.next() ) {
output( vert );
backend.swaptmesh();
- }
+ }
break;
}
}
@@ -269,7 +269,7 @@ CoveAndTiler::coveUpperLeft( void )
output( left.next() );
output( gv );
backend.swaptmesh();
- coveUL();
+ coveUL();
backend.endtmesh();
}
@@ -277,15 +277,15 @@ void
CoveAndTiler::coveUpperLeftNoGrid( TrimVertex* bl )
{
backend.bgntmesh( "coveUpperLeftNoGrid" );
- output( left.first() );
+ output( left.first() );
output( left.next() );
output( bl );
backend.swaptmesh();
- coveUL();
+ coveUL();
backend.endtmesh();
}
-void
+void
CoveAndTiler::coveUL()
{
GridVertex gv( top.ustart, bot.vindex );
@@ -318,7 +318,7 @@ CoveAndTiler::coveUL()
}
}
-void
+void
CoveAndTiler::coveLowerLeft( void )
{
GridVertex bgv( bot.ustart, bot.vindex );
@@ -330,7 +330,7 @@ CoveAndTiler::coveLowerLeft( void )
output( bgv );
backend.swaptmesh();
output( gv );
- coveLL();
+ coveLL();
backend.endtmesh();
}
@@ -338,15 +338,15 @@ void
CoveAndTiler::coveLowerLeftNoGrid( TrimVertex* tl )
{
backend.bgntmesh( "coveLowerLeft" );
- output( left.last() );
+ output( left.last() );
output( left.prev() );
backend.swaptmesh();
output( tl );
- coveLL( );
+ coveLL( );
backend.endtmesh();
}
-void
+void
CoveAndTiler::coveLL()
{
GridVertex gv( bot.ustart, top.vindex );
@@ -360,7 +360,7 @@ CoveAndTiler::coveLL()
backend.swaptmesh();
}
} else while( 1 ) {
- if( vert->param[0] > uarray.uarray[gv.gparam[0]] ){
+ if( vert->param[0] > uarray.uarray[gv.gparam[0]] ){
output( vert );
backend.swaptmesh();
vert = left.prev();
@@ -369,29 +369,29 @@ CoveAndTiler::coveLL()
backend.swaptmesh();
output( gv );
if( gv.prevu() == top.ustart ) {
- for( ; vert; vert = left.prev() ) {
+ for( ; vert; vert = left.prev() ) {
output( vert );
backend.swaptmesh();
- }
- break;
+ }
+ break;
}
}
}
}
-void
+void
CoveAndTiler::coveLowerRight( void )
{
GridVertex bgv( bot.uend, bot.vindex );
GridVertex gv( bot.uend, top.vindex );
right.last();
- backend.bgntmesh( "coveLowerRight" );
+ backend.bgntmesh( "coveLowerRight" );
output( bgv );
output( right.prev() );
output( gv );
backend.swaptmesh();
- coveLR();
+ coveLR();
backend.endtmesh( );
}
@@ -399,15 +399,15 @@ void
CoveAndTiler::coveLowerRightNoGrid( TrimVertex* tr )
{
backend.bgntmesh( "coveLowerRIght" );
- output( right.last() );
+ output( right.last() );
output( right.prev() );
output( tr );
backend.swaptmesh();
- coveLR();
+ coveLR();
backend.endtmesh();
}
-void
+void
CoveAndTiler::coveLR( )
{
GridVertex gv( bot.uend, top.vindex );
@@ -421,7 +421,7 @@ CoveAndTiler::coveLR( )
output( vert );
}
} else while( 1 ) {
- if( vert->param[0] < uarray.uarray[gv.gparam[0]] ) {
+ if( vert->param[0] < uarray.uarray[gv.gparam[0]] ) {
backend.swaptmesh();
output( vert );
vert = right.prev();
@@ -430,11 +430,11 @@ CoveAndTiler::coveLR( )
output( gv );
backend.swaptmesh();
if( gv.nextu() == top.uend ) {
- for( ; vert; vert = right.prev() ) {
+ for( ; vert; vert = right.prev() ) {
backend.swaptmesh();
output( vert );
- }
- break;
+ }
+ break;
}
}
}
diff --git a/src/glu/sgi/libnurbs/internals/knotvector.cc b/src/glu/sgi/libnurbs/internals/knotvector.cc
index b48efbd4bf..3e047456f5 100644
--- a/src/glu/sgi/libnurbs/internals/knotvector.cc
+++ b/src/glu/sgi/libnurbs/internals/knotvector.cc
@@ -35,8 +35,8 @@
/*
* knotvector.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/knotvector.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2003/10/14 23:48:57 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/knotvector.cc,v 1.2 2003/10/14 23:48:57 kendallb Exp $
*/
#include "glimports.h"
@@ -45,17 +45,20 @@
#include "knotvector.h"
#include "defines.h"
+#ifdef __WATCOMC__
+#pragma warning 726 10
+#endif
void Knotvector::init( long _knotcount, long _stride, long _order, INREAL *_knotlist )
{
- knotcount = _knotcount;
- stride = _stride;
- order = _order;
+ knotcount = _knotcount;
+ stride = _stride;
+ order = _order;
knotlist = new Knot[_knotcount];
assert( knotlist != 0 );
for( int i = 0; i != _knotcount; i++ )
- knotlist[i] = (Knot) _knotlist[i];
+ knotlist[i] = (Knot) _knotlist[i];
}
Knotvector::Knotvector( void )
@@ -70,7 +73,7 @@ Knotvector::~Knotvector( void )
int Knotvector::validate( void )
{
- /* kindex is used as an array index so subtract one first,
+ /* kindex is used as an array index so subtract one first,
* this propagates throughout the code so study carefully */
long kindex = knotcount-1;
@@ -85,7 +88,7 @@ int Knotvector::validate( void )
}
if( identical( knotlist[kindex-(order-1)], knotlist[order-1]) ) {
- // valid knot range is empty
+ // valid knot range is empty
return( 3 );
}
@@ -94,33 +97,33 @@ int Knotvector::validate( void )
// decreasing knot sequence
return( 4 );
}
-
+
/* check for valid multiplicity */
/* kindex is currently the index of the last knot.
* In the next loop it is decremented to ignore the last knot
- * and the loop stops when kindex is 2 so as to ignore the first
- * knot as well. These knots are not used in computing
- * knot multiplicities.
+ * and the loop stops when kindex is 2 so as to ignore the first
+ * knot as well. These knots are not used in computing
+ * knot multiplicities.
*/
long multi = 1;
for( ; kindex >= 1; kindex-- ) {
if( knotlist[kindex] - knotlist[kindex-1] < TOLERANCE ) {
- multi++;
+ multi++;
continue;
- }
+ }
if ( multi > order ) {
- // knot multiplicity greater than order of spline
+ // knot multiplicity greater than order of spline
return( 5 );
- }
+ }
multi = 1;
}
if ( multi > order ) {
- // knot multiplicity greater than order of spline
+ // knot multiplicity greater than order of spline
return( 5 );
- }
+ }
return 0;
}
@@ -128,7 +131,7 @@ int Knotvector::validate( void )
void Knotvector::show( char *msg )
{
#ifndef NDEBUG
- dprintf( "%s\n", msg );
+ dprintf( "%s\n", msg );
dprintf( "order = %ld, count = %ld\n", order, knotcount );
for( int i=0; i<knotcount; i++ )