Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ICAEN.UIOWA.EDU!dbfunk From: dbfunk@ICAEN.UIOWA.EDU (David B Funk) Newsgroups: comp.sys.apollo Subject: Re: PAD types Message-ID: <9002200247.AA00104@icaen.uiowa.edu> Date: 20 Feb 90 02:36:05 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Iowa Computer Aided Engineering Network, University of Iowa Lines: 42 In posting <1990Feb18.230542.24066@idacom.uucp> Danny Wilson writes: >A while back I ported a UNIX program to SR9.7 and enhanced its >output because of the way PADs handle character output. [stuff deleted] >So, I enhanced the program to create a little window at the top of >the pad to display the 'counting' numbers in. It went something like: > > inquire about stdout; > if it is of type pad_$uid, then > create a little window with frame > open a stream to that window/frame > put the output there > else > put the output to stdout > >However, now that we've upgraded to SR10.1, the program no longer works! > >The inquiry about ios_$stdout yields that it is of type "input_pad_$uid" >instead of simply "pad_$uid". > >WHY? I can't really see why the "output" should be of type "input"... etc >Has anyone out there seen this weirdness and can explain it? My guess is that you've been hit with more JLRU. At sr10, the "tty" command will return a "tty device" for any interactive shell, even a DM pad. Thus the "tty" for your DM window is its transcript pad, "/dev/display" and all those "/dev/pad*" thingies. Unix expects "/dev/tty" to be both readable and writeable, and can't understand the idea of having std-in and std-out going to 2 different types of "devices" for the same "/dev/tty". Thus if you look at all your standard streams for your shell in a DM window using the "/com/lopstr" tool, you'll see that they are all "input pad". One workaround for this that is OS rev independent: at sr10 they've finally documented the DM pad call "pad_$isa". Give this little gem your std-out or other stream, and it'll return a status of OK if its to a DM pad, error otherwise. I can see where this'll become important when there's more X stuff around. Then a window may not be a DM pad. Dave Funk