C3E: Complex Compute Core Engine v1.0
An engine for handling complex computational tasks
Loading...
Searching...
No Matches
assert.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 Nathanne Isip
3 *
4 * Redistribution and use in source and binary forms,
5 * with or without modification, are permitted provided
6 * that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the
9 * above copyright notice, this list of conditions
10 * and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the
13 * above copyright notice, this list of conditions
14 * and the following disclaimer in the documentation
15 * and/or other materials provided with the distribution.
16 */
17
27#ifndef C3E_ASSERT_H
28#define C3E_ASSERT_H
29
30#include <stdbool.h>
31
42void c3e_assert(bool condition);
43
57void c3e_assert_handler(void (*event)(const char* filename, int line));
58
67
77
78#endif /* C3E_ASSERT_H */
bool c3e_assert_has_handler()
Checks if a custom assertion handler is currently set.
void c3e_assert(bool condition)
Evaluates an assertion and triggers a custom handler if the condition is false.
void c3e_assert_remove_handle()
Removes the currently set custom assertion handler.
void c3e_assert_handler(void(*event)(const char *filename, int line))
Sets a custom assertion handler.