wsh adjustable windows...

michael sweet sweetmr at SCT60A.SUNYCT.EDU
Wed Apr 17 21:30:06 AEST 1991


> Now for the hard part, that I don't want to do:

> What about cases when you are 1) not connected to a terminal,
> 2) piped to the printer, or
> 3) using termio
> 4) using termcap
> 4) completely lost and need to make a best guess !

Well, if you are using curses for your wsh stuff, you can do:

 endwin(); /* shut down things */
 initscr(); /* start them back up, and read new size */

(this'll also work with my CMenu lib...)


Ok, for #1 and 2, you should get a FALSE (0) from isatty(1).  Hmmm, that
might not work for a printer, tho.  You could hardcode the name of the
printer device (not save if the program is to be used generally, but OK
otherwise), and use ttyname(1) to get the name of the device...

Hope this helps!

 -Mike



More information about the Comp.sys.sgi mailing list