aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--demo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/demo.c b/demo.c
index dbc20c7..063721c 100644
--- a/demo.c
+++ b/demo.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
int
main(void)
@@ -15,6 +16,11 @@ main(void)
double height;
size_t size, i;
+ if (isatty(STDOUT_FILENO)) {
+ fprintf(stderr, "Output file is a binary PAM image file, I am not writing that to a terminal.\n");
+ return 1;
+ }
+
rendering.smoothing = LIBSKRIFT_SUBPIXEL;
rendering.subpixel_order = LIBSKRIFT_NONE;
rendering.flags = LIBSKRIFT_MIRROR_CHARS | LIBSKRIFT_MIRROR_TEXT;