CVSROOT: /sources/gnash
Module name: gnash
Changes by: Markus Gothe <nihilus> 07/02/12 01:18:45
Modified files:
. : ChangeLog
server/asobj : Number.cpp
Log message:
Removed use of fpclassify.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2316&r2=1.2317
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Number.cpp?cvsroot=gnash&r1=1.19&r2=1.20
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2316
retrieving revision 1.2317
diff -u -b -r1.2316 -r1.2317
--- ChangeLog 11 Feb 2007 22:19:13 -0000 1.2316
+++ ChangeLog 12 Feb 2007 01:18:45 -0000 1.2317
@@ -1,3 +1,7 @@
+2007-02-11 Deanna Phillips <deanna>
+
+ * server/asobj/Number.cpp: Removed use of fpclassify.
+
2007-02-11 Sandro Santilli <address@hidden>
* server/sprite_instance.cpp: stubbed unloadMovie ActionScript
Index: server/asobj/Number.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Number.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- server/asobj/Number.cpp 11 Feb 2007 19:24:26 -0000 1.19
+++ server/asobj/Number.cpp 12 Feb 2007 01:18:45 -0000 1.20
@@ -18,7 +18,7 @@
//
//
-/* $Id: Number.cpp,v 1.19 2007/02/11 19:24:26 nihilus Exp $ */
+/* $Id: Number.cpp,v 1.20 2007/02/12 01:18:45 nihilus Exp $ */
// Implementation of ActionScript Number class.
@@ -33,19 +33,6 @@
#include <sstream>
#include <cmath>
-/* C99: 7.12 6 defines for floating point classification */
-
-#undef FP_ZERO
-#undef FP_SUBNORMAL
-#undef FP_NORMAL
-#undef FP_INFINITE
-#undef FP_NAN
-#define FP_ZERO 1
-#define FP_SUBNORMAL 2
-#define FP_NORMAL 4
-#define FP_INFINITE 8
-#define FP_NAN 16
-
using namespace std;
namespace gnash {
@@ -197,15 +184,11 @@
// Handle non-numeric values.
// "printf" gives "nan", "inf", "-inf", so we check explicitly
- switch (fpclassify(_val)) {
- case FP_NAN:
+ if(isnan(_val))
strcpy(_str, "NaN");
- break;
- case FP_INFINITE:
- // isinf() cannot be relied on to distinguish -Infinity
+ else if(isinf(_val))
strcpy(_str, _val < 0 ? "-Infinity" : "Infinity");
- break;
- default: // FP_ZERO, FP_NORMAL and FP_SUBNORMAL
+ else{ // FP_ZERO, FP_NORMAL and FP_SUBNORMAL
if (fabs(_val) < 0.0001 &&
fabs(_val) >= 0.00001) {
// This is the range for which %.15g gives scientific
_______________________________________________
Gnash-commit mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnash-commit