[SLOF] [PATCH v3 1/6] terminal: Disable the terminal-write trace by default
Thomas Huth
thuth at redhat.com
Tue Aug 4 07:06:35 AEST 2015
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 at redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
---
slof/fs/terminal.fs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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
--
1.8.3.1
More information about the SLOF
mailing list