[GRASS-SVN] r29495 - grass/branches/releasebranch_6_3/raster/r.cats

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 21 18:48:56 EST 2007


Author: hamish
Date: 2007-12-21 18:48:55 -0500 (Fri, 21 Dec 2007)
New Revision: 29495

Modified:
   grass/branches/releasebranch_6_3/raster/r.cats/main.c
Log:
fix label output (Gforge bug # 567)  [merge from trunk]


Modified: grass/branches/releasebranch_6_3/raster/r.cats/main.c
===================================================================
--- grass/branches/releasebranch_6_3/raster/r.cats/main.c	2007-12-21 23:35:58 UTC (rev 29494)
+++ grass/branches/releasebranch_6_3/raster/r.cats/main.c	2007-12-21 23:48:55 UTC (rev 29495)
@@ -36,7 +36,6 @@
     RASTER_MAP_TYPE map_type;
     int i;
     int from_stdin = FALSE;
-    struct Categories cats;
     struct GModule *module;
 
     struct
@@ -234,9 +233,13 @@
 
 	G_free_cats(&cats);
 	exit(EXIT_SUCCESS);
-     }
+    }
+    else {
+	if (G_read_cats(name, mapset, &cats) < 0)
+	    G_fatal_error(_("Unable to read category file of raster map <%s> in <%s>"),
+			     name, mapset);
+    }
 
-
     /* describe the category labels */
     /* if no cats requested, use r.describe to get the cats */
     if (parm.cats->answer == NULL) {



More information about the grass-commit mailing list