|
WinTer 0.1.1
Windows Terminal Emulator
|
Quality-of-life macros for strings, pointers, and math. More...
Macros | |
| #define | STRINGIFY_DETAIL(x) |
| Internal implementation of STRINGIFY. Do not use directly. | |
| #define | STRINGIFY(x) |
| Safely converts a macro argument into a string literal. | |
| #define | GLUE_DETAIL(x, y) |
| Internal implementation of GLUE. Do not use directly. | |
| #define | GLUE(x, y) |
| Safely concatenates two tokens together into a single token. | |
| #define | INT_FROM_PTR(ptr) |
| Safely casts a pointer to an integer of pointer size. | |
| #define | PTR_FROM_INT(type, val) |
| Safely casts a pointer-sized integer back to a specific pointer type. | |
| #define | ARRAY_SIZE(arr) |
| Calculates the number of elements in a statically allocated array. | |
| #define | MIN(a, b) |
| Returns the minimum of two values (Standard C fallback). | |
| #define | MAX(a, b) |
| Returns the maximum of two values (Standard C fallback). | |
| #define | CLAMP(val, min, max) |
| Clamps a value between a minimum and a maximum (Standard C fallback). | |
| #define | SWAP(type, a, b) |
| Generic variable swap. | |
Quality-of-life macros for strings, pointers, and math.
| #define ARRAY_SIZE | ( | arr | ) |
Calculates the number of elements in a statically allocated array.
| arr | The static array. |
Definition at line 254 of file base_macros.h.
| #define CLAMP | ( | val, | |
| min, | |||
| max ) |
Clamps a value between a minimum and a maximum (Standard C fallback).
Definition at line 303 of file base_macros.h.
| #define GLUE | ( | x, | |
| y ) |
Safely concatenates two tokens together into a single token.
| x | The first token. |
| y | The second token. |
Definition at line 231 of file base_macros.h.
| #define GLUE_DETAIL | ( | x, | |
| y ) |
Internal implementation of GLUE. Do not use directly.
Definition at line 225 of file base_macros.h.
| #define INT_FROM_PTR | ( | ptr | ) |
Safely casts a pointer to an integer of pointer size.
| ptr | The pointer to cast. |
Definition at line 238 of file base_macros.h.
| #define MAX | ( | a, | |
| b ) |
Returns the maximum of two values (Standard C fallback).
Definition at line 301 of file base_macros.h.
| #define MIN | ( | a, | |
| b ) |
Returns the minimum of two values (Standard C fallback).
Definition at line 299 of file base_macros.h.
| #define PTR_FROM_INT | ( | type, | |
| val ) |
Safely casts a pointer-sized integer back to a specific pointer type.
| type | The type of pointer to return (e.g., int, struct Node). |
| val | The integer memory address. |
Definition at line 246 of file base_macros.h.
| #define STRINGIFY | ( | x | ) |
Safely converts a macro argument into a string literal.
| x | The token to stringify. If it is a macro, it will be expanded first. |
Definition at line 222 of file base_macros.h.
| #define STRINGIFY_DETAIL | ( | x | ) |
Internal implementation of STRINGIFY. Do not use directly.
Definition at line 216 of file base_macros.h.
| #define SWAP | ( | type, | |
| a, | |||
| b ) |
Generic variable swap.
| type | The data type of the variables being swapped (e.g., int, float). |
| a | The first variable. |
| b | The second variable. |
Definition at line 312 of file base_macros.h.