X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxpoly%2Factive.c;h=b7231855415613a2167823e1259ac37b068853e6;hb=2c719855eac434f01d47ba0717d76de65939d74e;hp=e9270e47951196251f2b639dbdfa989da63e4b6f;hpb=ae2bbf404cbdf63152d22f1b0824468d04f8f8ce;p=swftools.git diff --git a/lib/gfxpoly/active.c b/lib/gfxpoly/active.c index e9270e4..b723185 100644 --- a/lib/gfxpoly/active.c +++ b/lib/gfxpoly/active.c @@ -1,7 +1,9 @@ #include #include #include +#include "../../config.h" #include "../q.h" +#include "../types.h" #include "active.h" actlist_t* actlist_new() @@ -375,7 +377,7 @@ static void move_to_root(actlist_t*a, segment_t*s) } } -static int actlist_splay(actlist_t*a, point_t p1, point_t p2) +static void actlist_splay(actlist_t*a, point_t p1, point_t p2) { if(!a->list) return; @@ -503,7 +505,11 @@ void actlist_delete(actlist_t*a, segment_t*s) } 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) {