mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 11:25:45 +01:00
add copyright information and code cleanup
This commit is contained in:
10
src/error.h
10
src/error.h
@@ -2,6 +2,10 @@
|
||||
// Licensed under the MIT Licence. See LICENSE for details
|
||||
#pragma once
|
||||
|
||||
#if __INCLUDE_LEVEL__ > 0
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#define ERROR_STR_PRE(v) #v
|
||||
#define ERROR_STR(v) ERROR_STR_PRE(v)
|
||||
|
||||
@@ -10,8 +14,8 @@
|
||||
#define warn(s, ...) fprintf(stderr, "\033[93m" __FILE__ ":" ERROR_STR(__LINE__) ": [WAR]: " s "\033[0m\n", ##__VA_ARGS__)
|
||||
#define error(s, ...) fprintf(stderr, "\033[91m" __FILE__ ":" ERROR_STR(__LINE__) ": [ERR]: " s "\033[0m\n", ##__VA_ARGS__)
|
||||
|
||||
#define fatal(s, ...) \
|
||||
do { \
|
||||
#define fatal(s, ...) \
|
||||
do { \
|
||||
printf("\033[101m" __FILE__ ":" ERROR_STR(__LINE__) ": [FAT]: " s "\033[0m\n", ##__VA_ARGS__); \
|
||||
exit(1); \
|
||||
exit(1); \
|
||||
} while (0)
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../error.h"
|
||||
#include "input.h"
|
||||
|
||||
Reference in New Issue
Block a user