Index: trunk/src/subprojects/importer/tc.cc
===================================================================
--- trunk/src/subprojects/importer/tc.cc	(revision 6424)
+++ trunk/src/subprojects/importer/tc.cc	(revision 6477)
@@ -47,5 +47,5 @@
 typedef struct TableIterator {
     int i1, i2, i3;
-    uint i;
+    unsigned int i;
     TableLevel3 *CurLevel3;
     int CheckLevel1, CheckLevel2;
@@ -70,5 +70,5 @@
 }
 
-int tableRetrieve(uint a, TableRoot *table, void **ref)
+int tableRetrieve(unsigned int a, TableRoot *table, void **ref)
 {
     int i1 = a / (LEVEL2COUNT * LEVEL3COUNT);
@@ -87,5 +87,5 @@
 }
 
-int tableInsert(uint a, TableRoot *table, void *ref)
+int tableInsert(unsigned int a, TableRoot *table, void *ref)
 {
     int i1 = a / (LEVEL2COUNT * LEVEL3COUNT);
@@ -94,25 +94,25 @@
 
     if(table->Table[i1] == NULL) {
-	chartedSetLabel("table level 2");
+        chartedSetLabel("table level 2");
         table->Table[i1] = (TableLevel2 *)calloc(1, sizeof(TableLevel2));
-	table->TotalAllocatedBytes += sizeof(TableLevel2);
+        table->TotalAllocatedBytes += sizeof(TableLevel2);
         if(table->Table[i1] == NULL)
             return 0;
     }
     if(table->Table[i1]->Table[i2] == NULL) {
-	chartedSetLabel("table level 3");
+        chartedSetLabel("table level 3");
         table->Table[i1]->Table[i2] =
-	    (TableLevel3 *)calloc(1, sizeof(TableLevel3));
-	table->TotalAllocatedBytes += sizeof(TableLevel3);
+            (TableLevel3 *)calloc(1, sizeof(TableLevel3));
+        table->TotalAllocatedBytes += sizeof(TableLevel3);
         if(table->Table[i1]->Table[i2] == NULL)
             return 0;
-	table->Table[i1]->EntryCount++;
-	table->TotalEntryCount += LEVEL3COUNT;
-	table->EmptyEntryCount += LEVEL3COUNT;
+        table->Table[i1]->EntryCount++;
+        table->TotalEntryCount += LEVEL3COUNT;
+        table->EmptyEntryCount += LEVEL3COUNT;
     }
     if(!table->Table[i1]->Table[i2]->IsSet[i3]) {
-	table->Table[i1]->Table[i2]->EntryCount++;
-	table->EmptyEntryCount --;
-	table->Table[i1]->Table[i2]->IsSet[i3] = 1;
+        table->Table[i1]->Table[i2]->EntryCount++;
+        table->EmptyEntryCount --;
+        table->Table[i1]->Table[i2]->IsSet[i3] = 1;
     }
     table->Table[i1]->Table[i2]->Table[i3] = ref;
@@ -120,5 +120,5 @@
 }
 
-int tableRemove(uint a, TableRoot *table, void **wasref)
+int tableRemove(unsigned int a, TableRoot *table, void **wasref)
 {
     int i1 = a / (LEVEL2COUNT * LEVEL3COUNT);
@@ -127,7 +127,7 @@
 
     if(table->Table[i1] == NULL)
-	return 0;
+        return 0;
     if(table->Table[i1]->Table[i2] == NULL)
-	return 0;
+        return 0;
     if(!table->Table[i1]->Table[i2]->IsSet[i3])
         return 0;
@@ -137,14 +137,14 @@
     table->EmptyEntryCount ++;
     if(--table->Table[i1]->Table[i2]->EntryCount == 0) {
-	table->EmptyEntryCount -= LEVEL3COUNT;
-	table->TotalEntryCount -= LEVEL3COUNT;
-	free(table->Table[i1]->Table[i2]);
-	table->TotalAllocatedBytes -= sizeof(TableLevel3);
-	table->Table[i1]->Table[i2] = NULL;
-	if(--table->Table[i1]->EntryCount == 0) {
-	    table->TotalAllocatedBytes -= sizeof(TableLevel2);
-	    free(table->Table[i1]);
-	    table->Table[i1] = NULL;
-	}
+        table->EmptyEntryCount -= LEVEL3COUNT;
+        table->TotalEntryCount -= LEVEL3COUNT;
+        free(table->Table[i1]->Table[i2]);
+        table->TotalAllocatedBytes -= sizeof(TableLevel3);
+        table->Table[i1]->Table[i2] = NULL;
+        if(--table->Table[i1]->EntryCount == 0) {
+            table->TotalAllocatedBytes -= sizeof(TableLevel2);
+            free(table->Table[i1]);
+            table->Table[i1] = NULL;
+        }
     }
     return 1;
@@ -161,5 +161,5 @@
 }
 
-int tableIterate(TableRoot *table, TableIterator *ti, uint *i, void **ref)
+int tableIterate(TableRoot *table, TableIterator *ti, unsigned int *i, void **ref)
 {
     int done;
@@ -168,40 +168,40 @@
     while(ti->i1 < LEVEL1COUNT) {
         if(ti->CheckLevel1 && table->Table[ti->i1] == NULL) {
-	    ti->i += LEVEL2COUNT * LEVEL3COUNT;
-	    ti->i1++;
-	    continue;
-	} else
-	    ti->CheckLevel1 = 0;
+            ti->i += LEVEL2COUNT * LEVEL3COUNT;
+            ti->i1++;
+            continue;
+        } else
+            ti->CheckLevel1 = 0;
         if(ti->CheckLevel2 && table->Table[ti->i1]->Table[ti->i2] == NULL) {
-	    ti->i += LEVEL3COUNT;
-	    if(++ti->i2 >= LEVEL2COUNT) {
-		ti->i2 = 0;
-		ti->i1++;
-		ti->CheckLevel1 = 1;
-	    }
-	    continue;
-	} else
-	    ti->CheckLevel2 = 0;
-	if(ti->i3 == 0)
-	    ti->CurLevel3 = table->Table[ti->i1]->Table[ti->i2];
-	if(ti->CurLevel3->IsSet[ti->i3]) {
-	    if(ref != NULL)
-		*ref = ti->CurLevel3->Table[ti->i3];
-	    if(i != NULL)
-		*i = ti->i;
-	    done = 1;
-	}
-	ti->i++;
-	if(++ti->i3 >= LEVEL3COUNT) {
-	    ti->i3 = 0;
-	    ti->CheckLevel2 = 1;
-	    if(++ti->i2 >= LEVEL2COUNT) {
-		ti->i2 = 0;
-		ti->i1++;
-		ti->CheckLevel1 = 1;
-	    }
-	}
-	if(done)
-	    return 1;
+            ti->i += LEVEL3COUNT;
+            if(++ti->i2 >= LEVEL2COUNT) {
+                ti->i2 = 0;
+                ti->i1++;
+                ti->CheckLevel1 = 1;
+            }
+            continue;
+        } else
+            ti->CheckLevel2 = 0;
+        if(ti->i3 == 0)
+            ti->CurLevel3 = table->Table[ti->i1]->Table[ti->i2];
+        if(ti->CurLevel3->IsSet[ti->i3]) {
+            if(ref != NULL)
+                *ref = ti->CurLevel3->Table[ti->i3];
+            if(i != NULL)
+                *i = ti->i;
+            done = 1;
+        }
+        ti->i++;
+        if(++ti->i3 >= LEVEL3COUNT) {
+            ti->i3 = 0;
+            ti->CheckLevel2 = 1;
+            if(++ti->i2 >= LEVEL2COUNT) {
+                ti->i2 = 0;
+                ti->i1++;
+                ti->CheckLevel1 = 1;
+            }
+        }
+        if(done)
+            return 1;
     }
     return 0;
@@ -214,16 +214,16 @@
     for(i1 = 0; i1 < LEVEL1COUNT; i1++) {
         if(table->Table[i1] != NULL) {
-	    for(i2 = 0; i2 < LEVEL2COUNT; i2++) {
-		if(table->Table[i1]->Table[i2] != NULL) {
-		    for(i3 = 0; i3 < LEVEL3COUNT; i3++) {
-			if(table->Table[i1]->Table[i2]->IsSet[i3])
-			    datumDelete(table->Table[i1]->Table[i2]->Table[i3]);
-		    }
-		    free(table->Table[i1]->Table[i2]);
-		}
-	    }
-	    free(table->Table[i1]);
-	    table->Table[i1] = NULL;
-	}
+            for(i2 = 0; i2 < LEVEL2COUNT; i2++) {
+                if(table->Table[i1]->Table[i2] != NULL) {
+                    for(i3 = 0; i3 < LEVEL3COUNT; i3++) {
+                        if(table->Table[i1]->Table[i2]->IsSet[i3])
+                            datumDelete(table->Table[i1]->Table[i2]->Table[i3]);
+                    }
+                    free(table->Table[i1]->Table[i2]);
+                }
+            }
+            free(table->Table[i1]);
+            table->Table[i1] = NULL;
+        }
     }
     table->TotalEntryCount = 0;
@@ -270,7 +270,7 @@
     { \
         int theErrorNow; \
-	theErrorNow = (a); \
-	if(theErrorNow < 0) \
-	    return theErrorNow; \
+        theErrorNow = (a); \
+        if(theErrorNow < 0) \
+            return theErrorNow; \
     }
 
@@ -287,5 +287,5 @@
 
 typedef struct ACTCVertex {
-    uint V;
+    unsigned int V;
     int Count;
     struct ACTCVertex **PointsToMe;
@@ -296,9 +296,9 @@
 
 /* private tokens */
-#define ACTC_NO_MATCHING_VERT		-0x3000
-#define ACTC_FWD_ORDER			0
-#define ACTC_REV_ORDER			1
-
-#define MAX_STATIC_VERTS		10000000 /* buh? */
+#define ACTC_NO_MATCHING_VERT           -0x3000
+#define ACTC_FWD_ORDER                  0
+#define ACTC_REV_ORDER                  1
+
+#define MAX_STATIC_VERTS                10000000 /* buh? */
 
 struct _ACTCData {
@@ -315,5 +315,5 @@
     ACTCVertex *StaticVerts;
     int UsingStaticVerts;
-    uint VertRange;
+    unsigned int VertRange;
 
     /* During consolidation */
@@ -330,6 +330,6 @@
 
     /* actcParam-settable parameters */
-    uint MinInputVert;
-    uint MaxInputVert;
+    unsigned int MinInputVert;
+    unsigned int MaxInputVert;
     int MaxVertShare;
     int MaxEdgeShare;
@@ -349,9 +349,9 @@
     c = fprintf(fp, "      %d triangles: ");
     for(i = 0; i < e->TriangleCount; i++) {
-	if(c + 1 + sprintf(v, "%u", e->Triangles[i].FinalVert) > 78) {
-	    fputs("\n", fp);
-	    c = fprintf(fp, "        ");
-	}
-	c += fprintf(fp, " %s", v);
+        if(c + 1 + sprintf(v, "%u", e->Triangles[i].FinalVert) > 78) {
+            fputs("\n", fp);
+            c = fprintf(fp, "        ");
+        }
+        c += fprintf(fp, " %s", v);
     }
     fputs("\n", fp);
@@ -365,7 +365,7 @@
 
     for(i = 0; i < vert->EdgeCount; i++) {
-	fprintf(fp, "    %u->%u (%d times)\n", vert->V, vert->Edges[i].V2->V,
-	    vert->Edges[i].Count);
-	dumpTriangles(&vert->Edges[i], fp);
+        fprintf(fp, "    %u->%u (%d times)\n", vert->V, vert->Edges[i].V2->V,
+            vert->Edges[i].Count);
+        dumpTriangles(&vert->Edges[i], fp);
     }
     fputs("\n", fp);
@@ -383,30 +383,30 @@
     if(tc->UsingStaticVerts) {
         for(i = 0; i < tc->VertRange; i++) {
-	    v = &tc->StaticVerts[i];
-	    if(v->Count > 0) {
-		fprintf(fp, "  vertex %u, valence %d, %d edges\n", v->V,
-		    v->Count, v->EdgeCount);
-		dumpEdges(v, fp);
-	    }
-	}
+            v = &tc->StaticVerts[i];
+            if(v->Count > 0) {
+                fprintf(fp, "  vertex %u, valence %d, %d edges\n", v->V,
+                    v->Count, v->EdgeCount);
+                dumpEdges(v, fp);
+            }
+        }
     } else {
-	for(i = 0; i < tc->VertexCount; i++) {
-	    if(tableIterate(tc->Vertices, tc->VertexIterator, NULL,
-		(void **)&v) == 0) {
-		fprintf(fp, "ACTC::dumpVertices : fewer vertices in the table "
-		    "than we expected!\n");
-		fprintf(stderr, "ACTC::dumpVertices : fewer vertices in the table "
-		    "than we expected!\n");
-	    }
-	    if(v == NULL) {
-		fprintf(fp, "ACTC::dumpVertices : did not expect to get a NULL"
-		    "Vertex from the table iterator!\n");
-		fprintf(stderr, "ACTC::dumpVertices : did not expect to get a NULL"
-		    "Vertex from the table iterator!\n");
-	    }
-	    fprintf(fp, "  vertex %u, valence %d, %d edges\n", v->V, v->Count,
-		v->EdgeCount);
-	    dumpEdges(v, fp);
-	}
+        for(i = 0; i < tc->VertexCount; i++) {
+            if(tableIterate(tc->Vertices, tc->VertexIterator, NULL,
+                (void **)&v) == 0) {
+                fprintf(fp, "ACTC::dumpVertices : fewer vertices in the table "
+                    "than we expected!\n");
+                fprintf(stderr, "ACTC::dumpVertices : fewer vertices in the table "
+                    "than we expected!\n");
+            }
+            if(v == NULL) {
+                fprintf(fp, "ACTC::dumpVertices : did not expect to get a NULL"
+                    "Vertex from the table iterator!\n");
+                fprintf(stderr, "ACTC::dumpVertices : did not expect to get a NULL"
+                    "Vertex from the table iterator!\n");
+            }
+            fprintf(fp, "  vertex %u, valence %d, %d edges\n", v->V, v->Count,
+                v->EdgeCount);
+            dumpEdges(v, fp);
+        }
     }
 }
@@ -422,18 +422,18 @@
     if(tc->VertexBins == NULL) {
         fprintf(fp, "        empty.\n");
-	return;
+        return;
     }
     for(i = 1; i <= tc->CurMaxVertValence; i++) {
         cur = tc->VertexBins[i];
-	c = fprintf(fp, "        bin %d -> ", i);
-	while(cur != NULL) {
-	    if(c + 1 + sprintf(v, "%ux%d", cur->V, cur->Count) > 78) {
-		fputs("\n", fp);
-		c = fprintf(fp, "          ");
-	    }
-	    c += fprintf(fp, " %s", v);
-	    cur = cur->Next;
-	}
-	fputs("\n", fp);
+        c = fprintf(fp, "        bin %d -> ", i);
+        while(cur != NULL) {
+            if(c + 1 + sprintf(v, "%ux%d", cur->V, cur->Count) > 78) {
+                fputs("\n", fp);
+                c = fprintf(fp, "          ");
+            }
+            c += fprintf(fp, " %s", v);
+            cur = cur->Next;
+        }
+        fputs("\n", fp);
     }
 }
@@ -464,5 +464,5 @@
 }
 
-static void *reallocAndAppend(void **ptr, uint *itemCount, size_t itemBytes,
+static void *reallocAndAppend(void **ptr, unsigned int *itemCount, size_t itemBytes,
     void *append)
 {
@@ -471,5 +471,5 @@
     t = realloc(*ptr, itemBytes * (*itemCount + 1));
     if(t == NULL)
-	return NULL;
+        return NULL;
     *ptr = t;
 
@@ -487,5 +487,5 @@
  * going to be less than the number of vertices.)
  */
-static int incVertexValence(ACTCData *tc, uint v, ACTCVertex **found)
+static int incVertexValence(ACTCData *tc, unsigned int v, ACTCVertex **found)
 {
     ACTCVertex *vertex;
@@ -493,37 +493,37 @@
     if(tc->UsingStaticVerts) {
         vertex = &tc->StaticVerts[v];
-	vertex->Count++;
-	if(vertex->Count == 1) {
-	    vertex->V = v;
-	    tc->VertexCount++;
-	}
+        vertex->Count++;
+        if(vertex->Count == 1) {
+            vertex->V = v;
+            tc->VertexCount++;
+        }
     } else {
-	if(tableRetrieve(v, tc->Vertices, (void **)&vertex) == 1) {
-	    if(vertex->V != v) {
-		ACTC_DEBUG(
-		    fprintf(stderr, "ACTC::incVertexValence : Got vertex %d when "
-			"looking for vertex %d?!?\n", vertex->V, v);
-		    abortWithOptionalDump(tc);
-		)
-		return tc->Error = ACTC_DATABASE_CORRUPT;
-	    }
-	    vertex->Count++;
-	} else {
-	    chartedSetLabel("new Vertex");
-	    vertex = (ACTCVertex *)malloc(sizeof(ACTCVertex));
-	    vertex->V = v;
-	    vertex->Count = 1;
-	    vertex->Edges = NULL;
-	    vertex->EdgeCount = 0;
-	    if(tableInsert(v, tc->Vertices, vertex) == 0) {
-		ACTC_DEBUG(fprintf(stderr, "ACTC::incVertexValence : Failed "
-		    "to insert vertex into table\n");)
-		return tc->Error = ACTC_ALLOC_FAILED;
-	    }
-	    tc->VertexCount++;
-	}
+        if(tableRetrieve(v, tc->Vertices, (void **)&vertex) == 1) {
+            if(vertex->V != v) {
+                ACTC_DEBUG(
+                    fprintf(stderr, "ACTC::incVertexValence : Got vertex %d when "
+                        "looking for vertex %d?!?\n", vertex->V, v);
+                    abortWithOptionalDump(tc);
+                )
+                return tc->Error = ACTC_DATABASE_CORRUPT;
+            }
+            vertex->Count++;
+        } else {
+            chartedSetLabel("new Vertex");
+            vertex = (ACTCVertex *)malloc(sizeof(ACTCVertex));
+            vertex->V = v;
+            vertex->Count = 1;
+            vertex->Edges = NULL;
+            vertex->EdgeCount = 0;
+            if(tableInsert(v, tc->Vertices, vertex) == 0) {
+                ACTC_DEBUG(fprintf(stderr, "ACTC::incVertexValence : Failed "
+                    "to insert vertex into table\n");)
+                return tc->Error = ACTC_ALLOC_FAILED;
+            }
+            tc->VertexCount++;
+        }
     }
     if(vertex->Count > tc->CurMaxVertValence)
-	tc->CurMaxVertValence = vertex->Count;
+        tc->CurMaxVertValence = vertex->Count;
 
     *found = vertex;
@@ -538,38 +538,38 @@
     v->Count--;
     if(v->Count < 0) {
-	ACTC_DEBUG(
-	    fprintf(stderr, "ACTC::decVertexValence : Valence went "
-		"negative?!?\n");
-	    abortWithOptionalDump(tc);
-	)
-	return tc->Error = ACTC_DATABASE_CORRUPT;
+        ACTC_DEBUG(
+            fprintf(stderr, "ACTC::decVertexValence : Valence went "
+                "negative?!?\n");
+            abortWithOptionalDump(tc);
+        )
+        return tc->Error = ACTC_DATABASE_CORRUPT;
     }
 
     if(v->PointsToMe != NULL) {
-	*v->PointsToMe = v->Next;
-	if(v->Next != NULL)
-	    v->Next->PointsToMe = v->PointsToMe;
-	v->Next = NULL;
+        *v->PointsToMe = v->Next;
+        if(v->Next != NULL)
+            v->Next->PointsToMe = v->PointsToMe;
+        v->Next = NULL;
     }
 
     if(v->Count == 0) {
-	tc->VertexCount--;
-	if(v->Edges != NULL)
-	    free(v->Edges);
+        tc->VertexCount--;
+        if(v->Edges != NULL)
+            free(v->Edges);
         if(!tc->UsingStaticVerts) {
-	    tableRemove(v->V, tc->Vertices, NULL);
-	    free(v);
-	}
-	*vptr = NULL;
+            tableRemove(v->V, tc->Vertices, NULL);
+            free(v);
+        }
+        *vptr = NULL;
     } else {
-	if(tc->VertexBins != NULL) {
-	    v->Next = tc->VertexBins[v->Count];
-	    v->PointsToMe = &tc->VertexBins[v->Count];
-	    if(v->Next != NULL)
-		v->Next->PointsToMe = &v->Next;
-	    tc->VertexBins[v->Count] = v;
-	    if(v->Count < tc->CurMinVertValence)
-		tc->CurMinVertValence = v->Count;
-	}
+        if(tc->VertexBins != NULL) {
+            v->Next = tc->VertexBins[v->Count];
+            v->PointsToMe = &tc->VertexBins[v->Count];
+            if(v->Next != NULL)
+                v->Next->PointsToMe = &v->Next;
+            tc->VertexBins[v->Count] = v;
+            if(v->Count < tc->CurMinVertValence)
+                tc->CurMinVertValence = v->Count;
+        }
     }
 
@@ -580,16 +580,16 @@
 {
     if(tc->CurMaxVertValence < tc->MinFanVerts) {
-	return ACTC_NO_MATCHING_VERT;
+        return ACTC_NO_MATCHING_VERT;
     }
     while(tc->VertexBins[tc->CurMaxVertValence] == NULL) {
-	tc->CurMaxVertValence--;
-	if(tc->CurMaxVertValence < tc->CurMinVertValence) {
-	    if(tc->VertexCount > 0) {
-		ACTC_DEBUG(fprintf(stderr, "tc::findNextFanVertex : no more "
-		    "vertices in bins but VertexCount > 0\n");)
-		return tc->Error = ACTC_DATABASE_CORRUPT;
-	    }
-	    return ACTC_NO_MATCHING_VERT;
-	}
+        tc->CurMaxVertValence--;
+        if(tc->CurMaxVertValence < tc->CurMinVertValence) {
+            if(tc->VertexCount > 0) {
+                ACTC_DEBUG(fprintf(stderr, "tc::findNextFanVertex : no more "
+                    "vertices in bins but VertexCount > 0\n");)
+                return tc->Error = ACTC_DATABASE_CORRUPT;
+            }
+            return ACTC_NO_MATCHING_VERT;
+        }
     }
     *vert = tc->VertexBins[tc->CurMaxVertValence];
@@ -600,13 +600,13 @@
 {
     while(tc->VertexBins[tc->CurMinVertValence] == NULL) {
-	tc->CurMinVertValence++;
-	if(tc->CurMinVertValence > tc->CurMaxVertValence) {
-	    if(tc->VertexCount > 0) {
-		ACTC_DEBUG(fprintf(stderr, "tc::findNextStripVertex : no more "
-		    "vertices in bins but VertexCount > 0\n");)
-		return tc->Error = ACTC_DATABASE_CORRUPT;
-	    }
-	    return ACTC_NO_MATCHING_VERT;
-	}
+        tc->CurMinVertValence++;
+        if(tc->CurMinVertValence > tc->CurMaxVertValence) {
+            if(tc->VertexCount > 0) {
+                ACTC_DEBUG(fprintf(stderr, "tc::findNextStripVertex : no more "
+                    "vertices in bins but VertexCount > 0\n");)
+                return tc->Error = ACTC_DATABASE_CORRUPT;
+            }
+            return ACTC_NO_MATCHING_VERT;
+        }
     }
     *vert = tc->VertexBins[tc->CurMinVertValence];
@@ -621,13 +621,13 @@
 {
     if(tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcBeginInput : called within "
-	    "BeginOutput/EndOutput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcBeginInput : called within "
+            "BeginOutput/EndOutput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
 
     if(tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcBeginInput : called within "
-	    "BeginInput/EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcBeginInput : called within "
+            "BeginInput/EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
 
@@ -636,17 +636,17 @@
 
     if(tc->MaxInputVert < MAX_STATIC_VERTS - 1) {
-	size_t byteCount;
-	tc->UsingStaticVerts = 1;
-	tc->VertRange = tc->MaxInputVert + 1;
-	byteCount = sizeof(ACTCVertex) * tc->VertRange;
-	chartedSetLabel("static verts");
-	tc->StaticVerts = (ACTCVertex *)calloc(sizeof(ACTCVertex), tc->VertRange);
-	if(tc->StaticVerts == NULL) {
-	    ACTC_INFO(printf("Couldn't allocate static %d vert block of %u "
-		"bytes\n", tc->VertRange, byteCount);)
-	    tc->UsingStaticVerts = 0;
-	}
+        size_t byteCount;
+        tc->UsingStaticVerts = 1;
+        tc->VertRange = tc->MaxInputVert + 1;
+        byteCount = sizeof(ACTCVertex) * tc->VertRange;
+        chartedSetLabel("static verts");
+        tc->StaticVerts = (ACTCVertex *)calloc(sizeof(ACTCVertex), tc->VertRange);
+        if(tc->StaticVerts == NULL) {
+            ACTC_INFO(printf("Couldn't allocate static %d vert block of %u "
+                "bytes\n", tc->VertRange, byteCount);)
+            tc->UsingStaticVerts = 0;
+        }
     } else
-	tc->UsingStaticVerts = 0;
+        tc->UsingStaticVerts = 0;
 
     return ACTC_NO_ERROR;
@@ -656,13 +656,13 @@
 {
     if(tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcEndInput : called within "
-	    "BeginOutput/EndOutput\n");)
-	return tc->Error = ACTC_DURING_OUTPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcEndInput : called within "
+            "BeginOutput/EndOutput\n");)
+        return tc->Error = ACTC_DURING_OUTPUT;
     }
 
     if(!tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcEndInput : called outside "
-	    "BeginInput/EndInput\n");)
-	return tc->Error = ACTC_IDLE;
+        ACTC_DEBUG(fprintf(stderr, "actcEndInput : called outside "
+            "BeginInput/EndInput\n");)
+        return tc->Error = ACTC_IDLE;
     }
 
@@ -682,13 +682,13 @@
 
     if(tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : called within "
-	    "BeginInput/EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : called within "
+            "BeginInput/EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
 
     if(tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : called within "
-	    "BeginOutput/EndOutput\n");)
-	return tc->Error = ACTC_DURING_OUTPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : called within "
+            "BeginOutput/EndOutput\n");)
+        return tc->Error = ACTC_DURING_OUTPUT;
     }
 
@@ -699,42 +699,42 @@
     tc->VertexBins = (ACTCVertex **)calloc(sizeof(ACTCVertex *), tc->CurMaxVertValence + 1);
     if(tc->VertexBins == NULL) {
-	ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : couldn't allocate %d bytes "
-	    "for Vertex Bins\n",
-	    sizeof(ACTCVertex *) * tc->CurMaxVertValence);)
-	return tc->Error = ACTC_ALLOC_FAILED;
+        ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : couldn't allocate %d bytes "
+            "for Vertex Bins\n",
+            sizeof(ACTCVertex *) * tc->CurMaxVertValence);)
+        return tc->Error = ACTC_ALLOC_FAILED;
     }
 
     if(tc->UsingStaticVerts) {
         double edgeTotal;
-	for(i = 0; i < tc->VertRange; i++) {
-	    v = &tc->StaticVerts[i];
-	    if(v->Count > 0) {
-		v->Next = tc->VertexBins[v->Count];
-		v->PointsToMe = &tc->VertexBins[v->Count];
-		tc->VertexBins[v->Count] = v;
-		if(v->Next != NULL)
-		    v->Next->PointsToMe = &v->Next;
-		if(v->Count < tc->CurMinVertValence)
-		    tc->CurMinVertValence = v->Count;
-		edgeTotal += v->EdgeCount;
-	    }
-	}
+        for(i = 0; i < tc->VertRange; i++) {
+            v = &tc->StaticVerts[i];
+            if(v->Count > 0) {
+                v->Next = tc->VertexBins[v->Count];
+                v->PointsToMe = &tc->VertexBins[v->Count];
+                tc->VertexBins[v->Count] = v;
+                if(v->Next != NULL)
+                    v->Next->PointsToMe = &v->Next;
+                if(v->Count < tc->CurMinVertValence)
+                    tc->CurMinVertValence = v->Count;
+                edgeTotal += v->EdgeCount;
+            }
+        }
     } else {
-	tableResetIterator(tc->VertexIterator);
-	for(i = 0; i < tc->VertexCount; i++) {
-	    if(tableIterate(tc->Vertices, tc->VertexIterator, NULL, (void **)&v)
-		== 0) {
-		ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : fewer vertices in "
-		    "the table than we expected!\n");)
-		return tc->Error = ACTC_DATABASE_CORRUPT;
-	    }
-	    v->Next = tc->VertexBins[v->Count];
-	    v->PointsToMe = &tc->VertexBins[v->Count];
-	    tc->VertexBins[v->Count] = v;
-	    if(v->Next != NULL)
-		v->Next->PointsToMe = &v->Next;
-	    if(v->Count < tc->CurMinVertValence)
-		tc->CurMinVertValence = v->Count;
-	}
+        tableResetIterator(tc->VertexIterator);
+        for(i = 0; i < tc->VertexCount; i++) {
+            if(tableIterate(tc->Vertices, tc->VertexIterator, NULL, (void **)&v)
+                == 0) {
+                ACTC_DEBUG(fprintf(stderr, "actcBeginOutput : fewer vertices in "
+                    "the table than we expected!\n");)
+                return tc->Error = ACTC_DATABASE_CORRUPT;
+            }
+            v->Next = tc->VertexBins[v->Count];
+            v->PointsToMe = &tc->VertexBins[v->Count];
+            tc->VertexBins[v->Count] = v;
+            if(v->Next != NULL)
+                v->Next->PointsToMe = &v->Next;
+            if(v->Count < tc->CurMinVertValence)
+                tc->CurMinVertValence = v->Count;
+        }
     }
 
@@ -745,13 +745,13 @@
 {
     if(tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcEndOutput : called within "
-	    "BeginInput/EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcEndOutput : called within "
+            "BeginInput/EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
 
     if(!tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcEndOutput : called outside "
-	    "BeginOutput/EndOutput\n");)
-	return tc->Error = ACTC_IDLE;
+        ACTC_DEBUG(fprintf(stderr, "actcEndOutput : called outside "
+            "BeginOutput/EndOutput\n");)
+        return tc->Error = ACTC_IDLE;
     }
 
@@ -759,7 +759,7 @@
 
     if(tc->UsingStaticVerts) {
-	free(tc->StaticVerts);
-	tc->StaticVerts = NULL;
-	tc->UsingStaticVerts = 0;
+        free(tc->StaticVerts);
+        tc->StaticVerts = NULL;
+        tc->UsingStaticVerts = 0;
     }
 
@@ -777,10 +777,10 @@
 
     if(!didPrintVersion) {
-	int verMinor, verMajor;
-	didPrintVersion = 1;
+        int verMinor, verMajor;
+        didPrintVersion = 1;
 
         actcGetParami(tc, ACTC_MAJOR_VERSION, &verMajor);
         actcGetParami(tc, ACTC_MINOR_VERSION, &verMinor);
-	fprintf(stderr, "TC Version %d.%d\n", verMajor, verMinor);
+        fprintf(stderr, "TC Version %d.%d\n", verMajor, verMinor);
     }
 #endif /* defined(DEBUG) || defined(INFO) */
@@ -790,7 +790,7 @@
 
     if(tc == NULL) {
-	ACTC_DEBUG(fprintf(stderr, "actcNew : couldn't allocate %d bytes "
-	    "for new ACTCData\n", sizeof(*tc));)
-	return NULL;
+        ACTC_DEBUG(fprintf(stderr, "actcNew : couldn't allocate %d bytes "
+            "for new ACTCData\n", sizeof(*tc));)
+        return NULL;
     }
 
@@ -822,5 +822,5 @@
     size = sizeof(ACTCEdge) * vert->EdgeCount;
     for(i = 0; i < vert->EdgeCount; i++) {
-	size += allocatedForTriangles(&vert->Edges[i]);
+        size += allocatedForTriangles(&vert->Edges[i]);
     }
     return size;
@@ -839,13 +839,13 @@
         size = tc->VertRange * sizeof(ACTCVertex);
         for(i = 0; i < tc->VertRange; i++) {
-	    v = &tc->StaticVerts[i];
-	    if(v->Count > 0)
-	        size += allocatedForEdges(v);
-	}
+            v = &tc->StaticVerts[i];
+            if(v->Count > 0)
+                size += allocatedForEdges(v);
+        }
     } else {
-	for(i = 0; i < tc->VertexCount; i++) {
-	    tableIterate(tc->Vertices, tc->VertexIterator, NULL, (void **)&v);
-	    size += allocatedForEdges(v);
-	}
+        for(i = 0; i < tc->VertexCount; i++) {
+            tableIterate(tc->Vertices, tc->VertexIterator, NULL, (void **)&v);
+            size += allocatedForEdges(v);
+        }
     }
     return size;
@@ -882,5 +882,5 @@
     if(tc->VertexBins != NULL) {
         free(tc->VertexBins);
-	tc->VertexBins = NULL;
+        tc->VertexBins = NULL;
     }
     tc->IsOutputting = 0;
@@ -900,64 +900,64 @@
 {
     if(tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcParami : within BeginInput/"
-	    "EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcParami : within BeginInput/"
+            "EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
     if(tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcParami : within BeginOutput/"
-	    "EndOutput\n");)
-	return tc->Error = ACTC_DURING_OUTPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcParami : within BeginOutput/"
+            "EndOutput\n");)
+        return tc->Error = ACTC_DURING_OUTPUT;
     }
     switch(param) {
-	case ACTC_OUT_MIN_FAN_VERTS:
-	    tc->MinFanVerts = value;
-	    break;
-
-	case ACTC_IN_MAX_VERT:
-	    if(value < tc->MinInputVert) {
-		ACTC_DEBUG(fprintf(stderr, "actcParami : tried to set "
-		    "MAX_INPUT_VERT to %d, less than MIN_INPUT_VERT (%d)\n",
-		    value, tc->MinInputVert);)
-		return tc->Error = ACTC_INVALID_VALUE;
-	    }
-	    tc->MaxInputVert = value;
-	    break;
-
-	case ACTC_IN_MIN_VERT:
-	    if(value > tc->MaxInputVert) {
-		ACTC_DEBUG(fprintf(stderr, "actcParami : tried to set "
-		    "MIN_INPUT_VERT to %d, greater than MAX_INPUT_VERT (%d)\n",
-		    value, tc->MaxInputVert);)
-		return tc->Error = ACTC_INVALID_VALUE;
-	    }
-	    tc->MinInputVert = value;
-	    break;
-
-	case ACTC_IN_MAX_EDGE_SHARING:
-	    tc->MaxEdgeShare = value;
-	    break;
-
-	case ACTC_IN_MAX_VERT_SHARING:
-	    tc->MaxVertShare = value;
-	    break;
-
-	case ACTC_OUT_HONOR_WINDING:
-	    tc->HonorWinding = value;
-	    break;
-
-	case ACTC_OUT_MAX_PRIM_VERTS:
-	    if(value < 3) {
-		ACTC_DEBUG(fprintf(stderr, "actcParami : tried to set "
-		    "MAX_PRIM_VERTS to %d (needed to be 3 or more)\n", value);)
-		return tc->Error = ACTC_INVALID_VALUE;
-	    }
-	    tc->MaxPrimVerts = value;
-	    break;
-
-    }
-    return ACTC_NO_ERROR;
-}
-
-int actcParamu(ACTCData *tc, int param, uint value)
+        case ACTC_OUT_MIN_FAN_VERTS:
+            tc->MinFanVerts = value;
+            break;
+
+        case ACTC_IN_MAX_VERT:
+            if(value < tc->MinInputVert) {
+                ACTC_DEBUG(fprintf(stderr, "actcParami : tried to set "
+                    "MAX_INPUT_VERT to %d, less than MIN_INPUT_VERT (%d)\n",
+                    value, tc->MinInputVert);)
+                return tc->Error = ACTC_INVALID_VALUE;
+            }
+            tc->MaxInputVert = value;
+            break;
+
+        case ACTC_IN_MIN_VERT:
+            if(value > tc->MaxInputVert) {
+                ACTC_DEBUG(fprintf(stderr, "actcParami : tried to set "
+                    "MIN_INPUT_VERT to %d, greater than MAX_INPUT_VERT (%d)\n",
+                    value, tc->MaxInputVert);)
+                return tc->Error = ACTC_INVALID_VALUE;
+            }
+            tc->MinInputVert = value;
+            break;
+
+        case ACTC_IN_MAX_EDGE_SHARING:
+            tc->MaxEdgeShare = value;
+            break;
+
+        case ACTC_IN_MAX_VERT_SHARING:
+            tc->MaxVertShare = value;
+            break;
+
+        case ACTC_OUT_HONOR_WINDING:
+            tc->HonorWinding = value;
+            break;
+
+        case ACTC_OUT_MAX_PRIM_VERTS:
+            if(value < 3) {
+                ACTC_DEBUG(fprintf(stderr, "actcParami : tried to set "
+                    "MAX_PRIM_VERTS to %d (needed to be 3 or more)\n", value);)
+                return tc->Error = ACTC_INVALID_VALUE;
+            }
+            tc->MaxPrimVerts = value;
+            break;
+
+    }
+    return ACTC_NO_ERROR;
+}
+
+int actcParamu(ACTCData *tc, int param, unsigned int value)
 {
     /*
@@ -972,49 +972,49 @@
 {
     switch(param) {
-	case ACTC_MAJOR_VERSION:
-	    *value = 1;
-	    break;
-
-	case ACTC_MINOR_VERSION:
-	    *value = 1;
-	    break;
-
-	case ACTC_IN_MAX_VERT:
-	    *value = tc->MaxInputVert;
-	    break;
-
-	case ACTC_IN_MIN_VERT:
-	    *value = tc->MinInputVert;
-	    break;
-
-	case ACTC_IN_MAX_EDGE_SHARING:
-	    *value = tc->MaxEdgeShare;
-	    break;
-
-	case ACTC_IN_MAX_VERT_SHARING:
-	    *value = tc->MaxVertShare;
-	    break;
-
-	case ACTC_OUT_MIN_FAN_VERTS:
-	    *value = tc->MinFanVerts;
-	    break;
-
-	case ACTC_OUT_HONOR_WINDING:
-	    *value = tc->HonorWinding;
-	    break;
-
-	case ACTC_OUT_MAX_PRIM_VERTS:
-	    *value = tc->MaxPrimVerts;
-	    break;
-
-	default:
-	    *value = 0;
-	    return tc->Error = ACTC_INVALID_VALUE;
-	    /* break; */
-    }
-    return ACTC_NO_ERROR;
-}
-
-int actcGetParamu(ACTCData *tc, int param, uint *value)
+        case ACTC_MAJOR_VERSION:
+            *value = 1;
+            break;
+
+        case ACTC_MINOR_VERSION:
+            *value = 1;
+            break;
+
+        case ACTC_IN_MAX_VERT:
+            *value = tc->MaxInputVert;
+            break;
+
+        case ACTC_IN_MIN_VERT:
+            *value = tc->MinInputVert;
+            break;
+
+        case ACTC_IN_MAX_EDGE_SHARING:
+            *value = tc->MaxEdgeShare;
+            break;
+
+        case ACTC_IN_MAX_VERT_SHARING:
+            *value = tc->MaxVertShare;
+            break;
+
+        case ACTC_OUT_MIN_FAN_VERTS:
+            *value = tc->MinFanVerts;
+            break;
+
+        case ACTC_OUT_HONOR_WINDING:
+            *value = tc->HonorWinding;
+            break;
+
+        case ACTC_OUT_MAX_PRIM_VERTS:
+            *value = tc->MaxPrimVerts;
+            break;
+
+        default:
+            *value = 0;
+            return tc->Error = ACTC_INVALID_VALUE;
+            /* break; */
+    }
+    return ACTC_NO_ERROR;
+}
+
+int actcGetParamu(ACTCData *tc, int param, unsigned int *value)
 {
     return actcGetParami(tc, param, (int *)value);
@@ -1028,11 +1028,11 @@
     tmp.FinalVert = v3;
     chartedSetLabel("triangle list");
-    r = reallocAndAppend((void **)&edge->Triangles, (uint*)&edge->TriangleCount,
+    r = reallocAndAppend((void **)&edge->Triangles, (unsigned int*)&edge->TriangleCount,
         sizeof(tmp), &tmp);
     if(r == NULL) {
-	ACTC_DEBUG(fprintf(stderr, "ACTC::mapEdgeTriangle : Couldn't allocate "
-	    "%d bytes for triangles\n", sizeof(tmp) *
-	    (edge->TriangleCount + 1));)
-	return tc->Error = ACTC_ALLOC_FAILED;
+        ACTC_DEBUG(fprintf(stderr, "ACTC::mapEdgeTriangle : Couldn't allocate "
+            "%d bytes for triangles\n", sizeof(tmp) *
+            (edge->TriangleCount + 1));)
+        return tc->Error = ACTC_ALLOC_FAILED;
     }
 
@@ -1045,14 +1045,14 @@
 
     for(i = 0; i < edge->TriangleCount; i++)
-	if(edge->Triangles[i].FinalVert == v3)
-	    break;
+        if(edge->Triangles[i].FinalVert == v3)
+            break;
 
     if(i == edge->TriangleCount) {
-	ACTC_DEBUG(
-	    fprintf(stderr, "ACTC::unmapEdgeTriangle : Couldn't find third vertex"
-	        " from edge in order to delete it?!?\n");
-	    abortWithOptionalDump(tc);
-	)
-	return tc->Error = ACTC_DATABASE_CORRUPT;
+        ACTC_DEBUG(
+            fprintf(stderr, "ACTC::unmapEdgeTriangle : Couldn't find third vertex"
+                " from edge in order to delete it?!?\n");
+            abortWithOptionalDump(tc);
+        )
+        return tc->Error = ACTC_DATABASE_CORRUPT;
     }
 
@@ -1065,5 +1065,5 @@
 static int mapVertexEdge(ACTCData *tc, ACTCVertex *v1, ACTCVertex *v2, ACTCEdge **edge)
 {
-    uint i;
+    unsigned int i;
     ACTCEdge tmp;
     void *r;
@@ -1071,24 +1071,24 @@
     for(i = 0; i < v1->EdgeCount; i++)
         if(v1->Edges[i].V2 == v2) {
-	    v1->Edges[i].Count++;
-	    break;
-	}
+            v1->Edges[i].Count++;
+            break;
+        }
 
     if(i == v1->EdgeCount) {
 
-	tmp.V2 = v2;
-	tmp.Count = 1;
-	tmp.Triangles = NULL;
-	tmp.TriangleCount = 0;
-
-	chartedSetLabel("vert-to-edge mapping");
-        r = reallocAndAppend((void **)&v1->Edges, (uint*)&v1->EdgeCount,
-	    sizeof(tmp), &tmp);
-	if(r == NULL) {
-	    ACTC_DEBUG(fprintf(stderr, "ACTC::mapVertexEdge : Couldn't reallocate "
-	        "to %d bytes for vertex's edge list\n", sizeof(tmp) *
-		v1->EdgeCount);)
-	    return tc->Error = ACTC_ALLOC_FAILED;
-	}
+        tmp.V2 = v2;
+        tmp.Count = 1;
+        tmp.Triangles = NULL;
+        tmp.TriangleCount = 0;
+
+        chartedSetLabel("vert-to-edge mapping");
+        r = reallocAndAppend((void **)&v1->Edges, (unsigned int*)&v1->EdgeCount,
+            sizeof(tmp), &tmp);
+        if(r == NULL) {
+            ACTC_DEBUG(fprintf(stderr, "ACTC::mapVertexEdge : Couldn't reallocate "
+                "to %d bytes for vertex's edge list\n", sizeof(tmp) *
+                v1->EdgeCount);)
+            return tc->Error = ACTC_ALLOC_FAILED;
+        }
     }
     *edge = &v1->Edges[i];
@@ -1102,14 +1102,14 @@
 
     for(i = 0; i < v1->EdgeCount; i++)
-	if(v1->Edges[i].V2 == v2)
-	    break;
+        if(v1->Edges[i].V2 == v2)
+            break;
 
     if(i == v1->EdgeCount) {
-	ACTC_DEBUG(
-	    fprintf(stderr, "ACTC::unmapVertexEdge : Couldn't find edge %d,%d"
-	        " from vertex in order to unmap it?!?\n", v1->V, v2->V);
-	    abortWithOptionalDump(tc);
-	)
-	return tc->Error = ACTC_DATABASE_CORRUPT;
+        ACTC_DEBUG(
+            fprintf(stderr, "ACTC::unmapVertexEdge : Couldn't find edge %d,%d"
+                " from vertex in order to unmap it?!?\n", v1->V, v2->V);
+            abortWithOptionalDump(tc);
+        )
+        return tc->Error = ACTC_DATABASE_CORRUPT;
     }
 
@@ -1117,13 +1117,13 @@
     if(v1->Edges[i].Count == 0) {
         if(v1->Edges[i].Triangles != NULL)
-	    free(v1->Edges[i].Triangles);
-	v1->Edges[i] = v1->Edges[v1->EdgeCount - 1];
-	v1->EdgeCount --;
-    }
-
-    return ACTC_NO_ERROR;
-}
-
-int actcAddTriangle(ACTCData *tc, uint v1, uint v2, uint v3)
+            free(v1->Edges[i].Triangles);
+        v1->Edges[i] = v1->Edges[v1->EdgeCount - 1];
+        v1->EdgeCount --;
+    }
+
+    return ACTC_NO_ERROR;
+}
+
+int actcAddTriangle(ACTCData *tc, unsigned int v1, unsigned int v2, unsigned int v3)
 {
     ACTCVertex *vertexRec1;
@@ -1136,12 +1136,12 @@
 
     if(tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcAddTriangle : inside "
-	    "BeginOutput/EndOutput\n");)
-	return tc->Error = ACTC_IDLE;
+        ACTC_DEBUG(fprintf(stderr, "actcAddTriangle : inside "
+            "BeginOutput/EndOutput\n");)
+        return tc->Error = ACTC_IDLE;
     }
     if(!tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcAddTriangle : outside "
-	    "BeginInput/EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcAddTriangle : outside "
+            "BeginInput/EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
 
@@ -1191,5 +1191,5 @@
 }
 
-int actcStartNextPrim(ACTCData *tc, uint *v1Return, uint *v2Return)
+int actcStartNextPrim(ACTCData *tc, unsigned int *v1Return, unsigned int *v2Return)
 {
     ACTCVertex *v1 = NULL;
@@ -1198,35 +1198,35 @@
 
     if(tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : within "
-	    "BeginInput/EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : within "
+            "BeginInput/EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
     if(!tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : outside "
-	    "BeginOutput/EndOutput\n");)
-	return tc->Error = ACTC_IDLE;
+        ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : outside "
+            "BeginOutput/EndOutput\n");)
+        return tc->Error = ACTC_IDLE;
     }
 
     findResult = findNextFanVertex(tc, &v1);
     if(findResult == ACTC_NO_ERROR)
-	tc->PrimType = ACTC_PRIM_FAN;
+        tc->PrimType = ACTC_PRIM_FAN;
     else if(findResult != ACTC_NO_MATCHING_VERT) {
-	ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : internal "
-	    "error finding next appropriate vertex\n");)
-	return tc->Error = findResult;
+        ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : internal "
+            "error finding next appropriate vertex\n");)
+        return tc->Error = findResult;
     } else {
-	findResult = findNextStripVertex(tc, &v1);
-	if(findResult != ACTC_NO_ERROR && findResult != ACTC_NO_MATCHING_VERT) {
-	    ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : internal "
-		"error finding next appropriate vertex\n");)
-	    return tc->Error = findResult;
-	}
-	tc->PrimType = ACTC_PRIM_STRIP;
+        findResult = findNextStripVertex(tc, &v1);
+        if(findResult != ACTC_NO_ERROR && findResult != ACTC_NO_MATCHING_VERT) {
+            ACTC_DEBUG(fprintf(stderr, "actcStartNextPrim : internal "
+                "error finding next appropriate vertex\n");)
+            return tc->Error = findResult;
+        }
+        tc->PrimType = ACTC_PRIM_STRIP;
     }
 
     if(findResult == ACTC_NO_MATCHING_VERT) {
-	*v1Return = -1;
-	*v2Return = -1;
-	return tc->Error = ACTC_DATABASE_EMPTY;
+        *v1Return = -1;
+        *v2Return = -1;
+        return tc->Error = ACTC_DATABASE_EMPTY;
     }
 
@@ -1253,7 +1253,7 @@
     for(i = 0; i < v1->EdgeCount; i++)
         if(v1->Edges[i].V2 == v2) {
-	    *edge = &v1->Edges[i];
-	    return 1;
-	}
+            *edge = &v1->Edges[i];
+            return 1;
+        }
     return 0;
 }
@@ -1269,5 +1269,5 @@
 }
 
-int actcGetNextVert(ACTCData *tc, uint *vertReturn)
+int actcGetNextVert(ACTCData *tc, unsigned int *vertReturn)
 {
     ACTCEdge *edge;
@@ -1277,27 +1277,27 @@
 
     if(tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcGetNextVert : within BeginInput/"
-	    "EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcGetNextVert : within BeginInput/"
+            "EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
     if(!tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcGetNextVert : outside BeginOutput/"
-	    "EndOutput\n");)
-	return tc->Error = ACTC_IDLE;
+        ACTC_DEBUG(fprintf(stderr, "actcGetNextVert : outside BeginOutput/"
+            "EndOutput\n");)
+        return tc->Error = ACTC_IDLE;
     }
     if(tc->PrimType == -1) {
-	ACTC_DEBUG(fprintf(stderr, "actcGetNextVert : Asked for next vertex "
-	    "without a primitive (got last\n    vertex already?)\n");)
-	return tc->Error = ACTC_INVALID_VALUE;
+        ACTC_DEBUG(fprintf(stderr, "actcGetNextVert : Asked for next vertex "
+            "without a primitive (got last\n    vertex already?)\n");)
+        return tc->Error = ACTC_INVALID_VALUE;
     }
 
     if(tc->VerticesSoFar >= tc->MaxPrimVerts) {
-	tc->PrimType = -1;
-	return tc->Error = ACTC_PRIM_COMPLETE;
+        tc->PrimType = -1;
+        return tc->Error = ACTC_PRIM_COMPLETE;
     }
 
     if(tc->V1 == NULL || tc->V2 == NULL) {
-	tc->PrimType = -1;
-	return tc->Error = ACTC_PRIM_COMPLETE;
+        tc->PrimType = -1;
+        return tc->Error = ACTC_PRIM_COMPLETE;
     }
 
@@ -1307,15 +1307,15 @@
 
     if(findEdge(tc->V1, tc->V2, &edge) != 0) {
-	wasEdgeFound = 1;
+        wasEdgeFound = 1;
     } else if(!tc->HonorWinding) {
-	wasFoundReversed = 1;
-	if(findEdge(tc->V2, tc->V1, &edge) != 0) {
-	    wasEdgeFound = 1;
-	}
+        wasFoundReversed = 1;
+        if(findEdge(tc->V2, tc->V1, &edge) != 0) {
+            wasEdgeFound = 1;
+        }
     }
 
     if(!wasEdgeFound) {
-	tc->PrimType = -1;
-	return tc->Error = ACTC_PRIM_COMPLETE;
+        tc->PrimType = -1;
+        return tc->Error = ACTC_PRIM_COMPLETE;
     }
 
@@ -1326,17 +1326,17 @@
 
     if(wasFoundReversed) {
-	ACTC_CHECK(unmapEdgeTriangle(tc, edge, thirdVertex));
-	ACTC_CHECK(unmapEdgeTriangleByVerts(tc, tc->V1, thirdVertex, tc->V2));
-	ACTC_CHECK(unmapEdgeTriangleByVerts(tc, thirdVertex, tc->V2, tc->V1));
-	ACTC_CHECK(unmapVertexEdge(tc, tc->V2, tc->V1));
-	ACTC_CHECK(unmapVertexEdge(tc, tc->V1, thirdVertex));
-	ACTC_CHECK(unmapVertexEdge(tc, thirdVertex, tc->V2));
+        ACTC_CHECK(unmapEdgeTriangle(tc, edge, thirdVertex));
+        ACTC_CHECK(unmapEdgeTriangleByVerts(tc, tc->V1, thirdVertex, tc->V2));
+        ACTC_CHECK(unmapEdgeTriangleByVerts(tc, thirdVertex, tc->V2, tc->V1));
+        ACTC_CHECK(unmapVertexEdge(tc, tc->V2, tc->V1));
+        ACTC_CHECK(unmapVertexEdge(tc, tc->V1, thirdVertex));
+        ACTC_CHECK(unmapVertexEdge(tc, thirdVertex, tc->V2));
     } else {
-	ACTC_CHECK(unmapEdgeTriangle(tc, edge, thirdVertex));
-	ACTC_CHECK(unmapEdgeTriangleByVerts(tc, tc->V2, thirdVertex, tc->V1));
-	ACTC_CHECK(unmapEdgeTriangleByVerts(tc, thirdVertex, tc->V1, tc->V2));
-	ACTC_CHECK(unmapVertexEdge(tc, tc->V1, tc->V2));
-	ACTC_CHECK(unmapVertexEdge(tc, tc->V2, thirdVertex));
-	ACTC_CHECK(unmapVertexEdge(tc, thirdVertex, tc->V1));
+        ACTC_CHECK(unmapEdgeTriangle(tc, edge, thirdVertex));
+        ACTC_CHECK(unmapEdgeTriangleByVerts(tc, tc->V2, thirdVertex, tc->V1));
+        ACTC_CHECK(unmapEdgeTriangleByVerts(tc, thirdVertex, tc->V1, tc->V2));
+        ACTC_CHECK(unmapVertexEdge(tc, tc->V1, tc->V2));
+        ACTC_CHECK(unmapVertexEdge(tc, tc->V2, thirdVertex));
+        ACTC_CHECK(unmapVertexEdge(tc, thirdVertex, tc->V1));
     }
     ACTC_CHECK(decVertexValence(tc, &tc->V1));
@@ -1347,9 +1347,9 @@
         tc->V2 = thirdVertex;
     } else /* PRIM_STRIP */ {
-	if(tc->CurWindOrder == ACTC_FWD_ORDER)
-	    tc->V1 = thirdVertex;
-	else
-	    tc->V2 = thirdVertex;
-	tc->CurWindOrder = !tc->CurWindOrder;
+        if(tc->CurWindOrder == ACTC_FWD_ORDER)
+            tc->V1 = thirdVertex;
+        else
+            tc->V2 = thirdVertex;
+        tc->CurWindOrder = !tc->CurWindOrder;
     }
 
@@ -1359,5 +1359,5 @@
 
 int actcTrianglesToPrimitives(ACTCData *tc, int triangleCount,
-    uint (*triangles)[3], int primTypes[], int primLengths[], uint vertices[],
+    unsigned int (*triangles)[3], int primTypes[], int primLengths[], unsigned int vertices[],
     int maxBatchSize)
 {
@@ -1365,7 +1365,7 @@
     int curTriangle;
     int curPrimitive;
-    uint curVertex;
+    unsigned int curVertex;
     int prim;
-    uint v1, v2, v3;
+    unsigned int v1, v2, v3;
     int lastPrim;
     int passesWithoutPrims;
@@ -1373,12 +1373,12 @@
 
     if(tc->IsInputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcTrianglesToPrimitives : within BeginInput/"
-	    "EndInput\n");)
-	return tc->Error = ACTC_DURING_INPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcTrianglesToPrimitives : within BeginInput/"
+            "EndInput\n");)
+        return tc->Error = ACTC_DURING_INPUT;
     }
     if(tc->IsOutputting) {
-	ACTC_DEBUG(fprintf(stderr, "actcTrianglesToPrimitives : within"
-	    "BeginOutput/EndOutput\n");)
-	return tc->Error = ACTC_DURING_OUTPUT;
+        ACTC_DEBUG(fprintf(stderr, "actcTrianglesToPrimitives : within"
+            "BeginOutput/EndOutput\n");)
+        return tc->Error = ACTC_DURING_OUTPUT;
     }
     curTriangle = 0;
@@ -1392,49 +1392,49 @@
     trisSoFar = 0;
     while(curTriangle < triangleCount) {
-	r = actcAddTriangle(tc, triangles[curTriangle][0],
-	    triangles[curTriangle][1], triangles[curTriangle][2]);
-	trisSoFar++;
-	curTriangle++;
-	if((trisSoFar >= maxBatchSize) ||
-	    (r == ACTC_ALLOC_FAILED && curTriangle != triangleCount) ||
-	    (r == ACTC_NO_ERROR && curTriangle == triangleCount)) {
-
-	    /* drain what we got */
-	    trisSoFar = 0;
-	    ACTC_CHECK(actcEndInput(tc));
-	    ACTC_CHECK(actcBeginOutput(tc));
-	    lastPrim = curPrimitive;
-	    while((prim = actcStartNextPrim(tc, &v1, &v2)) != ACTC_DATABASE_EMPTY) {
-		ACTC_CHECK(prim);
-		primTypes[curPrimitive] = prim;
-		primLengths[curPrimitive] = 2;
-		vertices[curVertex++] = v1;
-		vertices[curVertex++] = v2;
-		while((r = actcGetNextVert(tc, &v3)) != ACTC_PRIM_COMPLETE) {
-		    ACTC_CHECK(r);
-		    vertices[curVertex++] = v3;
-		    primLengths[curPrimitive]++;
-		}
-		curPrimitive++;
-	    }
-	    ACTC_CHECK(actcEndOutput(tc));
-	    if(r == ACTC_ALLOC_FAILED && curPrimitive == lastPrim) {
-	        if(passesWithoutPrims == 0) {
-		    /* not enough memory to add a triangle and */
-		    /* nothing in the database, better free everything */
-		    /* and try again */
-		    actcMakeEmpty(tc);
-		} else {
-		    /* cleaned up and STILL couldn't get a triangle in; */
-		    /* give up */
-		    return tc->Error = ACTC_ALLOC_FAILED;
-		}
-		passesWithoutPrims++;
-	    }
-	    ACTC_CHECK(actcBeginInput(tc));
-	} else
-	    ACTC_CHECK(r);
-	if(r == ACTC_ALLOC_FAILED)
-	    curTriangle--;
+        r = actcAddTriangle(tc, triangles[curTriangle][0],
+            triangles[curTriangle][1], triangles[curTriangle][2]);
+        trisSoFar++;
+        curTriangle++;
+        if((trisSoFar >= maxBatchSize) ||
+            (r == ACTC_ALLOC_FAILED && curTriangle != triangleCount) ||
+            (r == ACTC_NO_ERROR && curTriangle == triangleCount)) {
+
+            /* drain what we got */
+            trisSoFar = 0;
+            ACTC_CHECK(actcEndInput(tc));
+            ACTC_CHECK(actcBeginOutput(tc));
+            lastPrim = curPrimitive;
+            while((prim = actcStartNextPrim(tc, &v1, &v2)) != ACTC_DATABASE_EMPTY) {
+                ACTC_CHECK(prim);
+                primTypes[curPrimitive] = prim;
+                primLengths[curPrimitive] = 2;
+                vertices[curVertex++] = v1;
+                vertices[curVertex++] = v2;
+                while((r = actcGetNextVert(tc, &v3)) != ACTC_PRIM_COMPLETE) {
+                    ACTC_CHECK(r);
+                    vertices[curVertex++] = v3;
+                    primLengths[curPrimitive]++;
+                }
+                curPrimitive++;
+            }
+            ACTC_CHECK(actcEndOutput(tc));
+            if(r == ACTC_ALLOC_FAILED && curPrimitive == lastPrim) {
+                if(passesWithoutPrims == 0) {
+                    /* not enough memory to add a triangle and */
+                    /* nothing in the database, better free everything */
+                    /* and try again */
+                    actcMakeEmpty(tc);
+                } else {
+                    /* cleaned up and STILL couldn't get a triangle in; */
+                    /* give up */
+                    return tc->Error = ACTC_ALLOC_FAILED;
+                }
+                passesWithoutPrims++;
+            }
+            ACTC_CHECK(actcBeginInput(tc));
+        } else
+            ACTC_CHECK(r);
+        if(r == ACTC_ALLOC_FAILED)
+            curTriangle--;
     }
     ACTC_CHECK(actcEndInput(tc));
