Miscellaneous utility functions.
More...
#include <stdlib.h>
#include <cdio/types.h>
Go to the source code of this file.
Detailed Description
Miscellaneous utility functions.
Warning: this will probably get removed/replaced by using glib.h
Define Documentation
#define CLAMP |
( |
|
x, |
|
|
|
low, |
|
|
|
high | |
|
) |
| | (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) |
#define IN |
( |
|
x, |
|
|
|
low, |
|
|
|
high | |
|
) |
| | ((x) >= (low) && (x) <= (high)) |
#define MAX |
( |
|
a, |
|
|
|
b | |
|
) |
| | (((a) > (b)) ? (a) : (b)) |
#define MIN |
( |
|
a, |
|
|
|
b | |
|
) |
| | (((a) < (b)) ? (a) : (b)) |
Function Documentation
void* _cdio_memdup |
( |
const void * |
mem, |
|
|
size_t |
count | |
|
) |
| | |
char* _cdio_strdup_upper |
( |
const char |
str[] |
) |
|
void _cdio_strfreev |
( |
char ** |
strv |
) |
|
size_t _cdio_strlenv |
( |
char ** |
str_array |
) |
|
char** _cdio_strsplit |
( |
const char |
str[], |
|
|
char |
delim | |
|
) |
| | |
uint8_t cdio_from_bcd8 |
( |
uint8_t |
p |
) |
|
char* cdio_realpath |
( |
const char * |
psz_src, |
|
|
char * |
psz_dst | |
|
) |
| | |
cdio_realpath() same as POSIX.1-2001 realpath if that's around. If not we do poor-man's simulation of that behavior.
uint8_t cdio_to_bcd8 |
( |
uint8_t |
n |
) |
|