On (01/18/09 04:10), Peter Memishian wrote:
> I presume the API you've created has a "output instance handle" of some
> sort where you can store the number of rows.  I'd consider having the
> library call TIOCGWINSZ right before the first time it prints a row (and
> store away the result), and then have an oftm_winch() routine the
> application can call to tell the library the window size has changed,
> which will cause the library to call TIOCGWINSZ again and get the latest
> information.  That should require only about 5 lines of code in the
> application to setup the SIGWINCH handler and have that handler call the
> ofmt_winch() API.  Further, I suspect most applications won't need to
> worry about SIGWINCH because they complete immediately.  The SIGWINCH
> handler was added for ipmpstat because "-p" mode runs until it's
> explicitly terminated.

yes, that would work.

--Sowmini


Reply via email to