| 
					
				 | 
			
			
				@@ -50,23 +50,25 @@ enum class ATTR : std::int8_t { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   INVERSE = 7 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-// std::int32_t  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// std::int32_t 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 constexpr long strhash(const char *txt) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   long result = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   for (int x = 0; x < 3; ++x) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // char c = txt[x] - 'A'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    result = (result << 8) | txt[x]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (txt[x] == 0) break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    char c = txt[x]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if ((c >= 'a') && (c <= 'z')) c &= ~0x20; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    result = (result << 8) | c; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#define A_BOLD    0x01 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#define A_BLINK   0x02 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define A_BOLD 0x01 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define A_BLINK 0x02 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #define A_INVERSE 0x04 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#define A_RESET   0x10 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define A_RESET 0x10 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * @class ANSIColor 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -98,9 +100,7 @@ class ANSIColor { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   ANSIColor(std::initializer_list<int> il); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   constexpr ANSIColor(const char *text) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      : fg(COLOR::WHITE), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        bg(COLOR::BLACK), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        attr(0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      : fg(COLOR::WHITE), bg(COLOR::BLACK), attr(0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const char *cp = text; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     bool use_on = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -127,12 +127,11 @@ class ANSIColor { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           use_on = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        case strhash("BLU"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case strhash("BLA"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            bg = COLOR::BLUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bg = COLOR::BLACK; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            bg = COLOR::BLUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fg = COLOR::BLACK; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         case strhash("RED"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -144,7 +143,13 @@ class ANSIColor { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             bg = COLOR::GREEN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            fg =  COLOR::GREEN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fg = COLOR::GREEN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case strhash("BRO"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (use_on) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bg = COLOR::BROWN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fg = COLOR::BROWN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         case strhash("YEL"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,17 +160,11 @@ class ANSIColor { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           // if (use_on) throw error! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        case strhash("BRO"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (use_on) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            bg = COLOR::BROWN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            fg = COLOR::BROWN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        case strhash("CYA"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case strhash("BLU"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            bg = COLOR::CYAN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bg = COLOR::BLUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            fg = COLOR::CYAN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fg = COLOR::BLUE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         case strhash("MAG"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -173,11 +172,11 @@ class ANSIColor { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             fg = COLOR::MAGENTA; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        case strhash("BLA"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        case strhash("CYA"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            bg = COLOR::BLACK; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bg = COLOR::CYAN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            fg = COLOR::BLACK; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            fg = COLOR::CYAN; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         case strhash("WHI"): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (use_on) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -319,7 +318,7 @@ constexpr std::vector<int> from_text(const char *text) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 Maybe make char, char, char (fg, bg, attr) and store those from 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-the constexpr.   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+the constexpr. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 This "works", in that it does construct an ANSIColor from text. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -423,4 +422,4 @@ constexpr ANSIColor ac_from_text(const char *text) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 extern ANSIColor reset; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 |