1 03/20/81 - Auditing and editing I/O:
  2 
  3      Auditing allows one to keep a record or log of activity on a
  4 particular I/O switch.  Also, it allows editing of input.  The
  5 simplest use of auditing is:
  6 
  7 ! attach_audit
  8 
  9 This will set up auditing of input and output and enable audit
 10 editing.  An audit file will be placed in the user's home directory
 11 with a two component entry name.  The first component of the name is
 12 the date and the second component is the suffix ".audit".
 13 
 14 
 15 Audit requests:
 16 
 17      The audit requests are always recognized when auditing is on.
 18 The three character request sequence is the trigger character followed
 19 by the desired request followed by a new line.  The default trigger
 20 character is an exclamation mark ("!").  The requests are:
 21 
 22 !.
 23             print "audit" and which of input and output is being
 24             audited.
 25 !?
 26             print a brief description of available audit requests.
 27 !e
 28             enter the audit editor.
 29 !E
 30             enter the audit editor, with the input line processed as
 31             edit requests.
 32 
 33 
 34 !a
 35             abbrev expand the input line.  See the MPM documentation
 36             on abbrev for more information.
 37 !r
 38             replay the input line.  That is, display the input line
 39             without a new line.  Further input up to the next new line
 40             is appended to the redisplayed input.  This is the input
 41             line which is passed through the audit_ I/O module.
 42 
 43 
 44 !t
 45             instructs the audit_ module not to log the input line,
 46             i.e.  to make
 47             it transparent.
 48 !n
 49             no operation.  The input line to which this is appended is
 50             simply passed through the audit_ module.
 51 
 52 !d
 53             delete the line.  It prevents the input line from ever
 54             being seen by the system.
 55 
 56 
 57 Editor requests:
 58 
 59      The audit editor requests are presented in two categories,
 60 familiar requests and special requests.  The editor syntax is
 61 basically that of qedx.  Any number of requests may be on the same
 62 line and spaces are ignored.  Addressing, where appropriate, is done
 63 the same as in qedx with two notable exceptions.  First, the "." is a
 64 request for self-identification rather than an indicator for the
 65 current address.  Second, addresses are in terms of entries in the
 66 audit file rather than lines in a buffer.  If the default search tag
 67 is in use, as is the case unless specifically defeated, the absolute
 68 entry number refers to the number of entries with the default search
 69 tag from the beginning of the file.  Similarly, a relative entry
 70 address refers to the number of entries with the default search tag
 71 before or after the current address.
 72 
 73 
 74 Familiar requests:
 75 
 76 [[ADR1,]ADR2]p                print
 77 
 78             print the addressed entries.
 79 
 80 s/REGEXP/STRING/              substitute
 81 
 82             replace occurrences of REGEXP in the edit buffer with
 83             STRING.
 84 
 85 
 86 ADR                           location
 87 
 88             locate the addressed entry.  If ADR is not followed by a
 89             request the edit buffer is printed.  An ADR can contain an
 90             absolute entry reference at its beginning, relative
 91             addresses in any portion, and regular expressions in any
 92             portion.  An absolute address is either a number or the
 93             dollar-sign (to indicate the last entry in the audit file.
 94 
 95 ..STRING                    execute
 96 
 97             pass STRING to command processor and return to the audit
 98             editor.
 99 
100 
101 =                           print current entry number
102 
103             print the current entry number.  This value is dependent
104             on the current default search tag.  If the default search
105             tag changes, the current entry may also change.
106 
107 q                             quit
108 
109             quit from the editor without doing anything (i.e.,
110             returning any characters).
111 
112 
113 Special requests:
114 
115 expand                      expand abbrev
116 
117             abbrev expand the edit buffer.
118 
119 off                         audit off
120 
121             don't audit input and output in the editor.
122 
123 on                          audit on
124 
125             audit the editor.
126 
127 
128 l                           last returned line
129 
130             address the last line returned by the audit editor.
131 
132 r[STRING]                   return line
133 
134             return the rest of the request line, if non-null.
135             Otherwise, return the edit buffer (without trigger
136             sequence).
137 
138 n                           return new-line
139 
140             returns a new-line character.
141 
142 
143 type                        print type
144 
145             print the audit entry type of the current position.
146 
147 exec                        execute
148 
149             pass the edit buffer to the command processor and return
150             to the audit editor.
151 
152 d/STRING/                   default search tag
153 
154             set the default search tag to STRING.  If STRING is only
155             one character, then only the first character of the tag is
156             used to determine if an entry is seen (in counting entries
157             and doing searches).  If STRING is two characters, the
158             match is done one both characters of the tag.
159 
160 
161 Request syntax and processing:
162 
163      The square brackets in the request syntax above are to indicate
164 the contained item is optional.  The square brackets are not typed
165 when entering the request.  If execution of a request, in the audit
166 editor, should fail for any reason, the processing of that request
167 line is aborted, the user is informed of the failure, and a new
168 request is prompted for.  Note that this means the user is left in the
169 editor when a problem is encountered executing a request line
170 associated with a E audit request.
171      The audit editor may be entered recursively, and each level of
172 the editor has its own memory for the last returned line from its
173 level.
174 
175 
176 Examples:
177 
178 To set up with default audit file in homedir;
179           attach_audit
180 To set up with an audit file in the process_dir;
181           attach_audit -pn [pd]>my_audit_file
182 To set the audit file to be a circular  file of 5 records;
183           io modes user_i/o audit_file_size=5
184 To re-execute the last use of the pl1 command;
185           </^pl1/r!E
186 To execute the above command line again;
187           lr!E