aboutsummaryrefslogtreecommitdiff
path: root/slof/fs/terminal.fs
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2015-08-03 23:06:35 +0200
committerAlexey Kardashevskiy <aik@ozlabs.ru>2015-08-05 16:00:40 +1000
commit007c4500441665babda70b6af9779e3bf494c42d (patch)
tree4ca1d1c27f313457dd9f81d09407b1a0e9498711 /slof/fs/terminal.fs
parentbb624f7b534faf5e2da77cc94d98f045338c3e27 (diff)
downloadSLOF-007c4500441665babda70b6af9779e3bf494c42d.zip
SLOF-007c4500441665babda70b6af9779e3bf494c42d.tar.gz
SLOF-007c4500441665babda70b6af9779e3bf494c42d.tar.bz2
terminal: Disable the terminal-write trace by default
The terminal-write function has a built-in trace buffer feature which is currently always enabled. Since this is only needed for debugging, let's disable this feature by default. It can easily be enabled again by typing "true to twtrace-enabled?" at the Forth prompt. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'slof/fs/terminal.fs')
-rw-r--r--slof/fs/terminal.fs3
1 files changed, 2 insertions, 1 deletions
diff --git a/slof/fs/terminal.fs b/slof/fs/terminal.fs
index 582bede..dc82e7b 100644
--- a/slof/fs/terminal.fs
+++ b/slof/fs/terminal.fs
@@ -167,6 +167,7 @@ false VALUE stopcsi
CREATE twtracebuf 4000 allot twtracebuf 4000 erase
twtracebuf VALUE twbp
0 VALUE twbc
+0 VALUE twtrace-enabled?
: twtrace
twbc 4000 = IF 0 to twbc twtracebuf to twbp THEN
@@ -176,7 +177,7 @@ twtracebuf VALUE twbp
: terminal-write ( addr len -- actual-len )
cursor-off
tuck bounds ?DO i c@
- twtrace
+ twtrace-enabled? IF twtrace THEN
esc-on IF esc-process
ELSE CASE
1B OF true to esc-on ENDOF