diff options
Diffstat (limited to 'newlib/libm')
69 files changed, 127 insertions, 231 deletions
diff --git a/newlib/libm/common/s_isinf.c b/newlib/libm/common/s_isinf.c index fe18e2aba..55fd5c214 100644 --- a/newlib/libm/common/s_isinf.c +++ b/newlib/libm/common/s_isinf.c @@ -16,8 +16,7 @@ #undef isinf int -_DEFUN (isinf, (x), - double x) +isinf (double x) { __int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/newlib/libm/common/s_isinfd.c b/newlib/libm/common/s_isinfd.c index 5a2b04d4e..771ce44e4 100644 --- a/newlib/libm/common/s_isinfd.c +++ b/newlib/libm/common/s_isinfd.c @@ -9,8 +9,7 @@ #ifndef _DOUBLE_IS_32BITS int -_DEFUN (__isinfd, (x), - double x) +__isinfd (double x) { __int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/newlib/libm/common/s_isnand.c b/newlib/libm/common/s_isnand.c index 5f2c06467..31a3272c5 100644 --- a/newlib/libm/common/s_isnand.c +++ b/newlib/libm/common/s_isnand.c @@ -93,8 +93,7 @@ QUICKREF #ifndef _DOUBLE_IS_32BITS int -_DEFUN (__isnand, (x), - double x) +__isnand (double x) { __int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/newlib/libm/common/sf_isinf.c b/newlib/libm/common/sf_isinf.c index 5b57a346f..75e90c9fd 100644 --- a/newlib/libm/common/sf_isinf.c +++ b/newlib/libm/common/sf_isinf.c @@ -13,8 +13,7 @@ #undef isinff int -_DEFUN (isinff, (x), - float x) +isinff (float x) { __int32_t ix; GET_FLOAT_WORD(ix,x); @@ -27,8 +26,7 @@ _DEFUN (isinff, (x), #undef isinf int -_DEFUN (isinf, (x), - double x) +isinf (double x) { return isinff((float) x); } diff --git a/newlib/libm/common/sf_isinff.c b/newlib/libm/common/sf_isinff.c index 9d0e742e5..cd7b2cfd3 100644 --- a/newlib/libm/common/sf_isinff.c +++ b/newlib/libm/common/sf_isinff.c @@ -6,8 +6,7 @@ #include "fdlibm.h" int -_DEFUN (__isinff, (x), - float x) +__isinff (float x) { __int32_t ix; GET_FLOAT_WORD(ix,x); @@ -18,8 +17,7 @@ _DEFUN (__isinff, (x), #ifdef _DOUBLE_IS_32BITS int -_DEFUN (__isinfd, (x), - double x) +__isinfd (double x) { return __isinff((float) x); } diff --git a/newlib/libm/common/sf_isnan.c b/newlib/libm/common/sf_isnan.c index 9c813fc24..5c611d67e 100644 --- a/newlib/libm/common/sf_isnan.c +++ b/newlib/libm/common/sf_isnan.c @@ -24,8 +24,7 @@ #undef isnanf int -_DEFUN (isnanf, (x), - float x) +isnanf (float x) { __int32_t ix; GET_FLOAT_WORD(ix,x); @@ -38,8 +37,7 @@ _DEFUN (isnanf, (x), #undef isnan int -_DEFUN (isnan, (x), - double x) +isnan (double x) { return isnanf((float) x); } diff --git a/newlib/libm/common/sf_isnanf.c b/newlib/libm/common/sf_isnanf.c index 0b0d9bbaf..0831da664 100644 --- a/newlib/libm/common/sf_isnanf.c +++ b/newlib/libm/common/sf_isnanf.c @@ -16,8 +16,7 @@ #include "fdlibm.h" int -_DEFUN (__isnanf, (x), - float x) +__isnanf (float x) { __int32_t ix; GET_FLOAT_WORD(ix,x); @@ -28,8 +27,7 @@ _DEFUN (__isnanf, (x), #ifdef _DOUBLE_IS_32BITS int -_DEFUN (__isnand, (x), - double x) +__isnand (double x) { return __isnanf((float) x); } diff --git a/newlib/libm/machine/i386/f_math.h b/newlib/libm/machine/i386/f_math.h index bd44b1e92..833e5cff9 100644 --- a/newlib/libm/machine/i386/f_math.h +++ b/newlib/libm/machine/i386/f_math.h @@ -7,8 +7,7 @@ __inline__ static int -_DEFUN (check_finite, (x), - double x) +check_finite (double x) { __int32_t hx; GET_HIGH_WORD(hx,x); @@ -18,8 +17,7 @@ _DEFUN (check_finite, (x), __inline__ static int -_DEFUN (check_finitef, (x), - float x) +check_finitef (float x) { __int32_t ix; GET_FLOAT_WORD(ix,x); diff --git a/newlib/libm/mathfp/s_acos.c b/newlib/libm/mathfp/s_acos.c index d66a5cd26..d0318e1c7 100644 --- a/newlib/libm/mathfp/s_acos.c +++ b/newlib/libm/mathfp/s_acos.c @@ -75,8 +75,7 @@ MATHREF #ifndef _DOUBLE_IS_32BITS double -_DEFUN (acos, (double), - double x) +acos (double x) { return (asine (x, 1)); } diff --git a/newlib/libm/mathfp/s_asin.c b/newlib/libm/mathfp/s_asin.c index 477bbf5cb..b20f0a3f2 100644 --- a/newlib/libm/mathfp/s_asin.c +++ b/newlib/libm/mathfp/s_asin.c @@ -20,8 +20,7 @@ #ifndef _DOUBLE_IS_32BITS double -_DEFUN (asin, (double), - double x) +asin (double x) { return (asine (x, 0)); } diff --git a/newlib/libm/mathfp/s_asine.c b/newlib/libm/mathfp/s_asine.c index 28cfaf7a6..9e9073d1f 100644 --- a/newlib/libm/mathfp/s_asine.c +++ b/newlib/libm/mathfp/s_asine.c @@ -89,8 +89,7 @@ static const double a[] = { 0.0, 0.78539816339744830962 }; static const double b[] = { 1.57079632679489661923, 0.78539816339744830962 }; double -_DEFUN (asine, (double, int), - double x, +asine (double x, int acosine) { int flag, i; diff --git a/newlib/libm/mathfp/s_atan.c b/newlib/libm/mathfp/s_atan.c index 0dd339474..53551e56e 100644 --- a/newlib/libm/mathfp/s_atan.c +++ b/newlib/libm/mathfp/s_atan.c @@ -54,8 +54,7 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS double -_DEFUN (atan, (double), - double x) +atan (double x) { switch (numtest (x)) { diff --git a/newlib/libm/mathfp/s_atan2.c b/newlib/libm/mathfp/s_atan2.c index 9f71ed9c8..395253905 100644 --- a/newlib/libm/mathfp/s_atan2.c +++ b/newlib/libm/mathfp/s_atan2.c @@ -69,8 +69,7 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS double -_DEFUN (atan2, (double, double), - double v, +atan2 (double v, double u) { return (atangent (0.0, v, u, 1)); diff --git a/newlib/libm/mathfp/s_atangent.c b/newlib/libm/mathfp/s_atangent.c index 1df39ac50..02675b522 100644 --- a/newlib/libm/mathfp/s_atangent.c +++ b/newlib/libm/mathfp/s_atangent.c @@ -85,8 +85,7 @@ static const double p[] = { -0.13688768894191926929e+2, -0.83758299368150059274 }; double -_DEFUN (atangent, (double, double, double, int), - double x, +atangent (double x, double v, double u, int arctan2) diff --git a/newlib/libm/mathfp/s_ceil.c b/newlib/libm/mathfp/s_ceil.c index c6ecbe323..29e4a059d 100644 --- a/newlib/libm/mathfp/s_ceil.c +++ b/newlib/libm/mathfp/s_ceil.c @@ -20,8 +20,7 @@ #ifndef _DOUBLE_IS_32BITS double -_DEFUN (ceil, (double), - double x) +ceil (double x) { double f, y; diff --git a/newlib/libm/mathfp/s_cos.c b/newlib/libm/mathfp/s_cos.c index 6f63a404e..7c4029f9d 100644 --- a/newlib/libm/mathfp/s_cos.c +++ b/newlib/libm/mathfp/s_cos.c @@ -20,8 +20,7 @@ #ifndef _DOUBLE_IS_32BITS double -_DEFUN (cos, (double), - double x) +cos (double x) { return (sine (x, 1)); } diff --git a/newlib/libm/mathfp/s_cosh.c b/newlib/libm/mathfp/s_cosh.c index 552e5ee5c..bfe665069 100644 --- a/newlib/libm/mathfp/s_cosh.c +++ b/newlib/libm/mathfp/s_cosh.c @@ -63,8 +63,7 @@ QUICKREF #ifndef _DOUBLE_IS_32BITS double -_DEFUN (cosh, (double), - double x) +cosh (double x) { return (sineh (x, 1)); } diff --git a/newlib/libm/mathfp/s_exp.c b/newlib/libm/mathfp/s_exp.c index 362b8b079..bb1beffd7 100644 --- a/newlib/libm/mathfp/s_exp.c +++ b/newlib/libm/mathfp/s_exp.c @@ -70,8 +70,7 @@ static const double q[] = { 0.5, 0.56817302698551221787e-1, 0.75104028399870046114e-6 }; double -_DEFUN (exp, (double), - double x) +exp (double x) { int N; double g, z, R, P, Q; diff --git a/newlib/libm/mathfp/s_exp2.c b/newlib/libm/mathfp/s_exp2.c index 3bcf7ca2c..c913b3a22 100644 --- a/newlib/libm/mathfp/s_exp2.c +++ b/newlib/libm/mathfp/s_exp2.c @@ -9,8 +9,7 @@ #ifndef _DOUBLE_IS_32BITS double -_DEFUN (exp2, (double), - double x) +exp2 (double x) { return pow(2.0, x); } diff --git a/newlib/libm/mathfp/s_fabs.c b/newlib/libm/mathfp/s_fabs.c index 3d6d83889..10e89ef06 100644 --- a/newlib/libm/mathfp/s_fabs.c +++ b/newlib/libm/mathfp/s_fabs.c @@ -51,8 +51,7 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS double -_DEFUN (fabs, (double), - double x) +fabs (double x) { switch (numtest (x)) { diff --git a/newlib/libm/mathfp/s_floor.c b/newlib/libm/mathfp/s_floor.c index ebdb9a7b3..e407ea237 100644 --- a/newlib/libm/mathfp/s_floor.c +++ b/newlib/libm/mathfp/s_floor.c @@ -62,8 +62,7 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS double -_DEFUN (floor, (double), - double x) +floor (double x) { double f, y; diff --git a/newlib/libm/mathfp/s_ldexp.c b/newlib/libm/mathfp/s_ldexp.c index 472093071..6a844e0fe 100644 --- a/newlib/libm/mathfp/s_ldexp.c +++ b/newlib/libm/mathfp/s_ldexp.c @@ -63,8 +63,7 @@ PORTABILITY #define DOUBLE_EXP_OFFS 1023 double -_DEFUN (ldexp, (double, int), - double d, +ldexp (double d, int e) { int exp; diff --git a/newlib/libm/mathfp/s_log.c b/newlib/libm/mathfp/s_log.c index 27b959831..e1d33e10b 100644 --- a/newlib/libm/mathfp/s_log.c +++ b/newlib/libm/mathfp/s_log.c @@ -20,8 +20,7 @@ #ifndef _DOUBLE_IS_32BITS double -_DEFUN (log, (double), - double x) +log (double x) { return (logarithm (x, 0)); } diff --git a/newlib/libm/mathfp/s_log10.c b/newlib/libm/mathfp/s_log10.c index 9491cff76..d7fed2cfa 100644 --- a/newlib/libm/mathfp/s_log10.c +++ b/newlib/libm/mathfp/s_log10.c @@ -51,8 +51,7 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS double -_DEFUN (log10, (double), - double x) +log10 (double x) { return (logarithm (x, 1)); } diff --git a/newlib/libm/mathfp/s_logarithm.c b/newlib/libm/mathfp/s_logarithm.c index d14bf2eb4..e8c24200a 100644 --- a/newlib/libm/mathfp/s_logarithm.c +++ b/newlib/libm/mathfp/s_logarithm.c @@ -79,8 +79,7 @@ static const double C2 = 1.428606820309417232e-06; static const double C3 = 0.43429448190325182765; double -_DEFUN (logarithm, (double, int), - double x, +logarithm (double x, int ten) { int N; diff --git a/newlib/libm/mathfp/s_numtest.c b/newlib/libm/mathfp/s_numtest.c index b41bb87f4..a01045fa3 100644 --- a/newlib/libm/mathfp/s_numtest.c +++ b/newlib/libm/mathfp/s_numtest.c @@ -25,8 +25,7 @@ #ifndef _DOUBLE_IS_32BITS int -_DEFUN (numtest, (double), - double x) +numtest (double x) { __uint32_t hx, lx; int exp; diff --git a/newlib/libm/mathfp/s_sin.c b/newlib/libm/mathfp/s_sin.c index 2051304e0..c394f8548 100644 --- a/newlib/libm/mathfp/s_sin.c +++ b/newlib/libm/mathfp/s_sin.c @@ -20,8 +20,7 @@ #ifndef _DOUBLE_IS_32BITS double -_DEFUN (sin, (double), - double x) +sin (double x) { return (sine (x, 0)); } diff --git a/newlib/libm/mathfp/s_sincos.c b/newlib/libm/mathfp/s_sincos.c index 8fc65ac20..8694dc64d 100644 --- a/newlib/libm/mathfp/s_sincos.c +++ b/newlib/libm/mathfp/s_sincos.c @@ -20,8 +20,7 @@ #ifndef _DOUBLE_IS_32BITS void -_DEFUN (sincos, (x, sinx, cosx), - double x, +sincos (double x, double *sinx, double *cosx) { diff --git a/newlib/libm/mathfp/s_sine.c b/newlib/libm/mathfp/s_sine.c index d5e4469a0..7a5f4ddd3 100644 --- a/newlib/libm/mathfp/s_sine.c +++ b/newlib/libm/mathfp/s_sine.c @@ -72,8 +72,7 @@ static const double r[] = { -0.16666666666666665052, 0.27204790957888846175e-14 }; double -_DEFUN (sine, (double, int), - double x, +sine (double x, int cosine) { int sgn, N; diff --git a/newlib/libm/mathfp/s_sineh.c b/newlib/libm/mathfp/s_sineh.c index 457003ff8..1ca08b84c 100644 --- a/newlib/libm/mathfp/s_sineh.c +++ b/newlib/libm/mathfp/s_sineh.c @@ -94,8 +94,7 @@ static const double INV_V2 = 0.24999308500451499336; static const double V_OVER2_MINUS1 = 0.13830277879601902638e-4; double -_DEFUN (sineh, (double, int), - double x, +sineh (double x, int cosineh) { double y, f, P, Q, R, res, z, w; diff --git a/newlib/libm/mathfp/s_sinf.c b/newlib/libm/mathfp/s_sinf.c index b738a49b9..3e29fedf3 100644 --- a/newlib/libm/mathfp/s_sinf.c +++ b/newlib/libm/mathfp/s_sinf.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (sinf, (float), - float x) +sinf (float x) { return (sinef (x, 0)); } diff --git a/newlib/libm/mathfp/s_sinh.c b/newlib/libm/mathfp/s_sinh.c index c600ee0da..55b339bfb 100644 --- a/newlib/libm/mathfp/s_sinh.c +++ b/newlib/libm/mathfp/s_sinh.c @@ -20,8 +20,7 @@ #ifndef _DOUBLE_IS_32BITS double -_DEFUN (sinh, (double), - double x) +sinh (double x) { return (sineh (x, 0)); } diff --git a/newlib/libm/mathfp/s_sqrt.c b/newlib/libm/mathfp/s_sqrt.c index af3b1d85e..d5df47eec 100644 --- a/newlib/libm/mathfp/s_sqrt.c +++ b/newlib/libm/mathfp/s_sqrt.c @@ -62,8 +62,7 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS double -_DEFUN (sqrt, (double), - double x) +sqrt (double x) { double f, y; int exp, i, odd; diff --git a/newlib/libm/mathfp/s_tan.c b/newlib/libm/mathfp/s_tan.c index 3910a4c49..f3bfb6988 100644 --- a/newlib/libm/mathfp/s_tan.c +++ b/newlib/libm/mathfp/s_tan.c @@ -63,8 +63,7 @@ static const double q[] = { -0.46671683339755294240, 0.49819433993786512270e-6 }; double -_DEFUN (tan, (double), - double x) +tan (double x) { double y, f, g, XN, xnum, xden, res; int N; diff --git a/newlib/libm/mathfp/s_tanh.c b/newlib/libm/mathfp/s_tanh.c index 7c92c1750..ed036645b 100644 --- a/newlib/libm/mathfp/s_tanh.c +++ b/newlib/libm/mathfp/s_tanh.c @@ -69,8 +69,7 @@ static const double q[] = { 0.48402357071988688686e+4, 0.11274474380534949335e+3 }; double -_DEFUN (tanh, (double), - double x) +tanh (double x) { double f, res, g, P, Q, R; diff --git a/newlib/libm/mathfp/sf_acos.c b/newlib/libm/mathfp/sf_acos.c index 6bef98041..8631f3b97 100644 --- a/newlib/libm/mathfp/sf_acos.c +++ b/newlib/libm/mathfp/sf_acos.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (acosf, (float), - float x) +acosf (float x) { return (asinef (x, 1)); } diff --git a/newlib/libm/mathfp/sf_asin.c b/newlib/libm/mathfp/sf_asin.c index 92c33fda3..391ac304e 100644 --- a/newlib/libm/mathfp/sf_asin.c +++ b/newlib/libm/mathfp/sf_asin.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (asinf, (float), - float x) +asinf (float x) { return (asinef (x, 0)); } diff --git a/newlib/libm/mathfp/sf_asine.c b/newlib/libm/mathfp/sf_asine.c index a74778034..118479678 100644 --- a/newlib/libm/mathfp/sf_asine.c +++ b/newlib/libm/mathfp/sf_asine.c @@ -30,8 +30,7 @@ static const float a[] = { 0.0, 0.785398163 }; static const float b[] = { 1.570796326, 0.785398163 }; float -_DEFUN (asinef, (float, int), - float x, +asinef (float x, int acosine) { int flag, i; diff --git a/newlib/libm/mathfp/sf_atan.c b/newlib/libm/mathfp/sf_atan.c index f0f522076..03da2a6b0 100644 --- a/newlib/libm/mathfp/sf_atan.c +++ b/newlib/libm/mathfp/sf_atan.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (atanf, (float), - float x) +atanf (float x) { switch (numtestf (x)) { diff --git a/newlib/libm/mathfp/sf_atan2.c b/newlib/libm/mathfp/sf_atan2.c index e866ecbb8..dfe1d3375 100644 --- a/newlib/libm/mathfp/sf_atan2.c +++ b/newlib/libm/mathfp/sf_atan2.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (atan2f, (float, float), - float v, +atan2f (float v, float u) { return (atangentf (0.0, v, u, 1)); diff --git a/newlib/libm/mathfp/sf_atangent.c b/newlib/libm/mathfp/sf_atangent.c index 1865cde74..2c96e1544 100644 --- a/newlib/libm/mathfp/sf_atangent.c +++ b/newlib/libm/mathfp/sf_atangent.c @@ -31,8 +31,7 @@ static const float q[] = { 0.1412500740e+1 }; static const float p[] = { -0.4708325141, -0.5090958253e-1 }; float -_DEFUN (atangentf, (float, float, float, int), - float x, +atangentf (float x, float v, float u, int arctan2) diff --git a/newlib/libm/mathfp/sf_ceil.c b/newlib/libm/mathfp/sf_ceil.c index bc8e1403b..51ddada1f 100644 --- a/newlib/libm/mathfp/sf_ceil.c +++ b/newlib/libm/mathfp/sf_ceil.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (ceilf, (float), - float x) +ceilf (float x) { float f, y; diff --git a/newlib/libm/mathfp/sf_cos.c b/newlib/libm/mathfp/sf_cos.c index 057663e69..34b7dfdab 100644 --- a/newlib/libm/mathfp/sf_cos.c +++ b/newlib/libm/mathfp/sf_cos.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (cosf, (float), - float x) +cosf (float x) { return (sinef (x, 1)); } diff --git a/newlib/libm/mathfp/sf_cosh.c b/newlib/libm/mathfp/sf_cosh.c index 4635b7144..c747e907b 100644 --- a/newlib/libm/mathfp/sf_cosh.c +++ b/newlib/libm/mathfp/sf_cosh.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (coshf, (float), - float x) +coshf (float x) { return (sinehf (x, 1)); } diff --git a/newlib/libm/mathfp/sf_exp.c b/newlib/libm/mathfp/sf_exp.c index e37fac58b..33b3529c8 100644 --- a/newlib/libm/mathfp/sf_exp.c +++ b/newlib/libm/mathfp/sf_exp.c @@ -30,8 +30,7 @@ static const float p[] = { 0.249999999950, 0.00416028863 }; static const float q[] = { 0.5, 0.04998717878 }; float -_DEFUN (expf, (float), - float x) +expf (float x) { int N; float g, z, R, P, Q; diff --git a/newlib/libm/mathfp/sf_exp2.c b/newlib/libm/mathfp/sf_exp2.c index 7e147c5ed..43a9ae2df 100644 --- a/newlib/libm/mathfp/sf_exp2.c +++ b/newlib/libm/mathfp/sf_exp2.c @@ -7,8 +7,7 @@ #include "fdlibm.h" float -_DEFUN (exp2f, (float), - float x) +exp2f (float x) { return powf(2.0, x); } diff --git a/newlib/libm/mathfp/sf_fabs.c b/newlib/libm/mathfp/sf_fabs.c index 2661eabc0..8ee93b162 100644 --- a/newlib/libm/mathfp/sf_fabs.c +++ b/newlib/libm/mathfp/sf_fabs.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (fabsf, (float), - float x) +fabsf (float x) { switch (numtestf (x)) { diff --git a/newlib/libm/mathfp/sf_floor.c b/newlib/libm/mathfp/sf_floor.c index 1e0fb9e44..4ba295139 100644 --- a/newlib/libm/mathfp/sf_floor.c +++ b/newlib/libm/mathfp/sf_floor.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (floorf, (float), - float x) +floorf (float x) { float f, y; diff --git a/newlib/libm/mathfp/sf_fmod.c b/newlib/libm/mathfp/sf_fmod.c index 611725409..5dec8a1c9 100644 --- a/newlib/libm/mathfp/sf_fmod.c +++ b/newlib/libm/mathfp/sf_fmod.c @@ -25,8 +25,7 @@ static const float one = 1.0, Zero[] = {0.0, -0.0,}; float -_DEFUN (fmodf, (float, float), - float x, +fmodf (float x, float y) { __int32_t n,hx,hy,hz,ix,iy,sx,i; diff --git a/newlib/libm/mathfp/sf_ldexp.c b/newlib/libm/mathfp/sf_ldexp.c index 3a0d7a41a..9f05c43a0 100644 --- a/newlib/libm/mathfp/sf_ldexp.c +++ b/newlib/libm/mathfp/sf_ldexp.c @@ -23,8 +23,7 @@ #define FLOAT_EXP_OFFS 127 float -_DEFUN (ldexpf, (float, int), - float d, +ldexpf (float d, int e) { int exp; diff --git a/newlib/libm/mathfp/sf_log.c b/newlib/libm/mathfp/sf_log.c index b746d444f..c988f764f 100644 --- a/newlib/libm/mathfp/sf_log.c +++ b/newlib/libm/mathfp/sf_log.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (logf, (float), - float x) +logf (float x) { return (logarithmf (x, 0)); } diff --git a/newlib/libm/mathfp/sf_log10.c b/newlib/libm/mathfp/sf_log10.c index 444e535e0..deb35a378 100644 --- a/newlib/libm/mathfp/sf_log10.c +++ b/newlib/libm/mathfp/sf_log10.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (log10f, (float), - float x) +log10f (float x) { return (logarithmf (x, 1)); } diff --git a/newlib/libm/mathfp/sf_logarithm.c b/newlib/libm/mathfp/sf_logarithm.c index 855ee0744..37e57251c 100644 --- a/newlib/libm/mathfp/sf_logarithm.c +++ b/newlib/libm/mathfp/sf_logarithm.c @@ -31,8 +31,7 @@ static const float C2 = 1.428606820e-06; static const float C3 = 0.4342944819; float -_DEFUN (logarithmf, (float, int), - float x, +logarithmf (float x, int ten) { int N; diff --git a/newlib/libm/mathfp/sf_numtest.c b/newlib/libm/mathfp/sf_numtest.c index 00bab3a9d..1ad5862b1 100644 --- a/newlib/libm/mathfp/sf_numtest.c +++ b/newlib/libm/mathfp/sf_numtest.c @@ -23,8 +23,7 @@ #include "zmath.h" int -_DEFUN (numtestf, (float), - float x) +numtestf (float x) { __int32_t wx; int exp; diff --git a/newlib/libm/mathfp/sf_sin.c b/newlib/libm/mathfp/sf_sin.c index c68e18e50..61ae76b6b 100644 --- a/newlib/libm/mathfp/sf_sin.c +++ b/newlib/libm/mathfp/sf_sin.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (sinf, (float), - float x) +sinf (float x) { return (sinef (x, 0)); } diff --git a/newlib/libm/mathfp/sf_sincos.c b/newlib/libm/mathfp/sf_sincos.c index 85b393dce..472aa712b 100644 --- a/newlib/libm/mathfp/sf_sincos.c +++ b/newlib/libm/mathfp/sf_sincos.c @@ -18,8 +18,7 @@ #include "zmath.h" void -_DEFUN (sincosf, (x, sinx, cosx), - float x, +sincosf (float x, float *sinx, float *cosx) { diff --git a/newlib/libm/mathfp/sf_sine.c b/newlib/libm/mathfp/sf_sine.c index 24725bde1..8dd34d9a1 100644 --- a/newlib/libm/mathfp/sf_sine.c +++ b/newlib/libm/mathfp/sf_sine.c @@ -32,8 +32,7 @@ static const float r[] = { -0.1666665668, 0.2601903036e-5 }; float -_DEFUN (sinef, (float, int), - float x, +sinef (float x, int cosine) { int sgn, N; diff --git a/newlib/libm/mathfp/sf_sineh.c b/newlib/libm/mathfp/sf_sineh.c index 966e91362..83665bdc3 100644 --- a/newlib/libm/mathfp/sf_sineh.c +++ b/newlib/libm/mathfp/sf_sineh.c @@ -32,8 +32,7 @@ static const float INV_V2 = 0.2499930850; static const float V_OVER2_MINUS1 = 0.1383027787e-4; float -_DEFUN (sinehf, (float, int), - float x, +sinehf (float x, int cosineh) { float y, f, P, Q, R, res, z, w; diff --git a/newlib/libm/mathfp/sf_sinh.c b/newlib/libm/mathfp/sf_sinh.c index a50e56606..78cbef90d 100644 --- a/newlib/libm/mathfp/sf_sinh.c +++ b/newlib/libm/mathfp/sf_sinh.c @@ -18,8 +18,7 @@ #include "zmath.h" float -_DEFUN (sinhf, (float), - float x) +sinhf (float x) { return (sinehf (x, 0)); } diff --git a/newlib/libm/mathfp/sf_sqrt.c b/newlib/libm/mathfp/sf_sqrt.c index 5d5410dce..ede24b987 100644 --- a/newlib/libm/mathfp/sf_sqrt.c +++ b/newlib/libm/mathfp/sf_sqrt.c @@ -32,8 +32,7 @@ #include "zmath.h" float -_DEFUN (sqrtf, (float), - float x) +sqrtf (float x) { float f, y; int exp, i, odd; diff --git a/newlib/libm/mathfp/sf_tan.c b/newlib/libm/mathfp/sf_tan.c index fcde19ab3..7924bd217 100644 --- a/newlib/libm/mathfp/sf_tan.c +++ b/newlib/libm/mathfp/sf_tan.c @@ -29,8 +29,7 @@ static const float q[] = { -0.429135777, 0.971685835e-2 }; float -_DEFUN (tanf, (float), - float x) +tanf (float x) { float y, f, g, XN, xnum, xden, res; int N; diff --git a/newlib/libm/mathfp/sf_tanh.c b/newlib/libm/mathfp/sf_tanh.c index 51806af45..7da600a9c 100644 --- a/newlib/libm/mathfp/sf_tanh.c +++ b/newlib/libm/mathfp/sf_tanh.c @@ -31,8 +31,7 @@ static const float q[] = { 0.6178299136, 0.25 }; float -_DEFUN (tanhf, (float), - float x) +tanhf (float x) { float f, res, g, P, Q, R; diff --git a/newlib/libm/test/convert.c b/newlib/libm/test/convert.c index 24188fa8b..fe5bc0aa4 100644 --- a/newlib/libm/test/convert.c +++ b/newlib/libm/test/convert.c @@ -49,8 +49,7 @@ test_atoff (void) static void -_DEFUN(iterate,(func, name), - void _EXFUN((*func),(void)), +iterate (void _EXFUN((*func),(void)), char *name) { @@ -70,8 +69,7 @@ int_type *p = ints; static void -_DEFUN(int_iterate,(func, name), - void (*func)(), +int_iterate (void (*func)(), char *name) { newfunc(name); @@ -86,8 +84,7 @@ _DEFUN(int_iterate,(func, name), } void -_DEFUN(test_strtol_base,(base, pi, string), - int base, +test_strtol_base (int base, int_scan_type *pi, char *string) { @@ -206,8 +203,7 @@ test_fcvt (void) static void -_DEFUN(diterate,(func, name), - void (*func)(), +diterate (void (*func)(), char *name) { newfunc(name); diff --git a/newlib/libm/test/dcvt.c b/newlib/libm/test/dcvt.c index 922652e9f..56d5c2b6b 100644 --- a/newlib/libm/test/dcvt.c +++ b/newlib/libm/test/dcvt.c @@ -28,8 +28,7 @@ static struct p { #define _MAX_PREC 16 static char -_DEFUN(nextdigit,(value), -double *value) +nextdigit (double *value) { double tmp; @@ -39,8 +38,7 @@ double *value) static char * -_DEFUN(print_nan,(buffer, value, precision), - char *buffer, +print_nan (char *buffer, double value, int precision) { @@ -100,8 +98,7 @@ typedef struct void -_DEFUN(renormalize,(in), - cvt_info_type *in) +renormalize (cvt_info_type *in) { /* Make sure all numbers are less than 1 */ @@ -133,8 +130,7 @@ _DEFUN(renormalize,(in), */ static void -_DEFUN(normalize,(value, in), - double value, +normalize (double value, cvt_info_type *in) { int j; @@ -195,8 +191,7 @@ _DEFUN(normalize,(value, in), } int -_DEFUN(round,(in, start, now, ch), - cvt_info_type *in, +round (cvt_info_type *in, char *start, char *now, char ch) @@ -272,8 +267,7 @@ _DEFUN(round,(in, start, now, ch), void -_DEFUN(_cvte,(in), - register cvt_info_type *in) +_cvte (register cvt_info_type *in) { int buffer_idx =0; int digit = 0; @@ -341,8 +335,7 @@ _DEFUN(_cvte,(in), /* Produce NNNN.FFFF */ void -_DEFUN(_cvtf,(in), - cvt_info_type *in) +_cvtf (cvt_info_type *in) { int buffer_idx = 0; /* Current char being output */ @@ -434,8 +427,7 @@ _DEFUN(_cvtf,(in), char * -_DEFUN(_dcvt,(buffer, invalue, precision, width, type, dot), - char *buffer, +_dcvt (char *buffer, double invalue, int precision, int width, @@ -533,8 +525,7 @@ _DEFUN(_dcvt,(buffer, invalue, precision, width, type, dot), char * -_DEFUN(fcvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf), - double invalue, +fcvtbuf (double invalue, int ndigit, int *decpt, int *sign, @@ -563,8 +554,7 @@ _DEFUN(fcvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf), char * -_DEFUN(ecvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf), - double invalue, +ecvtbuf (double invalue, int ndigit, int *decpt, int *sign, @@ -596,8 +586,7 @@ _DEFUN(ecvtbuf,(invalue,ndigit,decpt,sign, fcvt_buf), char * -_DEFUN(gcvt,(d,ndigit,buf), - double d, +gcvt (double d, int ndigit, char *buf) { diff --git a/newlib/libm/test/math.c b/newlib/libm/test/math.c index f58f64f79..dda587a33 100644 --- a/newlib/libm/test/math.c +++ b/newlib/libm/test/math.c @@ -35,8 +35,7 @@ int verbose; /* To test exceptions - we trap them all and return a known value */ int -_DEFUN(matherr,(e), - struct exception *e) +matherr (struct exception *e) { if (traperror) { @@ -50,8 +49,7 @@ _DEFUN(matherr,(e), } -void _DEFUN(translate_to,(file,r), - FILE *file, +void translate_to (FILE *file, double r) { __ieee_double_shape_type bits; @@ -60,8 +58,7 @@ void _DEFUN(translate_to,(file,r), } int -_DEFUN(ffcheck,( is, p, name, serrno, merror), - double is, +ffcheck (double is, one_line_type *p, char *name, int serrno, @@ -108,8 +105,7 @@ _DEFUN(ffcheck,( is, p, name, serrno, merror), } double -_DEFUN(thedouble, (msw, lsw), - long msw, +thedouble (long msw, long lsw) { __ieee_double_shape_type x; @@ -123,8 +119,7 @@ int calc; int reduce; -_DEFUN(frontline,(f, mag, p, result, merror, errno, args, name), - FILE *f, +frontline (FILE *f, int mag, one_line_type *p, double result, @@ -176,8 +171,7 @@ _DEFUN(frontline,(f, mag, p, result, merror, errno, args, name), fprintf(f, ")*/\n"); } -_DEFUN(finish,(f, vector, result , p, args, name), - FILE *f, +finish (FILE *f, int vector, double result, one_line_type *p, @@ -194,8 +188,7 @@ _DEFUN(finish,(f, vector, result , p, args, name), } int redo; -_DEFUN(run_vector_1,(vector, p, func, name, args), - int vector, +run_vector_1 (int vector, one_line_type *p, char *func, char *name, @@ -429,12 +422,12 @@ test_math (void) */ #if 0 -float _DEFUN(cosf,(a), float a) { return cos((double)a); } -float _DEFUN(sinf,(a), float a) { return sin((double)a); } -float _DEFUN(log1pf,(a), float a) { return log1p((double)a); } -float _DEFUN(tanf,(a), float a) { return tan((double)a); } -float _DEFUN(ceilf,(a), float a) { return ceil(a); } -float _DEFUN(floorf,(a), float a) { return floor(a); } +float cosf (float a) { return cos((double)a); } +float sinf (float a) { return sin((double)a); } +float log1pf (float a) { return log1p((double)a); } +float tanf (float a) { return tan((double)a); } +float ceilf (float a) { return ceil(a); } +float floorf (float a) { return floor(a); } #endif /*ndef HAVE_FLOAT*/ diff --git a/newlib/libm/test/string.c b/newlib/libm/test/string.c index e66117fb6..a8cc1a16f 100644 --- a/newlib/libm/test/string.c +++ b/newlib/libm/test/string.c @@ -10,8 +10,7 @@ int errors = 0; #define check(thing) checkit(thing, __LINE__) void -_DEFUN(checkit,(ok,l), - int ok, +checkit (int ok, int l ) { @@ -31,8 +30,7 @@ _DEFUN(checkit,(ok,l), #define equal(a, b) funcqual(a,b,__LINE__); void -_DEFUN(funcqual,(a,b,l), - char *a, +funcqual (char *a, char *b, int l) { diff --git a/newlib/libm/test/test.c b/newlib/libm/test/test.c index 365c4c843..7769e2b36 100644 --- a/newlib/libm/test/test.c +++ b/newlib/libm/test/test.c @@ -9,8 +9,7 @@ int inacc; int -_DEFUN(main,(ac, av), - int ac, +main (int ac, char **av) { int i; @@ -57,8 +56,7 @@ bt(); static const char *iname = "foo"; void -_DEFUN(newfunc,(string), - const char *string) +newfunc (const char *string) { if (strcmp(iname, string)) { @@ -92,8 +90,7 @@ int reduce = 0; int strtod_vector = 0; int -_DEFUN(bigger,(a,b), - __ieee_double_shape_type *a, +bigger (__ieee_double_shape_type *a, __ieee_double_shape_type *b) { @@ -116,8 +113,7 @@ _DEFUN(bigger,(a,b), /* Return the first bit different between two double numbers */ int -_DEFUN(mag_of_error,(is, shouldbe), - double is, +mag_of_error (double is, double shouldbe) { __ieee_double_shape_type a,b; @@ -183,8 +179,7 @@ _DEFUN(mag_of_error,(is, shouldbe), void -_DEFUN(test_sok,(is, shouldbe), - char *is, +test_sok (char *is, char *shouldbe) { if (strcmp(is,shouldbe)) @@ -197,8 +192,7 @@ _DEFUN(test_sok,(is, shouldbe), } } void -_DEFUN(test_iok,(is, shouldbe), - int is, +test_iok (int is, int shouldbe) { if (is != shouldbe){ @@ -215,8 +209,7 @@ _DEFUN(test_iok,(is, shouldbe), prec float conversions against double results */ void -_DEFUN(test_scok,(is, shouldbe, count), - char *is, +test_scok (char *is, char *shouldbe, int count) { @@ -231,8 +224,7 @@ _DEFUN(test_scok,(is, shouldbe, count), } void -_DEFUN(test_eok,(is, shouldbe), - int is, +test_eok (int is, int shouldbe) { if (is != shouldbe){ @@ -245,8 +237,7 @@ _DEFUN(test_eok,(is, shouldbe), } void -_DEFUN(test_mok,(value, shouldbe, okmag), - double value, +test_mok (double value, double shouldbe, int okmag) { diff --git a/newlib/libm/test/test_ieee.c b/newlib/libm/test/test_ieee.c index 167a40c87..f23ceba6d 100644 --- a/newlib/libm/test/test_ieee.c +++ b/newlib/libm/test/test_ieee.c @@ -82,8 +82,7 @@ test_getroundtoi (void) } double - _DEFUN(dnumber,(msw, lsw), - int msw, + dnumber (int msw, int lsw) { diff --git a/newlib/libm/test/test_is.c b/newlib/libm/test/test_is.c index c4c8e2fdb..ac8f79c49 100644 --- a/newlib/libm/test/test_is.c +++ b/newlib/libm/test/test_is.c @@ -18,8 +18,7 @@ int mygraph; int mypunct; void -_DEFUN(test_is_single,(i), - int i) +test_is_single (int i) { setascii = 0; setlower = 0; @@ -1913,28 +1912,27 @@ _DEFUN(test_is_single,(i), } -int _DEFUN(def_isascii,(i), int i) { return isascii(i); } -int _DEFUN(def_iscntrl,(i), int i) { return iscntrl(i); } -int _DEFUN(def_isspace,(i), int i) { return isspace(i); } -int _DEFUN(def_isprint,(i), int i) { return isprint(i); } -int _DEFUN(def_isalnum,(i), int i) { return isalnum(i); } -int _DEFUN(def_isdigit,(i), int i) { return isdigit(i); } -int _DEFUN(def_isxdigit,(i), int i) { return isxdigit(i); } -int _DEFUN(def_isalpha,(i), int i) { return isalpha(i); } -int _DEFUN(def_isupper,(i), int i) { return isupper(i); } -int _DEFUN(def_islower,(i), int i) { return islower(i); } -int _DEFUN(def_isgraph,(i), int i) { return isgraph(i); } -int _DEFUN(def_ispunct,(i), int i) { return ispunct(i); } -int _DEFUN(def_tolower,(i), int i) { return tolower(i); } -int _DEFUN(def_toupper,(i), int i) { return toupper(i); } -int _DEFUN(def_toascii,(i), int i) { return toascii(i); } -int _DEFUN(def__tolower,(i), int i) { return _tolower(i); } -int _DEFUN(def__toupper,(i), int i) { return _toupper(i); } +int def_isascii (int i) { return isascii(i); } +int def_iscntrl (int i) { return iscntrl(i); } +int def_isspace (int i) { return isspace(i); } +int def_isprint (int i) { return isprint(i); } +int def_isalnum (int i) { return isalnum(i); } +int def_isdigit (int i) { return isdigit(i); } +int def_isxdigit (int i) { return isxdigit(i); } +int def_isalpha (int i) { return isalpha(i); } +int def_isupper (int i) { return isupper(i); } +int def_islower (int i) { return islower(i); } +int def_isgraph (int i) { return isgraph(i); } +int def_ispunct (int i) { return ispunct(i); } +int def_tolower (int i) { return tolower(i); } +int def_toupper (int i) { return toupper(i); } +int def_toascii (int i) { return toascii(i); } +int def__tolower (int i) { return _tolower(i); } +int def__toupper (int i) { return _toupper(i); } extern int inacc; void -_DEFUN(test_is_set,(func, name, p), - int (*func)(), +test_is_set (int (*func)(), char *name, int *p) { @@ -1952,8 +1950,7 @@ _DEFUN(test_is_set,(func, name, p), } } void -_DEFUN(test_to_set,(func, name, p, low, high), - int (*func)(), +test_to_set (int (*func)(), char *name, int *p, int low, |