[GRASS-SVN] r39045 - grass/branches/releasebranch_6_4/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 6 11:15:48 EDT 2009
Author: hamish
Date: 2009-09-06 11:15:47 -0400 (Sun, 06 Sep 2009)
New Revision: 39045
Modified:
grass/branches/releasebranch_6_4/lib/gis/trim_dec.c
Log:
don't trim e+20 into e+2 (trac #720; incurs a 2.5% performance hit; merge r38854 from devbr6)
Modified: grass/branches/releasebranch_6_4/lib/gis/trim_dec.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/trim_dec.c 2009-09-06 13:20:18 UTC (rev 39044)
+++ grass/branches/releasebranch_6_4/lib/gis/trim_dec.c 2009-09-06 15:15:47 UTC (rev 39045)
@@ -14,6 +14,7 @@
* \date 1999-2008
*/
+#include <string.h>
#include <grass/gis.h>
@@ -30,6 +31,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