SEE editor. ----------- I wrote this editor three years ago as an answer to many MS-DOS editors which need many keystrokes and confirmations to do a single thing (Are you sure to quit ?) (Are you sure to overwrite this file ?). Now I converted it to OS/2 and it also works under OS/2 as a Presentation Manager program. Requirements: OS/2 1.1 and up and 70 K disk space. Even IBM and Microsoft didn't provide a PM editor yet. The MEP (provided with C 5.1) and E (provided by IBM) are just character mode editors. Font problems. -------------- I also supply SEEFONTS.DLL with this editor for a 7*12 pixel font, and a small 6*8 font. The first allows more than 80 columns on the screen and the second allows a 100 column screen on VGA and EGA and 55 line screen on VGA. For using this font you must copy SEEFONTS.DLL to the directory pointed to by the LIBPATH parameter in your CONFIG.SYS file. When this file is not found, the smallest Courier font will be loaded. You must install the Courier font first (if you haven't done it yet) with the Control Panel, otherwise SEE won't work with Courier. For the other fonts you don't need Courier. Unfortunately, there is a problem with this font (a bug in OS/2 1.1). I used the smallest available Courier font (the others are proportional and not suitable for a text editor and the larger Courier fonts are too large for text editing less than 70 columns per line when SEE uses the entire screen). The lowest scan line is missing in this font, so an underscore looks like a space and a lowercase g as a q. When you have OS/2 1.2 installed, this bug may be fixed. Command line options. --------------------- Type SEE -? to show a dialog box with all options. Invocation: SEE [] [] -4 medium font (36 lines/screen on VGA) -6 small font (60 lines/screen on VGA) -a assembly mode: tabs 8 and special insert -b not a bold cursor line -cxxx color attribute (0 is different colors on color screen) -f start in full screen mode (maximized window) -l start in lower half of PM screen -h start in upper half of PM screen -u enable error beeps (must also be enabled in Control Panel) -i overwrite mode at startup -y find/replace case insensitive -z line buffer marking by characters -0 translates all nulls to hex 80 chars and back -tnn sets tab to nn -wnn sets right column value to nn and enables auto wrap Colors. ------- The default colors will be according to the Window Text, Window Static TEXT and Window Background as set in the Control Panel. When the option -cxxx has been set the colors of the text are set to this value. When -c0xFF is set, there is more color variation. The command line options -mxx, -nxx, -oxx, -pxx, -qxx and -rxx where xx is a hexadecimal number sets the color of the -m normal text -o header text -p header reverse -q help colors 1 -r help colors 2 -s help colors 3 The colors are an ORed value of: 01h blue foreground 02h green foreground 04h red foreground 08h highlighted foreground 10h blue background 20h green background 40h red background 80h blinking Config file. ------------ See searches first the current directory and then the directory in which SEE.EXE is for a file called SEE.CNF. This file can contain command line options (without / or -, each option on a new line), e.g. c0xff y a w80 m2h n4h sets more color variarion, case ignore for search, tabs 8 (assembly mode), 80 column word wrap, green normal text, red current line. Mouse control. -------------- The left button of the mouse sets the cursor in the position where the arrow pointer is. When the 'buffer mark mode' is on, clicking the left button finishes the marking. E.g. when Ctrl-B is pressed and then the left button is clicked, ih has the same effect as Ctrl-B again. When the left button is held down and the middle or right is pressed, the current line will be deleted (same as Ctrl-Y). Pressing the middle or right button only copies the line (or buffer marked by Ctrl-B or Ctrl-D) at the point where the mouse arrow is. This is convenient for moving lines in a text or source code. Run program. ------------ With the F12 key you can start a new shell from SEE. When nothing is filled in, SEE will call the CMD.EXE dos shell with no parameters. Otherwise, SEE will append .EXE to the first word and look in the current path for a matching program file. If it finds it, it will call the program file with the parameters specified, or otherwise it will call the dosshell CMD.EXE with the original string. So you can also enter COPY *.* A: for example. When you mark 'Background' see will remain the active window and when the program is finished, the window of that program will clear. Otherwise, the title bar will show 'Completed' when it ends and press Alt,C or click the upper left '-' button. Then, the Task manager will appear which I don't like but could not prevent yet. Drive full/not ready. --------------------- When A or B is selected and when they are not ready, SEE ignores it. Wildcards. ---------- On the command line or in the Edit file menu (^E) wildcards are also allowed. The next file can be get by pressing the Escape key. Ctrl-E (edit file menu) clears the wildcard. Line number. ------------ A line number can be invoked directly by see . E.g. SEE test.c 34 will start the editor in TEST.C at line 34. Large files. ------------ SEE can normally handle files up to 48 KB (extendable to 60 KB in one buffer), but when larger files are loaded the first 48 K will be loaded first (except in the case a line number is given which is not in the first 48 K). For the next 48 K press Ctrl-PgDn and for the next 48 K following the current line press Ctrl-U (which updates all previous text). A temporary file named @SEETEMP will be created and when the entire file is updated, this file will be renamed to the original file name. One buffer back is, unfortunately not possible (only with Ctrl-PgUp, reinitialize file at line 1). All functions working on the entire file (e.g. Ctrl-O(verall replace) or (Ctrl-K T(ab conversion)) will work only in the current text buffer. For find Again the + and - (numeric keypad) functions will only work within the text buffer. Ctrl-A searches the next text buffer(s) for a matching string. The Ctrl-L(ine number) function works on the entire file, thus will load another buffer if necessary. Note for Multi tasking environments (OS/2, Windows/386, VM/386, etc.) Be careful with editing two large files in the same directory in two different sessions! Limitations ----------- The limits are: Maximum 300 characters per line. Maximum 2560 lines or 48 KB per text buffer (the one which is reached first). Return value. ------------- SEE exits with ERRORLEVEL 0 unless exited by F3 or Ctrl-Break. Then it exits with errorlevel 1. (Handy for a edit-compile batch file). DOS screen. ----------- Because SEE runs in the Presentation Manager session, in cannot read the screen of a character mode session, so it must get the information of that session from a file. SEE reads a file (normally called ERR) but can be changed by option -efilename. This file is viewed by the View entry on the menu bar or the F9 key. The first line will be in the title bar and the remaining 25 lines will be shown in the dialog box. The program READ.EXE reads the screen of a character mode session. You can also redirect the output of your compiler to the ERR file. E.g. echo "Compiler errors" > err cl -Zi -Od file.c >> err When SEE is invoked now and F9 is pressed, the error messages will be shown under the title "Compiler errors". Goes down, character sequences ------------------------------ The F5 key toggles the mode in which the cursor goes down instead of right after each character or Del or F4(not Backspace). The F4 key is an increment key for digits. It enters digits 0-9 ( each time the key is pressed the next digit or char will be entered). Special insert -------------- When Shift-Ins is pressed the editor is in insert mode, except for blanks. That means that all nonblank characters right of the cursor will be shift to the right, but the blanks right of the cursor will be overwritten until one blank remains. Word wrap. ---------- Although not designed as a text processor, a very simple text processing feature is added. When Word-wrap mode is enabled (see -wnn) or in SEE by the 'Options' menu (Ctrl-T) nn is the right column number words will automatically wrap at that column. Ctrl K-W (Line wrap button) will wrap line by line (reformat) in that mode. Set buffer ---------- Normally in SEE the buffer (Copy or delete) is set by entire lines, but when Ctrl-T (or invoking see with the -z option) is enabled the buffer can be barked by each point in the text. When the buffer marker is set (by the inverse screen bar/point, it can also be ended by the mouse button. Search ------ Normally the Find/Replace functions are case sensitive but you can disable them by Ctrl-T + marking check box or invoking see with the -y option. For finding a control character press Ctrl-A after Ctrl-F(ind) or Ctrl-R(eplace) and fill in the value. ASCII values, color values. --------------------------- These can be entered decimally or in hex in the form 0xnn or nnh. Null characters and Ctrl-Z characters. -------------------------------------- Normally a file is loaded in the buffer until the first Ctrl-Z (EOF) or null character. When the -0 option is invoked, null characters and EOFs are loaded too and the nulls are translated into hex 80 characters temporarily and reset to nulls wnen written to a file. Moreover no additional CR-LF will be added in that mode. Handy for small config files. Problems. --------- When the main window is minimized and the user wants to close SEE with the system menu, the dialog box 'Ignore the changes' does not appear properly. This is due to a bug in WinSetWindowPos() in OS/2 1.1. Various functions. ------------------ Try out the functions under Ctrl-K. (Special menu in OS/2 version) Ctrl-K G and Ctrk-K [/{/( and Ctrl-K B are very useful for C programmers. Ctrl-K G inserts a "/* " at the cursor position and a " */" at the end of the current line. When there is already a "/* " and " */" (both with space) they will be removed. Handy for quick commenting out debug lines. Ctrl-K (brace open) will search a matcing close brace. Ctrl-K B (Bracket count button) will count the number of ( and )s in a single line (for checking complex expressions). Ctrl-K 7(Ascii button) will AND all characters above 80h ascii with 7Fh. SEE is developed by: Klaas van Ditzhuyzen c/o DATAD data communications PO Box 371 3900 AD Veenendaal Holland using MS-C 5.1