diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-03-06 19:56:37 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-03-06 19:56:37 -0500 |
| commit | 85f8cbf3d96d1b1dc0127398b762d58676d4f4f4 (patch) | |
| tree | 98a5ec2dd988d53370ed4bd8db7af1c133c535fb /src/math | |
| parent | 4dd73957883dd09ac0e7d7de4974e3696298b0c0 (diff) | |
prefix arguments with __
Diffstat (limited to 'src/math')
| -rw-r--r-- | src/math/_tgmath.h | 24 | ||||
| -rw-r--r-- | src/math/fpclassify.c | 6 | ||||
| -rw-r--r-- | src/math/isfinite.c | 2 | ||||
| -rw-r--r-- | src/math/isgreater.c | 3 | ||||
| -rw-r--r-- | src/math/isgreaterequal.c | 3 | ||||
| -rw-r--r-- | src/math/isinf.c | 2 | ||||
| -rw-r--r-- | src/math/isless.c | 3 | ||||
| -rw-r--r-- | src/math/islessequal.c | 3 | ||||
| -rw-r--r-- | src/math/islessgreater.c | 3 | ||||
| -rw-r--r-- | src/math/isnan.c | 3 | ||||
| -rw-r--r-- | src/math/isnormal.c | 2 | ||||
| -rw-r--r-- | src/math/isunordered.c | 3 | ||||
| -rw-r--r-- | src/math/signbit.c | 18 |
13 files changed, 42 insertions, 33 deletions
diff --git a/src/math/_tgmath.h b/src/math/_tgmath.h index fa7ce4b4..950fbdee 100644 --- a/src/math/_tgmath.h +++ b/src/math/_tgmath.h @@ -5,20 +5,20 @@ #ifdef TGSOURCE # if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) -# define TGCMPLX(x,y) CMPLXF(x,y) -# define TGFN(x) x##f -# define TYPE float -# define TGHUGE HUGE_VALF +# define TGCMPLX(__x, __y) CMPLXF(__x, __y) +# define TGFN(__x) __x##f +# define TYPE float +# define TGHUGE HUGE_VALF # include TGSOURCE # undef TGCMPLX # undef TGFN # undef TYPE # undef TGHUGE -# define TGCMPLX(x,y) CMPLXL(x,y) -# define TGFN(x) x##l -# define TYPE long double -# define TGHUGE HUGE_VALL +# define TGCMPLX(__x, __y) CMPLXL(__x, __y) +# define TGFN(__x) __x##l +# define TYPE long double +# define TGHUGE HUGE_VALL # include TGSOURCE # undef TGCMPLX # undef TGFN @@ -28,9 +28,9 @@ #endif -#define TGCMPLX(x,y) CMPLX(x,y) -#define TGFN(x) x -#define TYPE double -#define TGHUGE HUGE_VAL +#define TGCMPLX(__x, __y) CMPLX(__x, __y) +#define TGFN(__x) __x +#define TYPE double +#define TGHUGE HUGE_VAL #endif diff --git a/src/math/fpclassify.c b/src/math/fpclassify.c index 2e040e41..131905af 100644 --- a/src/math/fpclassify.c +++ b/src/math/fpclassify.c @@ -1,7 +1,9 @@ #include <math.h> -#define fpclassify(x) ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) : \ - (sizeof (x) == sizeof (double)) ? __fpclassify(x) : __fpclassifyl(x)) +#define fpclassify(__x) \ + ((sizeof (__x) == sizeof (float)) ? __fpclassifyf(__x) : \ + (sizeof (__x) == sizeof (double)) ? __fpclassify(__x) : \ + __fpclassifyl(__x)) /* STDC(199901) diff --git a/src/math/isfinite.c b/src/math/isfinite.c index 5eaf6b06..a37b5a2d 100644 --- a/src/math/isfinite.c +++ b/src/math/isfinite.c @@ -1,6 +1,6 @@ #include <math.h> -#define isfinite(x) (fpclassify(x) != FP_INFINITE) +#define isfinite(__x) (fpclassify(__x) != FP_INFINITE) /* STDC(199901) diff --git a/src/math/isgreater.c b/src/math/isgreater.c index 672dbe6a..80344c03 100644 --- a/src/math/isgreater.c +++ b/src/math/isgreater.c @@ -1,5 +1,6 @@ #include <math.h> -#define isgreater(x,y) ((x) > (y)) + +#define isgreater(__x, __y) ((__x) > (__y)) /* STDC(199901) diff --git a/src/math/isgreaterequal.c b/src/math/isgreaterequal.c index de0eaaf2..acc5d937 100644 --- a/src/math/isgreaterequal.c +++ b/src/math/isgreaterequal.c @@ -1,5 +1,6 @@ #include <math.h> -#define isgreaterequal(x,y) ((x) >= (y)) + +#define isgreaterequal(__x, __y) ((__x) >= (__y)) /* STDC(199901) diff --git a/src/math/isinf.c b/src/math/isinf.c index 1a6b00ff..be76ecfb 100644 --- a/src/math/isinf.c +++ b/src/math/isinf.c @@ -1,6 +1,6 @@ #include <math.h> -#define isinf(x) (fpclassify(x) == FP_INFINITE) +#define isinf(__x) (fpclassify(__x) == FP_INFINITE) /* STDC(199901) diff --git a/src/math/isless.c b/src/math/isless.c index 9685e84a..66f7d939 100644 --- a/src/math/isless.c +++ b/src/math/isless.c @@ -1,5 +1,6 @@ #include <math.h> -#define isless(x,y) ((x) < (y)) + +#define isless(__x, __y) ((__x) < (__y)) /* STDC(199901) diff --git a/src/math/islessequal.c b/src/math/islessequal.c index 97ded436..34a1c138 100644 --- a/src/math/islessequal.c +++ b/src/math/islessequal.c @@ -1,5 +1,6 @@ #include <math.h> -#define islessequal(x,y) ((x) <= (y)) + +#define islessequal(__x, __y) ((__x) <= (__y)) /* STDC(199901) diff --git a/src/math/islessgreater.c b/src/math/islessgreater.c index a2566474..b17fb161 100644 --- a/src/math/islessgreater.c +++ b/src/math/islessgreater.c @@ -1,5 +1,6 @@ #include <math.h> -#define islessgreater(x,y) ((x) < (y) || (x) > (y)) + +#define islessgreater(__x, __y) ((__x) < (__y) || (__x) > (__y)) /* STDC(199901) diff --git a/src/math/isnan.c b/src/math/isnan.c index e3e0160a..80bbb741 100644 --- a/src/math/isnan.c +++ b/src/math/isnan.c @@ -1,5 +1,6 @@ #include <math.h> -#define isnan(x) (fpclassify(x) == FP_NAN) + +#define isnan(__x) (fpclassify(__x) == FP_NAN) /* STDC(199901) diff --git a/src/math/isnormal.c b/src/math/isnormal.c index 868c7ea2..95e82b1b 100644 --- a/src/math/isnormal.c +++ b/src/math/isnormal.c @@ -1,6 +1,6 @@ #include <math.h> -#define isnormal(x) (fpclassify(x) == FP_NORMAL) +#define isnormal(__x) (fpclassify(__x) == FP_NORMAL) /* STDC(199901) diff --git a/src/math/isunordered.c b/src/math/isunordered.c index ac8cbfff..dab6fe64 100644 --- a/src/math/isunordered.c +++ b/src/math/isunordered.c @@ -1,5 +1,6 @@ #include <math.h> -#define isunordered(x,y) /* TODO */ + +#define isunordered(__x, __y) /* TODO */ /* STDC(199901) diff --git a/src/math/signbit.c b/src/math/signbit.c index a5278e77..77cc3977 100644 --- a/src/math/signbit.c +++ b/src/math/signbit.c @@ -1,20 +1,20 @@ #include <math.h> -#define signbit(x) \ - (sizeof(x) == sizeof(long double) ? \ +#define signbit(__x) \ + (sizeof(__x) == sizeof(long double) ? \ ((((union { \ long double __f; \ - char __c[sizeof(x)]; \ - }){.__f = (x)}).__c[sizeof(x)-1] & 0x80) == 0x80 ? 1 : 0) : \ - sizeof(x) == sizeof(double) ? \ + char __c[sizeof(__x)]; \ + }){.__f = (__x)}).__c[sizeof(__x)-1] & 0x80) == 0x80 ? 1 : 0) : \ + sizeof(__x) == sizeof(double) ? \ ((((union { \ double __f; \ - char __c[sizeof(x)]; \ - }){.__f = (x)}).__c[sizeof(x)-1] & 0x80) == 0x80 ? 1 : 0) : \ + char __c[sizeof(__x)]; \ + }){.__f = (__x)}).__c[sizeof(__x)-1] & 0x80) == 0x80 ? 1 : 0) : \ (((union { \ float __f; \ - char __c[sizeof(x)]; \ - }){.__f = (x)}).__c[sizeof(x)-1] & 0x80) == 0x80 ? 1 : 0) + char __c[sizeof(__x)]; \ + }){.__f = (__x)}).__c[sizeof(__x)-1] & 0x80) == 0x80 ? 1 : 0) /* |
