Libecoli 0.11.1
Extensible COmmand LIne library
Loading...
Searching...
No Matches
assert.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
3 */
4
16
17#pragma once
18
19#include <stdbool.h>
20
34#define ec_assert_print(expr, args...) __ec_assert_print(expr, #expr, args)
35
41void __ec_assert_print(bool expr, const char *expr_str, const char *format, ...);
42
58#define EC_CHECK_ARG(cond, ret, err) \
59 do { \
60 if (!(cond)) { \
61 errno = err; \
62 return ret; \
63 } \
64 } while (0)
65