mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
18 lines
299 B
C
18 lines
299 B
C
#ifndef _LOGGING_H
|
|
#define _LOGGING_H
|
|
|
|
#include <printf.h>
|
|
#include <panic.h>
|
|
|
|
void _putchar(char c);
|
|
void logging_sethook(void (*fun)(char));
|
|
|
|
#define __assert(x) \
|
|
if (!(x)){ \
|
|
printf("\e[91m%s:%s:%d: %s failed\n\e[0m", __FILE__, __func__, __LINE__, #x); \
|
|
_panic(NULL, NULL); \
|
|
};
|
|
|
|
|
|
#endif
|