debug: add a logging module

This commit is contained in:
2025-06-11 16:47:16 +02:00
parent 90c0903f25
commit 7db89e973d
6 changed files with 72 additions and 2 deletions

12
include/log.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef LOGH_
#define LOGH_
#include <stdio.h>
void log_init(FILE* fd);
void log_puts(const char* msg);
void log_printf(const char* fmt, ...);
// NOLINTNEXTLINE(readability-identifier-length)
void log_perror(const char* s);
#endif

View File

@@ -1,3 +1,6 @@
#ifndef MACROSH_
#define MACROSH_
// Do we just replace the compiler with clang??
#if defined(__clang__)
#define NULLABLE _Nullable
@@ -16,3 +19,5 @@
#else
#define UNULLABLE
#endif
#endif