Prepare files for public release

This commit is contained in:
2026-01-24 10:26:37 -05:00
parent 2f358c30e6
commit d89c636e2f
28 changed files with 2013 additions and 0 deletions

32
include/util/log.h Normal file
View File

@@ -0,0 +1,32 @@
//
// Created by sligh on 2026-01-09.
//
#ifndef LOG_H
#define LOG_H
#define ERRBUF_SIZE 300
#include "spdlog/spdlog.h"
#ifdef _WIN32
void print_errno() {
char errbuf[ERRBUF_SIZE];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, WSAGetLastError(), 0, errbuf, sizeof(errbuf),
NULL);
spdlog::error("{}", errbuf);
}
#else
#include <errno.h>
#include <string.h>
void print_errno() {
spdlog::error("{}", strerror(errno));
}
#endif
#endif //LOG_H