#include <stdlib.h>
#include <memory.h>
#include <math.h>
+#include "../../config.h"
#include "../q.h"
+#include "../types.h"
#include "active.h"
actlist_t* actlist_new()
}
lastx = x;
}
- fprintf(stderr, "[%d]", s->nr);
+ fprintf(stderr, "[%d]", (int)s->nr);
s = s->right;
if(s) fprintf(stderr, " ");
else fprintf(stderr, " y=%d\n", y);
actlist_dump(a, p1.y);
segment_t*s = a->list;
while(s) {
- fprintf(stderr, "[%d] %f/%f (%d,%d) -> (%d,%d)\n", s->nr,
+ fprintf(stderr, "[%d] %f/%f (%d,%d) -> (%d,%d)\n", SEGNR(s),
single_cmp(s,p1), cmp(s,p1,p2),
s->a.x, s->a.y, s->b.x, s->b.y);
s = s->right;
} else if(!a->root->rightchild) {
a->root = a->root->leftchild;
} else {
+#ifdef HAVE_LRAND48
if(lrand48()&1) {
+#else
+ if(((ptroff_t)s)&16) {
+#endif
// free up root->left->right
segment_t*t = a->root->leftchild;
while(t->rightchild) {