git.strcat.st

/strcat/minitox.git/ - summarytreelogarchive

subject
correct ANSI escape sequences in color macros
commit
b72d3d6f08db7984d5956475fec5e5321d1054db
date
2026-04-17T21:58:16Z
message
diff
 minitox.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/minitox.c b/minitox.c
index c539084..694c423 100644
--- a/minitox.c
+++ b/minitox.c
@@ -60,10 +60,10 @@ struct DHT_node bootstrap_nodes[] = {
 
 #define CODE_ERASE_LINE    "\r\033[2K"
 
-#define RESET_COLOR        "\x01b[0m"
-#define SELF_TALK_COLOR    "\x01b[35m"  // magenta
-#define GUEST_TALK_COLOR   "\x01b[90m" // bright black
-#define CMD_PROMPT_COLOR   "\x01b[34m" // blue
+#define RESET_COLOR        "\x1b[0m"
+#define SELF_TALK_COLOR    "\x1b[35m"  // magenta
+#define GUEST_TALK_COLOR   "\x1b[90m"  // bright black
+#define CMD_PROMPT_COLOR   "\x1b[34m"  // blue
 
 #define CMD_PROMPT   CMD_PROMPT_COLOR "> " RESET_COLOR // green
 #define FRIEND_TALK_PROMPT  CMD_PROMPT_COLOR "%-.12s << " RESET_COLOR
@@ -79,9 +79,9 @@ struct DHT_node bootstrap_nodes[] = {
 
 #define COLOR_PRINT(_color, _fmt,...) PRINT(_color _fmt RESET_COLOR, ##__VA_ARGS__)
 
-#define INFO(_fmt,...) COLOR_PRINT("\x01b[36m", _fmt, ##__VA_ARGS__)  // cyran
-#define WARN(_fmt,...) COLOR_PRINT("\x01b[33m", _fmt, ##__VA_ARGS__) // yellow
-#define ERROR(_fmt,...) COLOR_PRINT("\x01b[31m", _fmt, ##__VA_ARGS__) // red
+#define INFO(_fmt,...) COLOR_PRINT("\x1b[36m", _fmt, ##__VA_ARGS__)  // cyran
+#define WARN(_fmt,...) COLOR_PRINT("\x1b[33m", _fmt, ##__VA_ARGS__) // yellow
+#define ERROR(_fmt,...) COLOR_PRINT("\x1b[31m", _fmt, ##__VA_ARGS__) // red
 
 
 /*******************************************************************************