40 lines
1.0 KiB
Diff
40 lines
1.0 KiB
Diff
|
|
From 4c10e4629eccd856a366f64899bc9e22aa8c8296 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Mark Nudelman <markn@greenwoodsoftware.com>
|
||
|
|
Date: Fri, 21 Oct 2022 12:09:17 -0700
|
||
|
|
Subject: [PATCH 29/48] lesstest: Make display_screen_debug write to stderr not
|
||
|
|
stdout.
|
||
|
|
|
||
|
|
---
|
||
|
|
lesstest/display.c | 8 ++++----
|
||
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/lesstest/display.c b/lesstest/display.c
|
||
|
|
index 648d42a..4c5af01 100644
|
||
|
|
--- a/lesstest/display.c
|
||
|
|
+++ b/lesstest/display.c
|
||
|
|
@@ -109,17 +109,17 @@ void display_screen_debug(const byte* img, int imglen, int screen_width, int scr
|
||
|
|
}
|
||
|
|
literal = 0;
|
||
|
|
if (is_ascii(ch))
|
||
|
|
- fwrite(&ch, 1, 1, stdout);
|
||
|
|
+ fwrite(&ch, 1, 1, stderr);
|
||
|
|
else
|
||
|
|
- printf("<%lx>", (unsigned long) ch);
|
||
|
|
+ fprintf(stderr, "<%lx>", (unsigned long) ch);
|
||
|
|
if (++x >= screen_width) {
|
||
|
|
- printf("\n");
|
||
|
|
+ fprintf(stderr, "\n");
|
||
|
|
x = 0;
|
||
|
|
if (++y >= screen_height)
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
- fflush(stdout);
|
||
|
|
+ fflush(stderr);
|
||
|
|
}
|
||
|
|
|
||
|
|
void print_strings(const char* title, char* const* strings) {
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|