This is a revision of a port (by Bob Leivian) of version 73 of the "Less" pager from Unix (Fred Fish #149). Less is an Ascii text pager with the following features: -Compatible with WB 1.3 and 2.0 on any Amiga -Handles NTSC, PAL, overscan, etc. screens -Works with pipes (with a consenting shell or pipe: device) -Permits multiple file selection, CLI or Workbench -Forward & backward movement in a variety of ways -Powerful searches, using regular expression patterns -Handles alternative fonts -Handles international Ascii characters -Handles boldface, underline, etc. in ANSI or Unix nroff style -Customizable, using environment or command options -Residentable Less is still the only pager I know of on the Amiga that handles pipes and multiple file selection. To me, these two features are essential in a pager. If your shell supports pipes and expands wildcards (I use Steve Koren's outstanding SKsh), you can write things like 'ls | less' or 'less *.readme'. Less has been around for a long time in the Unix world, and has been ported to the Amiga before. Unfortunately, the earlier Amiga port would not run on Amiga 3000s and was seriously crippled in the areas of support for non-NTSC or overscan screens and international characters. The current version opens a full-sized window on your workbench screen (even PAL or overscan), and displays as much text from the input files 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, and of course front/back, drag bar, and 2.0 zoom gadgets. You can specify less than a full-sized window from the command line by a new option, -[N,N,N,N]. The four N's are left-edge position, top-edge position, width, and height in pixels. Any may be omitted, defaulting to 0. Zeros in the last two positions mean full width or height. If numbers at the end of the list are omitted, their preceding commas may be omitted also. If any of the Ns are negative, they are taken to be relative to the bottom right corner of the screen. Thus, [-200,-100, 200,100] would be a 200 by 100 window in the bottom right corner of the screen, and [0,12,0,-100] would be a full-width window leaving the title bar of the screen and the bottom 100 scan lines exposed. There is a minimum window size, and if it is violated, or if the window would fall off the edges of the screen, Less simply forces things to conform. It recognizes most ANSI commands to set underlining, italics, boldfacing, or inverse video, in addition to the backspace protocols for boldfacing and underlining that Less has always recognized (if neither of the two -u options is set). This version of Less is more "Amigatised" in its use of the Amiga keyboard. It 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. I have added ^N and ^P for next and previous line, ^V for next page, ^S for forward search, and '<' and '>' for go to top and bottom of file, in response to a request from an emacs-type. 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. Less version 1.4Z recognizes the international character set between characters 160 and 255 (decimal). The regular expression pattern matching in searches has been enabled. These use the powerful Unix 'ed' style patterns. Any pattern consisting only of letters, numbers, and spaces will simply search for the given pattern. But you can use one or more of the metacharacters [].^$()|*+ to engineer very sophisticated searches. The '.' stands for any single character, and 'x*' stands for 0 or more occurances of x (so 'x.*y' would match anything that started with x and ended with y). 'x+' works the same way, for 1 or more occurances of x. 'x?' matches 0 or 1 occurances of x (i.e. 'x' or nothing). '[abc]' matches any single occurance of 'a', 'b', or 'c'. '[^abc]' matches any single character except 'a', 'b', or 'c'. '[a-m]' matches any single character in the range 'a' through 'm' inclusive. '^x' finds x only at the beginning of a line; 'x$' only at the end of a line. 'x|y' matches either x or y. The various pieces can be combined, of course, and grouped with parentheses. '([Aa]ny|[Ee]ach) +of you' would find any phrase beginning with 'any' or 'each' (possibly capitalized) followed by one or more blanks, followed by 'of you'. ' (can)?not ' matches either 'not' or 'cannot', but not 'nothing' or 'cancel'. '[^a-zA-Z]i[^a-zA-Z]' finds all occurances of a variable 'i' in a program, but does not find 'i' embedded in other variable names or words. To match a metacharacter literally, precede it with a backslash; e.g. '\. \*' would match a period followed by two spaces and an asterisk. With resizeable windows, the number of lines to scroll for page-forward and page-back commands is now recalculated each time the screen is resized. The -z command now sets the maximum number of lines that will be scrolled for full-screen movement. The space bar, for instance, will scroll either -z lines, or a full screen, whichever is less. 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 of the window. Many bugs or unimplemented features have been fixed; they're generally small things that casual users will never notice. The Q and q options work: they quiet the visible bell, since there is no audible bell. The E and e options have changed meaning slightly: You can exit a file upon any attempted forward movement beyond eof (E), or only upon an attempted full-page movement (e, the default), or you can be barred from exiting via text movement commands (neither e nor E). The old business of closing the window immediately (old E) upon finding eof, before you have time to read the last page of text, was judged useless in the Amiga environment! C was made the default for painting screens, for speed. This version takes greater pains to assure that the prompt at the bottom of the screen fits in a single line; it is shortened if necessary. Some bug fixes have made it harder (I think!) to crash Less (no pun intended). Signal handling has been improved: ^C in the Less window will abort searches, but is otherwise ignored with a warning message. A BREAK signal from the launching CLI (^C in the CLI window, if there is one, or AmigaDOS "break" command directed at Less) will immediately terminate the process (with cleanup, of course). Error handling in connection with reading the files is much improved, with emphasis on more informative error messages. I removed two "features" of the old Amiga port: Less1.4Z 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. In any event, since I didn't need or want these functions, it seemed a lot easier to remove them than to rewrite them. The "clean data" option of the original Unix no longer makes sense in this version, and has been deleted. Less1.4Z was compiled with SAS-C (formerly Lattice) v5.10a, using the version 2.0 include files. -------------------------------------------------------------- Ray Zarling California State Univ. Stanislaus Turlock, CA 95380 rayz@csustan.edu