mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
19 lines
273 B
C
19 lines
273 B
C
#ifndef _LOGGING_H
|
|
#define _LOGGING_H
|
|
|
|
#include <printf.h>
|
|
|
|
void _putchar(char c);
|
|
void logging_sethook(void (*fun)(char));
|
|
|
|
// TODO panic
|
|
|
|
#define __assert(x) \
|
|
if (!(x)){ \
|
|
printf("%s:%s:%d: %s failed\n", __FILE__, __func__, __LINE__, #x); \
|
|
for(;;); \
|
|
};
|
|
|
|
|
|
#endif
|