Explorar o código

vlib: consolidate debug levels (cosmetics)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65132 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=10) %!d(string=hai) anos
pai
achega
fed86e35b1

+ 1 - 1
lib/vector/Vlib/copy.c

@@ -477,7 +477,7 @@ int Vect__copy_areas(const struct Map_info *In, int field, struct Map_info *Out)
     if (nareas > 0)
         G_message(_("Exporting areas..."));
     for (area = 1; area <= nareas; area++) {
-        G_debug(3, "area = %d", area);
+        G_debug(2, "area = %d", area);
         G_percent(area, nareas, 3);
 
         /* get category */

+ 3 - 3
lib/vector/Vlib/write_ogr.c

@@ -131,7 +131,7 @@ int V1_delete_line_ogr(struct Map_info *Map, off_t offset)
     }
     
     if (offset >= ogr_info->offset.array_num) {
-	G_warning(_("Invalid offset (%d)"), offset);
+	G_warning(_("Invalid offset (%ld)"), offset);
 	return -1;
     }
     
@@ -608,13 +608,13 @@ int write_attributes(dbDriver *driver, int cat, const struct field_info *Fi,
 	value = db_get_column_value(column);
 	/* for debug only */
 	db_convert_column_value_to_string(column, &dbstring);	
-	G_debug(2, "col %d : val = %s", j,
+	G_debug(3, "col %d : val = %s", j,
 		db_get_string(&dbstring));
 	
 	sqltype = db_get_column_sqltype(column);
 	ctype = db_sqltype_to_Ctype(sqltype);
 	ogrtype = sqltype_to_ogrtype(sqltype);
-	G_debug(2, "  colctype = %d", ctype);
+	G_debug(3, "  colctype = %d", ctype);
 	
 	ogrfieldnum = OGR_F_GetFieldIndex(Ogr_feature, colname);
 	if (ogrfieldnum < 0) {

+ 3 - 3
lib/vector/Vlib/write_pg.c

@@ -277,7 +277,7 @@ off_t V2_rewrite_line_pg(struct Map_info *Map, off_t line, int type,
     }
     
     geom_data = line_to_wkb(pg_info, &points, 1, type, Map->head.with_z);
-    G_asprintf(&stmt, "UPDATE \"%s\".\"%s\" SET geom = '%s'::GEOMETRY WHERE %s_id = %d",
+    G_asprintf(&stmt, "UPDATE \"%s\".\"%s\" SET geom = '%s'::GEOMETRY WHERE %s_id = %ld",
                schema_name, table_name, geom_data, keycolumn, line);
     G_free(geom_data);
 
@@ -341,7 +341,7 @@ int V1_delete_line_pg(struct Map_info *Map, off_t offset)
 
     sprintf(stmt, "DELETE FROM %s WHERE %s = %ld",
             pg_info->table_name, pg_info->fid_column, fid);
-    G_debug(2, "SQL: %s", stmt);
+    G_debug(3, "SQL: %s", stmt);
 
     if (Vect__execute_pg(pg_info->conn, stmt) == -1) {
         G_warning(_("Unable to delete feature"));
@@ -2026,7 +2026,7 @@ char *build_insert_stmt(const struct Format_info_pg *pg_info,
                     value = db_get_column_value(column);
                     /* for debug only */
                     db_convert_column_value_to_string(column, &dbstmt);
-                    G_debug(2, "col %d : val = %s", col,
+                    G_debug(3, "col %d : val = %s", col,
                             db_get_string(&dbstmt));
 
                     sqltype = db_get_column_sqltype(column);

+ 1 - 1
lib/vector/diglib/plus_struct.c

@@ -416,7 +416,7 @@ int dig_Rd_P_isle(struct Plus_head *Plus, int n, struct gvfile * fp)
     int cnt;
     struct P_isle *ptr;
 
-    G_debug(3, "dig_Rd_P_isle()");
+    G_debug(4, "dig_Rd_P_isle()");
 
     if (0 >= dig__fread_port_P(&cnt, 1, fp))
 	return (-1);

+ 3 - 3
lib/vector/diglib/struct_alloc.c

@@ -71,7 +71,7 @@ int dig_node_alloc_line(struct P_node * node, int add)
     int num;
     char *p;
 
-    G_debug(3, "dig_node_alloc_line(): add = %d", add);
+    G_debug(5, "dig_node_alloc_line(): add = %d", add);
 
     num = node->n_lines + add;
 
@@ -242,7 +242,7 @@ int dig_alloc_isles(struct Plus_head *Plus, int add)
     int size;
     char *p;
 
-    G_debug(3, "dig_alloc_isle():");
+    G_debug(5, "dig_alloc_isle():");
     size = Plus->alloc_isles + 1 + add;
     p = G_realloc(Plus->Isle, size * sizeof(struct P_isle *));
     if (p == NULL)
@@ -470,7 +470,7 @@ int dig_isle_alloc_line(struct P_isle * isle, int add)
     int num;
     char *p;
 
-    G_debug(3, "dig_isle_alloc_line():");
+    G_debug(5, "dig_isle_alloc_line():");
     num = isle->alloc_lines + add;
 
     p = G_realloc(isle->lines, num * sizeof(plus_t));