🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.elm
Article #5465

Re: Another for the wish list...

#5465
From: Dave Taylor
Date: Sun, 04 Mar 1990 20:13
35 lines
1700 bytes
John.Pedersen and Mike Monts ask about having the folder listing
routine called by '?' put through a pager...

This should actually be prety easy, actually, as the program simply 
opens up a pipe to an "ls" process...in the file "syscall.c", the 
routine is as follows:

  list_folders()
  {
        /** List the folders in the users FOLDERHOME directory.  This is
            simply a call to "ls -C"
        **/

        char buffer[SLEN];

        CleartoEOS();   /* don't leave any junk on the bottom of the screen */
        sprintf(buffer, "cd %s;ls -C", folders);
        printf("\n\rContents of your folder directory:\n\r\n\r");
        system_call(buffer, SH);
        printf("\n\r");
  }

To make it go through a pager, try changing the invocation to something
more like: 
	sprintf(buffer, "cd %s; ls -C | %s", folders, pager");
where "pager" is set to whatever your favorite pager might be...

Of course, looking at this routine a bit closer, it really shouldn't
have the "ls -C" call buried so deep in the code anyway.  ;-\

						-- Dave Taylor
Intuitive Systems
Mountain View, California

taylor@limbo.intuitive.com    or   {uunet!}{decwrl,apple}!limbo!taylor
Technical Details
Message-ID: <499@limbo.Intuitive.Com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!limbo!taylor
References: <132429@sun.Eng.Sun.COM> <1043@encad.Wichita.NCR.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!limbo!taylor
From: taylor@limbo.Intuitive.Com (Dave Taylor)
Newsgroups: comp.mail.elm
Subject: Re: Another for the wish list...
Summary: '?' folders | PAGER
Message-ID: <499@limbo.Intuitive.Com>
Date: 4 Mar 90 20:13:37 GMT
References: <132429@sun.Eng.Sun.COM> <1043@encad.Wichita.NCR.COM>
Reply-To: taylor@limbo.Intuitive.Com (Dave Taylor)
Organization: Intuitive Systems, Mountain View, CA: +011 (415) 966-1151
Lines: 35