Hello, 9fans
In writing a program I met a problem on finding window size.
cat /dev/wctl
shows something like this:
hebe% cat /dev/wctl
456 911214 603 current visible
hebe%
Need DEL key to stop. I want to get this info without manual intervention.
I tried a
; read -c 72 /dev/wctl
rio(4)
umbraticus
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Tf13f657beb7b12c0-Ma0337129de0681f834f7e7c7
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
> ; read -c 72 /dev/wctl
Or, if your chosen flavour of Plan 9 doesn't have the 'read -c'
option, one of these will do:
dd -if /dev/wctl -bs 72 -count 1 -quiet 1
syscall -o read 0 buf 72 [2]/dev/null
--
9fans: 9fans
Permalink:
https://9fans.topicbox.com/g
Thanks for umbraticus and Richard.
The value 72 is experimentally OK.
However I am not convinced yet.
I can't find the value in the manual.
Kenji Arisawa
2023年5月9日(火) 17:00 Richard Miller <9f...@hamnavoe.com>:
> > ; read -c 72 /dev/wctl
>
> Or, if your chosen flavour of Plan 9 doesn't have the
09.05.2023 15:04:07 有澤健治 :
> Thanks for umbraticus and Richard.
>
> The value 72 is experimentally OK.
> However I am not convinced yet.
> I can't find the value in the manual.
Not experimentally. According to rio(4), it's 4 values padded to 12 chars, plus
the window state as two strings, also
Thanks. sirjofri
OK. I have understood!
I have misunderstood the meaning "padded".
Sorry for may poor english.
2023年5月10日(水) 0:06 sirjofri :
>
> 09.05.2023 15:04:07 有澤健治 :
>
> > Thanks for umbraticus and Richard.
> >
> > The value 72 is experimentally OK.
> > However I am not convinced yet.
> >