making tiny not fuck other libs

This commit is contained in:
kin fuyuki 2026-02-20 01:58:44 -03:00
commit 2707a41755
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401

View file

@ -2,7 +2,6 @@
#ifndef TINYTERM_H
#define TINYTERM_H
#include <cstdio>
#include <cstring>
#include <stdarg.h>
@ -10,12 +9,9 @@
namespace tiny {
struct ErrorLevel {
int value;
ErrorLevel(int var){
this->value=var;
}
void setvalue(int var){
@ -23,38 +19,33 @@ struct ErrorLevel {
}
};
/*
-1: none
0: error
1: success
2: warning
3: message
4: echo
ex (i recommend using on main.cpp):
tiny::ErrorLevel tiny::level={1};
*/
extern tiny::ErrorLevel level;
#define WHITE "\033[0m" /* White */
#define BLACK "\033[30m" /* Black */
#define RED "\033[31m" /* Red */
#define GREEN "\033[32m" /* Green */
#define YELLOW "\033[33m" /* Yellow */
#define BLUE "\033[34m" /* Blue */
#define MAGENTA "\033[35m" /* Magenta */
#define CYAN "\033[36m" /* Cyan */
#define WHITE "\033[37m" /* White */
#define BGRED "\033[41m" /* Red */
#define BOLDBLACK "\033[1m\033[30m" /* Bold Black */
#define BOLDRED "\033[1m\033[31m" /* Bold Red */
#define BOLDGREEN "\033[1m\033[32m" /* Bold Green */
#define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */
#define BOLDBLUE "\033[1m\033[34m" /* Bold Blue */
#define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */
#define BOLDCYAN "\033[1m\033[36m" /* Bold Cyan */
#define BOLDWHITE "\033[1m\033[37m" /* Bold White */
inline const char* WHITE = "\033[0m";
inline const char* BLACK = "\033[30m";
inline const char* RED = "\033[31m";
inline const char* GREEN = "\033[32m";
inline const char* YELLOW = "\033[33m";
inline const char* BLUE = "\033[34m";
inline const char* MAGENTA = "\033[35m";
inline const char* CYAN = "\033[36m";
inline const char* BGRED = "\033[41m";
inline const char* BGBLACK = "\033[40m";
inline const char* BGGREEN = "\033[42m";
inline const char* BGYELLOW = "\033[43m";
inline const char* BGBLUE = "\033[44m";
inline const char* BGMAGENTA ="\033[45m";
inline const char* BGCYAN = "\033[46m";
inline const char* BGWHITE = "\033[47m";
inline const char* BOLDBLACK = "\033[1m\033[30m";
inline const char* BOLDRED = "\033[1m\033[31m";
inline const char* BOLDGREEN = "\033[1m\033[32m";
inline const char* BOLDYELLOW = "\033[1m\033[33m";
inline const char* BOLDBLUE = "\033[1m\033[34m";
inline const char* BOLDMAGENTA = "\033[1m\033[35m";
inline const char* BOLDCYAN = "\033[1m\033[36m";
inline const char* BOLDWHITE = "\033[1m\033[37m";
#define ending \
mixer.append(info); mixer.append("\033[0m\n");\
const char * finalinfo=mixer.c_str();\
@ -113,12 +104,5 @@ int lv=level.value;level.value=6;
level.value=lv;
}
}
#endif