ELinks 0.18.0
math.h File Reference
This graph shows which files directly or indirectly include this file:

Macros

#define MIN(x, y)
#define MAX(x, y)
#define swap_values(type, a, b)
 Swap values a and b, both of type type.

Functions

static int int_min (int x, int y)
static int int_max (int x, int y)
static void int_upper_bound (int *what, int limit)
 Limit what pointed value to upper bound limit.
static void int_lower_bound (int *what, int limit)
 Limit what pointed value to lower bound limit.
static void int_bounds (int *what, int lower_limit, int upper_limit)
 Limit what pointed value to lower bound lower_limit and to upper bound upper_limit.

Macro Definition Documentation

◆ MAX

#define MAX ( x,
y )
Value:
((x) > (y) ? (x) : (y))

◆ MIN

#define MIN ( x,
y )
Value:
((x) < (y) ? (x) : (y))

◆ swap_values

#define swap_values ( type,
a,
b )
Value:
do { \
type swap_register_ = (a); \
(a) = (b); \
(b) = (swap_register_); \
} while (0)
const char * type
Definition download.c:1899

Swap values a and b, both of type type.

This is supposed to evaluate at compile time, giving no performance hit.

Function Documentation

◆ int_bounds()

void int_bounds ( int * what,
int lower_limit,
int upper_limit )
inlinestatic

Limit what pointed value to lower bound lower_limit and to upper bound upper_limit.

◆ int_lower_bound()

void int_lower_bound ( int * what,
int limit )
inlinestatic

Limit what pointed value to lower bound limit.

◆ int_max()

int int_max ( int x,
int y )
inlinestatic

◆ int_min()

int int_min ( int x,
int y )
inlinestatic

◆ int_upper_bound()

void int_upper_bound ( int * what,
int limit )
inlinestatic

Limit what pointed value to upper bound limit.