fixed drawlink() ruby callback
[swftools.git] / lib / gfxpoly / active.c
index e9270e4..b723185 100644 (file)
@@ -1,7 +1,9 @@
 #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()
@@ -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) {