home *** CD-ROM | disk | FTP | other *** search
-
- ==============================================================================
-
- L2 Version 2.5
- A. Donnie Hale, Jr.
- Copyright (c) 1992, 1993
-
- An OS/2 2.0 file-viewer utility
-
- SANSoft Development
- 4971 Pegasus Ct.
- Hilliard, OH 43026
- Voice-mail: (614) 898-2675
- CompuServe: 74260,1022
-
- ==============================================================================
-
-
- Description
- -----------
- L2 is a text file-viewer utility created for OS/2 2.0 developers and users.
- It is developed entirely as a 32-bit application (save the text-mode
- interface, which IBM left as 16-bit). Multiple files may be specified on the
- command line (now including wildcards!!), and there is no restriction as to
- the maximum line length of a file. In addition to the standard features of a
- file-viewer utility, L2 incorporates intelligent tab expansion, multiple text
- modes, jumping to a specific line number, setting and retrieving of
- bookmarks, and regular expression searches. Also, because L2 loads the file
- to be viewed entirely into memory, scrolling, jumping to specific or saved
- locations, and text searches are extremely fast.
-
-
- Release 2.5 Notes
- -----------------
- A hexidecimal mode has been added!! By modifying the way L2 breaks up an
- ASCII file into lines, L2 can now load any file, as-is. As a result, L2
- loads slightly faster and binary files can be viewed as well! If a binary
- file is loaded and no CR/LF combinations are found, the file will appear in
- regular mode as one long line. It is best to switch to hex mode to view
- binary files. See the section on Hex Mode below for more information.
-
- If L2 is run and the current screen mode is not 80x25, L2 maintains the
- current screen mode. If the screen mode is 80x25, L2 uses the screen mode
- in its saved configuration (initially 80x30). This support for screen modes
- INCLUDES 132-column mode!! The MODE command under OS/2 2.0 supports a large
- number of screen modes, depending on hardware. You may be able to use this
- program to select a screen mode not internally supported by L2. To better
- support various screen modes, support for the two low-resolution 80x25
- modes has been removed.
-
- Version 2.5 fixes a bug in the "Clone L2" function if it couldn't find
- L2.EXE in the path and it wasn't in the current directory. L2 searches
- first the current directory, then the directories in the PATH, then the
- command line for the location of L2.EXE. It then updates that file with the
- current L2 configuration into L2CLONE.EXE, in the same directory as the
- L2.EXE file.
-
- Some various changes (specifically eliminating C Set/2 library functions in
- favor of already-being-used OS/2 APIs) yielded about a 9K reduction in
- size.
-
-
- Release 2.1 Notes
- -----------------
- To improve ease of use, L2 can now be started without any command-line
- parameters. When this is done, L2 will prompt for a file name or names. Any
- number of file names (with or without wildcards) may be entered at this
- prompt, separated by spaces (up to 60 characters total). L2 will treat this
- list exactly as if it had been entered on the command line. If <Escape> is
- pressed at this point, L2 will exit.
-
- Along with this, while a file is being viewed, the 'N' key will bring up
- this same prompt to allow viewing a new file while within L2. The same
- rules for entering file names given above apply here. The expanded list of
- files will be appended to any current list of files, and the first file
- found out of the additional files will be displayed.
-
- If L2 gets through its entire list of files without being able to load any
- of them, it will bring up the file prompt. Hitting <Escape> will exit at
- this point.
-
- The number of files that may be contained in the file list has been
- increased to 256 files.
-
-
- Release 2.0 Notes
- -----------------
- Release 2.0 of L2 incorporates several new features, including wildcard
- filename expansion and a file-selection list. Command-line arguments passed
- to L2 which have wildcards ('*' and '?') are expanded into full file names.
- Arguments without wildcards are left as-is. The F6 and Shift-F6 keys move
- forward and backward through the expanded list of files. The Ctrl-F6 key
- brings up a list of all of the expanded file names, with the currently
- listed file hilited. The desired file may be hilited, and when <Enter> is
- pressed, that file will be loaded. Up to 50 files may be contained in this
- expanded file list.
-
- If there is a problem loading the next/previous/selected file, a message is
- displayed, there is a short pause, and the next file in the list is loaded.
- If L2 gets through the entire list of files without being able to load any
- of them, it will exit.
-
- To work with this capability, the file-search criterion remain across files.
- Thus, if a search is performed on one file and then a new file is selected,
- only the 'A' key needs pressed to repeat that search from the top of the new
- file. The <Esc> key exits L2 altogether.
-
- Also, bookmarks maintain the file in which they are set. Thus, if 5 files
- are in the file list and bookmark 2 is set in file 3, the specified
- location in file 3 will be returned to when bookmark 2 is retrieved while
- viewing file 1.
-
-
- Features of L2
- --------------
- L2 uses "intelligent tab expansion": most text editors allow a tab width to
- be set. When <Tab> is pressed, the cursor goes to the next multiple of that
- tab stop on the current line. For example, if the tab width is 4, tab stops
- would be at columns 1, 5, 9, 13, etc. If the cursor is in column 10 and <Tab>
- is pressed, the cursor goes to column 13, where the next character will be
- placed. Editors operate this way so that source code will have correct
- indentation. Assuming that the tabs are saved in the file, most file-viewers
- simply display the character after a tab after moving the tab-width number of
- places to the right. In the previous example, with a tab-width of 4 and a tab
- at column 10, the standard file-viewer would display the next character at
- column 14 rather than 13. Thus columns are not aligned correctly, and the
- file doesn't look the same in the file-viewer as in the editor. L2 corrects
- this problem by using the tab width for locating tab stops the same way that
- an editor does.
-
- L2 internally supports up to 13 video modes, depending on hardware. Its
- default mode is 80x30 (720x480). When cycling through video modes, L2 stops
- at the next valid mode. L2 will support any mode that your hardware
- supports, including 132-column modes. If L2 is entered in a non-80x25 mode,
- L2 will stay in that mode. Otherwise, L2 will use its saved configuration
- screen mode (initially 80x30). Also, L2 supports up to 16 BACKGROUND colors,
- as well as the standard 16 foreground colors, again, depending on hardware.
-
- Specific line numbers may be jumped to. Also, bookmarks may be set and
- retrieved. This is useful when examining source code and jumping from one
- function to another and back, etc.
-
- L2 supports regular expression searches, so that complex search expressions
- may be entered and acted on. This goes beyond the capabilities of most file
- viewers.
-
- L2 may now (as of v2.5) be used for viewing binary files. They may appear as
- one long line in the normal viewing mode; thus it is best to switch to hex
- mode when viewing binary files. See Hex Mode below for more information.
-
-
- Using L2
- --------
- First, copy L2.EXE to a directory that is in your PATH statement. Then, to
- run L2, simply type L2 at an OS/2 2.0 full-screen or windowed prompt (L2 runs
- much better in full-screen mode), followed by 1 or more file names, and then
- press <Enter>:
-
- L2 filenam1.ext [filenam2.ext [filenam3.ext...]] <Enter>
-
- If you run L2 with no file names, L2 will prompt you for the file(s) to view.
-
- L2 will be started in its currently configured state. Initially, that is 80
- column by 30 row (720x480 pixels), with default colors, tab expansion on, and
- a tab width of 3. There is a means to change these, described later.
-
- L2 comes up with the top of the file displayed starting on the second row,
- continuing to the next to the bottom row. The top row is an informational /
- status line as shown below:
-
- FILENAME.EXT 9,999,999 9,999,999 +999,999 999,999 MM/DD/YY HH:MM:SS
- │ │ │ │ │ │ │
- file name line # # lines column file size file date file time
-
- The column offset area is only displayed when not in the leftmost column.
- Also, if the file size exceeds 1,000,000 bytes, it will be displayed in terms
- of the number of kilobytes (e.g. 1,354K).
-
- The bottom line on the display is for messages and text input. "Top of file"
- and "End of file" are examples of the messages displayed there. Text to be
- input includes the text for searches and line numbers for jumping.
-
- Pressing <F1> brings up a simple help screen describing available keys and
- their functionality. Pressing the Escape key (<Esc>) exits L2.
-
-
- Navigating L2
- -------------
- The standard navigation keys are used to move throughout the file. These
- include:
-
- Cursor keys () - line/column at a time scrolling,
- Ctrl-Left, Ctrl-Right - tab-width at a time horizontal scrolling
- PgUp, PgDn - page up and page down scrolling
- Home - top of file, stay in current column
- Ctrl-Home - top of file, column 1
- Backspace - go to column 1
- End - end of file, column 1
-
- Other navigation keys include:
-
- 'G' key - prompted for a line number; go to that line
- '0' - '9' keys - set bookmarks 0 through 9
- Shift '0' - '9' keys - retrieve bookmarks 0 through 9
-
- Note that bookmarks maintain the file, line, and column when they are set. If
- a bookmark is retrieved which is in a different file than the one being
- viewed, that file will be switched to and the position retrieved.
-
-
- Searching in L2
- ---------------
- There are three types of searches in L2: case-sensitive text search,
- case-insensitive text search, and regular expression search. To perform a
- search, press:
-
- 'F' key - perform a case-insensitive search; enter up to 60
- characters to search for; escape or 0 length search
- text cancels the search
- 'S' key - case-sensitive search, up to 60 characters
- 'R' key - regular expression search, up to 60 characters in
- the expression (although the found text may be
- longer)
- 'A' key - repeat the last search from the last found text
-
- All new searches (i.e., those begun with the 'F', 'S', or 'R' keys) begin at
- the top of the file. If the text is found, L2 will move to the line
- containing the text and hilite the text. If the text is not found, a message
- will be displayed at the bottom of the screen. Pressing 'A' after getting a
- "Text not found..." message will begin the search again at the top of the
- file.
-
- Pressing 'A' to repeat a search after switching files from the file in which
- an initial search took place will repeat the initial search from the top of
- the currently displayed file. This is useful to perform a search in many
- files without having to re-enter the search text.
-
- A repeated text search will begin at the first character after the previously
- found text. Regular expressions, however, are line-at-a-time searches;
- therefore, a repeated regular expression search will begin on the line after
- the line containing the previously found text.
-
- The characters available for regular expression searches are:
-
- ^ - matches beginning of line
- $ - matches end of line
- . - matches any character
- \ - followed by a single character matches that character, except:
- \b - backspace
- \s - space
- \t - tab
- \\ - backslash
- [] - character class
- [^...] - negative character class
- * - match 0 or more occurrences of the preceding regular expression
- | - match expression before | or expression after |
-
- Ranges of ASCII characters may be specified in character classes. For
- instance, [a-zA-Z0-9] matches any alphanumeric character. The characters * .
- ^ $ are not special characters within a character class.
-
-
- Hex Mode
- --------
- Pressing the 'H' key toggles a file being viewed into and out of hexidecimal
- mode. When hex mode is entered, L2 determines the point in the file nearest
- the beginning of the top line of the display which is evenly divisible by
- 0x10 (decimal 16) and begins displaying from that point. When hex mode is
- exited, the file is displayed from the same point as before entering hex
- mode.
-
- The following keys are active in hex mode:
-
- Cursor keys () - up / down one "row" (16 bytes)
- PgUp, PgDn - up / down one "screen"
- Home - top of file
- End - last screen-full of bytes in file
- Escape - exit L2
- 'H' key - exit hex mode
-
- The hex mode display consists of 3 columns. The first column represents the
- byte offset of each row from the top of the file, in 0000:0000 format. Note
- that a row will always begin at an offset evenly divisible by 0x10 (16
- decimal). The second column is a row of 16 bytes, represented by the
- hexidecimal version of each byte. The third column is the ASCII character for
- those same 16 bytes.
-
- When in hex mode, the file info line at the top of the screen replaces the
- line count with "Hex Mode" and displays the file size in 0000:0000 format.
-
-
- Configuring L2
- --------------
- There are several configurable items in L2, including tab expansion (on/off),
- tab width (2-8), screen colors (text, border, hilite, and help), and video
- mode. To modify these items, press:
-
- 'T' key - toggle tab expansion on/off
- 'W' key - cycle the tab width from 2-8 spaces
- 'M' key - cycle the video mode; there are 13 potential video
- modes, depending on the support your hardware
- provides, plus the screen mode which was active upon
- entering L2
- F2, Shift-F2 - background, foreground text colors
- F3, Shift-F3 - background, foreground border colors
- F4, Shift-F4 - background, foreground hilite colors (found text)
- F5, Shift-F5 - background, foreground help colors
-
- Note: There are 16 available foreground AND background colors, assuming the
- hardware supports it.
-
- If any of the configurable items are changed, the changes WILL BE LOST if the
- configuration is not saved. To save L2's configuration, press the <F10> key.
- L2 maintains its configuration information in the L2.EXE file (this is done
- to make loading L2 as fast as possible). Since OS/2 keeps the .EXE file open
- in DENYWRITE mode while L2.EXE is running, L2 cannot save its configuration
- to itself; therefore L2 saves its configuration in a file called L2CLONE.EXE.
- This file can then be renamed to L2.EXE after exiting L2 (to use the RENAME
- command, L2.EXE must be deleted or renamed first). One advantage of this
- approach is that you can create multiple copies of L2 for viewing different
- file types, such as L2C.EXE for C files; L2ASM.EXE for assembler files; etc.
- The configuration for each version could be appropriate to that file type.
-
- L2 searches first the current directory, then the directories in the PATH,
- then the command line for the location of L2.EXE. It then updates that file
- with the current L2 configuration into L2CLONE.EXE, in the same directory as
- the L2.EXE file. If you have problems cloning L2, try running it in the
- directory where the L2.EXE file is or explicitly state the path of the L2.EXE
- file on the command line.
-
-
- Registering L2
- --------------
- L2 was developed to support the author's responsibility of evaluating and
- documenting a system with 400+ modules for which the source code was acquired
- from a third-party company. It is distributed as shareware with the
- confidence that it can help others as well.
-
- Your comments, suggestions, and constructive criticisms are welcome. Please
- enclose them, along with the $25.00 registration fee, addressed to:
-
- SANSoft Development
- A. Donnie Hale, Jr.
- 4971 Pegasus Ct.
- Hilliard, OH 43026
- Voice-mail: (614) 898-2675
- CompuServe: 74260,1022
-
- Contact SANSoft Development for site licenses or volume purchases of L2.
-
- Thank you in advance for your support.
-
-
- Distributing L2
- ---------------
- SANSoft Development retains the sole right to sell L2; however, it may be
- distributed, provided:
-
- A. It is only distributed in its unmodified, archived form (L2*.ZIP)
- B. No attempt is made to profit from the distribution of L2 (a duplication
- fee not to exceed $5.00 may be charge by recognized users' groups)
-
-
- Warranty/Disclaimer
- -------------------
- SANSoft Development makes no representations or warranties as to the
- merchantibility or fitness of this product to a particular purpose. There is
- no other warranty, expressed or implied. SANSoft Development will not be
- liable for any special, incidental, consequential, indirect or similar
- damages due to loss of data or any other reason, even if SANSoft or an agent
- of SANSoft has been advised of the possibility of such damages. In no event
- shall SANSoft Development's liability for any damages ever exceed the price
- paid for the license to use the software, regardless of the form of the
- claim. The person using the software bears all risk as to the quality and
- performance of the software. Use of this package constitutes agreement on the
- part of the user to this disclaimer.
-
- ============================ E N D O F F I L E =============================
-
-