there's no reason for window size computation to be linked to the
authorespie <espie@openbsd.org>
Thu, 23 Jun 2016 16:11:23 +0000 (16:11 +0000)
committerespie <espie@openbsd.org>
Thu, 23 Jun 2016 16:11:23 +0000 (16:11 +0000)
commit645b31ca37bbd21d5b9ed70a837f879f4f9cdedf
tree2a63d73fd6d3db5171d1d5330b96939039e9e4aa
parent88c4a4c3eb5d103304ddc66bc23b910331d58e3a
there's no reason for window size computation to be linked to the
ProgressMeter, so make it available from state.
- computation is lazy, so no runtime difference;
- don't bother setting a SIG{WINCH} on non-tty;
- progressmeter already has access to state;
- do an empty window_size_changed in base state, override it for
addcreatedelete to inform the progressmeter.

to be reused in dpb...
usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm
usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
usr.sbin/pkg_add/OpenBSD/ProgressMeter/Term.pm
usr.sbin/pkg_add/OpenBSD/State.pm