Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/bin
Modified Files:
edje_cc_parse.c
Log Message:
switched to floating-point math. yell if you think this causes trouble.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc_parse.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- edje_cc_parse.c 15 Dec 2004 17:58:10 -0000 1.32
+++ edje_cc_parse.c 22 Dec 2004 14:41:12 -0000 1.33
@@ -148,18 +148,18 @@
perform_math (char *input)
{
char buf[256];
- int res;
+ double res;
/* FIXME
- * This is a bad hack, we're just assuming that the user wants to
- * use fixed point arithmetic here :O
+ * Always apply floating-point arithmetic.
+ * Does this cause problems for integer parameters?
*
* What we should do is, loop over the string and figure out whether
* there are floating point operands, too and then switch to
* floating point math.
*/
- res = my_atoi (input);
- snprintf (buf, sizeof (buf), "%i", res);
+ res = my_atof (input);
+ snprintf (buf, sizeof (buf), "%lf", res);
return strdup (buf);
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs