1 " BEGIN INCLUDE FILE ... ssu_request_macros.incl.alm
2 " Created: 5 May 1980 by W. Olin Sibert
3 " Modified: 25 July 1980 by G. Palter to add multics_request macro
4 " Modified: 1 December 1981 by G. Palter to remove user_flags
5 " Modified: 12 February 1982 by G. Palter for version 4
6 " Modified: 28 February 1982 by G. Palter to add dont_summarize and dont_list
7 " Modified: 2 August 1982 by Jay Pattin to add unknown_request
8 " Modified: 24 October 1984 by G. Palter to restore user flags and add the
9 " set_default_flags and set_default_multics_flags macros
10
11
12 " ALM macros used to define subsystem request tables
13
14
15 macro request_table_version
16 aci "srqt_4.0",8
17 &end
18
19
20 macro namelist
21 maclist off,save
22 vfd 36/&K
23 &R& aci @&i@32
24 &
25 maclist restore
26 &end
27
28 " ^L
29
30 " System defined per-request flags
31
32 bool flags.allow_command,400000 " valid as a command
33 bool flags.allow_af,200000 " valid as an active function
34 bool flags.allow_both,600000 " valid as both
35
36 bool flags.unimplemented,100000 " request is not yet implemented
37 bool flags.multics_request,040000 " request is actually a Multics command
38
39 bool flags.dont_summarize,020000 " summarize_requests won't list it
40 bool flags.dont_list,010000 " list_requests won't show it without -all
41
42 bool flags.unknown,004000 " request is explicitly made unknown
43
44
45 " Macros for setting per-request flags
46
47 macro set_flags_loop
48 maclist off,save
49 &3
50 &=&idefault& set_flags_loop &10&2
51 &; set &1&1+&i
52 &&
53 maclist restore
54 &end
55
56
57 macro set_flags
58 maclist off,save
59 set &1,0
60 &=&3,& set_flags_loop &10&2
61 &; set_flags_loop &1&2&3
62 &
63 maclist restore
64 &end
65
66 " ^L
67
68 " set_default_flags system-flags,user-flags
69
70 " Sets the default system and/or user flags to be used for requests:
71 " system-flags: defines the default general nature of requests;" the default
72 " default is flags.allow_command
73 " user-flags: defines the default setting for the subsystem specific flags
74 " associated with requests;" the default default is none 0
75 " Note: If either system-flags or user-flags is ommitted, the default is not
76 " changed from its prior value. This action allows the use of multiple
77 " set_default_flags macros within a table to change system or user
78 " flags without affecting the other defaults
79
80 macro set_default_flags
81 maclist off,save
82 &^=&1,& set_flags .dft_sfflags.allow_command&1
83 &
84 &^=&2,& set_flags .dft_uf0&2
85 &
86 maclist restore
87 &end
88
89
90 " set_default_multics_flags system-flags,user-flags
91
92 " Sets the default system and/or user flags to be used for Multics commands when used as requests:
93 " system-flags: defines the default general nature of Multics requests;" the
94 " default default is flags.allow_command+flags.allow_af
95 " user-flags: defines the default setting for the subsystem specific flags
96 " associated with Multics requests;" the default default is none 0
97 " Note: If either system-flags or user-flags is ommitted, the default is not
98 " changed from its prior value. This action allows the use of multiple
99 " set_default_multics_flags macros within a table to change system or user
100 " flags without affecting the other defaults
101
102 macro set_default_multics_flags
103 maclist off,save
104 &^=&1,& set_flags .dft_mrsfflags.allow_commandflags.allow_af&1
105 &
106 &^=&2,& set_flags .dft_mruf0&2
107 &
108 maclist restore
109 &end
110
111 " ^L
112
113 macro .multics_request_doc
114 null
115 &end
116
117
118 macro dft_multics_doc_lth
119 set .multics_doc_lth,0
120 &end
121
122
123 " set_default_multics_doc string
124
125 " Sets the default documentation to be used for Multics commands when used as requests:
126 " string: is the documentation string to be used for any subsequent requests defined by
127 " the multics_request_macro;" all occurences of "&1" in this string will be replaced by
128 " the actual name of the request;" Eg:
129 " set_default_multics_doc Type '.. help &1' for more information.
130
131 macro set_default_multics_doc
132 maclist off,save
133 macro .multics_request_doc
134 aci @&1@
135 &&end
136 macro dft_multics_doc_lth
137 macro .compute
138 set .multics_doc_lth,&&&&l1
139 &&&&end
140 .compute &1
141 &&end
142 maclist restore
143 &end
144
145 " ^L
146
147 " begin_table tablename
148
149 " Defines a subsystem request table multiple tables may exist in a single object segment:
150 " tablename: the name by which this table may be referenced externally;" references to the
151 " table should be of the form segname$tablename where segname is the name of this
152 " object segment
153
154 macro begin_table
155 segdef &1
156 maclist object,save
157 use tables
158 &1: request_table_version
159 aci @&1@,32
160 dup 6
161 vfd 36/0
162 dupend
163 vfd 36/&1.rc
164 maclist off
165 set .rc,0
166 set_default_flags default,default
167 set_default_multics_flags default,default
168 maclist restore
169 &end
170
171
172 " end_table tablename
173
174 " Indicates the end of a subsystem request table definition:
175 " tablename: the name of the table which has now been completely defined
176
177 macro end_table
178 maclist off,save
179 set &1.rc,.rc
180 maclist restore
181 &end
182
183 " ^L
184
185 " request name,processor,abbreviations,documentation,
186 " system-flags,user-flags
187
188 " Defines a subsystem request:
189 " name: the primary name of this request
190 " processor: the name of the procedure which actually executes this request;" it must be
191 " of the form segname$entryname
192 " abbreviations: is the list of defined abbreviations for this request
193 " documentation: a short string used by the list_requests request to explain this request
194 " system-flags: defines the general nature of this request;" the default is
195 " flags.allow_command
196 " user-flags: allows a subsystem to provide subsystem-specific information
197 " with the request's definition;" the default is none 0
198
199 macro request
200 maclist off,save
201 set .rc,.rc+1
202 maclist object
203 use tables
204 vfd 18/&U.call,18/&U.names
205 &=&4,& vfd 36/0
206 &; vfd 18/&U.info18/&l4
207 maclist off
208 use info
209 &U.info: aci @&4@
210 &
211 use tables
212 set_flags .sf,.dft_sf,&5
213 set_flags .uf,.dft_uf,&6
214 maclist object
215 vfd 18/.sf,18/.uf
216 maclist off
217 use calls
218 &U.call: epaq *
219 lprp4 7|stack_header.lot_ptr,*au
220 call6 &2
221 use names
222 &U.names: namelist &1&^=&3,&&3&
223 maclist restore
224 &end
225
226 " ^L
227
228 " unknown_request name,abbreviations
229
230 " Defines an unknown request: used to make the utilities not recognize a request even though
231 " it is defined in a later request table such as ssu_request_tables_$standard_request:
232 " name: the primary name of the request to be marked as unknown
233 " abbreviations: is the list of defined abbreviations for this request
234
235 macro unknown_request
236 maclist off,save
237 set .rc,.rc+1
238 maclist object
239 use tables
240 vfd 18/&U.call,18/&U.names
241 vfd 36/0
242 vfd 18/flags.unknown,18/0
243 maclist off
244 use calls
245 &U.call: epaq *
246 lprp4 7|stack_header.lot_ptr,*au
247 call6 ssu_$unknown_request
248 use names
249 &U.names: namelist &1&^=&2,&&2&
250 maclist restore
251 &end
252
253 " ^L
254
255 " multics_request name,abbreviations,documenation,procedure,
256 " system-flags,user-flags
257
258 " Defines that a Multics command/AF may be used as a subsystem request:
259 " name: the primary name of this request usually the name of the Multics command/AF
260 " abbreviations: is the list of defined abbreviations for this request
261 " documentation: a short string used by the list_requests request to explain this request;
262 " if no documentation is provided, the documentation specified by a prior use of
263 " set_default_multics_doc is used
264 " procedure: the name of the Multics command/AF which is actually executed by this
265 " request;" it must be of the form segname$entryname;" if not given, the default is
266 " name$name
267 " system-flags: defines the general nature of this request;" the default is
268 " flags.allow_command+flags.allow_af
269 " user-flags: allows a subsystem to provide subsystem-specific information
270 " with the request's definition;" the default is none 0
271
272 macro multics_request
273 maclist off,save
274 set .rc,.rc+1
275 maclist object
276 use tables
277 vfd 18/&U.call,18/&U.names
278 &=&3,& dft_multics_doc_lth &1&2&3&4&5&6
279 vfd 18/&U.info18/.multics_doc_lth
280 &; vfd 18/&U.info18/&l3
281 &
282 maclist off
283 use info
284 &U.info:
285 &=&3,& .multics_request_doc &1&2&3&4&5&6
286 &; aci @&3@
287 &
288 use tables
289 maclist object
290 set_flags .sf,.dft_mrsf,&5
291 set_flags .uf,.dft_mruf,&6
292 maclist object
293 vfd 18/.sf+flags.multics_request,18/.uf
294 maclist off
295 use calls
296 &U.call: epaq *
297 lprp4 7|stack_header.lot_ptr,*au
298 &=&4,& call6 &1$&1
299 &; call6 &4
300 &
301 use names
302 &U.names: namelist &1&^=&2,&&2&
303 maclist restore
304 &end
305
306 " ^L
307
308 " Required ALM statements to make this all work
309
310 use tables
311 use calls
312 use names
313 use info
314 join /text/tables,calls,names,info
315
316 include stack_header
317
318 " END INCLUDE FILE ... ssu_request_macros.incl.alm