[GRASS-SVN] r57358 - grass/trunk/display/d.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 2 01:17:01 PDT 2013


Author: hamish
Date: 2013-08-02 01:17:00 -0700 (Fri, 02 Aug 2013)
New Revision: 57358

Modified:
   grass/trunk/display/d.colors/get_info.c
Log:
avoid 'format not a string literal and no format arguments' warnings (merge from devbr6)

Modified: grass/trunk/display/d.colors/get_info.c
===================================================================
--- grass/trunk/display/d.colors/get_info.c	2013-08-02 08:16:37 UTC (rev 57357)
+++ grass/trunk/display/d.colors/get_info.c	2013-08-02 08:17:00 UTC (rev 57358)
@@ -3,13 +3,13 @@
 #include <grass/gis.h>
 #include <grass/display.h>
 #include <grass/colors.h>
+#include <grass/glocale.h>
 #include "colors.h"
 
 int get_map_info(char *name, char *mapset)
 {
     struct Colors colors;
     struct Categories categories;
-    char buff[128];
 
     if (!name)
 	exit(0);
@@ -17,16 +17,12 @@
 	exit(0);
 
     /* Reading color lookup table */
-    if (Rast_read_cats(name, mapset, &categories) == -1) {
-	sprintf(buff, "category file for [%s] not available", name);
-	G_fatal_error(buff);
-    }
+    if (Rast_read_cats(name, mapset, &categories) == -1)
+	G_fatal_error(_("Error reading category file for <%s>"), name);
 
     /* Reading color lookup table */
-    if (Rast_read_colors(name, mapset, &colors) == -1) {
-	sprintf(buff, "color file for [%s] not available", name);
-	G_fatal_error(buff);
-    }
+    if (Rast_read_colors(name, mapset, &colors) == -1)
+	G_fatal_error(_("Unable to read color table for raster map <%s>"), name);
 
     interact(&categories, &colors, name, mapset);
 



More information about the grass-commit mailing list