Go to the source code of this file.
|
| #define | MEMCHECK(x) (((x) == NULL) ? 101 : 0 ) |
| |
| #define | FREE(x) { if (x) { free(x); x = NULL; } } |
| |
| #define | ABS(x) (((x)<0) ? -(x) : (x)) /* absolute value of x */ |
| |
| #define | MIN(x, y) (((x)<=(y)) ? (x) : (y)) /* minimum of x and y */ |
| |
| #define | MAX(x, y) (((x)>=(y)) ? (x) : (y)) /* maximum of x and y */ |
| |
| #define | MOD(x, y) ((x)%(y)) /* x modulus y */ |
| |
| #define | LOG10(x) ((x) > 0.0 ? log10((x)) : (x)) /* safe log10 of x */ |
| |
| #define | SQR(x) ((x)*(x)) /* x-squared */ |
| |
| #define | SGN(x) (((x)<0) ? (-1) : (1)) /* sign of x */ |
| |
| #define | SIGN(x, y) ((y) >= 0.0 ? fabs(x) : -fabs(x)) |
| |
| #define | UCHAR(x) (((x) >= 'a' && (x) <= 'z') ? ((x)&~32) : (x)) |
| |
| #define | ARRAY_LENGTH(x) (sizeof(x)/sizeof(x[0])) /* length of array x */ |
| |
| #define | CALL(x) (ErrorCode = ((ErrorCode>0) ? (ErrorCode) : (x))) |
| |
◆ ABS
| #define ABS |
( |
|
x | ) |
(((x)<0) ? -(x) : (x)) /* absolute value of x */ |
◆ ARRAY_LENGTH
| #define ARRAY_LENGTH |
( |
|
x | ) |
(sizeof(x)/sizeof(x[0])) /* length of array x */ |
◆ CALL
◆ FREE
| #define FREE |
( |
|
x | ) |
{ if (x) { free(x); x = NULL; } } |
◆ LOG10
| #define LOG10 |
( |
|
x | ) |
((x) > 0.0 ? log10((x)) : (x)) /* safe log10 of x */ |
◆ MAX
| #define MAX |
( |
|
x, |
|
|
|
y |
|
) |
| (((x)>=(y)) ? (x) : (y)) /* maximum of x and y */ |
◆ MEMCHECK
| #define MEMCHECK |
( |
|
x | ) |
(((x) == NULL) ? 101 : 0 ) |
◆ MIN
| #define MIN |
( |
|
x, |
|
|
|
y |
|
) |
| (((x)<=(y)) ? (x) : (y)) /* minimum of x and y */ |
◆ MOD
| #define MOD |
( |
|
x, |
|
|
|
y |
|
) |
| ((x)%(y)) /* x modulus y */ |
◆ SGN
| #define SGN |
( |
|
x | ) |
(((x)<0) ? (-1) : (1)) /* sign of x */ |
◆ SIGN
| #define SIGN |
( |
|
x, |
|
|
|
y |
|
) |
| ((y) >= 0.0 ? fabs(x) : -fabs(x)) |
◆ SQR
| #define SQR |
( |
|
x | ) |
((x)*(x)) /* x-squared */ |
◆ UCHAR
| #define UCHAR |
( |
|
x | ) |
(((x) >= 'a' && (x) <= 'z') ? ((x)&~32) : (x)) |