COMPILATION LISTING OF SEGMENT safety_sw_on Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/25/83 1535.9 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 safety_sw_on: ssn: proc; 12 13 dcl (dirname, new_path) char (168); 14 dcl (entname, ename) char (32); 15 16 dcl arg char (alng) based (aptr) unaligned; 17 dcl b_name char (32) based; 18 19 dcl (aptr, eptr, nptr, bentp, npp, dirp, entp) ptr init (null); 20 21 dcl (i, j, argcnt, alng, ecount, retc) fixed bin (17); 22 dcl code fixed bin (35); 23 24 dcl whoami char (16); 25 26 dcl new_value bit (1); 27 dcl safety_sw bit (1); 28 29 dcl (error_table_$badopt, 30 error_table_$incorrect_access, 31 error_table_$no_info, 32 error_table_$noarg) ext fixed bin (35); 33 34 dcl check_path_name_ ext entry (ptr, fixed bin (17), bit (1), char (16), ptr, ptr, ptr, 35 fixed bin (17), ptr, ptr, fixed bin (17)); 36 dcl check_path_name_$indiv ext entry (ptr, ptr, bit (1)); 37 dcl cu_$arg_ptr ext entry (fixed bin (17), ptr, fixed bin (17), fixed bin (35)); 38 dcl freen_ ext entry (ptr); 39 dcl com_err_ ext entry options (variable); 40 41 dcl hcs_$set_safety_sw ext entry (char (*), char (*), bit (1), fixed bin (35)); 42 dcl hcs_$set_damaged_sw ext entry (char (*), char (*), bit (1), fixed bin (35)); 43 44 dcl (null, substr, addr) builtin; 45 dcl cleanup condition; 46 47 new_value = "1"b; 48 whoami = "safety_sw_on"; 49 safety_sw = "1"b; 50 goto start; 51 52 safety_sw_off: ssf: entry; 53 new_value = "0"b; 54 whoami = "safety_sw_off"; 55 safety_sw = "1"b; 56 goto start; 57 58 damaged_sw_on: dsn: entry; 59 60 new_value = "1"b; 61 whoami = "damaged_sw_on"; 62 safety_sw = "0"b; 63 goto start; 64 65 damaged_sw_off: dsf: entry; 66 67 new_value = "0"b; 68 whoami = "damaged_sw_off"; 69 safety_sw = "0"b; 70 71 start: 72 73 npp = addr (new_path); 74 dirp = addr (dirname); 75 entp = addr (entname); 76 77 on cleanup call ss_cleanup; 78 79 do i = 1 by 1; /* loop through all arguments */ 80 81 call cu_$arg_ptr (i, aptr, alng, code); 82 if code ^= 0 then do; 83 if i = 1 then go to no_pathname; /* no argument means safety switch of working directory */ 84 return; /* otherwise we are done */ 85 end; 86 87 if (arg = "-wd")| (arg = "-working_directory") then do; 88 no_pathname: aptr = dirp; 89 alng = 3; 90 dirname = "-wd"; 91 goto check_name; 92 end; 93 94 if substr (arg, 1, 1) = "-" then do; 95 call com_err_ (error_table_$badopt, whoami, "^a", arg); 96 return; 97 end; 98 99 check_name: 100 call check_path_name_ (aptr, alng, "0"b, whoami, dirp, entp, npp, ecount, eptr, nptr, retc); 101 if retc = 2 then go to free_up; /* error message was already printed */ 102 ename = entname; 103 104 do j = 1 to ecount; /* loop through all enames */ 105 106 if retc = 1 then do; /* a star name */ 107 call check_path_name_$indiv (dirp, bentp, "0"b); 108 ename = bentp -> b_name; 109 end; 110 111 if safety_sw /* See if to set safety sw or damaged sw */ 112 then call hcs_$set_safety_sw (dirname, ename, new_value, code); 113 else call hcs_$set_damaged_sw (dirname, ename, new_value, code); 114 if code ^= 0 then do; 115 call com_err_ (code, whoami, new_path); 116 /* if user lacks modify permission on parent */ 117 if (code = error_table_$incorrect_access) | (code = error_table_$no_info) then 118 go to free_up; /* skip processing segments in this directory */ 119 end; 120 end; 121 free_up: 122 call ss_cleanup; 123 124 end; /* loop through pathnames */ 125 126 ss_cleanup: proc; 127 128 if eptr ^= null then call freen_ (eptr); 129 if nptr ^= null then call freen_ (nptr); 130 131 end ss_cleanup; 132 133 end safety_sw_on; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/25/83 1444.4 safety_sw_on.pl1 >spec>on>eod-fix>safety_sw_on.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. addr builtin function dcl 44 ref 71 74 75 alng 000264 automatic fixed bin(17,0) dcl 21 set ref 81* 87 87 89* 94 95 95 99* aptr 000244 automatic pointer initial dcl 19 set ref 19* 81* 87 87 88* 94 95 99* arg based char unaligned dcl 16 set ref 87 87 94 95* b_name based char(32) unaligned dcl 17 ref 108 bentp 000252 automatic pointer initial dcl 19 set ref 19* 107* 108 check_path_name_ 000016 constant entry external dcl 34 ref 99 check_path_name_$indiv 000020 constant entry external dcl 36 ref 107 cleanup 000276 stack reference condition dcl 45 ref 77 code 000267 automatic fixed bin(35,0) dcl 22 set ref 81* 82 111* 113* 114 115* 117 117 com_err_ 000026 constant entry external dcl 39 ref 95 115 cu_$arg_ptr 000022 constant entry external dcl 37 ref 81 dirname 000100 automatic char(168) unaligned dcl 13 set ref 74 90* 111* 113* dirp 000256 automatic pointer initial dcl 19 set ref 19* 74* 88 99* 107* ecount 000265 automatic fixed bin(17,0) dcl 21 set ref 99* 104 ename 000234 automatic char(32) unaligned dcl 14 set ref 102* 108* 111* 113* entname 000224 automatic char(32) unaligned dcl 14 set ref 75 102 entp 000260 automatic pointer initial dcl 19 set ref 19* 75* 99* eptr 000246 automatic pointer initial dcl 19 set ref 19* 99* 128 128* error_table_$badopt 000010 external static fixed bin(35,0) dcl 29 set ref 95* error_table_$incorrect_access 000012 external static fixed bin(35,0) dcl 29 ref 117 error_table_$no_info 000014 external static fixed bin(35,0) dcl 29 ref 117 freen_ 000024 constant entry external dcl 38 ref 128 129 hcs_$set_damaged_sw 000032 constant entry external dcl 42 ref 113 hcs_$set_safety_sw 000030 constant entry external dcl 41 ref 111 i 000262 automatic fixed bin(17,0) dcl 21 set ref 79* 81* 83* j 000263 automatic fixed bin(17,0) dcl 21 set ref 104* new_path 000152 automatic char(168) unaligned dcl 13 set ref 71 115* new_value 000274 automatic bit(1) unaligned dcl 26 set ref 47* 53* 60* 67* 111* 113* npp 000254 automatic pointer initial dcl 19 set ref 19* 71* 99* nptr 000250 automatic pointer initial dcl 19 set ref 19* 99* 129 129* null builtin function dcl 44 ref 19 19 19 19 19 19 19 128 129 retc 000266 automatic fixed bin(17,0) dcl 21 set ref 99* 101 106 safety_sw 000275 automatic bit(1) unaligned dcl 27 set ref 49* 55* 62* 69* 111 substr builtin function dcl 44 ref 94 whoami 000270 automatic char(16) unaligned dcl 24 set ref 48* 54* 61* 68* 95* 99* 115* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. argcnt automatic fixed bin(17,0) dcl 21 error_table_$noarg external static fixed bin(35,0) dcl 29 NAMES DECLARED BY EXPLICIT CONTEXT. check_name 000342 constant label dcl 99 ref 91 damaged_sw_off 000167 constant entry external dcl 65 damaged_sw_on 000141 constant entry external dcl 58 dsf 000157 constant entry external dcl 65 dsn 000131 constant entry external dcl 58 free_up 000551 constant label dcl 121 ref 101 117 no_pathname 000273 constant label dcl 88 ref 83 safety_sw_off 000112 constant entry external dcl 52 safety_sw_on 000064 constant entry external dcl 11 ss_cleanup 000561 constant entry internal dcl 126 ref 77 121 ssf 000102 constant entry external dcl 52 ssn 000054 constant entry external dcl 11 start 000203 constant label dcl 71 set ref 50 56 63 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1032 1066 620 1042 Length 1262 620 34 157 212 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ssn 252 external procedure is an external procedure. on unit on line 77 64 on unit ss_cleanup 68 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ssn 000100 dirname ssn 000152 new_path ssn 000224 entname ssn 000234 ename ssn 000244 aptr ssn 000246 eptr ssn 000250 nptr ssn 000252 bentp ssn 000254 npp ssn 000256 dirp ssn 000260 entp ssn 000262 i ssn 000263 j ssn 000264 alng ssn 000265 ecount ssn 000266 retc ssn 000267 code ssn 000270 whoami ssn 000274 new_value ssn 000275 safety_sw ssn THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. check_path_name_ check_path_name_$indiv com_err_ cu_$arg_ptr freen_ hcs_$set_damaged_sw hcs_$set_safety_sw THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$incorrect_access error_table_$no_info LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 19 000041 11 000053 47 000072 48 000074 49 000077 50 000100 52 000101 53 000120 54 000122 55 000125 56 000127 58 000130 60 000147 61 000151 62 000154 63 000155 65 000156 67 000175 68 000177 69 000202 71 000203 74 000205 75 000207 77 000211 79 000233 81 000236 82 000253 83 000255 84 000260 87 000261 88 000273 89 000275 90 000277 91 000302 94 000303 95 000307 96 000341 99 000342 101 000377 102 000402 104 000405 106 000415 107 000420 108 000435 111 000441 113 000471 114 000516 115 000520 117 000541 120 000547 121 000551 124 000555 133 000557 126 000560 128 000566 129 000601 131 000615 ----------------------------------------------------------- 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