/* * less * Copyright (c) 1984,1985,1989 Mark Nudelman * * This program may be freely used and/or modified, * with the following provisions: * 1. This notice and the above copyright notice must remain intact. * 2. Neither this program, nor any modification of it, * may be sold for profit without written consent of the author. * * This program is a paginator similar to "more", * but allows you to move both forward and backward in the file. * Commands are based on "more" and "vi". */ This is a direct port of LESS version 177 to Borland C for the IBM-PC family. The original code by Mark Nudelman remains mostly intact, and functionality is very close to that described in the enclosed unmodified man and help files. The modifications include changes to support the LESSHELP environment variable under MSDOS (originally only available in UNIX version), and all of the original screen I/O (Microsoft C ?) has been replaced with simple direct calls to the Borland C video library (conio.h). Many problems have been encountered with text files with incorrect "lengths"; ie. those in which a control^Z character is used to identify the end-of-file before the physical end-of-file. These problems seem to be mostly cured, but, if LESS behaves strangely on the last screenful of a file, then this is likely the culprit. This port of LESS is also "somewhat" Desqview aware, in that it uses the BIOS for all video output when Desqview is active. This permits use in text windows without the need to "virtualize" text. Outside of Desqview, whenever a display size of 80 columns is in use, scrolling is made slightly faster by writing directly to the video buffer. Virtually all screen sizes are supported automatically by LESS. This version has been tested with VGA sizes 25x80, 43x80, 50x80, 60x80, and 25x132. My favorite LESS environment variable setting is currently: set LESS=-iqsM Things work well for me in that mode, so it may be a good starting point for others as well. Bug reports are welcome, but don't expect me to email new executables on a whim. Enjoy, Mark Lord MLORD@BNR.CA