COMPILATION LISTING OF SEGMENT upd_free_name_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 10/04/84 1255.9 mst Thu 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 upd_free_name_: procedure (dir, seg, code); 12 13 14 /* 15* 16* This procedure is used to rename a segment entry name to its corresponding 17* backup name. The transformation is "name" -> "name.1" (-> "name.2", etc.). 18* If the backup name already exists in the directory, it will be renamed as 19* well by a recursive call to upd_free_name_. Entry point upd_free_name_$restore 20* effects the inverse operation; all contiguous names in the series will be 21* renamed to the previous name in the series. 22* 23* P. Bos, May 1972 24* 25* Modified: 09/04/81 by GA Texada to call appropriate hcs_ entries on linkage error. 26* Modified: 09/10/84 by BL Braun to add $retain_suffix and $restore_with_suffix entrypoints. 27**/ 28 29 dcl dir char(*), /* dirname of affected segment */ 30 seg char(*), /* entryname to be transformed */ 31 suffix char(*), /* suffix of the entryname */ 32 code fixed bin(35); /* status code */ 33 34 dcl backup_name_ entry (char(*)) returns (char(32)), 35 chname_entry entry(char(*), char(*), char(*), char(*), fixed bin(35)) variable, 36 hcs_$chname_file entry (char(*), char(*), char(*), char(*), fixed bin(35)), 37 installation_tools_$chname_file entry (char(*), char(*), char(*), char(*), fixed bin(35)), 38 suffixed_name_$make entry (char(*), char(*), char(32), fixed bin(35)), 39 upd_free_name_ entry (char(*), char(*), fixed bin(35)), 40 upd_free_name_$restore entry (char(*), char(*), fixed bin(35)), 41 upd_free_name_$restore_with_suffix 42 entry (char(*), char(*), char(*), fixed bin(35)), 43 upd_free_name_$retain_suffix entry (char(*), char(*), char(*), fixed bin(35)); 44 45 dcl linkage_error condition; 46 47 dcl (error_table_$namedup, 48 error_table_$noentry) ext fixed bin(35); 49 50 dcl (after, reverse, rtrim) builtin; 51 52 dcl dot_suffix char(32) var; 53 dcl name char(32); /* backup name */ 54 dcl name_without_suffix char(32); 55 dcl new_name char(32); 56 dcl old_name char(32); 57 /* */ 58 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 59 60 name = backup_name_(seg); /* get name transform */ 61 on linkage_error begin; 62 chname_entry = hcs_$chname_file; 63 goto revert_linkage_error_1; 64 end; 65 chname_entry = installation_tools_$chname_file; 66 revert_linkage_error_1: 67 revert linkage_error; 68 69 70 call chname_entry (dir, seg, seg, name, code); /* attempt to rename it */ 71 if code = error_table_$namedup then do; /* backup name already in use */ 72 call upd_free_name_(dir, name, code); /* attempt to rename it also */ 73 if code = 0 then /* if that worked, try rename again */ 74 call chname_entry (dir, seg, seg, name, code); 75 end; 76 77 return; /* finis */ 78 79 80 restore: entry (dir, seg, code); /* inverse operation */ 81 82 83 name = backup_name_(seg); /* form backup name */ 84 on linkage_error begin; 85 chname_entry = hcs_$chname_file; 86 goto revert_linkage_error_2; 87 end; 88 chname_entry = installation_tools_$chname_file; 89 90 revert_linkage_error_2: 91 revert linkage_error; 92 call chname_entry (dir, name, name, seg, code); /* attempt to restore this name */ 93 if code = 0 then do; /* worked, try next segment in series */ 94 call upd_free_name_$restore (dir, name, code); /* and the next, and the next, ... */ 95 if code = error_table_$noentry then /* if end of series reached, */ 96 code = 0; /* no big thing */ 97 end; 98 99 return; /* done */ 100 /* */ 101 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 102 103 retain_suffix: entry (dir, seg, suffix, code); 104 105 code = 0; 106 call suffixed_name_$make (seg, suffix, old_name, code); 107 if code ^= 0 then return; 108 dot_suffix = "." || rtrim(suffix); 109 name_without_suffix = reverse(after(reverse(old_name), reverse(dot_suffix))); 110 /* get name transform */ 111 name_without_suffix = backup_name_(name_without_suffix); 112 new_name = rtrim(name_without_suffix) || dot_suffix; 113 114 on linkage_error begin; 115 chname_entry = hcs_$chname_file; 116 goto revert_linkage_error_3; 117 end; 118 chname_entry = installation_tools_$chname_file; 119 120 revert_linkage_error_3: 121 revert linkage_error; 122 123 /* attempt to rename it */ 124 call chname_entry (dir, old_name, old_name, new_name, code); 125 if code = error_table_$namedup then do; /* backup name already in use */ 126 /* attempt to rename it also */ 127 call upd_free_name_$retain_suffix(dir, new_name, suffix, code); 128 if code = 0 then /* if that worked, try rename again */ 129 call chname_entry (dir, old_name, old_name, new_name, code); 130 end; 131 return; 132 /* */ 133 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 134 135 restore_with_suffix: entry (dir, seg, suffix, code); 136 137 code = 0; 138 call suffixed_name_$make (seg, suffix, old_name, code); 139 if code ^= 0 then return; 140 dot_suffix = "." || rtrim(suffix); 141 name_without_suffix = reverse(after(reverse(old_name), reverse(dot_suffix))); 142 /* get name transform */ 143 name_without_suffix = backup_name_(name_without_suffix); 144 new_name = rtrim(name_without_suffix) || dot_suffix; 145 146 on linkage_error begin; 147 chname_entry = hcs_$chname_file; 148 goto revert_linkage_error_4; 149 end; 150 chname_entry = installation_tools_$chname_file; 151 152 revert_linkage_error_4: 153 revert linkage_error; 154 /* attempt to restore this name */ 155 call chname_entry (dir, new_name, new_name, old_name, code); 156 if code = 0 then do; /* worked, try next segment in series */ 157 call upd_free_name_$restore_with_suffix (dir, new_name, suffix, code); 158 /* and the next, and the next, ... */ 159 if code = error_table_$noentry then /* if end of series reached, */ 160 code = 0; /* no big thing */ 161 end; 162 163 return; /* done */ 164 165 166 end upd_free_name_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/04/84 1255.5 upd_free_name_.pl1 >special_ldd>online>6950-10/04/84>upd_free_name_.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. after builtin function dcl 50 ref 109 141 backup_name_ 000010 constant entry external dcl 34 ref 60 83 111 143 chname_entry 000100 automatic entry variable dcl 34 set ref 62* 65* 70 73 85* 88* 92 115* 118* 124 128 147* 150* 155 code parameter fixed bin(35,0) dcl 29 set ref 11 70* 71 72* 73 73* 80 92* 93 94* 95 95* 103 105* 106* 107 124* 125 127* 128 128* 135 137* 138* 139 155* 156 157* 159 159* dir parameter char unaligned dcl 29 set ref 11 70* 72* 73* 80 92* 94* 103 124* 127* 128* 135 155* 157* dot_suffix 000112 automatic varying char(32) dcl 52 set ref 108* 109 112 140* 141 144 error_table_$namedup 000030 external static fixed bin(35,0) dcl 47 ref 71 125 error_table_$noentry 000032 external static fixed bin(35,0) dcl 47 ref 95 159 hcs_$chname_file 000012 constant entry external dcl 34 ref 62 85 115 147 installation_tools_$chname_file 000014 constant entry external dcl 34 ref 65 88 118 150 linkage_error 000104 stack reference condition dcl 45 ref 61 66 84 90 114 120 146 152 name 000123 automatic char(32) unaligned dcl 53 set ref 60* 70* 72* 73* 83* 92* 92* 94* name_without_suffix 000133 automatic char(32) unaligned dcl 54 set ref 109* 111* 111* 112 141* 143* 143* 144 new_name 000143 automatic char(32) unaligned dcl 55 set ref 112* 124* 127* 128* 144* 155* 155* 157* old_name 000153 automatic char(32) unaligned dcl 56 set ref 106* 109 124* 124* 128* 128* 138* 141 155* reverse builtin function dcl 50 ref 109 109 109 141 141 141 rtrim builtin function dcl 50 ref 108 112 140 144 seg parameter char unaligned dcl 29 set ref 11 60* 70* 70* 73* 73* 80 83* 92* 103 106* 135 138* suffix parameter char unaligned dcl 29 set ref 103 106* 108 127* 135 138* 140 157* suffixed_name_$make 000016 constant entry external dcl 34 ref 106 138 upd_free_name_ 000020 constant entry external dcl 34 ref 72 upd_free_name_$restore 000022 constant entry external dcl 34 ref 94 upd_free_name_$restore_with_suffix 000024 constant entry external dcl 34 ref 157 upd_free_name_$retain_suffix 000026 constant entry external dcl 34 ref 127 NAMES DECLARED BY EXPLICIT CONTEXT. restore 000223 constant entry external dcl 80 restore_with_suffix 001002 constant entry external dcl 135 retain_suffix 000407 constant entry external dcl 103 revert_linkage_error_1 000103 constant label dcl 66 ref 63 revert_linkage_error_2 000316 constant label dcl 90 ref 86 revert_linkage_error_3 000664 constant label dcl 120 ref 116 revert_linkage_error_4 001257 constant label dcl 152 ref 148 upd_free_name_ 000013 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1550 1604 1351 1560 Length 2012 1351 34 171 177 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME upd_free_name_ 194 external procedure is an external procedure. on unit on line 61 64 on unit on unit on line 84 64 on unit on unit on line 114 64 on unit on unit on line 146 64 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME upd_free_name_ 000100 chname_entry upd_free_name_ 000112 dot_suffix upd_free_name_ 000123 name upd_free_name_ 000133 name_without_suffix upd_free_name_ 000143 new_name upd_free_name_ 000153 old_name upd_free_name_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_var_desc call_ext_out_desc return tra_ext enable shorten_stack ext_entry_desc int_entry reverse_cs set_cs_eis index_after_cs THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. backup_name_ hcs_$chname_file installation_tools_$chname_file suffixed_name_$make upd_free_name_ upd_free_name_$restore upd_free_name_$restore_with_suffix upd_free_name_$retain_suffix THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$namedup error_table_$noentry LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000007 60 000036 61 000052 62 000066 63 000073 65 000076 66 000103 70 000104 71 000136 72 000142 73 000164 77 000220 80 000221 83 000246 84 000265 85 000301 86 000306 88 000311 90 000316 92 000317 93 000347 94 000351 95 000374 99 000401 103 000402 105 000437 106 000440 107 000467 108 000471 109 000526 111 000567 112 000603 114 000632 115 000647 116 000654 118 000657 120 000664 124 000665 125 000714 127 000720 128 000746 131 000777 135 001000 137 001032 138 001033 139 001062 140 001064 141 001121 143 001162 144 001176 146 001225 147 001242 148 001247 150 001252 152 001257 155 001260 156 001307 157 001311 159 001340 163 001345 ----------------------------------------------------------- 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