diff --git a/takawiri.retro b/takawiri.retro index 47d3619..6f99c17 100755 --- a/takawiri.retro +++ b/takawiri.retro @@ -18,14 +18,18 @@ Setup the text output buffer dimensions. #25 'TOB:H const ~~~ -Setup the local terminal dimensions. - -TODO: some systems may provide this in the environment. See if - this can be pulled in automatically if present? +Setup the local terminal dimensions. This requires the current +development build of Retro to gain access to the `ioctl:` words. +(If not using this, hard code the terminal constraints for your +system). ~~~ -#105 'LT:W const -#30 'LT:H const +ioctl:term-size (rows,cols) 'LT:W const 'LT:H const +~~~ + +~~~ +LT:W #100 lt? [ 'Terminal_too_narrow! s:put nl bye ] if +LT:H #27 lt? [ 'Terminal_too_short! s:put nl bye ] if ~~~ # Dependencies