[GRASSLIST:785] Re: mixing old and new sites formats
H Bowman
hamish_nospam at yahoo.com
Tue Jul 22 06:43:29 EDT 2003
> Now interpolations go well, but then d.site.labels refuses to
> display labels unless site atribute is defined as double
just a note on 'double's in d.site.labels. I've yet to add it as an
option that controls number of sig. figs.; but you can get rid of the
".000000" after each should-be-integer value with the following patch to
src/display/d.site.labels/do_labels.c
==========================================================
--- do_labels.c Fri Apr 26 15:12:25 2002
+++ do_labels2.c Tue Jul 22 22:38:54 2003
@@ -82,7 +82,7 @@
G_fatal_error("No double attributes!\n");
if (theSite->dbl_alloc <= index)
G_fatal_error("Double index out of range!\n");
- sprintf(theText, "%lf", theSite->dbl_att[index]);
+ sprintf(theText, "%.0lf", theSite->dbl_att[index]);
break;
case SITE_ATTR_COORD:
*ptr = '(';
==========================================================
Hamish
More information about the grass-user
mailing list