[SLOF] [PATCH 1/4] terminal: Disable the terminal-write trace by default
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Mon Aug 3 20:33:32 AEST 2015
Thomas Huth <thuth at redhat.com> writes:
> 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