aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/msgdb.boot6
-rw-r--r--src/interp/sys-driver.boot9
2 files changed, 13 insertions, 2 deletions
diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot
index 3b72b074..bfd8e1ff 100644
--- a/src/interp/msgdb.boot
+++ b/src/interp/msgdb.boot
@@ -654,12 +654,14 @@ brightPrint0 x ==
x = '"%%" =>
sayString '"%"
x = '"%b" =>
- NULL IS_-CONSOLE CUROUTSTREAM => sayString '" "
+ NULL IS_-CONSOLE CUROUTSTREAM
+ or stdStreamIsTerminal(1) = 0 => sayString '" "
NULL $highlightAllowed => sayString '" "
sayString $highlightFontOn
k := blankIndicator x => BLANKS k
x = '"%d" =>
- NULL IS_-CONSOLE CUROUTSTREAM => sayString '" "
+ NULL IS_-CONSOLE CUROUTSTREAM
+ or stdStreamIsTerminal(1) = 0 => sayString '" "
NULL $highlightAllowed => sayString '" "
sayString $highlightFontOff
STRINGP x => sayString x
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index 2bd991fa..8cc54fad 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -64,4 +64,13 @@ systemAlgebraDirectory() ==
ensureTrailingSlash cdr dir
nil
+++ stdStreamIsTerminal:
+++ returns 1 if the standard stream is attached to a terminal;
+++ otherwise 0.
+)if %hasFeature KEYWORD::GCL
+import stdStreamIsTerminal for std__stream__is__terminal: INT -> INT
+)else
+stdStreamIsTerminal fd ==
+ 0
+)endif