Make terminal size detection a bit more robust
Make terminal size detection a bit more robust

The ioctl fails if stdin is not a terminal (which is the case
with input redirection for test purposes). Before the workspace
variables waw, wah would remain zero during the whole runtime.

Signed-off-by: Marc Andre Tanner <cc7c5be316e48d137cbb549833b85d91034d799d@brain-dump.org>

delphinus35/dvtm,medgar123/dvtm,benjohnson2001/dvtm,lotrfan/dvtm,lotrfan/dvtm,medgar123/dvtm,lotrfan/dvtm,gridsystem/dvtmx,tgvaughan/dvtm,medgar123/dvtm,delphinus35/dvtm,raedwulf/dvtm,armanbilge/dvtm,tgvaughan/dvtm,armanbilge/dvtm,benjohnson2001/dvtm,gridsystem/dvtmx,raedwulf/dvtm,raedwulf/dvtm,benjohnson2001/dvtm,tgvaughan/dvtm