[SLOF] [PATCH] Fix output word
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Sep 27 18:48:51 AEST 2017
Laurent Vivier <lvivier at redhat.com> writes:
> We can select the console output, but it does not really work
>
> Implement term-io-emit, as we have term-io-key to really
> send characters to the output selected by stdout.
>
> Signed-off-by: Laurent Vivier <lvivier at redhat.com>
> ---
> slof/fs/term-io.fs | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/slof/fs/term-io.fs b/slof/fs/term-io.fs
> index 52ce12a..a0b0f4b 100644
> --- a/slof/fs/term-io.fs
> +++ b/slof/fs/term-io.fs
> @@ -40,6 +40,20 @@
>
> 1 BUFFER: (term-io-char-buf)
>
> +: term-io-emit ( char -- )
> + s" stdout" get-chosen IF
> + decode-int nip nip dup 0= IF 0 EXIT THEN
> + swap (term-io-char-buf) c!
> + >r (term-io-char-buf) 1 s" write" r@ $call-method
> + drop
> + r> drop
Indentation problem here.
> + ELSE
> + [ ' emit behavior compile, ]
> + THEN
> +;
> +
> +' term-io-emit to emit
> +
> : term-io-key ( -- char )
> s" stdin" get-chosen IF
> decode-int nip nip dup 0= IF 0 EXIT THEN
Apart from the above nit, looks fine.
Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
Regards,
Nikunj
More information about the SLOF
mailing list