COMPILATION LISTING OF SEGMENT terminate Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Adv Computing Technology Centre Compiled on: 04/19/90 1530.4 mdt Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1990 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(90-03-21,Vu), approve(90-03-21,MCR8165), audit(90-03-29,Zimmerman), 17* install(90-04-19,MR12.4-1006): 18* Fix -bf argument for terminate_refname. 19* END HISTORY COMMENTS */ 20 21 22 terminate: tm: proc; 23 24 /* Implements the terminate commands: 25* 26* terminate paths {-control_args} 27* 28* terminate_segno segment_numbers {-control_args} 29* 30* terminate_refname reference_names {-control_args} 31* 32* terminate_single_refname reference_names {-control_args} 33* 34*The first three terminate segments; the last terminates only specified refnames. 35*Rewritten 01/11/80 by S. Herbst */ 36 /* Changed to not abort for error_table_$seg_unknown 03/04/81 S. Herbst */ 37 38 39 dcl arg char (arg_len) based (arg_ptr); 40 dcl dn char (168); 41 dcl (en, myname, refname, usage) char (32); 42 43 dcl (brief_sw, some_args) bit (1); 44 45 dcl (arg_ptr, seg_ptr) ptr; 46 47 dcl (arg_count, arg_len, i, segno) fixed bin; 48 dcl code fixed bin (35); 49 50 dcl error_table_$badopt fixed bin (35) ext; 51 dcl error_table_$invalidsegno fixed bin (35) ext; 52 dcl error_table_$name_not_found fixed bin (35) ext; 53 dcl error_table_$seg_unknown fixed bin (35) ext; 54 55 dcl active_fnc_err_ entry options (variable); 56 dcl (com_err_, com_err_$suppress_name) entry options (variable); 57 dcl cu_$af_return_arg entry (fixed bin, ptr, fixed bin, fixed bin (35)); 58 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 59 dcl cv_oct_check_ entry (char (*), fixed bin (35)) returns (fixed bin); 60 dcl expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 61 dcl get_wdir_ entry returns (char (168)); 62 dcl term_ entry (char (*), char (*), fixed bin (35)); 63 dcl term_$refname entry (char (*), fixed bin (35)); 64 dcl term_$seg_ptr entry (ptr, fixed bin (35)); 65 dcl term_$single_refname entry (char (*), fixed bin (35)); 66 67 dcl (baseptr, null, substr) builtin; 68 /* */ 69 myname = "terminate"; 70 usage = "paths"; 71 go to COMMON; 72 73 terminate_segno: tms: entry; 74 75 myname = "terminate_segno"; 76 usage = "segment_numbers"; 77 go to COMMON; 78 79 terminate_refname: tmr: entry; 80 81 myname = "terminate_refname"; 82 usage = "reference_names"; 83 go to COMMON; 84 85 terminate_single_refname: tmsr: entry; 86 87 myname = "terminate_single_refname"; 88 usage = "reference_names"; 89 90 91 COMMON: call cu_$af_return_arg (arg_count, null, 0, code); 92 if code = 0 then do; 93 call active_fnc_err_ (0, myname, "Cannot be called as an active function."); 94 return; 95 end; 96 97 brief_sw, some_args = "0"b; 98 do i = 1 to arg_count; 99 100 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 101 102 if substr (arg, 1, 1) ^= "-" then some_args = "1"b; 103 104 else if arg = "-brief" | arg = "-bf" then brief_sw = "1"b; 105 else if arg = "-long" | arg = "-lg" then brief_sw = "0"b; 106 else if arg = "-name" | arg = "-nm" then do; 107 i = i + 1; 108 if i > arg_count then do; 109 call com_err_ (0, myname, "No value specified for -name"); 110 return; 111 end; 112 some_args = "1"b; 113 end; 114 else do; 115 call com_err_ (error_table_$badopt, myname, "^a", arg); 116 return; 117 end; 118 end; 119 120 if ^some_args then do; 121 call com_err_$suppress_name (0, myname, "Usage: ^a ^a {-control_args}", myname, usage); 122 return; 123 end; 124 125 do i = 1 to arg_count; 126 127 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 128 129 if substr (arg, 1, 1) ^= "-" then do; 130 131 TERMINATE: if myname = "terminate" then do; 132 call expand_pathname_ (arg, dn, en, code); 133 if code ^= 0 then do; 134 call com_err_ (code, myname, "^a", arg); 135 return; 136 end; 137 TERM_PATH: call term_ (dn, en, code); 138 if code ^= 0 then do; 139 if ^brief_sw | code ^= error_table_$seg_unknown then 140 call com_err_ (code, myname, "^a^[>^]^a", dn, dn ^= ">", en); 141 if code ^= error_table_$seg_unknown then return; 142 end; 143 end; 144 else if myname = "terminate_segno" then do; 145 segno = cv_oct_check_ (arg, code); 146 if code ^= 0 then do; 147 call com_err_ (0, myname, "Invalid octal number ^a", arg); 148 return; 149 end; 150 seg_ptr = baseptr (segno); 151 call term_$seg_ptr (seg_ptr, code); 152 if code ^= 0 then do; 153 if ^brief_sw | (code ^= error_table_$seg_unknown & code ^= error_table_$invalidsegno) then 154 call com_err_ (code, myname, "^a", arg); 155 if code ^= error_table_$seg_unknown then return; 156 end; 157 end; 158 else if myname = "terminate_refname" then do; 159 refname = arg; 160 call term_$refname (refname, code); 161 if code ^= 0 then do; 162 TERM_ERROR: if ^brief_sw | (code ^= error_table_$seg_unknown & code ^= error_table_$name_not_found) then 163 call com_err_ (code, myname, "^a", arg); 164 if code ^= error_table_$seg_unknown then return; 165 end; 166 end; 167 else do; /* terminate_single_refname */ 168 refname = arg; 169 call term_$single_refname (refname, code); 170 if code ^= 0 then go to TERM_ERROR; 171 end; 172 end; 173 else if arg = "-name" | arg = "-nm" then do; 174 i = i + 1; 175 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 176 if myname = "terminate" then do; /* pathname */ 177 dn = get_wdir_ (); 178 en = arg; 179 go to TERM_PATH; 180 end; 181 else go to TERMINATE; 182 end; 183 end; 184 185 end terminate; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/19/90 1530.4 terminate.pl1 >spec>install>1006>terminate.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. active_fnc_err_ 000020 constant entry external dcl 55 ref 93 arg based char packed unaligned dcl 39 set ref 102 104 104 105 105 106 106 115* 129 132* 134* 145* 147* 153* 159 162* 168 173 173 178 arg_count 000220 automatic fixed bin(17,0) dcl 47 set ref 91* 98 108 125 arg_len 000221 automatic fixed bin(17,0) dcl 47 set ref 100* 102 104 104 105 105 106 106 115 115 127* 129 132 132 134 134 145 145 147 147 153 153 159 162 162 168 173 173 175* 178 arg_ptr 000214 automatic pointer dcl 45 set ref 100* 102 104 104 105 105 106 106 115 127* 129 132 134 145 147 153 159 162 168 173 173 175* 178 baseptr builtin function dcl 67 ref 150 brief_sw 000212 automatic bit(1) packed unaligned dcl 43 set ref 97* 104* 105* 139 153 162 code 000224 automatic fixed bin(35,0) dcl 48 set ref 91* 92 100* 127* 132* 133 134* 137* 138 139 139* 141 145* 146 151* 152 153 153 153* 155 160* 161 162 162 162* 164 169* 170 175* com_err_ 000022 constant entry external dcl 56 ref 109 115 134 139 147 153 162 com_err_$suppress_name 000024 constant entry external dcl 56 ref 121 cu_$af_return_arg 000026 constant entry external dcl 57 ref 91 cu_$arg_ptr 000030 constant entry external dcl 58 ref 100 127 175 cv_oct_check_ 000032 constant entry external dcl 59 ref 145 dn 000100 automatic char(168) packed unaligned dcl 40 set ref 132* 137* 139* 139 177* en 000152 automatic char(32) packed unaligned dcl 41 set ref 132* 137* 139* 178* error_table_$badopt 000010 external static fixed bin(35,0) dcl 50 set ref 115* error_table_$invalidsegno 000012 external static fixed bin(35,0) dcl 51 ref 153 error_table_$name_not_found 000014 external static fixed bin(35,0) dcl 52 ref 162 error_table_$seg_unknown 000016 external static fixed bin(35,0) dcl 53 ref 139 141 153 155 162 164 expand_pathname_ 000034 constant entry external dcl 60 ref 132 get_wdir_ 000036 constant entry external dcl 61 ref 177 i 000222 automatic fixed bin(17,0) dcl 47 set ref 98* 100* 107* 107 108* 125* 127* 174* 174 175* myname 000162 automatic char(32) packed unaligned dcl 41 set ref 69* 75* 81* 87* 93* 109* 115* 121* 121* 131 134* 139* 144 147* 153* 158 162* 176 null builtin function dcl 67 ref 91 91 refname 000172 automatic char(32) packed unaligned dcl 41 set ref 159* 160* 168* 169* seg_ptr 000216 automatic pointer dcl 45 set ref 150* 151* segno 000223 automatic fixed bin(17,0) dcl 47 set ref 145* 150 some_args 000213 automatic bit(1) packed unaligned dcl 43 set ref 97* 102* 112* 120 substr builtin function dcl 67 ref 102 129 term_ 000040 constant entry external dcl 62 ref 137 term_$refname 000042 constant entry external dcl 63 ref 160 term_$seg_ptr 000044 constant entry external dcl 64 ref 151 term_$single_refname 000046 constant entry external dcl 65 ref 169 usage 000202 automatic char(32) packed unaligned dcl 41 set ref 70* 76* 82* 88* 121* NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 000245 constant label dcl 91 ref 71 77 83 TERMINATE 000573 constant label dcl 131 ref 176 TERM_ERROR 001172 constant label dcl 162 ref 170 TERM_PATH 000664 constant label dcl 137 ref 179 terminate 000136 constant entry external dcl 22 terminate_refname 000206 constant entry external dcl 79 terminate_segno 000162 constant entry external dcl 73 terminate_single_refname 000232 constant entry external dcl 85 tm 000127 constant entry external dcl 22 tmr 000177 constant entry external dcl 79 tms 000153 constant entry external dcl 73 tmsr 000223 constant entry external dcl 85 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1612 1662 1343 1622 Length 2072 1343 50 173 247 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tm 246 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME tm 000100 dn tm 000152 en tm 000162 myname tm 000172 refname tm 000202 usage tm 000212 brief_sw tm 000213 some_args tm 000214 arg_ptr tm 000216 seg_ptr tm 000220 arg_count tm 000221 arg_len tm 000222 i tm 000223 segno tm 000224 code tm THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_ne_as call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. active_fnc_err_ com_err_ com_err_$suppress_name cu_$af_return_arg cu_$arg_ptr cv_oct_check_ expand_pathname_ get_wdir_ term_ term_$refname term_$seg_ptr term_$single_refname THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$invalidsegno error_table_$name_not_found error_table_$seg_unknown LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000126 69 000143 70 000146 71 000151 73 000152 75 000167 76 000172 77 000175 79 000176 81 000213 82 000216 83 000221 85 000222 87 000237 88 000242 91 000245 92 000265 93 000267 94 000314 97 000315 98 000317 100 000327 102 000344 104 000354 105 000370 106 000402 107 000412 108 000413 109 000416 110 000443 112 000444 113 000446 115 000447 116 000501 118 000502 120 000504 121 000506 122 000541 125 000542 127 000551 129 000566 131 000573 132 000577 133 000627 134 000631 135 000663 137 000664 138 000705 139 000707 141 000761 143 000765 144 000766 145 000772 146 001016 147 001020 148 001054 150 001055 151 001061 152 001072 153 001074 155 001135 157 001141 158 001142 159 001146 160 001153 161 001170 162 001172 164 001234 166 001240 168 001241 169 001246 170 001263 172 001265 173 001266 174 001277 175 001300 176 001315 177 001321 178 001330 179 001335 183 001336 185 001340 ----------------------------------------------------------- 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