home *** CD-ROM | disk | FTP | other *** search
- --------------------------------------------------------------------------------
- EDITOR Version 1.2 November 10, 1987.
- --------------------------------------------------------------------------------
- A User-Supported Program.
- --------------------------------------------------------------------------------
-
-
- Program and documentation: Copyright 1987 André Packwood, all rights reserved.
-
-
- This program, EDITOR, is NOT "public domain" and remains the intellectual pro-
- perty of its author who reserves for himself all marketing and distribution
- rights. However, you are permitted to use and distribute EDITOR if you observe
- ALL of the following conditions:
-
- 1- This program can be freely used by any individual or non-profit organi-
- zation for non-commercial applications, i.e. where no payment nor sala-
- ry are remitted to user.
-
- 2- Commercial societies, governments of any level, institutions, professio-
- nals and individuals using this program in paid-for applications must
- pay a one time license fee of $20 for the first computer it is run on.
- Each and every extra computer within an organization on which this pro-
- gram will be used requires supplementary fees of $10. On a network,
- each terminal must be considered as a computer, be it a "dumb" or an
- "intelligent" terminal.
-
- 3- This program cannot be included in any commercial or marketed product
- of any kind, without prior written consent from the author. The only
- exception to this rule is as following: this program can be distribu-
- ted on disk accompanied by other "user supported" or public domain pro-
- grams; the user cost for each disk cannot be greater than $10 Can or
- $7 US. The distributor must clearly state that such fees are to cover
- distribution costs only and do not represent user license fees. See
- also condition 4 below.
-
- 4- This program and its documentation may be freely distributed, be it on
- disk or through electronic communication means such as bulletin boards
- as long as both versions of the program, English and French, are dis-
- tributed together, complete and unchanged.
-
-
-
- Liability Disclaimer: The author of this program rejects all and any responsi-
- --------------------- bility regarding the program performance, loss of data,
- time, money or profits and material damages along with all consequences arising
- of the use of this program. This program is not warranted nor garanteed in any
- way. The end user may freely try this program and is the only person able to
- decide that he or she should continue using it. By using this program, the user
- agrees that he or she is the only responsible for any inconvenience caused by
- this program.
-
-
- Please send comments and suggestions or payment for user license to:
-
-
- André Packwood
- 1030, rue St-Alexandre
- Suite 400,
- Montréal, Québec
- H2Z 1P3
-
-
- A receipt will be mailed to license paying users.
-
-
-
- --------------------------------------------------------------------------------
- Description:
- --------------------------------------------------------------------------------
-
-
- Introduction: EDITOR is a line-based full screen text editor. It is simple,
- ------------- very compact, quick and can handle up to 800 lines of up to 80
- characters each. An audible signal will warn you when you reach
- the 74th character on the current line. EDITOR produces ASCII
- files, i.e. it does not add formatting characters.
-
- Most commands are similar to corresponding ones of IBM's Perso-
- nal Editor and are entered by pressing a function key or a com-
- bination of the ALT key and a mnemonic letter.
-
- Altough it is very compact (only 5 kilobytes), it requires about
- 70 kilobytes of free memory.
-
- It loads very quickly: only two seconds from a floppy disk on
- an 8 MHz XT compatible system. So it is particularily well sui-
- ted to floppy disk only systems. On a virtual disk (ramdisk),
- it loads instantly and occupies so little room.
-
- It has three video modes: a normal monochrome mode, a reverse
- monochrome mode and a color mode. The mode is specified on the
- DOS command line with a parameter. Also, all three modes can be
- partially modified while running the program.
-
- This editor can write control characters except ENTER (#13) and
- Backspace (#8); it also writes the high character set from #128
- to #254.
-
- It has a special "message" mode to create files that can be up-
- loaded to bulletin board systems. Such files contain no LF cha-
- racter (#10) and blank lines contain one space character (#32).
-
- It is available in English and French versions, the only diffe-
- rence being the translation of the various messages. The key-
- board mapping is unchanged.
-
- You can redefine keyboard mapping by using many widely available
- keyboard redefinition programs or DOS 3.0 to 3.3 utilities.
- This program has been tested with KEYBxx.COM from DOS 3.0 to
- 3.2, with KEYB.COM from DOS 3.3 and with MULTIC, from Ecole po-
- lytechnique de Montréal; other keyboard re-mapping programs
- might be usable.
-
- EDITOR can be used to extract text material from just about any
- file it can load, including program files.
-
-
-
- Required: IBM PC compatible computer, including IBM PC Junior; at least
- --------- 128 kilobytes of installed memory; or IBM PS/2 computer;
- MS-DOS or PC-DOS 3.0 or higher;
- MDA, Hercules, CGA, EGA or VGA display card.
-
- Warning: This version may create "snow" to appear on a display
- screen connected to an old-style CGA card.
-
-
-
- Features: Single line or grouped lines move.
- --------- Single line or grouped lines copy.
- Single line or grouped lines deletion.
- Line join.
- Line split.
- Blank line insertion.
- Cursor position display.
- Messages in plain English.
- Audible error warning.
- And normal full-screen editing functions.
-
-
-
- --------------------------------------------------------------------------------
- Using EDITOR:
- --------------------------------------------------------------------------------
-
-
- Loading: Simply enter EDITOR on DOS command line, preceded by the requi-
- -------- red path if EDITOR is not on your logged disk drive or if you
- have not made it reachable through the PATH command.
-
- To use EDITOR in reverse video mode, add a slash (/) immediately
- followed by the letter R (upper or lower case) as a parameter
- (example: editor/r). For the color mode, use the letter C in-
- stead (example: editor /C). Spaces between EDITOR and the
- mode parameter are optional.
-
- Once the program is loaded, you may modify the appearance of the
- screen with the Alt-Q command. See the descriptive table near
- the end of this document.
-
- You may ask EDITOR to load a file for you by specifying it on
- the DOS command line, separating the filename from the EDITOR
- command with AT LEAST ONE SPACE. If you are already using a
- video mode parameter, the filename must follow the parameter;
- space characters are then optional. The file name (including
- the path) must be no longer than 40 characters.
-
- Here are some valid examples on how to load EDITOR and a file
- named BINGO.TXT:
-
- editor bingo.txt
- EDITOR/Cbingo.txt
- editor /Rbingo.txt
- EDITOR/r BINGO.TXT
- editor c:\clients\sales\games\bingo.txt
-
- Here are some faulty examples:
-
- editorBINGO.TXT
- editor bingo.txt /r
- EDITOR/bingo.txt
- editor c:\projects\market\lottery\clients\distrib\bingo.txt
-
- If the specified file does not exist, a warning message will
- tell you that a new file will be created. In a batch file, you
- may specify the filename with a replaceable parameter; this way,
- you may automate many repetitive operations.
-
- Example: editor /c %1
-
-
-
- Screen: When you load EDITOR, the screen clears and a three line high
- ------- band appears at the top. This band contains the following
- information:
-
-
- Message area: File name area: Cursor location:
-
- ╒══════════════════════════════╤════════════════════════════════════════╤══════╕
- │Editor (C)1987 André Packwood│ │ V1.2 │
- ╘══════════════════════════════╧════════════════════════════════════════╧══════╛
-
- When needed, function or error messages will appear in the leftmost box. The
- version number of EDITOR you are running is displayed in the rightmost box and
- will be replaced by the cursor position coordinates the moment you move it or
- after a file has been loaded.
-
- When you press one of the file function keys, a supplementary message line (in
- reverse video) will appear just below the top band.
-
- The remaining 22 lines make up the writing area. You can think of this area as
- a movable window showing part of the whole 800 line file area the program can
- handle. Such a window is moved through the use of up and down arrow keys and
- with Page Up and Page Down keys.
-
- As soon as the described screen appears, you may start typing your text or open
- an existing file. If you have specified the name of an existing file on the
- command line, it will be loaded; if it does not exist, a message will tell you
- that a new file will be created.
-
-
-
- --------------------------------------------------------------------------------
- File commands:
- --------------------------------------------------------------------------------
-
-
- File commands use fuction keys:
-
-
- F-1 Opening an existing text file.
- ----------------------------------------------------------------
- A message prompts you to enter the name of the file to open; the
- path and the name may have up to 40 characters. If the file
- does not exist, a message and a warning sound will tell you that
- a new file will be created. The name of the file stays dis-
- played in the filename area.
-
- Note: this editor is limited to 800 lines of 80 characters; if
- you try to load a file containing more than 800 lines, a message
- will warn you. The file will be truncated and the extra lines
- lost. To avoid losing the end of end of your file, do not modi-
- fy it and quit it by pressing F-4. If a file contains lines lon-
- ger than 80 characters, such lines will be split in 80 charac-
- ters segments; consequently, the file will occupy more lines
- than it did originally.
-
- Another note: if, upon loading a file, you get what looks like
- "garbish", it is because the file you loaded was NOT a pure
- ASCII text file. It may have been created by a word processor
- that adds formatting characters, or it could be a program file.
- You should quit it immediately using F-4. DO NOT, repeat, DO NOT
- save it, for that file would not be usable any more! It's OK to
- browse around, as long as you do not save it.
-
-
- F-2 Save file and continue.
- ----------------------------------------------------------------
- As for F-1, you are asked for the name of the file. If the dis-
- played filename suits you, just press ENTER; modify it other-
- wise. If the file cannot be created, there will be a warning
- beep and a message. You should use this function often to save
- your work to disk.
-
-
- F-3 Save and quit this file.
- ----------------------------------------------------------------
- Exactly like F-2, except that after saving the file, the writing
- area will clear and be ready for a new file.
-
-
- F-4 Quit this file / Quit program.
- ----------------------------------------------------------------
- Clears the writing area and readies the system for a new file.
- Pressing again terminates the program and returns to DOS. If
- the file has been modified, you will be warned to save it. Press
- ENTER to quit this file or any other key to go back to editing
- this file.
-
-
- F-5 Save in "message" mode and quit this file.
- ----------------------------------------------------------------
- Just like F-3, except that the file will not contain any LF cha-
- racter (#10) and blank lines will contain one space character
- (#32). This mode is convenient to produce message files to be
- uploaded into a BBS message editor.
-
-
- Notes: After pressing F-1, F-2 F-3 or F-5, you may abort the command if
- ------ you press the ESC key.
-
- BACKSPACE is the only editing key you may use to modify the dis-
- played filename in a file operation.
-
- If you try to quit a newly created file or a file you have modi-
- fied, without saving it first, be it with F-1 or F-4, an audible
- signal and an error message will warn you. Should you decide
- not to save this file, just press ENTER in order to quit. Pres-
- sing any other key will take you back to the editor; you may
- then save it and quit it.
-
- If, when saving a file to a diskette, EDITOR encounters a pro-
- blem, you will be warned by an "Error creating save file" or
- "Error saving text to file" message and you will be back to the
- editor. Possible sources of the problem include: drive door or
- lever not closed, unformatted or unrecognized disk format, no
- diskette in drive, write-protect tab on diskette, defective dis-
- kette. Correct the problem and save again.
-
- If you specify a directory that does not exist on the disk or an
- inexistant disk, you will get an "Error creating save file" mes-
- sage.
-
- If disk space is unsufficient to save the whole file, a message
- will warn you and you will be back to editing. Save again on a
- different disk.
-
-
-
- --------------------------------------------------------------------------------
- Full screen editing commands:
- --------------------------------------------------------------------------------
-
-
- Cursor: The cursor is moved by one character or one line with the help
- of the four arrow keys.
-
-
- ENTER moves the cursor to the beginning of the next line.
-
-
- HOME moves the cursor to the beginning of the current line.
-
-
- END moves it to the end of the line.
-
-
- PAGE UP moves the cursor by 22 lines (one screen-full) towards the
- beginning of the file.
-
- PAGE DOWN moves it by 22 lines towards the end of the file.
-
-
- Ctrl-HOME takes the cursor to the very beginning of the file, to position
- 1 of line 1.
-
-
- Ctrl-END takes you to the end. The last line will be at the top of the
- writing area and the cursor located after the last character of
- this line. If the line happens to have 80 characters, the cur-
- sor will be placed at the beginning of next line.
-
- INSERT toggles the insertion mode on and off; the cursor becomes block-
- shaped and keystrokes are added at the cursor location while
- whatever is at its right side is shifted accordingly. Should
- some characters go beyond the right edge of the screen, they
- will be lost.
-
-
- DELETE erases the character at the cursor location and shifts whatever
- is at its right one space to the left.
-
-
- BACKSPACE erases the character preceeding the cursor and shifts whatever
- is at its right to the left.
-
-
- Ctrl-BACKSPACE deletes the line indicated by the cursor.
-
-
- TAB moves the cursor toward the right side to the next position that
- is a multiple of 8 plus 1.
-
-
- Shift-TAB moves it to the left in a similar fashion.
-
-
- Alt-L marks lines in reverse video for moving, copying or deletion.
-
-
- Alt-U unmarks lines.
-
-
- Alt-D deletes marked lines.
-
-
- Alt-M moves the marked lines to the new cursor location; lines get
- unmarked. You will get an error message if no line is marked.
-
-
- Alt-Z copies the marked lines to the new cursor position; lines stay
- marked. If no line is marked, the current line will be copied
- and its copy placed underneath.
-
-
- Alt-I inserts a blank line under the current line and move the cursor
- to the beginning of that line.
-
-
- Alt-J joins the next line to the current line up to the last complete
- word that will fit in the free space of the current line. A
- space character is added between the two joined segments and
- becomes the current cursor location. If the said next line is
- blank, it will be deleted; if it begins with space characters,
- such characters will be removed.
-
-
- Alt-S splits a line into two segments, the end of the line being moved
- under the current line. The separation occurs before the begin-
- ning of the word marked by the cursor or directly preceeding the
- space character indicated by the cursor. If the cursor is under
- the first word of the line, a blank line will be inserted before
- the current line.
-
- NOTE: Alt-S is the only mean you have to insert a line before
- the first line of your file; move the cursor to location 1 of
- line 1 (you could press Ctrl-HOME) then press Alt-S.
-
-
- Alt-Q modifies the appearance of the screen (alternate video mode).
- See the descriptive table below.
-
-
-
- --------------------------------------------------------------------------------
- Video mode descriptive table:
- --------------------------------------------------------------------------------
-
-
- EDITOR offers two ways to modify the screen appearance: the video mode chosen
- on the DOS command line and the alternate mode chose with the Alt_Q command.
- Here are the various possible combinations. Please note that on a monochrome
- screen which can be green, amber or white, the word "white" as used below rela-
- tes to what is luminous (bright) on the screen. "White/black" means white
- (bright) characters on a black background. "Monochrome screen" means a monitor
- connected to an MDA or Hercules video adapter.
-
-
-
- NO mode specified on command line, monochrome or color screen:
- --------------------------------------------------------------------------------
- No parameter Top Supplementary Normal Marked
- ---------------- band message text text
-
- Normal mode: white/black black/white white/black black/white
-
- Alternate mode: white/black white/black black/white white/black
-
-
-
- REVERSE mode specified on command line, monochrome or color screen:
- --------------------------------------------------------------------------------
- /R parameter Top Supplementary Normal Marked
- ---------------- band message text text
-
- Normal mode: black/white white/black black/white white/black
-
- Alternate mode: black/white black/white white/black black/white
-
-
-
- COLOR mode specified on command line, color screen:
- --------------------------------------------------------------------------------
- /C parameter Top Supplementary Normal Marked
- ---------------- band message text text
-
- Normal mode: white/cyan white/black white/blue white/red
-
- Alternate mode: white/cyan white/black blue/white* white/red
-
- * May appear as blue on light grey on some monitors or at certain settings.
-
-
-
- COLOR mode specified on command line, monochrome screen:
- --------------------------------------------------------------------------------
- No parameter Top Supplementary Normal Marked
- ---------------- band message text text
-
- Normal mode: white/black white/black white/black white/black
-
- Alternate mode: white/black white/black white/bl.underlined white/black
-
- Note: for obvious reasons, those last two modes are not very useful.
-
-
-
-
- --------------------------------------------------------------------------------
- Tricks and tips:
- --------------------------------------------------------------------------------
-
-
- When saving a file, EDITOR replaces the original version with the newer one; it
- does not create .BAK files. If you wish to keep the old version, make a copy
- of it under a different name or run EDITOR, load the file and save it immediate-
- ly (with F-2) with a new name; you may then start editing the file. You could
- also create a batch that would make a temporary copy of your file then load
- EDITOR and the file. Here is an example of a suitable batch:
-
- copy %1 special.tmp
- editor /c %1
-
- If this batch were named "ED.BAT", typing "ED BINGO.TXT" would copy BINGO.TXT
- into SPECIAL.TMP, then load EDITOR in color mode and open the file BINGO.TXT.
-
-
- When you create and save a new file, it may happen that you give it the name of
- an existing file on the disk; the old file would be lost because it would be
- written over by the one you are saving. To avoid that, before you begin typing
- your text, try opening a file (with F-1) using the name you intend to give to
- your new file. If there is a file with that name on the disk, it will be loaded
- into EDITOR; you may then quit this file and try a different name. If there is
- no such file, a message will tell you that a new file is being created. Start
- typing your text and save it often by pressing F-2 then ENTER.
-
-
- If you are creating a message to be uploaded into a Bulletin Board System (BBS),
- limit your line length to 70 characters, otherwise, your page layout could beco-
- me upset by the BBS's message editor. Save your text file with F-5. To send
- your message, use a communication program that supports ASCII file uploads; once
- you are into the BBS's editor, you will only have to transfer your file. You
- may have to slow down transfer between lines; consult your communication program
- manual (line pacing).
-
- You can quickly reformat a paragraph with Join (Alt-J) and Split (Alt-S) func-
- tions. When joining two lines, blank spaces preceding the text on the second
- line will be removed. Words are never broken in two and the cursor will be lo-
- cated at the junction of the two line segments; if there is an hyphen or a space
- character to remove, you will have to do it manually. When splitting a line,
- blanks directly preceding the word indicated by the cursor will be deleted and
- whatever is to the right of the cursor will be moved to the next line.
-
-
- EDITOR can be used to extract text and strip control characters from any file it
- can load, be it a text file with formatting characters or a program file. Make
- sure you are working on a copy of the file with a different name so the original
- will not be rendered unusable. To extract text, simply erase all characters not
- belonging to the body text and join words split into segments. Program files
- contain many #0 and even #255 characters which are invisible. To detect their
- presence at the end of lines, press END; if the cursor moves further than the
- very next position after the last word, then there are such characters. If
- splitting a line (Alt-S) won't occur at the space character where it should,
- then again there is a #0 or #255 character. It is possible that some parts of
- the text material may be missing at different places in the file; this is caused
- by the presence of #26 characters scattered in the original file.
-
-
-
-
- --------------------------------------------------------------------------------
- Various notes:
- --------------------------------------------------------------------------------
-
-
- When saving a file, EDITOR will append a CR character (#13) and an LF character
- (#10) after the last non-blank character of a line and then will write that line
- up to the LF character to disk. An EOF character (#26) is added to the end of
- the file.
-
- However, in message mode, only the CR character is added and blank lines will
- contain a space character and a CR. The files ends with an EOF character.
-
- EDITOR correctly interprets TAB characters embedded in a file created by other
- programs and replaces them by the required number of space characters, but it
- won't compress blanks when it saves a file. Thus it is possible for a file
- created by an other program to occupy more disk space after having been loaded
- and saved again with EDITOR.
-
-
-
- As with any other program, save your work frequently!!!
-
-
-
- --------------------------------------------------------------------------------
- This document has been written using only EDITOR.
- --------------------------------------------------------------------------------
-