Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: windows color printing
  • Loading branch information
PawelKorsak committed Mar 24, 2026
commit 17442d2bb8629a8276bedc56cd95c045c10127ac
14 changes: 13 additions & 1 deletion candletool/src/md_cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,25 @@
#include "flasher.hpp"
#include "web_file.hpp"

/* ERROR COLORING NOTE: may not work on all terminals! */

#ifndef WIN32

#define REDSTART "\033[1;31m"
#define GREENSTART "\033[1;32m"
#define YELLOWSTART "\033[1;33m"
#define BLUESTART "\x1b[38;5;33m"
#define RESETTEXT "\033[0m"

#else

#define REDSTART ""
#define GREENSTART ""
#define YELLOWSTART ""
#define BLUESTART ""
#define RESETTEXT ""

#endif

#define RED__(x) REDSTART x RESETTEXT
#define RED_(x) REDSTART + x + RESETTEXT

Expand Down