mirror of
https://github.com/thepigeongenerator/mcaselector-lite
synced 2026-02-08 07:33:35 +01:00
These headers have no associated C files, and are mainly used for utility logic. Having them in `/include` makes them more easily located, and more globally used. We are using "classic" header guards here over `#pragma once` for better support. Since `#pragma once` is defined by the compiler, rather than standard C. Why isn't it used across the project? I have no idea.
24 lines
1.2 KiB
C
24 lines
1.2 KiB
C
/* This file is part of MCA-Selector-lite,
|
|
* and is licensed under GPL-2.0-only.
|
|
* Copyright (C)2025 quinnthepigeon@proton.me Quinn
|
|
* For further information, view COPYING and CONTRIBUTORS
|
|
* at: www.github.com/thepigeongenerator/mcaselector-lite */
|
|
#pragma once
|
|
|
|
#include <mcaselector-lite/atrb.h>
|
|
#include <mcaselector-lite/types.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
void error_debug(uint ln, const char *restrict file, const char *restrict fmt, ...);
|
|
void error_info(uint ln, const char *restrict file, const char *restrict fmt, ...);
|
|
void error_warn(uint ln, const char *restrict file, const char *restrict fmt, ...);
|
|
void error_error(uint ln, const char *restrict file, const char *restrict fmt, ...);
|
|
void error_fatal(uint ln, const char *restrict file, const char *restrict fmt, ...) NORET;
|
|
|
|
#define debug(...) error_debug(__LINE__, __FILE__ __VA_OPT__(, ) __VA_ARGS__)
|
|
#define info(...) error_info(__LINE__, __FILE__ __VA_OPT__(, ) __VA_ARGS__)
|
|
#define warn(...) error_warn(__LINE__, __FILE__ __VA_OPT__(, ) __VA_ARGS__)
|
|
#define error(...) error_error(__LINE__, __FILE__ __VA_OPT__(, ) __VA_ARGS__)
|
|
#define fatal(...) error_fatal(__LINE__, __FILE__ __VA_OPT__(, ) __VA_ARGS__)
|