Name

pfe-termcatch-ext ? TERMCATCH support for testing

Synopsis

TERM-CAPTURE-CONTROLS ( -- var-ptr ) ?=>? ();?
[FORTH];
?
(TERM-CAPTURE-ON) ?=>? ();?
[FORTH];
?
(TERM-CAPTURE-OFF) ?=>? ();?
[FORTH];
?
(TERM-CAPTURE-BUFFER) ?=>? ();?
[FORTH];
?
(TERM-CAPTURE-RESULT) ?=>? ();?
[FORTH];
?
TERM-CAPTURE-ON ( capturebuffer-ptr capturebuffer-len -- ) ?=>? ();?
[FORTH];
?
TERM-CAPTURE-OFF ( -- capturebuffer-ptr capturebuffer-len ) ?=>? ();?
[FORTH];
?
TERMCATCH ( str-ptr str-len some-xt* -- str-ptr str-len' catch-code# ) ?=>? ();?
[FORTH];
?

Description

TERM-CAPTURE-CONTROLS ( -- var-ptr ) => [FORTH]

enable/disable common visualization of terminal control sequences.

(TERM-CAPTURE-ON) - no description, sorry

(TERM-CAPTURE-OFF) - no description, sorry

(TERM-CAPTURE-BUFFER) - no description, sorry

(TERM-CAPTURE-RESULT) - no description, sorry

TERM-CAPTURE-ON ( capturebuffer-ptr capturebuffer-len -- ) => [FORTH]

init/start capturing terminal output

  :  TERM-CAPTURE-ON (TERM-CAPTURE-BUFFER) (TERM-CAPTURE-ON) ;
  

TERM-CAPTURE-OFF ( -- capturebuffer-ptr capturebuffer-len ) => [FORTH]

shutdown capturing terminal output

  :  TERM-CAPTURE-OFF (TERM-CAPTURE-OFF) (TERM-CAPTURE-RESULT) ;
  

TERMCATCH ( str-ptr str-len some-xt* -- str-ptr str-len' catch-code# ) => [FORTH]

create a catch-domain around the token to be executed. This works the same as CATCH. Additionally all terminal output of that word is being captured to the buffer being provided as an argument. The maximum length input argument is modified flagging the actual length of captured output stream as the output argument. Note that in most cases a POCKET-PAD is just not big enough, atleast many error condition notifications tend to be quite lengthy for byte counted forth strings.

  : TERMCATCH TERM-CAPTURE-ON CATCH >R TERM-CAPTURE-OFF R> ;