home *** CD-ROM | disk | FTP | other *** search
/ Play and Learn 2 / 19941.ZIP / 19941 / FRENCH / EDITOR12 / EDITOR.DOC < prev    next >
Encoding:
Text File  |  1994-02-05  |  27.0 KB  |  581 lines

  1. --------------------------------------------------------------------------------
  2.                    EDITOR    Version 1.2   November 10, 1987.
  3. --------------------------------------------------------------------------------
  4.                            A User-Supported Program.
  5. --------------------------------------------------------------------------------
  6.  
  7.  
  8. Program and documentation:  Copyright 1987 André Packwood, all rights reserved.
  9.  
  10.  
  11. This program, EDITOR, is NOT "public domain" and remains the intellectual pro-
  12. perty of its author who reserves for himself all marketing and distribution
  13. rights.  However, you are permitted to use and distribute EDITOR if you observe
  14. ALL of the following conditions:
  15.  
  16. 1-      This program can be freely used by any individual or non-profit organi-
  17.         zation for non-commercial applications, i.e. where no payment nor sala-
  18.         ry are remitted to user.
  19.  
  20. 2-      Commercial societies, governments of any level, institutions, professio-
  21.         nals and individuals using this program in paid-for applications must
  22.         pay a one time license fee of $20 for the first computer it is run on.
  23.         Each and every extra computer within an organization on which this pro-
  24.         gram will be used requires supplementary fees of $10.  On a network,
  25.         each terminal must be considered as a computer, be it a "dumb" or an
  26.         "intelligent" terminal.
  27.  
  28. 3-      This program cannot be included in any commercial or marketed product
  29.         of any kind, without prior written consent from the author.  The only
  30.         exception to this rule is as following:  this program can be distribu-
  31.         ted on disk accompanied by other "user supported" or public domain pro-
  32.         grams;  the user cost for each disk cannot be greater than $10 Can or
  33.         $7 US.  The distributor must clearly state that such fees are to cover
  34.         distribution costs only and do not represent user license fees.  See
  35.         also condition 4 below.
  36.  
  37. 4-      This program and its documentation may be freely distributed, be it on
  38.         disk or through electronic communication means such as bulletin boards
  39.         as long as both versions of the program, English and French, are dis-
  40.         tributed together, complete and unchanged.
  41.  
  42.  
  43.  
  44. Liability Disclaimer:  The author of this program rejects all and any responsi-
  45. ---------------------  bility regarding the program performance, loss of data,
  46. time, money or profits and material damages along with all consequences arising
  47. of the use of this program.  This program is not warranted nor garanteed in any
  48. way.  The end user may freely try this program and is the only person able to
  49. decide that he or she should continue using it.  By using this program, the user
  50. agrees that he or she is the only responsible for any inconvenience caused by
  51. this program.
  52.  
  53.  
  54. Please send comments and suggestions or payment for user license to:
  55.  
  56.  
  57.                             André Packwood
  58.                             1030, rue St-Alexandre
  59.                             Suite 400,
  60.                             Montréal, Québec
  61.                             H2Z 1P3
  62.  
  63.  
  64. A receipt will be mailed to license paying users.
  65.  
  66.  
  67.  
  68. --------------------------------------------------------------------------------
  69.                                  Description:
  70. --------------------------------------------------------------------------------
  71.  
  72.  
  73. Introduction:   EDITOR is a line-based full screen text editor.  It is simple,
  74. -------------   very compact, quick and can handle up to 800 lines of up to 80
  75.                 characters each.  An audible signal will warn you when you reach
  76.                 the 74th character on the current line.  EDITOR produces ASCII
  77.                 files, i.e. it does not add formatting characters.
  78.  
  79.                 Most commands are similar to corresponding ones of IBM's Perso-
  80.                 nal Editor and are entered by pressing a function key or a com-
  81.                 bination of the ALT key and a mnemonic letter.
  82.  
  83.                 Altough it is very compact (only 5 kilobytes), it requires about
  84.                 70 kilobytes of free memory.
  85.  
  86.                 It loads very quickly:  only two seconds from a floppy disk on
  87.                 an 8 MHz XT compatible system.  So it is particularily well sui-
  88.                 ted to floppy disk only systems.  On a virtual disk (ramdisk),
  89.                 it loads instantly and occupies so little room.
  90.  
  91.                 It has three video modes:  a normal monochrome mode, a reverse
  92.                 monochrome mode and a color mode.  The mode is specified on the
  93.                 DOS command line with a parameter.  Also, all three modes can be
  94.                 partially modified while running the program.
  95.  
  96.                 This editor can write control characters except ENTER (#13) and
  97.                 Backspace (#8); it also writes the high character set from #128
  98.                 to #254.
  99.  
  100.                 It has a special "message" mode to create files that can be up-
  101.                 loaded to bulletin board systems.  Such files contain no LF cha-
  102.                 racter (#10) and blank lines contain one space character (#32).
  103.  
  104.                 It is available in English and French versions, the only diffe-
  105.                 rence being the translation of the various messages. The key-
  106.                 board mapping is unchanged.
  107.  
  108.                 You can redefine keyboard mapping by using many widely available
  109.                 keyboard redefinition programs or DOS 3.0 to 3.3 utilities.
  110.                 This program has been tested with KEYBxx.COM from DOS 3.0 to
  111.                 3.2, with KEYB.COM from DOS 3.3 and with MULTIC, from Ecole po-
  112.                 lytechnique de Montréal; other keyboard re-mapping programs
  113.                 might be usable.
  114.  
  115.                 EDITOR can be used to extract text material from just about any
  116.                 file it can load, including program files.
  117.  
  118.  
  119.  
  120. Required:       IBM PC compatible computer, including IBM PC Junior; at least
  121. ---------       128 kilobytes of installed memory; or IBM PS/2 computer;
  122.                 MS-DOS or PC-DOS 3.0 or higher;
  123.                 MDA, Hercules, CGA, EGA or VGA display card.
  124.  
  125.                 Warning:  This version may create "snow" to appear on a display
  126.                 screen connected to an old-style CGA card.
  127.  
  128.  
  129.  
  130. Features:       Single line or grouped lines move.
  131. ---------       Single line or grouped lines copy.
  132.                 Single line or grouped lines deletion.
  133.                 Line join.
  134.                 Line split.
  135.                 Blank line insertion.
  136.                 Cursor position display.
  137.                 Messages in plain English.
  138.                 Audible error warning.
  139.                 And normal full-screen editing functions.
  140.  
  141.  
  142.  
  143. --------------------------------------------------------------------------------
  144.                                  Using EDITOR:
  145. --------------------------------------------------------------------------------
  146.  
  147.  
  148. Loading:        Simply enter EDITOR on DOS command line, preceded by the requi-
  149. --------        red path if EDITOR is not on your logged disk drive or if you
  150.                 have not made it reachable through the PATH command.
  151.  
  152.                 To use EDITOR in reverse video mode, add a slash (/) immediately
  153.                 followed by the letter R (upper or lower case) as a parameter
  154.                 (example:  editor/r). For the color mode, use the letter C in-
  155.                 stead (example:  editor   /C).  Spaces between EDITOR and the
  156.                 mode parameter are optional.
  157.  
  158.                 Once the program is loaded, you may modify the appearance of the
  159.                 screen with the Alt-Q command.  See the descriptive table near
  160.                 the end of this document.
  161.  
  162.                 You may ask EDITOR to load a file for you by specifying it on
  163.                 the DOS command line, separating the filename from the EDITOR
  164.                 command with AT LEAST ONE SPACE.  If you are already using a
  165.                 video mode parameter, the filename must follow the parameter;
  166.                 space characters are then optional.  The file name (including
  167.                 the path) must be no longer than 40 characters.
  168.  
  169.                 Here are some valid examples on how to load EDITOR and a file
  170.                 named BINGO.TXT:
  171.  
  172.                 editor bingo.txt
  173.                 EDITOR/Cbingo.txt
  174.                 editor           /Rbingo.txt
  175.                 EDITOR/r                           BINGO.TXT
  176.                 editor c:\clients\sales\games\bingo.txt
  177.  
  178.                 Here are some faulty examples:
  179.  
  180.                 editorBINGO.TXT
  181.                 editor bingo.txt  /r
  182.                 EDITOR/bingo.txt
  183.                 editor c:\projects\market\lottery\clients\distrib\bingo.txt
  184.  
  185.                 If the specified file does not exist, a warning message will
  186.                 tell you that a new file will be created.  In a batch file, you
  187.                 may specify the filename with a replaceable parameter; this way,
  188.                 you may automate many repetitive operations.
  189.  
  190.                 Example:             editor /c %1
  191.  
  192.  
  193.  
  194. Screen:         When you load EDITOR, the screen clears and a three line high
  195. -------         band appears at the top.  This band contains the following
  196.                 information:
  197.  
  198.  
  199.  Message area:                  File name area:                Cursor location:
  200.  
  201. ╒══════════════════════════════╤════════════════════════════════════════╤══════╕
  202. │Editor  (C)1987 André Packwood│                                        │ V1.2 │
  203. ╘══════════════════════════════╧════════════════════════════════════════╧══════╛
  204.  
  205. When needed, function or error messages will appear in the leftmost box.  The
  206. version number of EDITOR you are running is displayed in the rightmost box and
  207. will be replaced by the cursor position coordinates the moment you move it or
  208. after a file has been loaded.
  209.  
  210. When you press one of the file function keys, a supplementary message line (in
  211. reverse video) will appear just below the top band.
  212.  
  213. The remaining 22 lines make up the writing area.  You can think of this area as
  214. a movable window showing part of the whole 800 line file area the program can
  215. handle.  Such a window is moved through the use of up and down arrow keys and
  216. with Page Up and Page Down keys.
  217.  
  218. As soon as the described screen appears, you may start typing your text or open
  219. an existing file.  If you have specified the name of an existing file on the
  220. command line, it will be loaded; if it does not exist, a message will tell you
  221. that a new file will be created.
  222.  
  223.  
  224.  
  225. --------------------------------------------------------------------------------
  226.                                 File commands:
  227. --------------------------------------------------------------------------------
  228.  
  229.  
  230. File commands use fuction keys:
  231.  
  232.  
  233. F-1             Opening an existing text file.
  234.                 ----------------------------------------------------------------
  235.                 A message prompts you to enter the name of the file to open; the
  236.                 path and the name may have up to 40 characters.  If the file
  237.                 does not exist, a message and a warning sound will tell you that
  238.                 a new file will be created.  The name of the file stays dis-
  239.                 played in the filename area.
  240.  
  241.                 Note:  this editor is limited to 800 lines of 80 characters; if
  242.                 you try to load a file containing more than 800 lines, a message
  243.                 will warn you. The file will be truncated and the extra lines
  244.                 lost.  To avoid losing the end of end of your file, do not modi-
  245.                 fy it and quit it by pressing F-4. If a file contains lines lon-
  246.                 ger than 80 characters, such lines will be split in 80 charac-
  247.                 ters segments; consequently, the file will occupy more lines
  248.                 than it did originally.
  249.  
  250.                 Another note:  if, upon loading a file, you get what looks like
  251.                 "garbish", it is because the file you loaded was NOT a pure
  252.                 ASCII text file.  It may have been created by a word processor
  253.                 that adds formatting characters, or it could be a program file.
  254.                 You should quit it immediately using F-4. DO NOT, repeat, DO NOT
  255.                 save it, for that file would not be usable any more!  It's OK to
  256.                 browse around, as long as you do not save it.
  257.  
  258.  
  259. F-2             Save file and continue.
  260.                 ----------------------------------------------------------------
  261.                 As for F-1, you are asked for the name of the file.  If the dis-
  262.                 played filename suits you, just press ENTER; modify it other-
  263.                 wise.  If the file cannot be created, there will be a warning
  264.                 beep and a message.  You should use this function often to save
  265.                 your work to disk.
  266.  
  267.  
  268. F-3             Save and quit this file.
  269.                 ----------------------------------------------------------------
  270.                 Exactly like F-2, except that after saving the file, the writing
  271.                 area will clear and be ready for a new file.
  272.  
  273.  
  274. F-4             Quit this file / Quit program.
  275.                 ----------------------------------------------------------------
  276.                 Clears the writing area and readies the system for a new file.
  277.                 Pressing again terminates the program and returns to DOS.  If
  278.                 the file has been modified, you will be warned to save it. Press
  279.                 ENTER to quit this file or any other key to go back to editing
  280.                 this file.
  281.  
  282.  
  283. F-5             Save in "message" mode and quit this file.
  284.                 ----------------------------------------------------------------
  285.                 Just like F-3, except that the file will not contain any LF cha-
  286.                 racter (#10) and blank lines will contain one space character
  287.                 (#32).  This mode is convenient to produce message files to be
  288.                 uploaded into a BBS message editor.
  289.  
  290.  
  291. Notes:          After pressing F-1, F-2 F-3 or F-5, you may abort the command if
  292. ------          you press the ESC key.
  293.  
  294.                 BACKSPACE is the only editing key you may use to modify the dis-
  295.                 played filename in a file operation.
  296.  
  297.                 If you try to quit a newly created file or a file you have modi-
  298.                 fied, without saving it first, be it with F-1 or F-4, an audible
  299.                 signal and an error message will warn you.  Should you decide
  300.                 not to save this file, just press ENTER in order to quit.  Pres-
  301.                 sing any other key will take you back to the editor; you may
  302.                 then save it and quit it.
  303.  
  304.                 If, when saving a file to a diskette, EDITOR encounters a pro-
  305.                 blem, you will be warned by an "Error creating save file" or
  306.                 "Error saving text to file" message and you will be back to the
  307.                 editor. Possible sources of the problem include:  drive door or
  308.                 lever not closed, unformatted or unrecognized disk format, no
  309.                 diskette in drive, write-protect tab on diskette, defective dis-
  310.                 kette.  Correct the problem and save again.
  311.  
  312.                 If you specify a directory that does not exist on the disk or an
  313.                 inexistant disk, you will get an "Error creating save file" mes-
  314.                 sage.
  315.  
  316.                 If disk space is unsufficient to save the whole file, a message
  317.                 will warn you and you will be back to editing.  Save again on a
  318.                 different disk.
  319.  
  320.  
  321.  
  322. --------------------------------------------------------------------------------
  323.                          Full screen editing commands:
  324. --------------------------------------------------------------------------------
  325.  
  326.  
  327. Cursor:         The cursor is moved by one character or one line with the help
  328.                 of the four arrow keys.
  329.  
  330.  
  331. ENTER           moves the cursor to the beginning of the next line.
  332.  
  333.  
  334. HOME            moves the cursor to the beginning of the current line.
  335.  
  336.  
  337. END             moves it to the end of the line.
  338.  
  339.  
  340. PAGE UP         moves the cursor by 22 lines (one screen-full) towards the
  341.                 beginning of the file.
  342.  
  343. PAGE DOWN       moves it by 22 lines towards the end of the file.
  344.  
  345.  
  346. Ctrl-HOME       takes the cursor to the very beginning of the file, to position
  347.                 1 of line 1.
  348.  
  349.  
  350. Ctrl-END        takes you to the end.  The last line will be at the top of the
  351.                 writing area and the cursor located after the last character of
  352.                 this line.  If the line happens to have 80 characters, the cur-
  353.                 sor will be placed at the beginning of next line.
  354.  
  355. INSERT          toggles the insertion mode on and off; the cursor becomes block-
  356.                 shaped and keystrokes are added at the cursor location while
  357.                 whatever is at its right side is shifted accordingly.  Should
  358.                 some characters go beyond the right edge of the screen, they
  359.                 will be lost.
  360.  
  361.  
  362. DELETE          erases the character at the cursor location and shifts whatever
  363.                 is at its right one space to the left.
  364.  
  365.  
  366. BACKSPACE       erases the character preceeding the cursor and shifts whatever
  367.                 is at its right to the left.
  368.  
  369.  
  370. Ctrl-BACKSPACE  deletes the line indicated by the cursor.
  371.  
  372.  
  373. TAB             moves the cursor toward the right side to the next position that
  374.                 is a multiple of 8 plus 1.
  375.  
  376.  
  377. Shift-TAB       moves it to the left in a similar fashion.
  378.  
  379.  
  380. Alt-L           marks lines in reverse video for moving, copying or deletion.
  381.  
  382.  
  383. Alt-U           unmarks lines.
  384.  
  385.  
  386. Alt-D           deletes marked lines.
  387.  
  388.  
  389. Alt-M           moves the marked lines to the new cursor location; lines get
  390.                 unmarked.  You will get an error message if no line is marked.
  391.  
  392.  
  393. Alt-Z           copies the marked lines to the new cursor position; lines stay
  394.                 marked.  If no line is marked, the current line will be copied
  395.                 and its copy placed underneath.
  396.  
  397.  
  398. Alt-I           inserts a blank line under the current line and move the cursor
  399.                 to the beginning of that line.
  400.  
  401.  
  402. Alt-J           joins the next line to the current line up to the last complete
  403.                 word that will fit in the free space of the current line.  A
  404.                 space character is added between the two joined segments and
  405.                 becomes the current cursor location.  If the said next line is
  406.                 blank, it will be deleted;  if it begins with space characters,
  407.                 such characters will be removed.
  408.  
  409.  
  410. Alt-S           splits a line into two segments, the end of the line being moved
  411.                 under the current line.  The separation occurs before the begin-
  412.                 ning of the word marked by the cursor or directly preceeding the
  413.                 space character indicated by the cursor.  If the cursor is under
  414.                 the first word of the line, a blank line will be inserted before
  415.                 the current line.
  416.  
  417.                 NOTE:  Alt-S is the only mean you have to insert a line before
  418.                 the first line of your file;  move the cursor to location 1 of
  419.                 line 1 (you could press Ctrl-HOME) then press Alt-S.
  420.  
  421.  
  422. Alt-Q           modifies the appearance of the screen (alternate video mode).
  423.                 See the descriptive table below.
  424.  
  425.  
  426.  
  427. --------------------------------------------------------------------------------
  428.                          Video mode descriptive table:
  429. --------------------------------------------------------------------------------
  430.  
  431.  
  432. EDITOR offers two ways to modify the screen appearance:  the video mode chosen
  433. on the DOS command line and the alternate mode chose with the Alt_Q command.
  434. Here are the various possible combinations.  Please note that on a monochrome
  435. screen which can be green, amber or white, the word "white" as used below rela-
  436. tes to what is luminous (bright) on the screen. "White/black" means white
  437. (bright) characters on a black background. "Monochrome screen" means a monitor
  438. connected to an MDA or Hercules video adapter.
  439.  
  440.  
  441.  
  442. NO mode specified on command line, monochrome or color screen:
  443. --------------------------------------------------------------------------------
  444. No parameter          Top         Supplementary        Normal          Marked
  445. ----------------      band           message            text            text
  446.  
  447. Normal mode:       white/black     black/white       white/black     black/white
  448.  
  449. Alternate mode:    white/black     white/black       black/white     white/black
  450.  
  451.  
  452.  
  453. REVERSE mode specified on command line, monochrome or color screen:
  454. --------------------------------------------------------------------------------
  455. /R parameter          Top         Supplementary        Normal          Marked
  456. ----------------      band           message            text            text
  457.  
  458. Normal mode:       black/white     white/black       black/white     white/black
  459.  
  460. Alternate mode:    black/white     black/white       white/black     black/white
  461.  
  462.  
  463.  
  464. COLOR mode specified on command line, color screen:
  465. --------------------------------------------------------------------------------
  466. /C parameter          Top         Supplementary        Normal          Marked
  467. ----------------      band           message            text            text
  468.  
  469. Normal mode:       white/cyan      white/black       white/blue       white/red
  470.  
  471. Alternate mode:    white/cyan      white/black       blue/white*      white/red
  472.  
  473. * May appear as blue on light grey on some monitors or at certain settings.
  474.  
  475.  
  476.  
  477. COLOR mode specified on command line, monochrome screen:
  478. --------------------------------------------------------------------------------
  479. No parameter          Top         Supplementary        Normal          Marked
  480. ----------------      band           message            text            text
  481.  
  482. Normal mode:       white/black      white/black      white/black     white/black
  483.  
  484. Alternate mode:    white/black      white/black  white/bl.underlined white/black
  485.  
  486. Note:  for obvious reasons, those last two modes are not very useful.
  487.  
  488.  
  489.  
  490.  
  491. --------------------------------------------------------------------------------
  492.                                Tricks and tips:
  493. --------------------------------------------------------------------------------
  494.  
  495.  
  496. When saving a file, EDITOR replaces the original version with the newer one; it
  497. does not create .BAK files.  If you wish to keep the old version, make a copy
  498. of it under a different name or run EDITOR, load the file and save it immediate-
  499. ly (with F-2) with a new name; you may then start editing the file.  You could
  500. also create a batch that would make a temporary copy of your file then load
  501. EDITOR and the file.  Here is an example of a suitable batch:
  502.  
  503. copy %1 special.tmp
  504. editor /c %1
  505.  
  506. If this batch were named "ED.BAT", typing "ED BINGO.TXT" would copy BINGO.TXT
  507. into SPECIAL.TMP, then load EDITOR in color mode and open the file BINGO.TXT.
  508.  
  509.  
  510. When you create and save a new file, it may happen that you give it the name of
  511. an existing file on the disk; the old file would be lost because it would be
  512. written over by the one you are saving.  To avoid that, before you begin typing
  513. your text, try opening a file (with F-1) using the name you intend to give to
  514. your new file.  If there is a file with that name on the disk, it will be loaded
  515. into EDITOR; you may then quit this file and try a different name.  If there is
  516. no such file, a message will tell you that a new file is being created.  Start
  517. typing your text and save it often by pressing F-2 then ENTER.
  518.  
  519.  
  520. If you are creating a message to be uploaded into a Bulletin Board System (BBS),
  521. limit your line length to 70 characters, otherwise, your page layout could beco-
  522. me upset by the BBS's message editor.  Save your text file with F-5.  To send
  523. your message, use a communication program that supports ASCII file uploads; once
  524. you are into the BBS's editor, you will only have to transfer your file.  You
  525. may have to slow down transfer between lines; consult your communication program
  526. manual (line pacing).
  527.  
  528. You can quickly reformat a paragraph with Join (Alt-J) and Split (Alt-S) func-
  529. tions.  When joining two lines, blank spaces preceding the text on the second
  530. line will be removed.  Words are never broken in two and the cursor will be lo-
  531. cated at the junction of the two line segments; if there is an hyphen or a space
  532. character to remove, you will have to do it manually.  When splitting a line,
  533. blanks directly preceding the word indicated by the cursor will be deleted and
  534. whatever is to the right of the cursor will be moved to the next line.
  535.  
  536.  
  537. EDITOR can be used to extract text and strip control characters from any file it
  538. can load, be it a text file with formatting characters or a program file.  Make
  539. sure you are working on a copy of the file with a different name so the original
  540. will not be rendered unusable.  To extract text, simply erase all characters not
  541. belonging to the body text and join words split into segments.  Program files
  542. contain many #0 and even #255 characters which are invisible.  To detect their
  543. presence at the end of lines, press END; if the cursor moves further than the
  544. very next position after the last word, then there are such characters.  If
  545. splitting a line (Alt-S) won't occur at the space character where it should,
  546. then again there is a #0 or #255 character.  It is possible that some parts of
  547. the text material may be missing at different places in the file; this is caused
  548. by the presence of #26 characters scattered in the original file.
  549.  
  550.  
  551.  
  552.  
  553. --------------------------------------------------------------------------------
  554.                                 Various notes:
  555. --------------------------------------------------------------------------------
  556.  
  557.  
  558. When saving a file, EDITOR will append a CR character (#13) and an LF character
  559. (#10) after the last non-blank character of a line and then will write that line
  560. up to the LF character to disk.  An EOF character (#26) is added to the end of
  561. the file.
  562.  
  563. However, in message mode, only the CR character is added and blank lines will
  564. contain a space character and a CR.  The files ends with an EOF character.
  565.  
  566. EDITOR correctly interprets TAB characters embedded in a file created by other
  567. programs and replaces them by the required number of space characters, but it
  568. won't compress blanks when it saves a file.  Thus it is possible for a file
  569. created by an other program to occupy more disk space after having been loaded
  570. and saved again with EDITOR.
  571.  
  572.  
  573.  
  574. As with any other program, save your work frequently!!!
  575.  
  576.  
  577.  
  578. --------------------------------------------------------------------------------
  579.                This document has been written using only EDITOR.
  580. --------------------------------------------------------------------------------
  581.