1 05/12/82  The audit_ editor.
  2 
  3      The audit_ editor is invoked by typing the edit request when
  4 auditing.  The edit request comprising a three character
  5 sequence;
  6 
  7      trigger character || "e" or "E" || new-line
  8 
  9 The default trigger character is "!".
 10 
 11 
 12 Editor request list:
 13 
 14 [[ADR,]ADR]p                  print
 15 s/REGEXP/STRING/              substitute
 16 ADR                           location
 17 ..STRING                      execute
 18 q                             quit
 19 :                             defeat default search tag
 20 ? (or .?)                     list editor requests
 21 expand (or .expand)           expand abbrev
 22 off (or .off))                audit off
 23 on (or .on)                   audit on
 24 l (or .l)                     last returned line
 25 r[STRING] (or .r[STRING])     return line
 26 n (or .n)                     return newline
 27 type (or .type)               print type
 28 exec (or .exec)               execute edit line
 29 d/STRING/ (or .d/STRING/)     default search tag
 30 =                             print current entry number
 31 
 32 
 33 Explanation of editor requests:
 34 
 35      The audit editor requests are presented in two categories,
 36 familiar requests and special requests.  The editor syntax is
 37 basically that of qedx.  Any number of requests may be on the
 38 same line and spaces are ignored.
 39 
 40      Addressing, where appropriate, is done the same as in qedx
 41 with two notable exceptions.  First, the "." is a request for
 42 self-identification rather than an indicator for the current
 43 address.  Second, addresses are in terms of entries in the audit
 44 file rather than lines in a buffer.
 45 
 46      If the default search tag is in use, as is the case unless
 47 specifically defeated, the absolute entry number refers to the
 48 number of entries with the default search tag from the beginning
 49 of the file.  Similarly, a relative entry address refers to the
 50 number of entries with the default search tag before or after
 51 the current address.
 52 
 53 
 54 Addressing:
 55 
 56      An address can consist of one or more of the following three
 57 types of address, the relative address, the absolute address, and
 58 the search address.
 59 
 60      An absolute address refers to an entry by its entry number.
 61 This entry number is determined by counting, from the beginning
 62 of the file, the number of entries which match the default search
 63 tag.  The use of a colon (":") means every entry is counted.
 64 
 65      A relative address is a number preceded by either a "+" or a
 66 "-". It refers to the entry which is the specified number of
 67 entries with the default search tag before , "-", or after, "+",
 68 the entry currently in the edit buffer.
 69 
 70      A search address is a regular expression which may be
 71 preceded by a less-than ("<").  A regular expression is a
 72 character string beginning and ending with a slash ("/").  A
 73 search address which is a regular expression alone refers to the
 74 next entry in the file after the one currently in the edit
 75 buffer, which contains a match for the regular expression.
 76 
 77      A search address which comprises a regular expression
 78 preceded by a less-than, "<", does a backward search for the
 79 first entry previous to the current entry containing a match for
 80 the regular expression.  N is a positive integer, and /REGEXP/
 81 is a regular expression.  The three types of addresses and their
 82 variations are: N -N +N /REGEXP/ </REGEXP/
 83 
 84 
 85 Familiar Requests:
 86 
 87 [[ADR1,]ADR2]p                print
 88 
 89             print the addressed entries.
 90 
 91 s/REGEXP/STRING/              substitute
 92 
 93             replace occurrences of REGEXP in the edit buffer with
 94             STRING.
 95 
 96 ADR                           location
 97 
 98             locate the addressed entry.  If ADR is not followed
 99             by a request the edit buffer is printed.  An ADR can
100             contain an absolute entry reference at its beginning,
101             relative addresses in any portion, and regular
102             expressions in any portion.  An absolute address is
103             either a number or the dollar-sign (to indicate the
104             last entry in the audit file.
105 
106 ..STRING                      execute
107 
108             pass STRING to command processor and return to the
109             audit editor.
110 
111 q                             quit
112 
113             quits the audit_ editor.
114 
115 =                             print current entry number
116 
117             print the entry number associated with the current
118             position in the audit file.  The value of the entry
119             number for the current position can change with
120             different default search tags.  See the ":" and "d"
121             requests below.
122 
123 
124 Special requests:
125 
126 :                             defeat default search tag
127 
128             look at every entry, regardless of entry class (or
129             tag).  only effective for requests following it and
130             on the same request line.
131 
132 ?         (or .?)             list editor requests
133 
134             list the editor requests and a brief description of
135             their function.
136 
137 expand    (or .expand)        expand abbrev
138 
139             abbrev expand the edit buffer.
140 
141 off       (or .off)           audit off
142 
143             don't audit input and output in the editor.
144 
145 on        (or .on)            audit on
146 
147             audit the editor.
148 
149 l         (or .l)             last returned line
150 
151             address the last line returned by the audit editor.
152 
153 r[STRING] (or .r[STRING])     return line
154 
155             return the rest of the request line, if non-null.
156             Otherwise, return the edit buffer (without trigger
157             sequence).
158 
159 n         (or .n)             return new-line
160 
161             returns a new-line character.
162 
163 type      (or .type)          print type
164 
165             print the audit entry type of the current position.
166 
167 exec      (or  .exec)         execute
168 
169             pass the edit buffer to the command processor and
170             return to the audit editor.
171 
172 d/STRING/ (or .d/STRING/)     default search tag
173 
174             set the default search tag to STRING.  If STRING is
175             only one character, then only the first character of
176             the tag is used to determine if an entry is seen (in
177             counting entries and doing searches).  If STRING is
178             two characters, the match is done one both characters
179             of the tag.
180 
181 
182 
183 Notes:
184      The audit_ editor may be invoked while in the audit_ editor,
185 if the editor is  being audited.  For every level of the editor,
186 there is a remembered last returned line distinct from all other
187 remembered last returned lines.
188 
189      There is also a position in the audit file associated with
190 the last returned line.  This position is the location that the
191 last returned line was recorded (this position exists since last
192 returned lines are audited).  The "l" request sets the current
193 position to be this associated position.  It is important to
194 note that this position (or entry) is distinct from wherever the
195 original copy of the last returned line(the one which was edited
196 to produce the last returned line) was located.