[GRASS-SVN] r59770 - grass/branches/releasebranch_7_0/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 17 11:17:09 PDT 2014


Author: mmetz
Date: 2014-04-17 11:17:08 -0700 (Thu, 17 Apr 2014)
New Revision: 59770

Modified:
   grass/branches/releasebranch_7_0/lib/vector/Vlib/poly.c
Log:
Vlib: fix linkm usage

Modified: grass/branches/releasebranch_7_0/lib/vector/Vlib/poly.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/vector/Vlib/poly.c	2014-04-17 18:16:47 UTC (rev 59769)
+++ grass/branches/releasebranch_7_0/lib/vector/Vlib/poly.c	2014-04-17 18:17:08 UTC (rev 59770)
@@ -31,7 +31,7 @@
 static int comp_double(double *, double *);
 static int V__within(double, double, double);
 int Vect__intersect_line_with_poly();
-static void destroy_links(struct Slink *);
+static void destroy_links(struct link_head *, struct Slink *);
 static int Vect__divide_and_conquer(struct Slink *, const struct line_pnts *,
 				    struct link_head *, double *, double *,
 				    int);
@@ -185,6 +185,8 @@
     }
 
     /* guess we have to do it the hard way... */
+    G_debug(3, "Vect_get_point_in_poly(): divide and conquer");
+
     /* get min and max x values */
     x_max = x_min = Points->x[0];
     for (i = 0; i < Points->n_points; i++) {
@@ -215,7 +217,7 @@
     *Y = cent_y;		/* pick line segment (x_min, cent_y) - (x_max, cent_y) */
     ret = Vect__divide_and_conquer(Head, Points, Token, X, Y, 10);
 
-    destroy_links(Head);
+    destroy_links(Token, Head);
 
     if (ret < 0) {
 	G_warning("Vect_get_point_in_poly(): %s",
@@ -290,7 +292,7 @@
     return Vect__divide_and_conquer(Head, Points, Token, X, Y, --levels);
 }
 
-static void destroy_links(struct Slink *Head)
+static void destroy_links(struct link_head *Token, struct Slink *Head)
 {
     struct Slink *p, *tmp;
 
@@ -298,7 +300,7 @@
 
     while (p != NULL) {
 	tmp = p->next;
-	link_dispose((struct link_head *)Head, (VOID_T *) p);
+	link_dispose(Token, (VOID_T *) p);
 	p = tmp;
     }
 }



More information about the grass-commit mailing list