From 36b6d84ee4b520bdf43891ea86df03cf660cb464 Mon Sep 17 00:00:00 2001 From: Matthew Wozniak Date: Fri, 25 Oct 2024 23:24:45 -0400 Subject: create project --- log.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 log.h (limited to 'log.h') diff --git a/log.h b/log.h new file mode 100644 index 0000000..88254bc --- /dev/null +++ b/log.h @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: ISC +// SPDX-FileCopyrightText: 2024 Matthew Wozniak + +#include +#include + +#define die(fmt, ...) {\ + fprintf(stderr, "err: " __FILE__ ": " fmt "\n", __VA_ARGS__); \ + exit(1); \ +} + +#define warn(fmt, ...) \ + fprintf(stderr, "warn: " __FILE__ ": " fmt "\n", __VA_ARGS__) + +#define info(fmt, ...) \ + fprintf(stderr, "info: " __FILE__ ": " fmt "\n", __VA_ARGS__) + +// vi: sw=4 ts=4 noet tw=80 cc=80 -- cgit v1.2.3-54-g00ecf