home *** CD-ROM | disk | FTP | other *** search
/ PC Format 14 / Disk14-1.iso / SEDH.EXE / SED.DOC next >
Text File  |  1989-07-09  |  6KB  |  155 lines

  1.  
  2. SED.EXE is a small notepad like editor which uses familiar WordStar/
  3. Sidekick commands. It is designed to be run both on its own, and from other
  4. programs. The program accepts several parameters to affect operation.
  5.  
  6. SED is called as follows:-
  7.  
  8.        C:\> sed <file> <options>
  9.  
  10. where <file> is any dos text file, using standard naming (a path may be
  11. specified, but no wildcards are allowed). If a file name is not entered then
  12. SED assumes "NONAME" as a default file name.
  13.  
  14.      examples:-
  15.  
  16.          sed           --- invokes editor to edit a new file, "NONAME"
  17.          sed file.ext  --- invokes editor to edit "file.ext"
  18.  
  19. It is also possible to supply further parameters on the command line which
  20. instruct the editor to change any of several default settings. An options
  21. parameter looks like this:-
  22.  
  23.           -IAWA
  24.  
  25. where the '-' must precede the start of an options lists, and the several
  26. characters which follow each set one option. The individual options are:-
  27.  
  28.       I     -- Insert mode should be initially OFF (defaults to ON)
  29.       A     -- Auto-Indent mode should be initially OFF (defaults to ON)
  30.       W     -- Word Wrap mode should be initially OFF (defaults to ON)
  31.       B     -- Editor should not create .BAK files (it does by default)
  32.       J     -- Justified Right Margin (defaults to OFF, ie ragged)
  33.       M     -- Set Right Margin (see below)
  34.       C     -- Colour overrides (see below)
  35.       D     -- Display Window overrides (see below)
  36.       S     -- Suppress Clear Screen when leaving editor.
  37.  
  38. example:-
  39.  
  40.         sed file.ext -AWB
  41.  
  42. calls the editor to edit file "file.ext". Auto indent will be initially off,
  43. as will word wrap and .BAK file creation.
  44.  
  45.  
  46. Right Margin Setting
  47. --------------------
  48.  
  49. The right margin normally defaults to the full window width, however you can
  50. set your own right margin by supplying an M parameter. The syntax of this
  51. option is:-
  52.  
  53.        sed file.ext -M[rr]
  54.  
  55. where "rr" is the column number which the right margin should be set to. For
  56. example,
  57.  
  58.        sed file.ext -m[70]
  59.  
  60. sets the right margin to column 70.
  61.  
  62.  
  63.  
  64. Colour Overrides.
  65. -----------------
  66.  
  67. The editor uses a default set of colours for various titles etc. These can
  68. be overridden using the command line option mentioned briefly above. The
  69. syntax of this option is as follows:-
  70.  
  71.        sed file.ext -C[nn,bb,ee,ii]
  72.  
  73. nn,bb,ee and ii are the colour attributes to use for (respectively) normal
  74. text, marked blocks, error messages and the information line. For example:-
  75.  
  76.        sed file.ext -C[7,112,112,112]
  77.  
  78. tells the editor to use attribute 7 for normal text (7 = light gray on black)
  79. and attribute 112 for all other prompts (112 = black on light gray, eg
  80. reverse).
  81.  
  82. The following table helps you to calculate which attribute to use:-
  83.  
  84.    ForeGround Colour          Background Colour
  85.  
  86.    Black         =  0         Black         =  0
  87.    Blue          =  1         Blue          =  1
  88.    Green         =  2         Green         =  2
  89.    Cyan          =  3         Cyan          =  3
  90.    Red           =  4         Red           =  4
  91.    Magenta       =  5         Magenta       =  5
  92.    Brown         =  6         Brown         =  6
  93.    LightGray     =  7         LightGray     =  7
  94.    DarkGray      =  8
  95.    LightBlue     =  9
  96.    LightGreen    = 10
  97.    LightCyan     = 11
  98.    LightRed      = 12
  99.    Light Magenta = 13
  100.    Yellow        = 14
  101.    White         = 15
  102.  
  103. To calculate an IBM PC colour attribute, take the number of the background
  104. colour you want and multiply it by 16. Then add the number of the
  105. foreground colour. The result is the attribute value in decimal which you
  106. use in the colour override option of the editor. Note that you cannot use
  107. high intensity foreground colours (unless you want to fiddle with the blink
  108. bit externally).
  109.  
  110.  
  111. Display Window Override.
  112. ------------------------
  113.  
  114. The editor normally takes over the entire display for its own use, however
  115. it can be told to restrict itself to a defined region of the display using
  116. this option. The syntax is the same as for the colour overrides, but with a
  117. different initial letter, ie:-
  118.  
  119.        sed file.ext -D[xx,yy,ww,hh]
  120.  
  121. Where xx,yy,ww and hh are (respectively) the x-position of the window origin,
  122. (0-79), the y position of the window origin (0-24), the window width, and the
  123. window height.
  124.  
  125. Note: A window is just a rectangular portion of the display. The editor does
  126. not draw boxes etc around this region. The idea is that you use this option
  127. from a program, and that program draws its own box using your own flavour of
  128. frame etc. If you do this then the window dimensions you pass to sed should
  129. define a rectangular portion of the screen which does not overwrite the left,
  130. right or bottom of the window frame, but which *does* overwrite the top of
  131. the window frame (sed will put it's information line there).
  132.  
  133. A full example:-
  134.  
  135.  
  136.      sed file.ext -IAWBS -C[7,112,112,112] -D[5,5,70,15]
  137.  
  138. Edits file "FILE.EXT", insert mode is off, as is auto-indent, word wrap and
  139. .BAK file creation, screen clearing is suppressed on exit, and colour
  140. settings and the window region are overridden.
  141.  
  142. The SED editor is entirely my own work, written in Modula-2 using the JPI M2
  143. compiler. SED.EXE and this document are hereby placed entirely in the public
  144. domain. Do with it as you will.
  145.  
  146. Don Milne.
  147. 86 Leadside Road.,
  148. Aberdeen
  149. AB2 4TU.
  150. CIX-id         : mpack
  151. BIX-id         : mpack
  152.  
  153. 22nd May 1989.
  154.  
  155.