JWM Source Documentation
Miscellaneous functions and macros. More...
Go to the source code of this file.
Defines | |
| #define | Min(x, y) ( (x) > (y) ? (y) : (x) ) |
| Return the minimum of two values. | |
| #define | Max(x, y) ( (x) > (y) ? (x) : (y) ) |
| Return the maximum of two values. | |
Functions | |
| void | ExpandPath (char **path) |
| Perform shell-like macro path expansion. | |
| void | Trim (char *str) |
| Trim leading and trailing whitespace from a string. | |
| char * | CopyString (const char *str) |
| Copy a string. | |
Detailed Description
Define Documentation
| #define Max | ( | x, | |
| y | |||
| ) | ( (x) > (y) ? (x) : (y) ) |
| #define Min | ( | x, | |
| y | |||
| ) | ( (x) > (y) ? (y) : (x) ) |
Function Documentation
| char* CopyString | ( | const char * | str | ) |
Copy a string.
Note that NULL is accepted. When provided NULL, NULL will be returned.
- Parameters:
-
str The string to copy.
- Returns:
- A copy of the string.
| void ExpandPath | ( | char ** | path | ) |
Perform shell-like macro path expansion.
- Parameters:
-
path The path to expand (possibly reallocated).
| void Trim | ( | char * | str | ) |
Trim leading and trailing whitespace from a string.
- Parameters:
-
str The string to trim.