[GRASS-SVN] r38100 - in grass/trunk: imagery/i.gensig imagery/i.gensigset lib/raster raster/r.cross raster/r.in.poly raster/r.reclass raster/r.stats raster/r.support raster/r.support.stats

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 27 13:49:33 EDT 2009


Author: martinl
Date: 2009-06-27 13:49:32 -0400 (Sat, 27 Jun 2009)
New Revision: 38100

Modified:
   grass/trunk/imagery/i.gensig/labels.c
   grass/trunk/imagery/i.gensigset/labels.c
   grass/trunk/lib/raster/closecell.c
   grass/trunk/raster/r.cross/main.c
   grass/trunk/raster/r.in.poly/poly2rast.c
   grass/trunk/raster/r.reclass/main.c
   grass/trunk/raster/r.stats/main.c
   grass/trunk/raster/r.support.stats/check.c
   grass/trunk/raster/r.support/check.c
   grass/trunk/raster/r.support/main.c
Log:
fix Rast_init_cats


Modified: grass/trunk/imagery/i.gensig/labels.c
===================================================================
--- grass/trunk/imagery/i.gensig/labels.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/imagery/i.gensig/labels.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -11,5 +11,5 @@
     map = parms->training_map;
     mapset = G_find_cell2(map, "");
     if (Rast_read_cats(map, mapset, &files->training_labels) < 0)
-	Rast_init_cats((CELL) 0, "", &files->training_labels);
+	Rast_init_cats("", &files->training_labels);
 }

Modified: grass/trunk/imagery/i.gensigset/labels.c
===================================================================
--- grass/trunk/imagery/i.gensigset/labels.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/imagery/i.gensigset/labels.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -12,5 +12,5 @@
     map = parms->training_map;
     mapset = G_find_cell2(map, "");
     if (Rast_read_cats(map, mapset, &files->training_labels) < 0)
-	Rast_init_cats((CELL) 0, "", &files->training_labels);
+	Rast_init_cats("", &files->training_labels);
 }

Modified: grass/trunk/lib/raster/closecell.c
===================================================================
--- grass/trunk/lib/raster/closecell.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/lib/raster/closecell.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -211,7 +211,7 @@
     Rast_get_range_min_max(&fcb->range, &cell_min, &cell_max);
     if (Rast_is_c_null_value(&cell_max))
 	cell_max = 0;
-    Rast_init_cats(cell_max, (char *)NULL, &cats);
+    Rast_init_cats((char *)NULL, &cats);
     Rast_write_cats(fcb->name, &cats);
     Rast_free_cats(&cats);
 

Modified: grass/trunk/raster/r.cross/main.c
===================================================================
--- grass/trunk/raster/r.cross/main.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/raster/r.cross/main.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -136,7 +136,7 @@
     }
     strcat(buf, " and ");
     strcat(buf, names[i]);
-    Rast_init_cats((CELL) 0, buf, &pcats);
+    Rast_init_cats(buf, &pcats);
 
     /* first step is cross product, but un-ordered */
     result = cross(fd, non_zero, primary, outfd);

Modified: grass/trunk/raster/r.in.poly/poly2rast.c
===================================================================
--- grass/trunk/raster/r.in.poly/poly2rast.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/raster/r.in.poly/poly2rast.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -40,7 +40,7 @@
 	title = "";
     G_strip(title);
 
-    Rast_init_cats((CELL) 0, title, &labels);
+    Rast_init_cats(title, &labels);
 
     format = getformat(ifd);
     npasses = begin_rasterization(nrows, format);

Modified: grass/trunk/raster/r.reclass/main.c
===================================================================
--- grass/trunk/raster/r.reclass/main.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/raster/r.reclass/main.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -92,7 +92,7 @@
     }
     tty = isatty(fileno(srcfp));
 
-    Rast_init_cats(0, "", &cats);
+    Rast_init_cats("", &cats);
     fp = Rast_raster_map_is_fp(parm.input->answer, old_mapset);
     Rast_read_fp_range(parm.input->answer, old_mapset, &range);
     Rast_get_fp_range_min_max(&range, &min, &max);

Modified: grass/trunk/raster/r.stats/main.c
===================================================================
--- grass/trunk/raster/r.stats/main.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/raster/r.stats/main.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -286,7 +286,7 @@
 	    labels = (struct Categories *)
 		G_realloc(labels, (nfiles + 1) * sizeof(struct Categories));
 	    if (Rast_read_cats(name, "", &labels[nfiles]) < 0)
-		Rast_init_cats((CELL) 0, "", &labels[nfiles]);
+		Rast_init_cats("", &labels[nfiles]);
 	}
 	if (is_fp[nfiles])
 	    /* floating point map */

Modified: grass/trunk/raster/r.support/check.c
===================================================================
--- grass/trunk/raster/r.support/check.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/raster/r.support/check.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -58,7 +58,7 @@
 
     /* Further category checks */
     if (!cats_ok)
-	Rast_init_cats(max, "", &cats);
+	Rast_init_cats("", &cats);
     else if (cats.num != max) {
 	cats.num = max;
 	cats_ok = 0;

Modified: grass/trunk/raster/r.support/main.c
===================================================================
--- grass/trunk/raster/r.support/main.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/raster/r.support/main.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -284,7 +284,7 @@
 
 	if ((fd = Rast_open_cell_old(infile, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), infile);
-	Rast_init_cats((CELL) 0, "", &cats);
+	Rast_init_cats("", &cats);
 	if (Rast_read_cats(map_opt->answer, "", &cats) < 0)
 	    G_fatal_error(_("Unable to read category file of raster map <%s>"),
 			  map_opt->answer);

Modified: grass/trunk/raster/r.support.stats/check.c
===================================================================
--- grass/trunk/raster/r.support.stats/check.c	2009-06-27 16:25:06 UTC (rev 38099)
+++ grass/trunk/raster/r.support.stats/check.c	2009-06-27 17:49:32 UTC (rev 38100)
@@ -77,7 +77,7 @@
 
     /* Further category checks */
     if (!cats_ok)
-	Rast_init_cats(max, "", &cats);
+	Rast_init_cats("", &cats);
     else if (cats.num != max) {
 	cats.num = max;
 	cats_ok = 0;



More information about the grass-commit mailing list