home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / GNU / LES177AS.ZIP / README.DOS < prev    next >
Encoding:
Text File  |  1992-01-04  |  6.2 KB  |  121 lines

  1. LESS V177E    -- Ported to MSDOS/BORLANDC by Mark Lord -- Nov/91
  2.  
  3. /*
  4.  *        less
  5.  *    Copyright (c) 1984,1985,1989  Mark Nudelman
  6.  *
  7.  *    This program may be freely used and/or modified, 
  8.  *    with the following provisions:
  9.  *    1. This notice and the above copyright notice must remain intact.
  10.  *    2. Neither this program, nor any modification of it,
  11.  *       may be sold for profit without written consent of the author.
  12.  *
  13.  *    This program is a paginator similar to "more", 
  14.  *    but allows you to move both forward and backward in the file.  
  15.  *    Commands are based on "more" and "vi".
  16.  */
  17.  
  18. This is a direct port of LESS version 177 to Borland C for the IBM-PC family.
  19.  
  20. A slightly buggy version of this was posted to comp.binaries.ibm.pc (USENET)
  21. in August/1991.  Fixes made since that release include:
  22.  
  23.     1) 'F'  command now works.  Note that SHARE.EXE should also be loaded.
  24.     2) 'Q'  command added, same as 'q'.
  25.     3) '-z' option now works.
  26.     4) default scroll window size is now (screensize - 2).
  27.     5) lines are no longer "lost" when '-r' is used.
  28.     6) ALT-e, ALT-n, and ALT-p now do same functions as ':e', ':n' and ':p'.
  29.     7) output is now buffered, as per original version.
  30.     8) handling of messy 'Calculating line numbers'.. has been fixed up.
  31.     9) '-v' now supported to select BIOS output over direct screen writes.
  32.  
  33. At this point, MLESS177.ZIP was first uploaded to Simtel20.  With much poking
  34. and prodding by users (especially M D Lawler), the changes have continued:
  35.  
  36.     10) optional '|' command (pipe) now supported.
  37.     11) optional '-o/-O' logfiles now supported.
  38.     12) lesskey files now supported for remapping command key sequences.
  39.     13) carriage returns (^M) now NEVER displayed.
  40.     14) help message now says '-?' instead of '-\?'.
  41.     15) the version number ('V' command) is now '177++' to avoid confusion.
  42.     16) the handling of NULL patterns has been fixed in regex.c.
  43.     17) lesskey.exe and lesskey.man also included in package.
  44.     18) ALT-x and ALT-q now quit from less.
  45.     19) filename wildcard GLOBbing is now supported for the :e function.
  46.     20) setargv.c (by Michael M Rubenstein) is used instead of wildargs.obj
  47.         for expanding wildcards.. allows quotes and forward slashes.
  48.     21) the help screen now uses same video output mode as original file.
  49.     22) a makefile (less.mak) is now included for less/lesskey with bcc.
  50.     23) the -h and -y options now default to two less than the screensize,
  51.         to complement the default for -z, unless -z is explicitly set.
  52.     24) control characters now display in LIGHTBLUE by default.
  53.     25) default LESSCHARSET is now "ibmpc" instead of "ascii".  This allows
  54.         access to almost the entire OEM character set, unlike "latin1".
  55.     26) bugs in original edit.c fixed up -- better handling of :e command
  56.         and binary files are never entered into edit list.
  57.     27) scrolling now works consistantly with and without -c/-C options.
  58.     28) bug fixed in setargv.c:  less +G now works again.  Note that even
  59.         in "stock" less, the following is broken:  less +f filename  
  60.     29) buggy -s (in original, too!) now fixed, courtesy KiYun Roe.
  61.  
  62. Thanks to a lot of help from Michael D Lawler, this version now supports 101%
  63. of the full/optional functionality of the standard unix version of less.
  64.  
  65. This package includes *full* source code for LESS V177, including all changes
  66. made for the TURBOC port to MSDOS.  The diffs from "standard LESS V177" are
  67. also included separately in diffs.177 for those who wish to restore the 
  68. original source code.  Several extra files specific to the MSDOS port are also
  69. included.  I used BORLAND C++ to build the .EXE's, and LZEXE to compress them.
  70.  
  71. The original source by Mark Nudelman remains mostly intact, and functionality
  72. is very close to that described in the enclosed .man and .hlp files.
  73.  
  74. The biggest difference from the original is that the MSDOS port defaults to
  75. a scroll window size which maintains one line in common with the previous 
  76. screen when paging forward/backward in the file.  "Standard" LESS does not.
  77.  
  78. The incredible GNU regex.[ch] routines are used to provide regular expression
  79. matching in string searches, and the popen/pclose routines are courtesy of
  80. Diomidis Spinellis, with minor modifications for Borland C.  Also used is a 
  81. version of setargv.c by Michael M Rubenstein to handle wildcards on the command
  82. line.  A greatly hacked wildcard.c (originally by Guntram Blohm) performs
  83. wildcard expansion for the ":e" command.
  84.  
  85. Modifications include changes to support the LESSHELP environment variable
  86. under MSDOS (originally only available in UNIX version), and all of the original
  87. screen I/O (Microsoft C ?) has been replaced with simple direct calls to the
  88. Borland C video library (conio.h).  Many problems have been encountered with
  89. text files with incorrect "lengths"; ie. those in which a control^Z character
  90. is used to identify the end-of-file before the physical end-of-file.  These
  91. problems seem to be mostly cured, but, if LESS behaves strangely on the last 
  92. screenful of a file, then this is likely the culprit.
  93.  
  94. This port of LESS is also "somewhat" Desqview aware, in that it uses the BIOS
  95. for all video output when Desqview is active.  This permits use in text windows
  96. without the need to "virtualize" text.  Outside of Desqview, whenever a display
  97. size of 80 columns is in use, scrolling is made slightly faster by writing
  98. directly to the video buffer.
  99.  
  100. Most common screen sizes are supported automatically by LESS.  This version
  101. has been tested with VGA sizes 25x80, 43x80, 50x80, and 25x132.  The Borland
  102. library routines seem to choke on video modes involving more than 50 lines.
  103.  
  104. When lesskey.exe is used to create alternate command-key sequences for less,
  105. it creates a file named "_less" in the directory referenced by the HOME 
  106. environment variable, or in the root directory of the current drive if HOME
  107. is not set.  The less program looks for _less beginning in these two places,
  108. and then scans the entire search path if it is not found there.
  109.  
  110. My favorite LESS environment variable setting under MS-DOS is currently:
  111.  
  112.     set LESS=-icqsM
  113.  
  114. Things work well for me in that mode, so it may be a good starting point to try.
  115.  
  116. Bug reports are welcome, but don't expect me to email new executables on a whim.
  117.  
  118. Enjoy,
  119.  
  120. Mark Lord    MLORD@BNR.CA
  121.