We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 835e2d1 commit e763266Copy full SHA for e763266
simavr/sim/run_avr.c
@@ -33,6 +33,15 @@
33
34
#include "sim_core_decl.h"
35
36
+#ifndef NO_COLOR
37
+/* Replacements for ANSI escape codes if color is disabled. */
38
+static const struct text_colors font_no_color = {
39
+ .green = "",
40
+ .red = "",
41
+ .normal = ""
42
+};
43
+#endif
44
+
45
static void
46
display_usage(
47
const char * app)
@@ -111,6 +120,12 @@ main(
111
120
int trace_vectors_count = 0;
112
121
const char *vcd_input = NULL;
113
122
123
124
+ const char *no_color = getenv("NO_COLOR");
125
+ if (no_color && no_color[0])
126
+ simavr_font = font_no_color;
127
128
114
129
if (argc == 1)
115
130
display_usage(basename(argv[0]));
116
131
0 commit comments