#endif
-#define Swap(a,b) if (1) { GLUvertex *t = a; a = b; b = t; } else
+#define Swap(a,b) do { GLUvertex *t = a; a = b; b = t; } while (0)
void __gl_edgeIntersect( GLUvertex *o1, GLUvertex *d1,
GLUvertex *o2, GLUvertex *d2,
#include "mesh.h"
#include "memalloc.h"
+#ifndef TRUE
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
+#endif
static GLUvertex *allocVertex()
{
#include <math.h>
#include <assert.h>
+#ifndef TRUE
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
+#endif
#define Dot(u,v) (u[0]*v[0] + u[1]*v[1] + u[2]*v[2])
#define INIT_SIZE 32
+#ifndef TRUE
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
+#endif
#ifdef FOR_TRITE_TEST_PROGRAM
#define LEQ(x,y) (*pq->leq)(x,y)
PQhandle pqInsert( PriorityQ *pq, PQkey keyNew )
{
long curr;
- PQhandle free;
+ PQhandle free_handle;
curr = ++ pq->size;
if( (curr*2) > pq->max ) {
}
if( pq->freeList == 0 ) {
- free = curr;
+ free_handle = curr;
} else {
- free = pq->freeList;
- pq->freeList = pq->handles[free].node;
+ free_handle = pq->freeList;
+ pq->freeList = pq->handles[free_handle].node;
}
- pq->nodes[curr].handle = free;
- pq->handles[free].node = curr;
- pq->handles[free].key = keyNew;
+ pq->nodes[curr].handle = free_handle;
+ pq->handles[free_handle].node = curr;
+ pq->handles[free_handle].key = keyNew;
if( pq->initialized ) {
FloatUp( pq, curr );
}
- assert(free != LONG_MAX);
- return free;
+ assert(free_handle != LONG_MAX);
+ return free_handle;
}
/* really __gl_pqHeapExtractMin */
#define LT(x,y) (! LEQ(y,x))
#define GT(x,y) (! LEQ(x,y))
-#define Swap(a,b) if(1){PQkey *tmp = *a; *a = *b; *b = tmp;}else
+#define Swap(a,b) do{PQkey *tmp = *a; *a = *b; *b = tmp;}while(0)
/* really __gl_pqSortInit */
int pqInit( PriorityQ *pq )
#include "tess.h"
#include "render.h"
+#ifndef TRUE
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
+#endif
/* This structure remembers the information we need about a primitive
* to be able to render it later, once we have determined which
#define AddToTrail(f,t) ((f)->trail = (t), (t) = (f), (f)->marked = TRUE)
-#define FreeTrail(t) if( 1 ) { \
+#define FreeTrail(t) do { \
while( (t) != NULL ) { \
(t)->marked = FALSE; t = (t)->trail; \
} \
- } else /* absorb trailing semicolon */
+ } while(0) /* absorb trailing semicolon */
#include "memalloc.h"
#include "sweep.h"
+#ifndef TRUE
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
+#endif
#ifdef FOR_TRITE_TEST_PROGRAM
extern void DebugEvent( GLUtesselator *tess );
#define GLU_TESS_DEFAULT_TOLERANCE 0.0
#define GLU_TESS_MESH 100112 /* void (*)(GLUmesh *mesh) */
+#ifndef TRUE
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
+#endif
/*ARGSUSED*/ static void GLAPIENTRY noBegin( GLenum type ) {}
/*ARGSUSED*/ static void GLAPIENTRY noEdgeFlag( GLboolean boundaryEdge ) {}