On Nov 4, 7:58 am, "kotzkro...@gmail.com" <kotzkro...@gmail.com>
wrote:
Hi,
I just started working on a simple 'more' version.
I use it like this:
cat blabla.txt | more
Here is my problem:
Since more gets its input through a pipe I can't use stdin for
keyboard input anymore and thus can't scroll with space and return.
How can I have one filestream for the pipe and another for regular
keyboard input?
Is this possible?
As mentioned, this is not standard C. You might try opening /dev/tty
and reading from that (this idea comes from The Unix Programming
Environment, I think by Thompson and Pike - I may be wrong about
that). On a DOS/Win environment, open the device "CON", it should
accomplish the same thing.
-- Marty (a newbie, so feel free to ignore me)