ref(v);
he->ystar = v->coord.y + offset;
last = &PQhash[PQbucket(he)];
- while ((next = last->PQnext) != (struct Halfedge *) NULL &&
+ while ((next = last->PQnext) != NULL &&
(he->ystar > next->ystar ||
(he->ystar == next->ystar
&& v->coord.x > next->vertex->coord.x))) {
{
Halfedge *last;
- if (he->vertex != (Site *) NULL) {
+ if (he->vertex != NULL) {
last = &PQhash[PQbucket(he)];
while (last->PQnext != he)
last = last->PQnext;
last->PQnext = he->PQnext;
--PQcount;
deref(he->vertex);
- he->vertex = (Site *) NULL;
+ he->vertex = NULL;
}
}
{
Point answer;
- while (PQhash[PQmin].PQnext == (struct Halfedge *) NULL) {
+ while (PQhash[PQmin].PQnext == NULL) {
PQmin += 1;
}
answer.x = PQhash[PQmin].PQnext->vertex->coord.x;
if (PQhash == NULL)
PQhash = N_GNEW(PQhashsize, Halfedge);
for (i = 0; i < PQhashsize; i += 1)
- PQhash[i].PQnext = (Halfedge *) NULL;
+ PQhash[i].PQnext = NULL;
}
static void PQdumphe(Halfedge * p)
if (!PQempty())
newintstar = PQ_min();
- if (newsite != (struct Site *) NULL && (PQempty()
+ if (newsite != NULL && (PQempty()
|| newsite->coord.y <
newintstar.y
|| (newsite->coord.y ==
e = gvbisect(bot, newsite);
bisector = HEcreate(e, le);
ELinsert(lbnd, bisector);
- if ((p = hintersect(lbnd, bisector)) != (struct Site *) NULL) {
+ if ((p = hintersect(lbnd, bisector)) != NULL) {
PQdelete(lbnd);
PQinsert(lbnd, p, dist(p, newsite));
}
lbnd = bisector;
bisector = HEcreate(e, re);
ELinsert(lbnd, bisector);
- if ((p = hintersect(bisector, rbnd)) != (struct Site *) NULL)
+ if ((p = hintersect(bisector, rbnd)) != NULL)
PQinsert(bisector, p, dist(p, newsite));
newsite = (*nextsite) ();
} else if (!PQempty()) {
ELinsert(llbnd, bisector);
endpoint(e, re - pm, v);
deref(v);
- if ((p = hintersect(llbnd, bisector)) != (struct Site *) NULL) {
+ if ((p = hintersect(llbnd, bisector)) != NULL) {
PQdelete(llbnd);
PQinsert(llbnd, p, dist(p, bot));
}
- if ((p = hintersect(bisector, rrbnd)) != (struct Site *) NULL) {
+ if ((p = hintersect(bisector, rrbnd)) != NULL) {
PQinsert(bisector, p, dist(p, bot));
}
} else