[GRASS-SVN] r68746 - grass/trunk/raster/r.support
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 22 19:14:54 PDT 2016
Author: annakrat
Date: 2016-06-22 19:14:54 -0700 (Wed, 22 Jun 2016)
New Revision: 68746
Modified:
grass/trunk/raster/r.support/main.c
Log:
r.support: write category title, not title in history file, see #3035
Modified: grass/trunk/raster/r.support/main.c
===================================================================
--- grass/trunk/raster/r.support/main.c 2016-06-23 02:08:17 UTC (rev 68745)
+++ grass/trunk/raster/r.support/main.c 2016-06-23 02:14:54 UTC (rev 68746)
@@ -151,13 +151,8 @@
is_reclass = (Rast_is_reclass(raster->answer, "", rname, rmapset) > 0);
if (title_opt->answer) {
- strncpy(title, title_opt->answer, MAX_TITLE_LEN);
- title[MAX_TITLE_LEN - 1] = '\0'; /* strncpy doesn't null terminate oversized input */
- G_strip(title);
- G_debug(3, "map title= [%s] (%li chars)", title, strlen(title));
- Rast_read_history(raster->answer, "", &hist);
- Rast_set_history(&hist, HIST_TITLE, title);
- Rast_write_history(raster->answer, &hist);
+ Rast_put_cell_title(raster->answer, title_opt->answer);
+ G_debug(3, "map title= [%s] (%li chars)", title_opt->answer, strlen(title_opt->answer));
}
if (save_opt->answer) {
More information about the grass-commit
mailing list