Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!shelby!msi.umn.edu!cs.umn.edu!cybrspc!roy From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail) Newsgroups: comp.lang.c Subject: Re: MORE/PAGING routine needed ... Message-ID: <2PHHs2w163w@cybrspc> Date: 11 Nov 90 18:11:36 GMT References: <14420@smoke.brl.mil> Organization: Villa CyberSpace, Minneapolis, MN Lines: 25 gwyn@smoke.brl.mil (Doug Gwyn) writes: > In article <1244@eci.UUCP> lll@eci.UUCP (Linda L. Lassor) writes: > >Has anyone a callable c routine that acts like MORE or PAGE? I need > >to incorporate such a routine in some programs that need to display > >files a few lines at a time, and don't want to have to do a > >system("more filename") call to do it. > > I never understand requests like this. A functional requirement is > described, then the obvious solution is immediately rejected. What > exactly is the objection to system("more filename")? I could think of a few. Perhaps she is on an OS that doesn't easily support spawning system processes, maybe due to small memory models (such as MS-DOS). Or maybe she wants to avoid the possibility of a clever user gaining shell access through the pager program, assuming the capability exists. Or it could be that she simply wants to avoid the overhead of spawning another program. In that the solution she has rejected _is_ so obvious, I'm sure there are good reasons for the rejection. -- Roy M. Silvernail |+| roy%cybrspc@cs.umn.edu |+| #define opinions ALL_MINE; main(){float x=1;x=x/50;printf("It's only $%.2f, but it's my $%.2f!\n",x,x);} "This is cyberspace." -- Peter da Silva :--: "...and I like it here!" -- me