Path: utzoo!utgpu!watserv1!watmath!att!mcdchg!mcdphx!dover!digital!chen From: chen@digital.sps.mot.com (Jinfu Chen) Newsgroups: comp.sys.apollo Subject: Re: PAD Types Message-ID: <48c84a4e.12c9a@digital.sps.mot.com> Date: 21 Feb 90 20:46:13 GMT References: <1990Feb18.230542.24066@idacom.uucp> Sender: news@digital.sps.mot.com Organization: Motorola, Inc. Logic IC Div, Mesa, AZ Lines: 64 In article <1990Feb18.230542.24066@idacom.uucp> danny@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. > >The original (unix) program implemented a 'counting' type display >by printing a number followed by a CR. (a la.. > > for (i=0,i<10,i++) > printf("Value is %d\r", i) > printf("file transfer complete\n") > >Running on a PAD, since all the characters would get queued up in the >transcript pad, it didn't create the same effect. >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: Instead of using a pad (frame?), one can turn off the input pad cooked mode and make it behave JLRU (:-). Here is a short program to demonstrate that: #include #include #include #include main() { status_$t status; int i; pad_$raw(ios_$stdin, &status); printf("i = "); for (i = 0; i < 10; i++) { printf("%d ", i); fflush(stdout); sleep(1); } printf("\n"); pad_$cooked(ios_$stdin, &status); } Of course, a real program needs some more checking, such as the pad_$isa call and error checking of the returned status. I do have another question relating to PAD. Is there a way to check if I 'own' the display manager from a program. The reason for this is for the DM editor program someone posted a while ago. If I run a program which would call pad_$create on a remote node via crp or telnet/rsh/rlogin, I can open up a pad on that remote node even I don't 'own' the DM over there. This could be quite annoying to the user on the remote node. The only way I can think of is to check the owner of process 'display_manager'. -- Jinfu Chen (602)898-5338 | Disclaimer: Motorola, Inc. Logic IC Div., Mesa, AZ | ...{somewhere}!uunet!dover!digital!chen | My employer doesn't pay chen@digital.sps.mot.com | me to express opinions.