Re-style fdlibm to conform to jerry guidelines

* First re-style was done automatically by indent to minimize the
  chance of errors during rewrite.

* Manual changes were applied to non-critical places only (comments
  and spaces):
  * Replaced all tabs with spaces.
  * Fixed tab stops in formulae in function comments.
    (Note: ASCII art for math formulae (especially for super- and
    subscripts) is a terrible idea.)
  * Unified the style of function comments.
  * Moved some in-code comments to their right places, which indent
    couldn't handle.
  * Added spaces to formulae of in-code comments to make them more
    readable.
  * Added braces mandated by jerry style guidelines.
  * Added parentheses to multiline #ifdef.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2016-03-17 10:42:00 +01:00
parent b39474c746
commit 8dd5186a0d
19 changed files with 2726 additions and 1887 deletions
+18 -18
View File
@@ -13,43 +13,43 @@
/* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly
but these catch some common cases. */
#if defined(i386) || defined(__i386) || defined(__i386__) || \
defined(i486) || defined(__i486) || defined(__i486__) || \
defined(intel) || defined(x86) || defined(i86pc) || \
defined(__alpha) || defined(__osf__) || \
defined(__x86_64__) || defined(__arm__)
#if (defined (i386) || defined (__i386) || defined (__i386__) || \
defined (i486) || defined (__i486) || defined (__i486__) || \
defined (intel) || defined (x86) || defined (i86pc) || \
defined (__alpha) || defined (__osf__) || \
defined (__x86_64__) || defined (__arm__))
#define __LITTLE_ENDIAN
#endif
#ifdef __LITTLE_ENDIAN
#define __HI(x) *(1+(int*)&x)
#define __LO(x) *(int*)&x
#define __HI(x) *(1 + (int *) &x)
#define __LO(x) *(int *) &x
#else
#define __HI(x) *(int*)&x
#define __LO(x) *(1+(int*)&x)
#define __HI(x) *(int *) &x
#define __LO(x) *(1 + (int *) &x)
#endif
/*
* ANSI/POSIX
*/
#define MAXFLOAT ((float)3.40282346638528860e+38)
#define MAXFLOAT ((float) 3.40282346638528860e+38)
#define HUGE MAXFLOAT
#define HUGE MAXFLOAT
/*
* set X_TLOSS = pi*2**52, which is possibly defined in <values.h>
* (one may replace the following line by "#include <values.h>")
*/
#define X_TLOSS 1.41484755040568800000e+16
#define X_TLOSS 1.41484755040568800000e+16
#define DOMAIN 1
#define SING 2
#define OVERFLOW 3
#define UNDERFLOW 4
#define TLOSS 5
#define PLOSS 6
#define DOMAIN 1
#define SING 2
#define OVERFLOW 3
#define UNDERFLOW 4
#define TLOSS 5
#define PLOSS 6
/*
* ANSI/POSIX