Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!jarthur!petunia!koko.csustan.edu!csustan!altair.csustan.edu!rayz From: rayz@altair.csustan.edu (R. L. Zarling) Newsgroups: comp.sys.amiga.misc Subject: Less runs on the 3000! Message-ID: <1991Jun3.193307.2143@csustan.csustan.edu> Date: 3 Jun 91 19:33:07 GMT Sender: news@csustan.csustan.edu Organization: California State University, Stanislaus Lines: 123 Originator: rayz@altair.csustan.edu In response to numerous requests, I have posted my revision of Bob Leivian's Less1.3 (dubbed Less1.3Z) to ab20.larc.nasa.gov (128.155.23.64). It is file Less13Z.lzh, currently in directory /incoming/amiga. The ReadMe file from that posting follows: ------------ This is a revision of a port (by Bob Leivian) of version 73 of the "Less" pager from *nix (Fred Fish #149). Bob Leivian's port of 'Less' to the Amiga has long been my favorite Ascii file reader. It does multiple files, pipes, forward and backward scrolling, and searching. I also appreciate that it opens its own window, so I can look at a file without losing context on my shell screen. Alas, it was however faulted. Mainly in that it didn't run on my new Amiga 3000! As it turned out, this was just the incentive I needed to open up the code and fix everything I always wanted it to do. The current version runs under both 1.3 and 2.0 (and presumably earlier versions as well--untested). It has been tested on an accelerated 1000 and 2000, and on my 3000. The current version opens a full-sized window on your workbench screen, and displays as much text from the first input file as it can using the standard system font. It is smart enough to adjust these values even if you resize the window using the resizing gadget. It responds to the standard window close gadget. It recognizes most ANSI commands to set underlining, italics, boldfacing, or inverse video, in additon to the backspace protocols for boldfacing and underlining that Less has always recognized. Of course, I couldn't resist a few minor command/option additions. This Less allows you to scroll backward in the file by one line using the backspace key--a sort of logical consequence, IMHO, of the carriage return key's use for scrolling forward by single lines. The arrow keys (cursor up, down, left and right) are active: up and down move you through the document by pages; left and right by lines; shifted left and right by half-pages. The HELP key displays a help message. Half-page moves used to be fixed at 10 lines (although alterable by prefixing a u or d command with a different number). With resizable screens, this didn't seem to make much sense any more, so I also have Less automatically compute the half-page size on startup and resizing. Note that the old -z only holds its value until the window is resized. I removed two "features" of the old Amiga port: Less1.3Z no longer internally expands wildcarded filenames, and it no longer prints files on the system printer. I think both of these functions are better done by other means; e.g. SKsh or some other shell for wildcard expansion, and copying to prt: or using one of the many printer utilities to get printouts. Less is a good pager; it doesn't need to be bogged down and fattened up with random other capability. Workbench support is expanded to handle multiple selection of files to be viewed. You cannot enter -options from workbench like you can from CLI, but Less *does* act upon whatever options are set in the environment variable LESS. Someone should probably add tooltype support someday. Less1.3Z was compiled with SAS-C (formerly Lattice) v5.10a. ------------------------------------------------------------------- ReadMe from original Less1.3 follows: This is an updated version of "LESS" from Fish #92 It fixes several bugs and has some nice new features * It is a "better more" , that is you can go forward or backward, search, go to line numbers, or a percentage of the file, moves forward just like more, however "b" backs up and many more options are available (type h for help) * It now works with interlaced screens. * It has "a print the file I am looking at" feature with several style options such as line numbers page breaks, draft/letter mode etc. The command is & (ampersand -- sorry I am running out of letters) (note! I couldn't get a EXECUTE("RUN less -p filename") to work when called from the workbench so it only prints in background from CLI. If any one can make that work let me know! Enter the first letter of each option, if any For example 'nh#60|80t8^l', prints the file with numbered lines. headers, 60 lines per page, 80 columns per line, tab stops every 8 positions, control chars (if any are in the file) are printed in ^X format, and the file is printed in letterquality mode the options are... numberedlines headers ^ctrl proportional letterquality draft wide uncompressed # of rows, | of columns, t tabstop * you can also print a file directly by "RUN less -p filename" if you want * it handles roff file underline and boldface better now * the screen paint options have been changed to c and C (from p), to match UN*X 'more'. if you like there is a paint in place option that is cute, the default is clear and paint from top which is fastest (esp. on 48 line interlaced) but you can use scroll from bottom mode also * all changes from UN*X 'less' up to rev 73 are included * a new option -z allows you to set scroll page size to some size other than a screenful if you want. * there is a '' command that returns you to where you were before a ' command * you can now set numbered options correctly that is it for now and "THANKS FOR YOUR SUPPORT..." donations, comments and suggestions can be sent to: Bob Leivian ...!sun!sunburn!dover!leivian 2702 W. Curry St. Chandler, AZ 85224 (602)820-6859