takawiri: use ioctl: to get terminal size; report errors on start if too small
FossilOrigin-Name: e6b1567ab2db12c536a596913be21f5fb774209c7e67a395cd54e936dfdc47b4
This commit is contained in:
parent
f326a99caf
commit
ba12145728
1 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue