COMPILATION LISTING OF SEGMENT set_mrds_options Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-18_1146.33_Tue_mdt Options: optimize map 1 /****^ ******************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* ******************************************** */ 6 7 8 9 /****^ HISTORY COMMENTS: 10* 1) change(87-01-22,Hergert), approve(88-07-11,MCR7903), 11* audit(88-07-11,Dupuis), install(88-08-01,MR12.2-1073): 12* Changed design of the flags structure for use with the new parser. 13* END HISTORY COMMENTS */ 14 15 16 set_mrds_options: 17 smo: 18 proc; 19 20 /* DESCRIPTION 21* 22* smo {-pso -ot -pse -er on|off {-force}} | -reset -list 23* 24* The purpose of this procedure is to implement the set_mrds_options command. 25* The options set here control the way MRDS will act. 26* The various mrds options that can be set by this command are 27* print_search_order, and no_ot. Also controllable is error_report and 28* print_selection_expression. error_report (er) causes the long form of 29* error reporting to be turned on or off. pse dumps the select expression 30* in some human readable format. control options are -list and -reset. 31* -list lists the current state of the switches. -reset causes all switches 32* to be reset to their default values. 33* 34* HISTORY: 35* 36* 85-08-23 Originally written by John Hergert (FMC) 37* 38* 39* INPUT CONDITIONS: 40* 41* Some control arg must be supplied. If it is one of the options I.E. 42* -er -pso -ot -pse then it must be followed by either "on" or "off". 43* -force may be supplied, but only has effect on args that can be put in 44* selection expressions, as it is intended to force overriding default 45* values supplied in the sex. 46* 47**/ 48 49 code = 0; 50 flags = OFF; 51 52 53 call cu_$arg_count (nargs, code); 54 if (code ^= 0) then call error (code); 55 56 if nargs = 0 then do; 57 call com_err_ (0, program_name, 58 "^/^a^/", 59 "Usage: set_mrds_options {{{-pso on|off} | {-ot on|off} | {-pse on|off} | {-er on|off}} {-force}} | -reset -list" 60 ); 61 goto exit; 62 end; 63 64 more_args = TRUE; 65 i = 1; 66 do while (more_args); 67 68 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 69 if (code ^= 0) then call error (code); 70 71 if arg = "-pso" | arg = "-print_search_order" 72 then do; 73 flags.selected.pso = TRUE; 74 call get_arg_flag (flags.value.pso, i); 75 end; 76 else if arg = "-ot" | arg = "-optimize" 77 then do; 78 flags.selected.ot = TRUE; 79 call get_arg_flag (flags.value.ot, i); 80 end; 81 else if arg = "-pse" | arg = "-print_selection_expression" 82 then do; 83 flags.selected.pse = TRUE; 84 call get_arg_flag (flags.value.pse, i); 85 end; 86 else if arg = "-er" | arg = "-error_report" 87 then do; 88 flags.selected.error = TRUE; 89 call get_arg_flag (flags.value.error, i); 90 end; 91 else if arg = "-rs" | arg = "-reset" 92 then if nargs = 1 then do; 93 flags.reset_sw = ON; 94 more_args = FALSE; 95 end; 96 else do; 97 call com_err_ (0, 98 program_name, 99 "^/^a^/", 100 "The -reset control argument is incompatible with any other control arguments." 101 ); 102 goto exit; 103 end; 104 else if arg = "-ls" | arg = "-list" 105 then if nargs = 1 then do; 106 flags.list_sw = ON; 107 more_args = FALSE; 108 end; 109 else do; 110 call com_err_ (0, 111 program_name, 112 "^/^a^/", 113 "The -list control argument is incompatible with any other control arguments." 114 ); 115 goto exit; 116 end; 117 else if arg = "-fc" | arg = "-force" 118 then if nargs ^= 1 119 then flags.selected.force,flags.value.force = ON; 120 else do; 121 call com_err_ (0, 122 program_name, 123 "^/^a^/", 124 "The -force control argument must be used with other control arguments." 125 ); 126 goto exit; 127 end; 128 else do; 129 call com_err_ ( 130 error_table_$badopt, 131 program_name, 132 "^/^a^/", 133 "Usage: set_mrds_options {-pso | -ot | -pse | -er {on|off} {-force}} | -reset -list" 134 ); 135 goto exit; 136 end; 137 138 i = i + 1; 139 if i > nargs then more_args = FALSE; 140 end; 141 142 143 if flags.reset_sw then do; 144 flags.selected.pse, flags.selected.pso, flags.selected.ot, 145 flags.selected.error, flags.selected.force = ON; 146 flags.value.pso, flags.value.pse, flags.value.force = OFF; 147 flags.value.error, flags.value.ot = ON; 148 end; 149 150 call mrds_dsl_translate$set_options (addr (flags)); 151 152 if flags.list_sw then do; 153 call ioa_ (" MRDS Selection Expression Options:^/"); 154 call ioa_ ("Print search order:^40t^[ON^;OFF^]", flags.value.pso); 155 call ioa_ ("Print selection expression:^40t^[ON^;OFF^]", 156 flags.value.pse); 157 call ioa_ ("Optimize selection expression:^40t^[ON^;OFF^]", 158 flags.value.ot); 159 call ioa_ ("Force override default values:^40t^[ON^;OFF^]", 160 flags.value.force); 161 call ioa_ ("Long error report:^40t^[ON^;OFF^]^/", 162 flags.value.error); 163 end; 164 165 exit: 166 return; 167 168 error: 169 proc (cd); 170 dcl cd fixed bin (35); 171 call com_err_ (cd, program_name); 172 goto exit; 173 end; 174 175 get_arg_flag: 176 procedure (flag, arg_index); 177 178 /* handle on or off args in the command line */ 179 180 dcl flag bit (1); 181 dcl arg_index fixed bin; 182 183 if arg_index = nargs then do; 184 call com_err_ (error_table_$wrong_no_of_args, program_name, 185 "^/^a^/", 186 "on or off must be specified after the control argument '" 187 || arg || "'." 188 ); 189 goto exit; 190 end; 191 192 193 arg_index = arg_index + 1; /* point to the next one */ 194 195 call cu_$arg_ptr (arg_index, arg_ptr, arg_len, code); 196 if (code ^= 0) then call error (code); 197 198 if arg = "on" 199 then flag = ON; 200 else if arg = "off" 201 then flag = OFF; 202 else do; 203 call com_err_ (error_table_$badopt, program_name, 204 "^/^a^/", 205 "on or off must be specified after the control argument. Not '" 206 || arg || "'." 207 ); 208 goto exit; 209 end; 210 211 end get_arg_flag; 212 1 1 /* BEGIN INCLUDE mrds_se_options.incl.pl1 */ 1 2 1 3 /****^ HISTORY COMMENTS: 1 4* 1) change(87-11-23,Hergert), approve(88-06-28,MCR7903), 1 5* audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 1 6* Created for for new parser. 1 7* END HISTORY COMMENTS */ 1 8 1 9 dcl 1 mode_flags aligned based (mode_flags_ptr), 1 10 2 reset_sw bit unal, 1 11 2 list_sw bit unal, 1 12 2 extras bit (34) unal, 1 13 2 selected aligned like option_list, 1 14 2 value like option_list; 1 15 1 16 1 17 dcl 1 option_list aligned based (option_list_ptr), 1 18 2 pso bit unal, 1 19 2 pse bit unal, 1 20 2 ot bit unal, 1 21 2 force bit unal, 1 22 2 error bit unal, 1 23 2 extras bit (31) unal; 1 24 1 25 dcl mode_flags_ptr ptr; 1 26 dcl option_list_ptr ptr; 1 27 1 28 /* END INCLUDE mrds_se_options.incl.pl1 */ 213 214 215 /* local variables */ 216 217 dcl program_name char (27) internal static 218 options (constant) init ("set_mrds_options"); 219 dcl (nargs, i) fixed bin; 220 dcl arg char (arg_len) based (arg_ptr); 221 dcl arg_len fixed bin (21); 222 dcl arg_ptr ptr; 223 dcl more_args bit; 224 225 dcl code fixed bin (35); 226 dcl (OFF, FALSE) bit internal static options (constant) 227 init ("0"b); 228 dcl (ON, TRUE) bit internal static options (constant) 229 init ("1"b); 230 dcl 1 flags aligned like mode_flags; 231 232 dcl mrds_dsl_translate$set_options 233 entry (ptr); 234 dcl cu_$arg_count entry (fixed bin, fixed bin (35)); 235 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), 236 fixed bin (35)); 237 dcl ioa_ entry () options (variable); 238 dcl com_err_ entry options (variable); 239 240 /* error codes */ 241 dcl ( 242 error_table_$wrong_no_of_args, 243 error_table_$badopt 244 ) external fixed bin (35); 245 246 /* builtins */ 247 dcl addr builtin; 248 249 end set_mrds_options; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/00 1146.3 set_mrds_options.pl1 >udd>sm>ds>w>ml>set_mrds_options.pl1 213 1 08/04/88 2143.3 mrds_se_options.incl.pl1 >ldd>incl>mrds_se_options.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. FALSE constant bit(1) initial packed unaligned dcl 226 ref 94 107 139 OFF constant bit(1) initial packed unaligned dcl 226 ref 50 146 200 ON constant bit(1) initial packed unaligned dcl 228 ref 93 106 117 144 147 198 TRUE constant bit(1) initial packed unaligned dcl 228 ref 64 73 78 83 88 addr builtin function dcl 247 ref 150 150 arg based char packed unaligned dcl 220 ref 71 71 76 76 81 81 86 86 91 91 104 104 117 117 184 198 200 203 arg_index parameter fixed bin(17,0) dcl 181 set ref 175 183 193* 193 195* arg_len 000102 automatic fixed bin(21,0) dcl 221 set ref 68* 71 71 76 76 81 81 86 86 91 91 104 104 117 117 184 195* 198 200 203 arg_ptr 000104 automatic pointer dcl 222 set ref 68* 71 71 76 76 81 81 86 86 91 91 104 104 117 117 184 195* 198 200 203 cd parameter fixed bin(35,0) dcl 170 set ref 168 171* code 000107 automatic fixed bin(35,0) dcl 225 set ref 49* 53* 54 54* 68* 69 69* 195* 196 196* com_err_ 000020 constant entry external dcl 238 ref 57 97 110 121 129 171 184 203 cu_$arg_count 000012 constant entry external dcl 234 ref 53 cu_$arg_ptr 000014 constant entry external dcl 235 ref 68 195 error 2(04) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 89* 147* 161* error 1(04) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 88* 144* error_table_$badopt 000024 external static fixed bin(35,0) dcl 241 set ref 129* 203* error_table_$wrong_no_of_args 000022 external static fixed bin(35,0) dcl 241 set ref 184* flag parameter bit(1) packed unaligned dcl 180 set ref 175 198* 200* flags 000110 automatic structure level 1 dcl 230 set ref 50* 150 150 force 1(03) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 117* 144* force 2(03) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 117* 146* 159* i 000101 automatic fixed bin(17,0) dcl 219 set ref 65* 68* 74* 79* 84* 89* 138* 138 139 ioa_ 000016 constant entry external dcl 237 ref 153 154 155 157 159 161 list_sw 0(01) 000110 automatic bit(1) level 2 packed packed unaligned dcl 230 set ref 106* 152 mode_flags based structure level 1 dcl 1-9 more_args 000106 automatic bit(1) packed unaligned dcl 223 set ref 64* 66 94* 107* 139* mrds_dsl_translate$set_options 000010 constant entry external dcl 232 ref 150 nargs 000100 automatic fixed bin(17,0) dcl 219 set ref 53* 56 91 104 117 139 183 option_list based structure level 1 dcl 1-17 ot 1(02) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 78* 144* ot 2(02) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 79* 147* 157* program_name 000000 constant char(27) initial packed unaligned dcl 217 set ref 57* 97* 110* 121* 129* 171* 184* 203* pse 2(01) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 84* 146* 155* pse 1(01) 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 83* 144* pso 2 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 74* 146* 154* pso 1 000110 automatic bit(1) level 3 in structure "flags" packed packed unaligned dcl 230 in procedure "smo" set ref 73* 144* reset_sw 000110 automatic bit(1) level 2 packed packed unaligned dcl 230 set ref 93* 143 selected 1 000110 automatic structure level 2 dcl 230 value 2 000110 automatic structure level 2 dcl 230 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. mode_flags_ptr automatic pointer dcl 1-25 option_list_ptr automatic pointer dcl 1-26 NAMES DECLARED BY EXPLICIT CONTEXT. error 001370 constant entry internal dcl 168 ref 54 69 196 exit 001367 constant label dcl 165 ref 61 102 115 126 135 172 189 208 get_arg_flag 001410 constant entry internal dcl 175 ref 74 79 84 89 set_mrds_options 000412 constant entry external dcl 16 smo 000403 constant entry external dcl 16 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2004 2032 1667 2014 Length 2234 1667 26 165 115 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME smo 180 external procedure is an external procedure. error internal procedure shares stack frame of external procedure smo. get_arg_flag internal procedure shares stack frame of external procedure smo. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME smo 000100 nargs smo 000101 i smo 000102 arg_len smo 000104 arg_ptr smo 000106 more_args smo 000107 code smo 000110 flags smo THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr ioa_ mrds_dsl_translate$set_options THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$wrong_no_of_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 16 000402 49 000417 50 000420 53 000456 54 000466 56 000472 57 000474 61 000527 64 000530 65 000532 66 000534 68 000536 69 000553 71 000557 73 000571 74 000573 75 000575 76 000576 78 000606 79 000610 80 000612 81 000613 83 000623 84 000625 85 000627 86 000630 88 000640 89 000642 90 000644 91 000645 93 000660 94 000662 95 000663 97 000664 102 000717 103 000720 104 000721 106 000734 107 000736 108 000737 110 000740 115 000773 116 000774 117 000775 121 001022 126 001055 127 001056 129 001057 135 001111 138 001112 139 001113 140 001117 143 001120 144 001123 146 001156 147 001175 150 001207 152 001220 153 001223 154 001237 155 001257 157 001301 159 001323 161 001345 165 001367 168 001370 171 001372 172 001407 175 001410 183 001412 184 001415 189 001472 193 001474 195 001475 196 001512 198 001516 200 001532 203 001544 208 001620 211 001622 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved