COMPILATION LISTING OF SEGMENT test_archive Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/12/82 1245.9 mst Fri 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 12 test_archive: ta: proc; 13 14 /* Command based on archive processing in "bindarchive" command, 15* by C Garman, from modifications made to original of 16* C Garman by E Stone. */ 17 18 dcl fix_old bit(1) aligned; 19 20 fix_old = "0"b; /* Look but don't touch */ 21 go to startup; 22 23 fix_old_archive: foa: entry; /* Play a few games with contents, on the fly */ 24 25 fix_old = "1"b; 26 go to startup; 27 28 dcl (archive_data_$header_begin, 29 archive_data_$ident, 30 archive_data_$header_end) char(8) aligned ext; 31 32 dcl (error_table_$entlong, 33 error_table_$noarg) fixed bin ext; 34 35 dcl outnamep ptr, 36 arglen fixed bin, 37 outname char(arglen) unaligned based(outnamep); 38 39 dcl (first bit(1) init("0"b), 40 com_name char(16) init("test_archive"), 41 (h1, i1, e1) char(8)) aligned int static; /* copies of archive_data_$--- */ 42 43 declare 1 archd based aligned, 44 2 begin char(8), 45 2 name_count char(4), 46 2 name char(32), 47 2 arc_time char(16), 48 2 mode char(4), 49 2 seg_time char(20), 50 2 bit_count char(8), 51 2 end char(8); 52 53 dcl (path char(168), 54 entarc char(40), 55 cur_name char(32), 56 type char(8), 57 old char(2), 58 s char(1), 59 c0 char(0)) aligned, 60 (i, ibc, ignore, ntharg, nwords, some_old, some_num) fixed bin, /* misc numbers */ 61 code fixed bin(35), 62 (pathp, entropy, 63 cur_ptr) ptr, 64 hdr_length fixed bin int static init(25), 65 cur_hdr fixed bin; 66 67 dcl (com_err_, ioa_, ioa_$rsnnl) entry options(variable), 68 cu_$arg_ptr entry(fixed bin, ptr, fixed bin, fixed bin(35)), 69 cv_dec_check_ entry(char(*) aligned, fixed bin(35), fixed bin), 70 expand_path_ entry(ptr, fixed bin, ptr, ptr, fixed bin(35)), 71 hcs_$initiate_count entry(char(*) aligned, char(*) aligned, char(*) aligned, fixed bin, fixed bin, ptr, fixed bin(35)), 72 hcs_$terminate_noname entry(ptr, fixed bin(35)); 73 74 dcl (addr, char, divide, index, null, ptr, substr) builtin; 75 76 /* */ 77 78 startup: 79 if first = "0"b 80 then do; 81 82 h1 = archive_data_$header_begin; /* make copies of values in archive_data_ */ 83 i1 = archive_data_$ident; 84 e1 = archive_data_$header_end; 85 86 first = "1"b; 87 88 end; 89 90 pathp = addr(path); /* get miscellaneous pointers */ 91 entropy = addr(entarc); 92 93 ntharg = 0; 94 95 arg_loop: 96 ntharg = ntharg + 1; 97 98 /* Get name of archive segment. */ 99 100 call cu_$arg_ptr(ntharg, outnamep, arglen, code); /* get argument */ 101 if code ^= 0 102 then if code = error_table_$noarg 103 then go to abort_args; 104 else go to arg_error; 105 106 if arglen = 0 107 then go to arg_loop; 108 109 call expand_path_(outnamep, arglen, pathp, entropy, code); /* get directory and entry name of argument */ 110 if code ^= 0 111 then do; 112 arg_error: 113 call com_err_(code, com_name, outname); 114 go to arg_loop; 115 116 end; 117 118 substr(entarc, 33, 8) = (8)" "; 119 if index(entarc, ".archive ") = 0 120 then do; 121 122 call ioa_$rsnnl("^a.archive", entarc, code, entarc); /* Add suffix if not provided */ 123 if code >= 33 /* Check length of resultant */ 124 then do; 125 126 code = error_table_$entlong; 127 go to arg_error; 128 129 end; 130 131 end; 132 133 call hcs_$initiate_count(path, entarc, c0, nwords, 1, cur_ptr, code); 134 /* initiate archive segment */ 135 136 if cur_ptr = null 137 then do; 138 139 call com_err_(code, com_name, "^R^a>^a^B", path, entarc); 140 go to arg_loop; 141 142 end; 143 144 call ioa_("^/^a>^a^/", path, entarc); /* print name of segment to be tested */ 145 146 /* Initialize per-archive variables */ 147 148 nwords = divide(nwords + 35, 36, 17, 0); /* convert bit-count to number of words */ 149 150 cur_name = "S_T_A_R_T_"; 151 cur_hdr = 0; 152 153 if nwords <= hdr_length /* Segment must be at least 26 words long */ 154 then go to pt_nwords; 155 156 some_old, some_num = 0b; 157 158 do i = 0 by 1 while (cur_hdr < nwords); /* loop until end of archive seg found */ 159 160 cur_ptr = ptr(cur_ptr, cur_hdr); /* get pointer to current archive block */ 161 162 old = " "; /* Assume new style format (first char is FF) */ 163 164 if cur_ptr -> archd.begin ^= i1 /* check validity of archive header */ 165 then do; /* Error in archive header */ 166 167 if cur_ptr -> archd.begin = h1 168 then do; 169 170 old = " *"; /* Comment on old-style header (VT) and continue */ 171 some_old = some_old + 1; 172 go to check_end; 173 174 end; 175 176 type = "ident "; 177 arc_err: call ioa_("Archive format error(^a) after ""^a"", ""cur_ptr"" = ^p", 178 type, cur_name, cur_ptr); 179 180 go to arg_loop; /* Look at next arg, leave current archive known */ 181 182 end; 183 184 check_end: 185 if cur_ptr -> archd.end ^= e1 186 then do; 187 188 type = "fence "; 189 go to arc_err; 190 191 end; 192 193 cur_name = cur_ptr -> archd.name; 194 195 call cv_dec_check_(cur_ptr -> archd.bit_count, code, ibc); 196 /* get bit-count of i-th component from archive header */ 197 if code ^= 0 198 then call com_err_(0, com_name, "Non-decimal-digit in character # ^d in ""^8a""", 199 code, cur_ptr -> archd.bit_count); 200 if ibc < 0 201 then do; 202 203 type = "-count "; 204 go to arc_err; 205 206 end; 207 208 if substr(cur_ptr -> archd.bit_count, 8, 1) = " " 209 then if old = " " 210 then do; 211 212 old = " #"; 213 some_num = some_num + 1; 214 215 end; 216 217 call ioa_("^6o^a^-^a", cur_hdr, old, cur_name); 218 219 if fix_old 220 then do; 221 222 if old = " *" /* Very, very old */ 223 then cur_ptr -> archd.begin = i1; 224 225 if cur_ptr -> archd.name_count ^= " " 226 then cur_ptr -> archd.name_count = " "; 227 228 if char(cur_ptr -> archd.mode, 1) ^= "r" 229 then if index (cur_ptr -> name, ".") ^= 0 230 then cur_ptr -> archd.mode = "r wa"; 231 else cur_ptr -> archd.mode = "re "; 232 233 if char(cur_ptr -> archd.arc_time, 4) = " " 234 then cur_ptr -> archd.arc_time = cur_ptr -> archd.seg_time; 235 236 if substr(cur_ptr -> archd.bit_count, 8, 1) = " " 237 then cur_ptr -> archd.bit_count = " " || char(cur_ptr -> archd.bit_count, 7); 238 239 ignore = index(cur_ptr -> archd.name, ".epl"); 240 241 if ignore ^= 0 242 then if substr(cur_ptr -> archd.name, ignore + 4, 3) ^= "bsa" 243 then substr(cur_ptr -> archd.name, ignore, 4) = ".pl1"; 244 else substr(cur_ptr -> archd.name, ignore, 7) = ".alm "; 245 246 end; 247 248 cur_hdr = cur_hdr + divide(ibc + 35, 36, 17, 0) + hdr_length; 249 250 end; /* end of iteration loop for contents of archive file */ 251 252 if i = 1 253 then s = " "; 254 else s = "s"; 255 call ioa_("^/^6o words, ^d component^a.", cur_hdr, i, s); 256 257 if some_old ^= 0 258 then call ioa_("(""*"" indicates very old archive, with VT instead of FF as first character of header!)"); 259 260 if some_num ^= 0 261 then call ioa_("(""#"" indicates trailing blank in bit-count field)"); 262 263 if cur_hdr ^= nwords 264 then /* ! */ 265 pt_nwords: 266 call ioa_("""nwords"" = ^o(8), ""cur_hdr"" = ^o after ^p", 267 nwords, cur_hdr, cur_ptr); 268 else call hcs_$terminate_noname(cur_ptr, code); 269 270 go to arg_loop; 271 272 abort_args: /* return */ 273 call ioa_(""); /* Print out 1 blank line */ 274 275 end test_archive; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/12/82 1113.0 test_archive.pl1 >spec>on>11/12/82>test_archive.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 74 ref 90 91 arc_time 13 based char(16) level 2 dcl 43 set ref 233 233* archd based structure level 1 dcl 43 archive_data_$header_begin 000024 external static char(8) dcl 28 ref 82 archive_data_$header_end 000030 external static char(8) dcl 28 ref 84 archive_data_$ident 000026 external static char(8) dcl 28 ref 83 arglen 000104 automatic fixed bin(17,0) dcl 35 set ref 100* 106 109* 112 112 begin based char(8) level 2 dcl 43 set ref 164 167 222* bit_count 25 based char(8) level 2 dcl 43 set ref 195* 197* 208 236 236* 236 c0 000206 automatic char dcl 53 set ref 133* char builtin function dcl 74 ref 228 233 236 code 000215 automatic fixed bin(35,0) dcl 53 set ref 100* 101 101 109* 110 112* 122* 123 126* 133* 139* 195* 197 197* 268* com_err_ 000036 constant entry external dcl 67 ref 112 139 197 com_name 000011 internal static char(16) initial dcl 39 set ref 112* 139* 197* cu_$arg_ptr 000044 constant entry external dcl 67 ref 100 cur_hdr 000224 automatic fixed bin(17,0) dcl 53 set ref 151* 158 160 217* 248* 248 255* 263 263* cur_name 000171 automatic char(32) dcl 53 set ref 150* 177* 193* 217* cur_ptr 000222 automatic pointer dcl 53 set ref 133* 136 160* 160 164 167 177* 184 193 195 197 208 222 225 225 228 228 228 231 233 233 233 236 236 236 239 241 241 244 263* 268* cv_dec_check_ 000046 constant entry external dcl 67 ref 195 divide builtin function dcl 74 ref 148 248 e1 000022 internal static char(8) dcl 39 set ref 84* 184 end 27 based char(8) level 2 dcl 43 ref 184 entarc 000157 automatic char(40) dcl 53 set ref 91 118* 119 122* 122* 133* 139* 144* entropy 000220 automatic pointer dcl 53 set ref 91* 109* error_table_$entlong 000032 external static fixed bin(17,0) dcl 32 ref 126 error_table_$noarg 000034 external static fixed bin(17,0) dcl 32 ref 101 expand_path_ 000050 constant entry external dcl 67 ref 109 first 000010 internal static bit(1) initial dcl 39 set ref 78 86* fix_old 000100 automatic bit(1) dcl 18 set ref 20* 25* 219 h1 000016 internal static char(8) dcl 39 set ref 82* 167 hcs_$initiate_count 000052 constant entry external dcl 67 ref 133 hcs_$terminate_noname 000054 constant entry external dcl 67 ref 268 hdr_length constant fixed bin(17,0) initial dcl 53 ref 153 248 i 000206 automatic fixed bin(17,0) dcl 53 set ref 158* 252 255* i1 000020 internal static char(8) dcl 39 set ref 83* 164 222 ibc 000207 automatic fixed bin(17,0) dcl 53 set ref 195* 200 248 ignore 000210 automatic fixed bin(17,0) dcl 53 set ref 239* 241 241 241 244 index builtin function dcl 74 ref 119 228 239 ioa_ 000040 constant entry external dcl 67 ref 144 177 217 255 257 260 263 272 ioa_$rsnnl 000042 constant entry external dcl 67 ref 122 mode 17 based char(4) level 2 dcl 43 set ref 228 228* 231* name 3 based char(32) level 2 dcl 43 set ref 193 228 239 241 241* 244* name_count 2 based char(4) level 2 dcl 43 set ref 225 225* ntharg 000211 automatic fixed bin(17,0) dcl 53 set ref 93* 95* 95 100* null builtin function dcl 74 ref 136 nwords 000212 automatic fixed bin(17,0) dcl 53 set ref 133* 148* 148 153 158 263 263* old 000204 automatic char(2) dcl 53 set ref 162* 170* 208 212* 217* 222 outname based char unaligned dcl 35 set ref 112* outnamep 000102 automatic pointer dcl 35 set ref 100* 109* 112 path 000105 automatic char(168) dcl 53 set ref 90 133* 139* 144* pathp 000216 automatic pointer dcl 53 set ref 90* 109* ptr builtin function dcl 74 ref 160 s 000205 automatic char(1) dcl 53 set ref 252* 254* 255* seg_time 20 based char(20) level 2 dcl 43 ref 233 some_num 000214 automatic fixed bin(17,0) dcl 53 set ref 156* 213* 213 260 some_old 000213 automatic fixed bin(17,0) dcl 53 set ref 156* 171* 171 257 substr builtin function dcl 74 set ref 118* 208 236 241 241* 244* type 000202 automatic char(8) dcl 53 set ref 176* 177* 188* 203* NAMES DECLARED BY EXPLICIT CONTEXT. abort_args 001310 constant label dcl 272 ref 101 arc_err 000635 constant label dcl 177 ref 189 204 arg_error 000342 constant label dcl 112 ref 104 127 arg_loop 000273 constant label dcl 95 ref 106 114 140 180 270 check_end 000666 constant label dcl 184 ref 172 fix_old_archive 000235 constant entry external dcl 23 foa 000226 constant entry external dcl 23 pt_nwords 001246 constant label dcl 263 ref 153 startup 000245 constant label dcl 78 ref 21 26 ta 000207 constant entry external dcl 12 test_archive 000216 constant entry external dcl 12 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1516 1574 1321 1526 Length 1774 1321 56 164 175 14 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ta 234 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 first ta 000011 com_name ta 000016 h1 ta 000020 i1 ta 000022 e1 ta STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ta 000100 fix_old ta 000102 outnamep ta 000104 arglen ta 000105 path ta 000157 entarc ta 000171 cur_name ta 000202 type ta 000204 old ta 000205 s ta 000206 c0 ta 000206 i ta 000207 ibc ta 000210 ignore ta 000211 ntharg ta 000212 nwords ta 000213 some_old ta 000214 some_num ta 000215 code ta 000216 pathp ta 000220 entropy ta 000222 cur_ptr ta 000224 cur_hdr ta THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry set_cs_eis index_cs_eis THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_ptr cv_dec_check_ expand_path_ hcs_$initiate_count hcs_$terminate_noname ioa_ ioa_$rsnnl THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. archive_data_$header_begin archive_data_$header_end archive_data_$ident error_table_$entlong error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000206 20 000223 21 000224 23 000225 25 000242 26 000244 78 000245 82 000250 83 000254 84 000260 86 000264 90 000266 91 000270 93 000272 95 000273 100 000274 101 000311 104 000316 106 000317 109 000321 110 000340 112 000342 114 000366 118 000367 119 000372 122 000401 123 000432 126 000435 127 000440 133 000441 136 000503 139 000507 140 000544 144 000545 148 000573 150 000577 151 000602 153 000603 156 000605 158 000607 160 000613 162 000616 164 000620 167 000625 170 000627 171 000631 172 000632 176 000633 177 000635 180 000665 184 000666 188 000672 189 000674 193 000675 195 000700 197 000720 200 000760 203 000762 204 000764 208 000765 212 000776 213 001000 217 001001 219 001032 222 001034 225 001045 228 001053 231 001073 233 001075 236 001103 239 001115 241 001124 244 001135 248 001140 250 001146 252 001150 254 001156 255 001160 257 001207 260 001225 263 001243 268 001276 270 001307 272 001310 275 001320 ----------------------------------------------------------- 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