[GRASS-dev] d.legend: -2147483648 -> null?

Markus Neteler neteler at osgeo.org
Wed Aug 20 05:36:19 EDT 2008


Hi,

using d.rast.leg (d.legend) on a NO DATA integer map, it prints "-2147483648"
instead of null.

Below dirty hack cures the problem - how to do it correctly?

[neteler at markus d.legend]$ svn diff
Index: main.c
===================================================================
--- main.c      (revision 32903)
+++ main.c      (working copy)
@@ -867,6 +867,7 @@
                    else
                        sprintf(buff, DispFormat,
                                (int)catlist[catlistCount - i - 1]);
+                   if (G_strcasecmp(buff, "-2147483648") == 0)
sprintf(buff, "null");
                    if (!hide_catstr)   /* both */
                        strcat(buff, ")");
                }

thanks
Markus


More information about the grass-dev mailing list