Last active
March 26, 2025 22:41
-
-
Save sammonius/698ed40eca764b03bec972abc4b1870c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef DEBUG_H | |
#define DEBUG_H | |
#define PROG_NAME "my_app" | |
/* USAGE: puts(ERROR "Could not find wallet"); */ | |
/* No licence cuz i don't care */ | |
#define IHATETHECPREPROCESSORSOMUCHRIGHTNOW(X) #X | |
#define STRINGIFY(X) IHATETHECPREPROCESSORSOMUCHRIGHTNOW(X) | |
#define ERROR PROG_NAME ": \033[1;31mERROR\033[0m at " __FILE__ " line " STRINGIFY(__LINE__) ": " | |
#define EXCEPTION PROG_NAME ": \033[34mEXCEPTION\033[0m at " __FILE__ " line " STRINGIFY(__LINE__) ": " | |
#define WARNING PROG_NAME ": \033[1;33mWARNING\033[0m at " __FILE__ " line " STRINGIFY(__LINE__) ": " | |
#define NOTE PROG_NAME ": \033[1mNOTE\033[0m at " __FILE__ " line " STRINGIFY(__LINE__) ": " | |
#define TODO PROG_NAME ": \033[3;4mTODO\033[0m at " __FILE__ " line " STRINGIFY(__LINE__) ": " | |
#define MESSAGE PROG_NAME ": \033[1mMESSAGE\033[0m at " __FILE__ " line " STRINGIFY(__LINE__) ": " | |
#define DEBUG PROG_NAME ": \033[1;4;5mDEBUG\033[0m at " __FILE__ " line " STRINGIFY(__LINE__) ": " | |
#endif /* DEBUG_H */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just realized that not putting a license means that no one can legally use it. I hereby forfeit all rights to the above 22 useless lines of code.