diff options
author | Kendall Bennett <KendallB@scitechsoft.com> | 2003-10-14 23:48:57 +0000 |
---|---|---|
committer | Kendall Bennett <KendallB@scitechsoft.com> | 2003-10-14 23:48:57 +0000 |
commit | 596d57c42a24430e72e225c051270918d0b2e864 (patch) | |
tree | 98b771dd11e637f88107682adb3797c4731b548d /src/glu/sgi/libtess | |
parent | 9b77fb7dab3fd4e4a9228e5c0609cc494aa01211 (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/libtess')
-rw-r--r-- | src/glu/sgi/libtess/geom.h | 21 | ||||
-rw-r--r-- | src/glu/sgi/libtess/normal.c | 19 | ||||
-rw-r--r-- | src/glu/sgi/libtess/sweep.c | 60 | ||||
-rw-r--r-- | src/glu/sgi/libtess/tess.c | 49 |
4 files changed, 77 insertions, 72 deletions
diff --git a/src/glu/sgi/libtess/geom.h b/src/glu/sgi/libtess/geom.h index 14969d4878..d2c649eee2 100644 --- a/src/glu/sgi/libtess/geom.h +++ b/src/glu/sgi/libtess/geom.h @@ -6,21 +6,21 @@ ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** +** ** http://oss.sgi.com/projects/FreeB -** +** ** Note that, as provided in the License, the Software is distributed on an ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** +** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. -** +** ** Additional Notice Provisions: The application programming interfaces ** established by SGI in conjunction with the Original Code are The ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released @@ -35,8 +35,8 @@ /* ** Author: Eric Veach, July 1994. ** -** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/geom.h,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/libtess/geom.h,v 1.2 2003/10/14 23:48:57 kendallb Exp $ */ #ifndef __geom_h_ @@ -58,8 +58,8 @@ ((u)->s == (v)->s && (u)->t <= (v)->t)) #endif -#define EdgeEval(u,v,w) __gl_edgeEval(u,v,w) -#define EdgeSign(u,v,w) __gl_edgeSign(u,v,w) +#define EdgeEval(u,v,w) __gl_edgeEval(u,v,w) +#define EdgeSign(u,v,w) __gl_edgeSign(u,v,w) /* Versions of VertLeq, EdgeSign, EdgeEval with s and t transposed. */ @@ -69,11 +69,12 @@ #define TransSign(u,v,w) __gl_transSign(u,v,w) -#define EdgeGoesLeft(e) VertLeq( (e)->Dst, (e)->Org ) +#define EdgeGoesLeft(e) VertLeq( (e)->Dst, (e)->Org ) #define EdgeGoesRight(e) VertLeq( (e)->Org, (e)->Dst ) +#undef ABS #define ABS(x) ((x) < 0 ? -(x) : (x)) -#define VertL1dist(u,v) (ABS(u->s - v->s) + ABS(u->t - v->t)) +#define VertL1dist(u,v) (ABS(u->s - v->s) + ABS(u->t - v->t)) #define VertCCW(u,v,w) __gl_vertCCW(u,v,w) diff --git a/src/glu/sgi/libtess/normal.c b/src/glu/sgi/libtess/normal.c index 618cfd9ccf..7ffd39eb32 100644 --- a/src/glu/sgi/libtess/normal.c +++ b/src/glu/sgi/libtess/normal.c @@ -6,21 +6,21 @@ ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** +** ** http://oss.sgi.com/projects/FreeB -** +** ** Note that, as provided in the License, the Software is distributed on an ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** +** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. -** +** ** Additional Notice Provisions: The application programming interfaces ** established by SGI in conjunction with the Original Code are The ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released @@ -35,8 +35,8 @@ /* ** Author: Eric Veach, July 1994. ** -** $Date: 2002/11/01 23:45:31 $ $Revision: 1.2 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/normal.c,v 1.2 2002/11/01 23:45:31 brianp Exp $ +** $Date: 2003/10/14 23:48:57 $ $Revision: 1.3 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/normal.c,v 1.3 2003/10/14 23:48:57 kendallb Exp $ */ #include "gluos.h" @@ -64,6 +64,7 @@ static void Normalize( GLdouble v[3] ) } #endif +#undef ABS #define ABS(x) ((x) < 0 ? -(x) : (x)) static int LongAxis( GLdouble v[3] ) @@ -138,7 +139,7 @@ static void ComputeNormal( GLUtesselator *tess, GLdouble norm[3] ) norm[LongAxis(d1)] = 1; } } - + static void CheckOrientation( GLUtesselator *tess ) { @@ -176,7 +177,7 @@ extern int RandomSweep; #define S_UNIT_X (RandomSweep ? (2*drand48()-1) : 1.0) #define S_UNIT_Y (RandomSweep ? (2*drand48()-1) : 0.0) #else -#if defined(SLANTED_SWEEP) +#if defined(SLANTED_SWEEP) /* The "feature merging" is not intended to be complete. There are * special cases where edges are nearly parallel to the sweep line * which are not implemented. The algorithm should still behave @@ -242,7 +243,7 @@ void __gl_projectPolygon( GLUtesselator *tess ) sUnit[i] = 0; sUnit[(i+1)%3] = S_UNIT_X; sUnit[(i+2)%3] = S_UNIT_Y; - + tUnit[i] = 0; tUnit[(i+1)%3] = (norm[i] > 0) ? -S_UNIT_Y : S_UNIT_Y; tUnit[(i+2)%3] = (norm[i] > 0) ? S_UNIT_X : -S_UNIT_X; diff --git a/src/glu/sgi/libtess/sweep.c b/src/glu/sgi/libtess/sweep.c index f28fad4e50..e9fa8a7716 100644 --- a/src/glu/sgi/libtess/sweep.c +++ b/src/glu/sgi/libtess/sweep.c @@ -6,21 +6,21 @@ ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** +** ** http://oss.sgi.com/projects/FreeB -** +** ** Note that, as provided in the License, the Software is distributed on an ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** +** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. -** +** ** Additional Notice Provisions: The application programming interfaces ** established by SGI in conjunction with the Original Code are The ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released @@ -35,8 +35,8 @@ /* ** Author: Eric Veach, July 1994. ** -** $Date: 2002/11/07 14:17:05 $ $Revision: 1.5 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/sweep.c,v 1.5 2002/11/07 14:17:05 brianp Exp $ +** $Date: 2003/10/14 23:48:57 $ $Revision: 1.6 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/sweep.c,v 1.6 2003/10/14 23:48:57 kendallb Exp $ */ #include "gluos.h" @@ -92,6 +92,8 @@ extern void DebugEvent( GLUtesselator *tess ); * when it is necessary.) */ +#undef MAX +#undef MIN #define MAX(x,y) ((x) >= (y) ? (x) : (y)) #define MIN(x,y) ((x) <= (y) ? (x) : (y)) @@ -99,7 +101,7 @@ extern void DebugEvent( GLUtesselator *tess ); * winding of the new edge. */ #define AddWinding(eDst,eSrc) (eDst->winding += eSrc->winding, \ - eDst->Sym->winding += eSrc->Sym->winding) + eDst->Sym->winding += eSrc->Sym->winding) static void SweepEvent( GLUtesselator *tess, GLUvertex *vEvent ); static void WalkDirtyRegions( GLUtesselator *tess, ActiveRegion *regUp ); @@ -175,7 +177,7 @@ static int FixUpperEdge( ActiveRegion *reg, GLUhalfEdge *newEdge ) reg->eUp = newEdge; newEdge->activeRegion = reg; - return 1; + return 1; } static ActiveRegion *TopLeftRegion( ActiveRegion *reg ) @@ -225,7 +227,7 @@ static ActiveRegion *AddRegionBelow( GLUtesselator *tess, if (regNew == NULL) longjmp(tess->env,1); regNew->eUp = eNewUp; - /* __gl_dictListInsertBefore */ + /* __gl_dictListInsertBefore */ regNew->nodeUp = dictInsertBefore( tess->dict, regAbove->nodeUp, regNew ); if (regNew->nodeUp == NULL) longjmp(tess->env,1); regNew->fixUpperEdge = FALSE; @@ -292,7 +294,7 @@ static GLUhalfEdge *FinishLeftRegions( GLUtesselator *tess, * active region to the face, since at this point each face will belong * to at most one region (this was not necessarily true until this point * in the sweep). The walk stops at the region above regLast; if regLast - * is NULL we walk as far as possible. At the same time we relink the + * is NULL we walk as far as possible. At the same time we relink the * mesh if necessary, so that the ordering of edges around vOrg is the * same as in the dictionary. */ @@ -449,11 +451,11 @@ static void SpliceMergeVertices( GLUtesselator *tess, GLUhalfEdge *e1, data[0] = e1->Org->data; data[1] = e2->Org->data; CallCombine( tess, e1->Org, data, weights, FALSE ); - if ( !__gl_meshSplice( e1, e2 ) ) longjmp(tess->env,1); + if ( !__gl_meshSplice( e1, e2 ) ) longjmp(tess->env,1); } static void VertexWeights( GLUvertex *isect, GLUvertex *org, GLUvertex *dst, - GLfloat *weights ) + GLfloat *weights ) /* * Find some weights which describe how the intersection vertex is * a linear combination of "org" and "dest". Each of the two edges @@ -596,7 +598,7 @@ static int CheckForLeftSplice( GLUtesselator *tess, ActiveRegion *regUp ) /* eUp->Dst is below eLo, so splice eUp->Dst into eLo */ regUp->dirty = regLo->dirty = TRUE; e = __gl_meshSplitEdge( eLo ); - if (e == NULL) longjmp(tess->env,1); + if (e == NULL) longjmp(tess->env,1); if ( !__gl_meshSplice( eUp->Lnext, eLo->Sym ) ) longjmp(tess->env,1); e->Rface->inside = regUp->inside; } @@ -682,7 +684,7 @@ static int CheckForIntersect( GLUtesselator *tess, ActiveRegion *regUp ) return FALSE; } - if( (! VertEq( dstUp, tess->event ) + if( (! VertEq( dstUp, tess->event ) && EdgeSign( dstUp, tess->event, &isect ) >= 0) || (! VertEq( dstLo, tess->event ) && EdgeSign( dstLo, tess->event, &isect ) <= 0 )) @@ -705,7 +707,7 @@ static int CheckForIntersect( GLUtesselator *tess, ActiveRegion *regUp ) if( dstUp == tess->event ) { /* Splice dstUp into eLo, and process the new region(s) */ if (__gl_meshSplitEdge( eLo->Sym ) == NULL) longjmp(tess->env,1); - if ( !__gl_meshSplice( eUp->Lnext, eLo->Oprev ) ) longjmp(tess->env,1); + if ( !__gl_meshSplice( eUp->Lnext, eLo->Oprev ) ) longjmp(tess->env,1); regLo = regUp; regUp = TopRightRegion( regUp ); e = RegionBelow(regUp)->eUp->Rprev; @@ -813,7 +815,7 @@ static void WalkDirtyRegions( GLUtesselator *tess, ActiveRegion *regUp ) if( eUp->Org != eLo->Org ) { if( eUp->Dst != eLo->Dst && ! regUp->fixUpperEdge && ! regLo->fixUpperEdge - && (eUp->Dst == tess->event || eLo->Dst == tess->event) ) + && (eUp->Dst == tess->event || eLo->Dst == tess->event) ) { /* When all else fails in CheckForIntersect(), it uses tess->event * as the intersection location. To make this possible, it requires @@ -822,7 +824,7 @@ static void WalkDirtyRegions( GLUtesselator *tess, ActiveRegion *regUp ) * case it might splice one of these edges into tess->event, and * violate the invariant that fixable edges are the only right-going * edge from their associated vertex). - */ + */ if( CheckForIntersect( tess, regUp )) { /* WalkDirtyRegions() was called recursively; we're done */ return; @@ -846,7 +848,7 @@ static void WalkDirtyRegions( GLUtesselator *tess, ActiveRegion *regUp ) static void ConnectRightVertex( GLUtesselator *tess, ActiveRegion *regUp, - GLUhalfEdge *eBottomLeft ) + GLUhalfEdge *eBottomLeft ) /* * Purpose: connect a "right" vertex vEvent (one where all edges go left) * to the unprocessed portion of the mesh. Since there are no right-going @@ -959,7 +961,7 @@ static void ConnectLeftDegenerate( GLUtesselator *tess, SpliceMergeVertices( tess, e, vEvent->anEdge ); return; } - + if( ! VertEq( e->Dst, vEvent )) { /* General case -- splice vEvent into edge e which passes through it */ if (__gl_meshSplitEdge( e->Sym ) == NULL) longjmp(tess->env,1); @@ -969,7 +971,7 @@ static void ConnectLeftDegenerate( GLUtesselator *tess, regUp->fixUpperEdge = FALSE; } if ( !__gl_meshSplice( vEvent->anEdge, e ) ) longjmp(tess->env,1); - SweepEvent( tess, vEvent ); /* recurse */ + SweepEvent( tess, vEvent ); /* recurse */ return; } @@ -1075,9 +1077,9 @@ static void SweepEvent( GLUtesselator *tess, GLUvertex *vEvent ) ActiveRegion *regUp, *reg; GLUhalfEdge *e, *eTopLeft, *eBottomLeft; - tess->event = vEvent; /* for access in EdgeLeq() */ + tess->event = vEvent; /* for access in EdgeLeq() */ DebugEvent( tess ); - + /* Check if this vertex is the right endpoint of an edge that is * already in the dictionary. In this case we don't need to waste * time searching for the location to insert new edges. @@ -1143,7 +1145,7 @@ static void AddSentinel( GLUtesselator *tess, GLdouble t ) e->Org->t = t; e->Dst->s = -SENTINEL_COORD; e->Dst->t = t; - tess->event = e->Dst; /* initialize it */ + tess->event = e->Dst; /* initialize it */ reg->eUp = e; reg->windingNumber = 0; @@ -1193,7 +1195,7 @@ static void DoneEdgeDict( GLUtesselator *tess ) DeleteRegion( tess, reg ); /* __gl_meshDelete( reg->eUp );*/ } - dictDeleteDict( tess->dict ); /* __gl_dictListDeleteDict */ + dictDeleteDict( tess->dict ); /* __gl_dictListDeleteDict */ } @@ -1209,10 +1211,10 @@ static void RemoveDegenerateEdges( GLUtesselator *tess ) for( e = eHead->next; e != eHead; e = eNext ) { eNext = e->next; eLnext = e->Lnext; - + if( VertEq( e->Org, e->Dst ) && e->Lnext->Lnext != e ) { /* Zero-length edge, contour has at least 3 edges */ - + SpliceMergeVertices( tess, eLnext, e ); /* deletes e->Org */ if ( !__gl_meshDelete( e ) ) longjmp(tess->env,1); /* e is a self-loop */ e = eLnext; @@ -1220,7 +1222,7 @@ static void RemoveDegenerateEdges( GLUtesselator *tess ) } if( eLnext->Lnext == e ) { /* Degenerate contour (one or two edges) */ - + if( eLnext != e ) { if( eLnext == eNext || eLnext == eNext->Sym ) { eNext = eNext->next; } if ( !__gl_meshDelete( eLnext ) ) longjmp(tess->env,1); @@ -1327,7 +1329,7 @@ int __gl_computeInterior( GLUtesselator *tess ) for( ;; ) { vNext = (GLUvertex *)pqMinimum( tess->pq ); /* __gl_pqSortMinimum */ if( vNext == NULL || ! VertEq( vNext, v )) break; - + /* Merge together all vertices at exactly the same location. * This is more efficient than processing them one at a time, * simplifies the code (see ConnectLeftDegenerate), and is also @@ -1349,7 +1351,7 @@ int __gl_computeInterior( GLUtesselator *tess ) } /* Set tess->event for debugging purposes */ - /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ + /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ tess->event = ((ActiveRegion *) dictKey( dictMin( tess->dict )))->eUp->Org; DebugEvent( tess ); DoneEdgeDict( tess ); diff --git a/src/glu/sgi/libtess/tess.c b/src/glu/sgi/libtess/tess.c index 0793106334..308b2f56b9 100644 --- a/src/glu/sgi/libtess/tess.c +++ b/src/glu/sgi/libtess/tess.c @@ -6,21 +6,21 @@ ** this file except in compliance with the License. You may obtain a copy ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** +** ** http://oss.sgi.com/projects/FreeB -** +** ** Note that, as provided in the License, the Software is distributed on an ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** +** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. -** +** ** Additional Notice Provisions: The application programming interfaces ** established by SGI in conjunction with the Original Code are The ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released @@ -35,8 +35,8 @@ /* ** Author: Eric Veach, July 1994. ** -** $Date: 2002/11/01 23:45:31 $ $Revision: 1.3 $ -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/tess.c,v 1.3 2002/11/01 23:45:31 brianp Exp $ +** $Date: 2003/10/14 23:48:57 $ $Revision: 1.4 $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/tess.c,v 1.4 2003/10/14 23:48:57 kendallb Exp $ */ #include "gluos.h" @@ -63,13 +63,13 @@ /*ARGSUSED*/ static void GLAPIENTRY noEnd( void ) {} /*ARGSUSED*/ static void GLAPIENTRY noError( GLenum errnum ) {} /*ARGSUSED*/ static void GLAPIENTRY noCombine( GLdouble coords[3], void *data[4], - GLfloat weight[4], void **dataOut ) {} + GLfloat weight[4], void **dataOut ) {} /*ARGSUSED*/ static void GLAPIENTRY noMesh( GLUmesh *mesh ) {} /*ARGSUSED*/ void GLAPIENTRY __gl_noBeginData( GLenum type, void *polygonData ) {} -/*ARGSUSED*/ void GLAPIENTRY __gl_noEdgeFlagData( GLboolean boundaryEdge, +/*ARGSUSED*/ void GLAPIENTRY __gl_noEdgeFlagData( GLboolean boundaryEdge, void *polygonData ) {} /*ARGSUSED*/ void GLAPIENTRY __gl_noVertexData( void *data, void *polygonData ) {} @@ -85,9 +85,10 @@ /* Half-edges are allocated in pairs (see mesh.c) */ typedef struct { GLUhalfEdge e, eSym; } EdgePair; +#undef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ - MAX(sizeof(GLUvertex),sizeof(GLUface)))) + MAX(sizeof(GLUvertex),sizeof(GLUface)))) GLUtesselator * GLAPIENTRY @@ -170,7 +171,7 @@ static void GotoState( GLUtesselator *tess, enum TessState newState ) gluTessBeginContour( tess ); break; default: - ; + ; } } else { switch( tess->state ) { @@ -184,7 +185,7 @@ static void GotoState( GLUtesselator *tess, enum TessState newState ) MakeDormant( tess ); break; default: - ; + ; } } } @@ -246,7 +247,7 @@ gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value ) /* tolerance should be in range [0..1] */ assert(0.0 <= tess->relTolerance && tess->relTolerance <= 1.0); *value= tess->relTolerance; - break; + break; case GLU_TESS_WINDING_RULE: assert(tess->windingRule == GLU_TESS_WINDING_ODD || tess->windingRule == GLU_TESS_WINDING_NONZERO || @@ -295,7 +296,7 @@ gluTessCallback( GLUtesselator *tess, GLenum which, _GLUfuncptr fn) return; case GLU_TESS_EDGE_FLAG_DATA: tess->callEdgeFlagData= (fn == NULL) ? - &__gl_noEdgeFlagData : (void (GLAPIENTRY *)(GLboolean, void *)) fn; + &__gl_noEdgeFlagData : (void (GLAPIENTRY *)(GLboolean, void *)) fn; /* If the client wants boundary edges to be flagged, * we render everything as separate triangles (no strips or fans). */ @@ -313,8 +314,8 @@ gluTessCallback( GLUtesselator *tess, GLenum which, _GLUfuncptr fn) tess->callEnd = (fn == NULL) ? &noEnd : (void (GLAPIENTRY *)(void)) fn; return; case GLU_TESS_END_DATA: - tess->callEndData = (fn == NULL) ? &__gl_noEndData : - (void (GLAPIENTRY *)(void *)) fn; + tess->callEndData = (fn == NULL) ? &__gl_noEndData : + (void (GLAPIENTRY *)(void *)) fn; return; case GLU_TESS_ERROR: tess->callError = (fn == NULL) ? &noError : (void (GLAPIENTRY *)(GLenum)) fn; @@ -329,9 +330,9 @@ gluTessCallback( GLUtesselator *tess, GLenum which, _GLUfuncptr fn) return; case GLU_TESS_COMBINE_DATA: tess->callCombineData = (fn == NULL) ? &__gl_noCombineData : - (void (GLAPIENTRY *)(GLdouble [3], - void *[4], - GLfloat [4], + (void (GLAPIENTRY *)(GLdouble [3], + void *[4], + GLfloat [4], void **, void *)) fn; return; @@ -368,7 +369,7 @@ static int AddVertex( GLUtesselator *tess, GLdouble coords[3], void *data ) e->Org->coords[0] = coords[0]; e->Org->coords[1] = coords[1]; e->Org->coords[2] = coords[2]; - + /* The winding of an edge says how the winding number changes as we * cross from the edge''s right face to its left face. We add the * vertices in such an order that a CCW contour will add +1 to @@ -503,7 +504,7 @@ gluTessEndPolygon( GLUtesselator *tess ) { GLUmesh *mesh; - if (setjmp(tess->env) != 0) { + if (setjmp(tess->env) != 0) { /* come back here if out of memory */ CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY ); return; @@ -521,7 +522,7 @@ gluTessEndPolygon( GLUtesselator *tess ) * an explicit mesh either. */ if( __gl_renderCache( tess )) { - tess->polygonData= NULL; + tess->polygonData= NULL; return; } } @@ -554,15 +555,15 @@ gluTessEndPolygon( GLUtesselator *tess ) if( tess->boundaryOnly ) { rc = __gl_meshSetWindingNumber( mesh, 1, TRUE ); } else { - rc = __gl_meshTessellateInterior( mesh ); + rc = __gl_meshTessellateInterior( mesh ); } if (rc == 0) longjmp(tess->env,1); /* could've used a label */ __gl_meshCheckMesh( mesh ); if( tess->callBegin != &noBegin || tess->callEnd != &noEnd - || tess->callVertex != &noVertex || tess->callEdgeFlag != &noEdgeFlag - || tess->callBeginData != &__gl_noBeginData + || tess->callVertex != &noVertex || tess->callEdgeFlag != &noEdgeFlag + || tess->callBeginData != &__gl_noBeginData || tess->callEndData != &__gl_noEndData || tess->callVertexData != &__gl_noVertexData || tess->callEdgeFlagData != &__gl_noEdgeFlagData ) |