浏览代码

avoid debug level 0 -- G_debug(0, ...)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54198 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父节点
当前提交
3d05792b0a

+ 1 - 1
display/d.vect/label.c

@@ -61,7 +61,7 @@ int display_label(struct Map_info *Map, int type,
 	list = Vect_new_boxlist(FALSE); /* bboxes not needed */
 	Vect_get_constraint_box(Map, &box);
 	nlines = Vect_select_lines_by_box(Map, &box, GV_CENTROID, list);
-	G_debug(0, "ncentroids (ogr) = %d", nlines);
+	G_debug(3, "ncentroids (ogr) = %d", nlines);
 	
 	for (line = 0; line < nlines; line++) {
 	    ltype = Vect_read_line(Map, Points, Cats, list->id[line]);

+ 1 - 1
lib/gis/token.c

@@ -34,7 +34,7 @@ static char **tokenize(const char *, const char *, const char *);
   tokens = G_tokenize(buf, " |:,");
   ntok = G_number_of_tokens(tokens);
   for (i=0; i < ntok; i++) {
-     G_debug(0, "%d=[%s]", i, tokens[i]);
+     G_debug(1, "%d=[%s]", i, tokens[i]);
   }
   G_free_tokens(tokens);
   \endcode

+ 2 - 3
lib/temporal/lib/default_name.c

@@ -60,8 +60,7 @@ int tgis_set_default_connection(void)
 {
     dbConnection connection;
 
-    G_debug(0,
-	    "Creating new default TGIS DB params with tgis_set_default_connection()");
+    G_verbose_message(_("Creating new default TGIS DB params"));
 
     if (strcmp(TGISDB_DEFAULT_DRIVER, "sqlite") == 0) {
 
@@ -71,7 +70,7 @@ int tgis_set_default_connection(void)
 	tgis_set_connection(&connection);
     }
     else
-	G_fatal_error(_("Programmer error"));
+	G_fatal_error(_("Programmer error - only SQLite driver is currently supported"));
 
     return DB_OK;
 }

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

@@ -254,7 +254,7 @@ struct seg_intersections *find_all_intersections(const struct line_pnts *Points)
 					&x2, &y2);
 	    /*            res2 = segment_intersection_2d_e(x[i], y[i], x[i+1], y[i+1], x[j], y[j], x[j+1], y[j+1], &x1_, &y1_, &x2_, &y2_);
 	       if ((res != res2) || ((res != 0) && (x1!=x1_ || y1!=y1_)) ) {
-	       G_debug(0, "exact=%d orig=%d", res, res2);
+	       G_debug(1, "exact=%d orig=%d", res, res2);
 	       segment_intersection_2d_test(x[i], y[i], x[i+1], y[i+1], x[j], y[j], x[j+1], y[j+1], &x1, &y1, &x2, &y2);
 	       }
 	     */

+ 2 - 2
raster3d/r3.in.ascii/main.c

@@ -273,8 +273,8 @@ asciiToG3d(FILE * fp, RASTER3D_Region * region, int convertNull, char *nullValue
                     Rast3d_set_null_value(&value, 1, DCELL_TYPE);
                 } else {
                     if (sscanf(buff, "%lf", &value) != 1) {
-                        G_warning(_("Invalid value detected."));
-                        G_debug(0, "invalid value at col=%d row=%d depth=%d last_value=[%s]",
+                        G_warning(_("Invalid value detected"));
+                        G_debug(1, "invalid value at col=%d row=%d depth=%d last_value=[%s]",
                                 x + 1, y + 1, z + 1, buff);
                         fatalError("asciiToG3d: read failed");
                     }

+ 2 - 2
vector/v.lidar.growing/ConvexHull.c

@@ -264,8 +264,8 @@ struct element_grow **P_alloc_element(int rows, int cols)
 void nrerror(char error_text[])
 /* standard error handler */
 {
-    G_debug(0, "run-time error...");
-    G_debug(0, "%s", error_text);
+    G_debug(1, "run-time error...");
+    G_debug(1, "%s", error_text);
     G_fatal_error(_("...now exiting to system..."));
     exit(EXIT_FAILURE);
 }

+ 2 - 2
vector/v.lrs/v.lrs.label/main.c

@@ -319,7 +319,7 @@ int main(int argc, char **argv)
     nlines = Vect_get_num_lines(&In);
     /* for ( line = 19; line <= 19; line++ ) { */
     for (line = 1; line <= nlines; line++) {
-	G_debug(0, "  line = %d / %d", line, nlines);
+	G_debug(3, "  line = %d / %d", line, nlines);
 	type = Vect_read_line(&In, LPoints, LCats, line);
 	if (!(type & GV_LINE))
 	    continue;
@@ -391,7 +391,7 @@ int main(int argc, char **argv)
 	    nrseg++;
 	}
 
-	G_debug(0, "    %d reference segments selected", nrseg);
+	G_debug(3, "    %d reference segments selected", nrseg);
 	if (nrseg == 0)
 	    continue;
 

+ 1 - 5
vector/v.perturb/myrng.c

@@ -25,10 +25,6 @@ int myrng(double *numbers, int n,
 	/* is this how to do transformation? */
 	for (i = 0; i < n; ++i)
 	    numbers[i] *= p2, numbers[i] += p1;
-
-    /*
-       for(i=0;i<n;++i)
-       G_debug(0,"%g",numbers[i]);
-     */
+    
     return 0;
 }