System procedures.
More...
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
|
| int | st_snprintf (char *buffer, size_t bufsz, const char *format,...) |
| |
| int | st_remove (const char *filename) |
| |
| void | st_except (const char *reason, const char *file, int line) |
| | Log error reason and call exit(EXIT_FAILURE).
|
| |
|
|
static const struct StException | st_except_null_param = {"Null param."} |
| | Exception: "null_param".
|
| |
|
static const struct StException | st_except_alloc_fail = {"Memory allocation failed."} |
| | Exception: "alloc_fail".
|
| |
|
static const struct StException | st_except_sem_fail = {"Semaphore failure."} |
| | Exception: "sem_fail".
|
| |
|
static const struct StException | st_except_mutex_fail = {"Mutex failure."} |
| | Exception: "mutex_fail".
|
| |
|
static const struct StException | st_except_not_supported = {"Not supported."} |
| | Exception: "not_supported".
|
| |
|
static const struct StException | st_except_sanity_fail = {"Sanity check failed."} |
| | Exception: "sanity_fail".
|
| |
◆ st_except()
| void st_except |
( |
const char * |
reason, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
Log error reason and call exit(EXIT_FAILURE).
- Parameters
-
| [in] | reason | The reason. |
| [in] | file | The path to the calling source file. |
| [in] | line | The number of the calling line of code from the source file. |
◆ st_remove()
| int st_remove |
( |
const char * |
filename | ) |
|
◆ st_snprintf()
| int st_snprintf |
( |
char * |
buffer, |
|
|
size_t |
bufsz, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |