#include <csl/cslconfig.h>
Go to the source code of this file.
Defines | |
#define | NULL ((void*) 0) |
null pointer. More... | |
#define | TRUE (!FALSE) |
Boolean true. More... | |
#define | FALSE (0) |
Boolean false. More... | |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
Return maximum. More... | |
#define | MIN(a, b) ((a) > (b) ? (b) : (a)) |
Return minimum. More... | |
#define | CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) |
Clamp data within a range. More... | |
#define | CSL_BREAKPOINT() ((void) raise (5 )) |
Breakpoint exception. More... | |
Typedefs | |
typedef int | CslBool |
Boolean type. More... | |
typedef int | CslByte |
Byte-sized type. More... |
|
Clamp data within a range. Clamp a value between the values low and high, i.e. if value is larger than high set it to high. If it is lower than low, set it to low, otherwise leave it unchanged. Works with any data type.
|
|
Breakpoint exception. Raise a breakpoint exception in a portable way. If running under a debugger this will cause the application to stop and allow debugging. If running outside a debugger it will raise a SIGTRAP exception which by default will terminate the program. |
|
Boolean false. Portable value for boolean false, if not already defined. |
|
Return maximum. Return the maximum of two values.
|
|
Return minimum. Return the minimum of two values.
|
|
null pointer. Portable value for null pointer, if not already defined. |
|
Boolean true. Portable value for boolean true, if not already defined. |
|
Boolean type. A portable data type for Boolean values. |
|
Byte-sized type. A portable data type for byte values. |