Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!buengc!bph
From: bph@buengc.BU.EDU (Blair P. Houghton)
Newsgroups: comp.unix.wizards
Subject: Re: How can I read keyboard without stopping
Message-ID: <877@buengc.BU.EDU>
Date: 19 Aug 88 10:56:29 GMT
References: <813@ms3.UUCP> <1246@mcgill-vision.UUCP> <51@yarra.oz.au>
Reply-To: bph@buengc.bu.edu (Blair P. Houghton)
Followup-To: comp.unix.wizards
Organization: Boston Univ. Col. of Eng.
Lines: 41

In article <51@yarra.oz.au> bgg@yarra.oz.au (Benjamin G. Golding) writes:
> In article <813@ms3.UUCP>, isns02@ms3.UUCP (Harris Reavin) writes:
> > I would like to know if it is possible to get input data from the
> > keyboard while my program is constantly looping and displaying output
>
> 5) A pair of processes and a pipe.  Have the main process create a
>    pipe and spawn a subprocess to do all the work; it can then block
>    reading from the keyboard.  When keyboard input arrives, the main
>    process copies it to the pipe for the other process and sends a
>    signal to notify it that data is waiting there.
>
>    Good: It will work almost anywhere, even V6!  It is simple and
>    natural: there are two tasks to be done, so we have two processes.
>
>    Bad: If we lose a signal we may not get all input as it arrives.

I think I know of an example of this, and a fun one at that!

If you can find it (I don't believe I have a noncorrupted copy), look
at the vrogue extension to the game rogue.  It allows switching two
character sets when sending graphics-characters and ascii to the terminal
under the X window system.

Lemme look...

Aha! I do have it; just not on this computer.  No ftping problem...

Yes, it is neat as all-get-out.  It does some Rube Goldberg plumbing,
(no doubt brilliant to another eye) and handles almost all of the
signals itself.  I don't know of its portability, but I'm certain for
Ultrix 2.2.

I would appreciate someone's telling me what my liability is if I start
passing it around.  I pulled it off the net, myself, but I don't know
whether it should have been there; seems it was part of a systems-software
release once, then not.

Jim Gettys would know.

				--Blair
				  "So would his lawyer, I fear..."