Libecoli
0.4.0
Extensible COmmand LIne library
Loading...
Searching...
No Matches
ecoli_assert.h
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
3
*/
4
16
17
#ifndef ECOLI_ASSERT_
18
#define ECOLI_ASSERT_
19
20
#include <stdbool.h>
21
35
#define ec_assert_print(expr, args...) \
36
__ec_assert_print(expr, #expr, args)
37
43
void
__ec_assert_print(
bool
expr,
const
char
*expr_str,
44
const
char
*format, ...);
45
61
#define EC_CHECK_ARG(cond, ret, err) do { \
62
if (!(cond)) { \
63
errno = err; \
64
return ret; \
65
} \
66
} while(0)
67
68
#endif
69
include
ecoli_assert.h
Generated by
1.13.2