NetSurf
|
Interface to a number of general purpose functionality. More...
#include <stdbool.h>
Go to the source code of this file.
Macros | |
#define | NOF_ELEMENTS(array) (sizeof(array)/sizeof(*(array))) |
#define | ABS(x) (((x)>0)?(x):(-(x))) |
#define | min(x, y) (((x)<(y))?(x):(y)) |
#define | max(x, y) (((x)>(y))?(x):(y)) |
#define | clamp(x, low, high) (min(max((x),(low)),(high))) |
#define | nsmkdir(dir, mode) mkdir((dir), (mode)) |
POSIX mkdir function. More... | |
#define | FLEX_ARRAY_LEN_DECL |
#define | SLEN(x) (sizeof((x)) - 1) |
Calculate length of constant C string. More... | |
#define | fallthrough do {} while(0) |
switch fall through More... | |
Functions | |
bool | is_dir (const char *path) |
Check if a directory exists. More... | |
Interface to a number of general purpose functionality.
Definition in file utils.h.
#define NOF_ELEMENTS | ( | array | ) | (sizeof(array)/sizeof(*(array))) |
#define SLEN | ( | x | ) | (sizeof((x)) - 1) |
bool is_dir | ( | const char * | path | ) |
Check if a directory exists.
Definition at line 94 of file utils.c.
References path().
Referenced by filename_create_directory(), handle_filesystem_select_button(), menu_save_page(), ro_gui_choose_language(), and ro_gui_default_language().