[GRASS-SVN] r57357 - grass/branches/develbranch_6/display/d.colors
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Aug 2 01:16:37 PDT 2013
Author: hamish
Date: 2013-08-02 01:16:37 -0700 (Fri, 02 Aug 2013)
New Revision: 57357
Modified:
grass/branches/develbranch_6/display/d.colors/get_info.c
Log:
avoid 'format not a string literal and no format arguments' warnings
Modified: grass/branches/develbranch_6/display/d.colors/get_info.c
===================================================================
--- grass/branches/develbranch_6/display/d.colors/get_info.c 2013-08-02 08:02:09 UTC (rev 57356)
+++ grass/branches/develbranch_6/display/d.colors/get_info.c 2013-08-02 08:16:37 UTC (rev 57357)
@@ -4,13 +4,13 @@
#include <grass/display.h>
#include <grass/raster.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);
@@ -18,16 +18,12 @@
exit(0);
/* Reading color lookup table */
- if (G_read_cats(name, mapset, &categories) == -1) {
- sprintf(buff, "category file for [%s] not available", name);
- G_fatal_error(buff);
- }
+ if (G_read_cats(name, mapset, &categories) == -1)
+ G_fatal_error(_("Error reading category file for <%s>"), name);
/* Reading color lookup table */
- if (G_read_colors(name, mapset, &colors) == -1) {
- sprintf(buff, "color file for [%s] not available", name);
- G_fatal_error(buff);
- }
+ if (G_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