[GRASS-SVN] r38855 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 25 03:50:54 EDT 2009
Author: hamish
Date: 2009-08-25 03:50:54 -0400 (Tue, 25 Aug 2009)
New Revision: 38855
Modified:
grass/trunk/lib/gis/trim_dec.c
Log:
don't trim e+20 into e+2 (trac #720; incurs a 2.5% performance hit; merge from devbr6)
Modified: grass/trunk/lib/gis/trim_dec.c
===================================================================
--- grass/trunk/lib/gis/trim_dec.c 2009-08-25 07:47:33 UTC (rev 38854)
+++ grass/trunk/lib/gis/trim_dec.c 2009-08-25 07:50:54 UTC (rev 38855)
@@ -11,6 +11,7 @@
* \author Original author CERL
*/
+#include <string.h>
#include <grass/gis.h>
/*!
@@ -24,6 +25,10 @@
{
char *mark;
+ /* don't trim e+20 into e+2 */
+ if( strchr(buf, 'e') || strchr(buf, 'E') )
+ return 0;
+
/* find the . */
while (*buf != '.')
if (*buf++ == 0)
More information about the grass-commit
mailing list