about summary refs log tree commit diff
path: root/include/debug.h
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-09-20 17:48:21 +0200
committerGitHub <noreply@github.com>2023-09-20 17:48:21 +0200
commit14bca4431138a80b93795683dec588a40f6050a9 (patch)
treed83a157ecf643474b406201f1b1c55c0196a4bab /include/debug.h
parent748d417f86d2d2a290c43428fd40ce616afcfc95 (diff)
parent762fe0aad860c0c0fa3c9e19103c3df799498c72 (diff)
downloadafl++-14bca4431138a80b93795683dec588a40f6050a9.tar.gz
Merge pull request #1864 from ThomasTNO/utf8_support
Add support for UTF-8 line rendering
Diffstat (limited to 'include/debug.h')
-rw-r--r--include/debug.h55
1 files changed, 38 insertions, 17 deletions
diff --git a/include/debug.h b/include/debug.h
index cd621a72..234d8fc4 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -116,7 +116,7 @@
  * Box drawing sequences *
  *************************/
 
-#ifdef FANCY_BOXES
+#ifdef FANCY_BOXES_NO_UTF
 
   #define SET_G1 "\x1b)0"                      /* Set G1 for box drawing    */
   #define RESET_G1 "\x1b)B"                    /* Reset G1 to ASCII         */
@@ -136,22 +136,43 @@
 
 #else
 
-  #define SET_G1 ""
-  #define RESET_G1 ""
-  #define bSTART ""
-  #define bSTOP ""
-  #define bH "-"
-  #define bV "|"
-  #define bLT "+"
-  #define bRT "+"
-  #define bLB "+"
-  #define bRB "+"
-  #define bX "+"
-  #define bVR "+"
-  #define bVL "+"
-  #define bHT "+"
-  #define bHB "+"
-
+  #ifdef FANCY_BOXES
+
+    #define SET_G1 ""
+    #define RESET_G1 ""
+    #define bSTART ""
+    #define bSTOP ""
+    #define bH "\u2500"                        /* Horizontal line           */
+    #define bV "\u2502"                        /* Vertical line             */
+    #define bLT "\u250c"                       /* Left top corner           */
+    #define bRT "\u2510"                       /* Right top corner          */
+    #define bLB "\u2514"                       /* Left bottom corner        */
+    #define bRB "\u2518"                       /* Right bottom corner       */
+    #define bX "\u253c"                        /* Cross                     */
+    #define bVR "\u251c"                       /* Vertical, branch right    */
+    #define bVL "\u2524"                       /* Vertical, branch left     */
+    #define bHT "\u2534"                       /* Horizontal, branch top    */
+    #define bHB "\u252c"                       /* Horizontal, branch bottom */
+
+  #else
+
+    #define SET_G1 ""
+    #define RESET_G1 ""
+    #define bSTART ""
+    #define bSTOP ""
+    #define bH "-"
+    #define bV "|"
+    #define bLT "+"
+    #define bRT "+"
+    #define bLB "+"
+    #define bRB "+"
+    #define bX "+"
+    #define bVR "+"
+    #define bVL "+"
+    #define bHT "+"
+    #define bHB "+"
+
+  #endif
 #endif                                                      /* ^FANCY_BOXES */
 
 /***********************