diff options
author | Michele Calgaro <[email protected]> | 2020-12-19 22:55:58 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-12-19 22:56:21 +0900 |
commit | df2eb7afd1783a8750b8034890ff7a9e6abb7388 (patch) | |
tree | 7d8f360841f6830f0265b94f37a876c7ec0576f9 /kjs | |
parent | 083dbd6407c433a7ff2b4880836d919a84b2cea9 (diff) | |
download | tdelibs-df2eb7afd1783a8750b8034890ff7a9e6abb7388.tar.gz tdelibs-df2eb7afd1783a8750b8034890ff7a9e6abb7388.zip |
Fixed some uncrustify's code formatting offending files.
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit 491e1c72c7e2a19b58772fd285284e974d489501)
Diffstat (limited to 'kjs')
-rw-r--r-- | kjs/dtoa.cpp | 6 | ||||
-rw-r--r-- | kjs/grammar.cpp | 2 | ||||
-rw-r--r-- | kjs/value.cpp | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/kjs/dtoa.cpp b/kjs/dtoa.cpp index c39fa5bc6..8fc79ddf7 100644 --- a/kjs/dtoa.cpp +++ b/kjs/dtoa.cpp @@ -2077,7 +2077,7 @@ strtod else if (!(word0(rv) & Bndry_mask) && !word1(rv)) { drop_down: /* boundary case -- decrement exponent */ -#ifdef Sudden_Underflow /*{{*/ +#ifdef Sudden_Underflow L = word0(rv) & Exp_mask; #ifdef IBM if (L < Exp_msk1) @@ -2086,8 +2086,8 @@ strtod if (L <= (scale ? (2*P+1)*Exp_msk1 : Exp_msk1)) #else if (L <= Exp_msk1) -#endif /*Avoid_Underflow*/ -#endif /*IBM*/ +#endif +#endif goto undfl; L -= Exp_msk1; #else /*Sudden_Underflow}{*/ diff --git a/kjs/grammar.cpp b/kjs/grammar.cpp index 03eb07876..9cc7a342f 100644 --- a/kjs/grammar.cpp +++ b/kjs/grammar.cpp @@ -1340,7 +1340,9 @@ while (0) # define YYDPRINTF(Args) \ do { \ if (yydebug) \ + { \ YYFPRINTF Args; \ + } \ } while (0) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ diff --git a/kjs/value.cpp b/kjs/value.cpp index bbf5a05c1..d5a7a9731 100644 --- a/kjs/value.cpp +++ b/kjs/value.cpp @@ -361,11 +361,12 @@ Number::Number(int i) Number::Number(unsigned int u) : Value(SimpleNumber::fits(u) ? SimpleNumber::make(u) : new NumberImp(static_cast<double>(u))) { } -Number::Number(double d) +// check for NaN first if we werent't compiled with -mieee on Alpha #if defined(__alpha) && !defined(_IEEE_FP) - // check for NaN first if we werent't compiled with -mieee on Alpha +Number::Number(double d) : Value(KJS::isNaN(d) ? NumberImp::staticNaN : (SimpleNumber::fits(d) ? SimpleNumber::make((long)d) : new NumberImp(d))) { } #else +Number::Number(double d) : Value(SimpleNumber::fits(d) ? SimpleNumber::make((long)d) : (KJS::isNaN(d) ? NumberImp::staticNaN : new NumberImp(d))) { } #endif |