Operation of more command

Michael D. Setzer II mikes at kuentos.guam.net
Sun Apr 27 10:25:16 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm the current developer of g4l, and it has used busybox before I took over, 
and has been excellent. I have just noticed one issue involving the more 
command. The g4l project is a bootcd for disk imaging, and doesn't make a 
lot of use of the more command, but there are times when checking things 
would make more a nice option, but both the busybox and even the one 
from Fedora 8 seem to work just like cat. In looking at the code of the 
more.c, it appear it acts like cat under some situations. It works fine when 
run under the Fedora environment, but from the cd, it does the same with a 
local terminal or if telnetted in. So, not sure what would be missing that 
would case it to act in this manner.

There is a LINES paramater in the environment that is set already. 

I have made a simple morex.c program that seems to do what I need, but 
would perfer to have it work the same in the g4l environment.

MOREX.C

#include "stdio.h"
int main()
{
  char oneword[100];
  char *c;
  int cnt=0;

  do
  {
    c = fgets(oneword,100,stdin); /* get one line from the file */
    if (c != NULL)
       printf("%s",oneword);    /* display it on the monitor  */
    if (!(++cnt % 20)) sleep(5);
  } while (c != NULL);          /* repeat until NULL          */
  return 0;
}

Just picked 20 and 5 second pause per page. 



+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes at kuentos.guam.net                            
  mailto:msetzerii at gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC at HOME CREDITS
SETI 5,269,727.070797 | EINSTEIN 1,573,038.609732 | ROSETTA 
480,077.992597


-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8 -- QDPGP 2.61c
Comment: http://community.wow.net/grt/qdpgp.html

iQA/AwUBSBPH7izGQcr/2AKZEQLowwCbBIZR1V74RIxK2vMzwcLl9w7VW2EAoOxg
T/gn0XyPjy2JU9VP0rYc7cg4
=4cbn
-----END PGP SIGNATURE-----



More information about the busybox mailing list