stdin and the keyboard
Renny K
rennyk at apex.com
Sat Jun 29 09:27:24 AEST 1991
In article <1619 at opus.NMSU.Edu> mdowell at dante.nmsu.edu (DOWELL) writes:
>Hello,
>
>I've got a quick question...
>
>I am trying to write a replacement for the DOS more command. I would
>like it to function as closely like the original as possible,
>therefore piping of commands is needed, ie dir | more.
>
>My problem is that when I get input from the command (dir) I set the
>file pointer equal to stdin, but when I go to check if a key is
>pressed getch() checks stdin and grabs a character from the command.
>
>I can't get it to recognize the keyboard and the input command
>separate instead of both being the stdin.
>
<rest deleted>
Okay... Once you show a screenfull of info, reassign the stdin pointer
to a file opened to CON:, (make sure you save the old one) and later
restore the old one.
Renny.
--
-------------------------------------------------------------------------------
Renny Koshy rennyk at apex.com
Apex Computer, Redmond, WA.
More information about the Comp.lang.c
mailing list