<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
Hello,<BR>
<BR>
I recently used BusyBox extensively in an embedded device product and ended up making some improvements to the "more" command. Attached is a patch against BB 1.6.1. The changes are:<BR>
<BR>
- Fixed a number of deficiencies in the line wrapping.<BR>
- Fixed a bug where the page could scroll multiple times per keypress. (The fix is to only scroll on spacebar, as with other "more" implementations. If an invalid character is pressed, we print a brief usage message.)<BR>
- Made us re-read the terminal dimensions after user input, in case they resized the terminal while we were waiting.<BR>
- Added an 'R' key to print the rest of the file without prompting.<BR>
- Made us crudely support tabs in the line-wrapping code by converting them to 8 spaces (not great, but better than messing up the screen; make it a compile-time option if you don't like it).<BR>
<BR>
With this patch, the line-wrapping code now scrolls the screen correctly for any combination of normal characters, newlines, and tabs. And I think the change in code size is probably fairly small.<BR>
<BR>
Enjoy. I hope to see this in the next release. :)<BR>
<BR>
Thanks for the great program,<BR>
<BR>
Tristan Schmelcher
</BODY>
</HTML>