X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fconsolecolors.h;h=d92be58bc706f9dafa78f9771ad671a1f2f1eda7;hb=754f0130893bacb2b69a32c3de9ed1b3da9659cd;hp=953beb34658c5ea3cf09dc76507ec7bed639ab33;hpb=ebdaf368e137fc933e648ee88a08a4f83e796f87;p=user%2Fhenk%2Fcode%2Finspircd.git
diff --git a/include/consolecolors.h b/include/consolecolors.h
index 953beb346..d92be58bc 100644
--- a/include/consolecolors.h
+++ b/include/consolecolors.h
@@ -14,8 +14,8 @@
* along with this program. If not, see .
*/
-#ifndef CONSOLECOLORS_H
-#define CONSOLECOLORS_H
+
+#pragma once
#include
@@ -29,72 +29,70 @@ extern HANDLE g_hStdout;
inline std::ostream& con_green(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_red(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_white(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_white_bright(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_bright(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_reset(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, g_wOriginalColors);
- return s;
+ SetConsoleTextAttribute(g_hStdout, g_wOriginalColors);
+ return s;
}
#else
inline std::ostream& con_green(std::ostream &s)
{
- return s << "\033[1;32m";
+ return s << "\033[1;32m";
}
inline std::ostream& con_red(std::ostream &s)
{
- return s << "\033[1;31m";
+ return s << "\033[1;31m";
}
inline std::ostream& con_white(std::ostream &s)
{
- return s << "\033[0m";
+ return s << "\033[0m";
}
inline std::ostream& con_white_bright(std::ostream &s)
{
- return s << "\033[1m";
+ return s << "\033[1m";
}
inline std::ostream& con_bright(std::ostream &s)
{
- return s << "\033[1m";
+ return s << "\033[1m";
}
inline std::ostream& con_reset(std::ostream &s)
{
- return s << "\033[0m";
+ return s << "\033[0m";
}
#endif
-
-#endif
\ No newline at end of file