Commit ff270c1f authored by bernd's avatar bernd

More work on testing terminal

parent 812fdb3a
......@@ -184,3 +184,17 @@ event: ->throw dup DoError throw ;
: sha-3-512s ( -- )
[: 2dup sha-3-512 space type cr ;] arg-loop ;
\ terminal connection
: c:terminal ( -- )
$10000 $100000 "test" ins-ip c:connect
[: .time ." Terminal test: connect to server" cr ;] $err
tc-permit# fs-class-permit or to fs-class-permit
net2o-code
expect-reply
log .time "Terminal test" $, type cr endwith
$10000 blocksize! $400 blockalign! stat( request-stats )
[: 3 ulit, file-type "" $, 0 ulit, open-file
state-addr >o 2 fs-class! o> ;] n2o>file
end-code| ['] .time $err ;
\ No newline at end of file
......@@ -153,11 +153,13 @@ set-current
: open-tracked-file ( addr u mode --)
open-file get-size get-stat ;
: n2o>file ( xt -- )
file-reg# @ ulit, file-id catch endwith
throw 1 file-reg# +! ;
: n2o:copy ( addrsrc us addrdest ud -- )
file-reg# @ ulit, file-id
2swap $, r/o ulit, open-tracked-file endwith
file-reg# @ save-to
1 file-reg# +! ;
[: 2swap $, r/o ulit, open-tracked-file
file-reg# @ save-to ;] n2o>file ;
: seek! ( pos id -- ) >r d>64
64dup r@ state-addr .fs-seek 64!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment