MORE/PAGING routine needed ...
Avery Colter
avery at netcom.UUCP
Thu Nov 22 20:49:46 AEST 1990
Well, the regular expression search thingie I'm trying to hack is turning
out to be a good sized dragon, so I will shortly beam up what I have
so far for a paging routine.
If you want to do it sooner, it basically goes through a for loop a
number of times equal to the number of lines per hit you want.
The I just give it an fgets and an fputs inside the loop, returning
if the end of the file is found.
When the loop ends, put in whatever input routine you want to use.
What I have currently is a gets, partly because my system doesn't
have a curses header file or getch or getche. If you can put in
some event-driven loop to test for a keyboard stroke, it'll perform
more like the Unix shell command.
--
Avery Ray Colter {apple|claris}!netcom!avery {decwrl|mips|sgi}!btr!elfcat
(415) 839-4567 "I feel love has got to come on and I want it:
Something big and lovely!" - The B-52s, "Channel Z"
More information about the Comp.lang.c
mailing list