[GRASS-SVN] r46676 - grass/branches/develbranch_6/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 13 08:08:13 EDT 2011


Author: mmetz
Date: 2011-06-13 05:08:13 -0700 (Mon, 13 Jun 2011)
New Revision: 46676

Modified:
   grass/branches/develbranch_6/lib/vector/Vlib/Makefile
   grass/branches/develbranch_6/lib/vector/Vlib/dbcolumns.c
   grass/branches/develbranch_6/lib/vector/Vlib/dgraph.c
Log:
Vlib: port minor changes from 6.4

Modified: grass/branches/develbranch_6/lib/vector/Vlib/Makefile
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/Makefile	2011-06-13 12:06:29 UTC (rev 46675)
+++ grass/branches/develbranch_6/lib/vector/Vlib/Makefile	2011-06-13 12:08:13 UTC (rev 46676)
@@ -11,7 +11,7 @@
 DEPENDENCIES =  $(ARCH_INCDIR)/Vect.h $(ARCH_INCDIR)/V_.h \
 		$(ARCH_INCDIR)/vect/dig_defines.h \
 		$(ARCH_INCDIR)/vect/dig_macros.h $(ARCH_INCDIR)/vect/dig_structs.h \
-               	$(ARCH_INCDIR)/vect/dig_externs.h $(ARCH_INCDIR)/vect/dig_globs.h $(GISDEP)
+		$(ARCH_INCDIR)/vect/dig_externs.h $(ARCH_INCDIR)/vect/dig_globs.h $(GISDEP)
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 

Modified: grass/branches/develbranch_6/lib/vector/Vlib/dbcolumns.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/dbcolumns.c	2011-06-13 12:06:29 UTC (rev 46675)
+++ grass/branches/develbranch_6/lib/vector/Vlib/dbcolumns.c	2011-06-13 12:08:13 UTC (rev 46676)
@@ -45,7 +45,7 @@
     dbHandle handle;
     dbString table_name;
     dbTable *table;
-    char buf[2000];
+    char buf[2000], temp_buf[2000];
 
 
     num_dblinks = Vect_get_num_dblinks(Map);
@@ -75,9 +75,11 @@
 	if (col == 0)
 	    sprintf(buf, "%s",
 		    db_get_column_name(db_get_table_column(table, col)));
-	else
-	    sprintf(buf, "%s,%s", buf,
+	else {
+	    sprintf(temp_buf, ",%s",
 		    db_get_column_name(db_get_table_column(table, col)));
+	    strcat(buf, temp_buf);
+	}
     }
     G_debug(3, "%s", buf);
 
@@ -104,7 +106,7 @@
     dbHandle handle;
     dbString table_name;
     dbTable *table;
-    char buf[2000];
+    char buf[2000], temp_buf[2000];
 
 
     num_dblinks = Vect_get_num_dblinks(Map);
@@ -135,10 +137,12 @@
 	    sprintf(buf, "%s",
 		    db_sqltype_name(db_get_column_sqltype
 				    (db_get_table_column(table, col))));
-	else
-	    sprintf(buf, "%s,%s", buf,
+	else {
+	    sprintf(temp_buf, ",%s",
 		    db_sqltype_name(db_get_column_sqltype
 				    (db_get_table_column(table, col))));
+	    strcat(buf, temp_buf);
+	}
     }
     G_debug(3, "%s", buf);
 
@@ -166,7 +170,7 @@
     dbHandle handle;
     dbString table_name;
     dbTable *table;
-    char buf[2000];
+    char buf[2000], temp_buf[2000];
 
 
     num_dblinks = Vect_get_num_dblinks(Map);
@@ -198,11 +202,13 @@
 		    db_get_column_name(db_get_table_column(table, col)),
 		    db_sqltype_name(db_get_column_sqltype
 				    (db_get_table_column(table, col))));
-	else
-	    sprintf(buf, "%s,%s(%s)", buf,
+	else {
+	    sprintf(temp_buf, ",%s(%s)",
 		    db_get_column_name(db_get_table_column(table, col)),
 		    db_sqltype_name(db_get_column_sqltype
 				    (db_get_table_column(table, col))));
+	    strcat(buf, temp_buf);
+	}
     }
     G_debug(3, "%s", buf);
 

Modified: grass/branches/develbranch_6/lib/vector/Vlib/dgraph.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/dgraph.c	2011-06-13 12:06:29 UTC (rev 46675)
+++ grass/branches/develbranch_6/lib/vector/Vlib/dgraph.c	2011-06-13 12:08:13 UTC (rev 46676)
@@ -164,8 +164,8 @@
 {
     struct intersection_point *aa, *bb;
 
-    aa = *(struct intersection_point **)a;
-    bb = *(struct intersection_point **)b;
+    aa = *((struct intersection_point **)a);
+    bb = *((struct intersection_point **)b);
 
     if (aa->x < bb->x)
 	return -1;



More information about the grass-commit mailing list