Explorar o código

veditlib: osgeo4w patch applied (by jef) - trac https://trac.osgeo.org/grass/ticket/519
(merge from devbr6, https://trac.osgeo.org/grass/changeset/36222)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36224 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa %!s(int64=16) %!d(string=hai) anos
pai
achega
afa03507a3
Modificáronse 2 ficheiros con 7 adicións e 8 borrados
  1. 6 7
      lib/vector/vedit/select.c
  2. 1 1
      lib/vector/vedit/snap.c

+ 6 - 7
lib/vector/vedit/select.c

@@ -139,6 +139,12 @@ int select_by_query(struct Map_info *Map, int line, int type, double thresh,
 {
     int ltype;
     double length;
+    int i, cat_curr;
+    int node1, node2, node;	/* nodes */
+    int nnode1, nnode2;	/* number of line in node */
+    double nx, ny, nz;	/* node coordinates */
+    struct ilist *exclude, *found;	/* line id of nearest lines */
+    struct line_cats *Cats_curr;
 
     if (!Vect_line_alive(Map, line))
 	return -1;
@@ -172,13 +178,6 @@ int select_by_query(struct Map_info *Map, int line, int type, double thresh,
 	    return -1;
 	/* check if line is dangle */
 
-	int i, cat_curr;
-	int node1, node2, node;	/* nodes */
-	int nnode1, nnode2;	/* number of line in node */
-	double nx, ny, nz;	/* node coordinates */
-	struct ilist *exclude, *found;	/* line id of nearest lines */
-	struct line_cats *Cats_curr;
-
 	Vect_get_line_nodes(Map, line, &node1, &node2);
 
 	node = -1;

+ 1 - 1
lib/vector/vedit/snap.c

@@ -180,7 +180,7 @@ int Vedit_snap_lines(struct Map_info *Map, struct Map_info **BgMap,
 		     int to_vertex)
 {
     int i, line, type;
-    int nlines_modified;
+    int nlines_modified = 0;
 
     struct line_pnts *Points;
     struct line_cats *Cats;