aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glu/sgi/libtess/priorityq-heap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-29 22:05:53 +0000
committermarha <marha@users.sourceforge.net>2010-11-29 22:05:53 +0000
commitfed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7 (patch)
treefa1ba494685a71e28a096990a8707680c7cb378b /mesalib/src/glu/sgi/libtess/priorityq-heap.c
parentae340911c1ba1f98b418bd8f1a487fa4d79491b0 (diff)
parent6fda93be42ace9eeab0e82ceebb6798961c9105c (diff)
downloadvcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.gz
vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.bz2
vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/glu/sgi/libtess/priorityq-heap.c')
-rw-r--r--mesalib/src/glu/sgi/libtess/priorityq-heap.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/mesalib/src/glu/sgi/libtess/priorityq-heap.c b/mesalib/src/glu/sgi/libtess/priorityq-heap.c
index e3a6c6068..52698b59c 100644
--- a/mesalib/src/glu/sgi/libtess/priorityq-heap.c
+++ b/mesalib/src/glu/sgi/libtess/priorityq-heap.c
@@ -39,8 +39,12 @@
#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)
@@ -159,7 +163,7 @@ void pqInit( PriorityQ *pq )
PQhandle pqInsert( PriorityQ *pq, PQkey keyNew )
{
long curr;
- PQhandle free;
+ PQhandle free_handle;
curr = ++ pq->size;
if( (curr*2) > pq->max ) {
@@ -186,21 +190,21 @@ PQhandle pqInsert( PriorityQ *pq, PQkey keyNew )
}
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 */