COMPILATION LISTING OF SEGMENT move_quota Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 02/22/85 0834.5 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 move_quota: movequota: mq: proc; 7 8 /* Implements the get_quota and move_quota commands and the get_quota active function. */ 9 /* Coded November 1969 by M.R. Thompson */ 10 /* Converted to pl1 1970 J.W. Gintell */ 11 /* Star convention added September 1971 J. W. Gintell */ 12 /* Converted to Version 2 December 1971 J.W. Gintell */ 13 /* Removed set_quota entry point to tools May 1975 J. Whitmore */ 14 /* Extra blank line removed from output 07/14/76 S. Herbst */ 15 /* Rewrote, added gq af and -quota, -records_left, -records_used 09/29/82 S. Herbst */ 16 /* Fixed to print table when multiple paths specified 10/29/82 S. Herbst */ 17 /* Fixed error message for invalid numeric arg 01/03/83 S. Herbst */ 18 /* Fixed bug in gq active function 03/17/83 S. Herbst */ 19 /* Fixed -rec_left on link to use target's parent quota not link's parent quota 07/06/84 S. Herbst */ 20 /* Added -nonzero, -total, -zero 07/06/84 S. Herbst */ 21 /* Changed -all to print trp price at current rate structure 07/09/84 S. Herbst */ 22 /* Added -sort 07/12/84 S. Herbst */ 23 /* Fixed bug truncating record-days to an integer 11/15/84 Steve Herbst */ 24 /* Fixed -long to align its output data in a column 11/26/84 Steve Herbst */ 25 /* Fixed bug in error message when no directories match a starname 02/15/85 Steve Herbst */ 26 27 28 /* Constants */ 29 30 dcl NO_ACCESS fixed bin int static options (constant) init (-1); 31 dcl (QUOTA init (1), RECORDS_LEFT init (2), RECORDS_USED init (3)) fixed bin int static options (constant); 32 33 /* Based */ 34 35 dcl area area based (area_ptr); 36 37 dcl 1 node aligned based, 38 2 sort_value fixed bin (35), 39 2 next ptr, 40 2 info, 41 3 path char (168) unaligned, 42 3 lvname char (36), 43 3 trp fixed bin (71), 44 3 time_updated fixed bin (36), 45 3 (terminal_quota, quota_value, records_left, records_used) fixed bin; 46 47 dcl arg char (arg_len) based (arg_ptr); 48 dcl return_arg char (return_len) varying based (return_ptr); 49 50 /* Automatic */ 51 52 dcl (dn, path) char (168); 53 dcl lvname_string char (36); 54 dcl (default_lvname, en, lvname, me, time_string) char (32); 55 56 dcl sons_lvid bit (36); 57 dcl (af_sw, dir_quota_sw, long_sw, nonzero_sw, print_header_sw, quota_sw, records_left_sw, records_used_sw) bit (1); 58 dcl (some_matches, some_nonzero, some_zero, sort_sw, star_sw, total_sw, type_specified_sw, wdir_sw, zero_sw) bit (1); 59 60 dcl (area_ptr, arg_ptr, first_node_ptr, last_node_ptr, p, return_ptr) ptr; 61 62 dcl rate_structure_number fixed bin (9); 63 dcl (arg_count, i, j, node_count, path_count, quota_value, records_left, records_used) fixed bin; 64 dcl (sort_by, terminal_quota, total_quota, total_records_used) fixed bin; 65 dcl (arg_len, return_len) fixed bin (21); 66 dcl (code, time_updated) fixed bin (35); 67 dcl trp fixed bin (71); 68 dcl record_days float bin; 69 dcl dummy_rate (0:7) float bin; 70 dcl (disk_rate, dummy_float) float bin; 71 72 dcl error_table_$badopt fixed bin (35) ext; 73 dcl error_table_$badstar fixed bin (35) ext; 74 dcl error_table_$nomatch fixed bin (35) ext; 75 dcl error_table_$nostars fixed bin (35) ext; 76 dcl error_table_$not_act_fnc fixed bin (35) ext; 77 78 dcl complain variable entry options (variable); 79 dcl get_arg variable entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 80 81 dcl absolute_pathname_ entry (char (*), char (*), fixed bin (35)); 82 dcl active_fnc_err_ entry options (variable); 83 dcl check_star_name_$path entry (char (*), fixed bin (35)); 84 dcl (com_err_, com_err_$suppress_name) entry options (variable); 85 dcl cu_$af_return_arg entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 86 dcl cu_$arg_count entry (fixed bin, fixed bin (35)); 87 dcl (cu_$af_arg_ptr, cu_$arg_ptr) entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 88 dcl cv_dec_check_ entry (char (*), fixed bin (35)) returns (fixed bin); 89 dcl date_time_$fstime entry (fixed bin (35), char (*)); 90 dcl expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 91 dcl get_system_free_area_ entry returns (ptr); 92 dcl get_wdir_ entry returns (char (168)); 93 dcl (hcs_$dir_quota_move, hcs_$quota_move) entry (char (*), char (*), fixed bin, fixed bin (35)); 94 dcl (hcs_$dir_quota_read, hcs_$quota_read) entry (char (*), fixed bin, fixed bin (71), fixed bin (35), 95 bit (36), fixed bin, fixed bin, fixed bin (35)); 96 dcl hcs_$get_link_target entry (char (*), char (*), char (*), char (*), fixed bin (35)); 97 dcl hcs_$star_ entry (char (*), char (*), fixed bin (2), ptr, fixed bin, ptr, ptr, fixed bin (35)); 98 dcl hcs_$star_dir_list_ entry (char (*), char (*), fixed bin (2), ptr, fixed bin, fixed bin, 99 ptr, ptr, fixed bin (35)); 100 dcl (ioa_, ioa_$rsnnl) entry options (variable); 101 dcl mdc_$find_lvname entry (bit (36), char (*), fixed bin (35)); 102 dcl pathname_ entry (char (*), char (*)) returns (char (168)); 103 dcl sort_items_$fixed_bin entry (ptr); 104 dcl system_info_$prices_rs entry (fixed bin (9), (0:7)float bin, (0:7)float bin, (0:7)float bin, (0:7)float bin, 105 float bin, float bin); 106 dcl user_info_$rs_number entry (fixed bin (9)); 107 108 dcl (addr, binary, divide, float, index, length, mod, null, reverse, substr, sum, unspec) builtin; 109 110 dcl cleanup condition; 111 112 me = "move_quota"; 113 dir_quota_sw = "0"b; 114 go to MOVE_COMMON; 115 116 move_dir_quota: entry; 117 118 me = "move_dir_quota"; 119 dir_quota_sw = "1"b; 120 121 MOVE_COMMON: 122 call cu_$arg_count (arg_count, code); 123 if code ^= 0 then do; 124 call com_err_ (code, me); 125 return; 126 end; 127 128 if arg_count < 2 | mod (arg_count, 2) ^= 0 then do; 129 call com_err_$suppress_name (0, me, "Usage: ^a path1 records1 ... pathN recordsN", me); 130 return; 131 end; 132 133 do i = 1 by 2 to arg_count; 134 135 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 136 if index (arg, "-") = 1 then 137 if arg = "-working_directory" | arg = "-working_dir" | arg = "-wd" then do; 138 dn = get_wdir_ (); 139 en = ""; 140 end; 141 else do; 142 call com_err_ (error_table_$badopt, me, "^a", arg); 143 return; 144 end; 145 else do; 146 call expand_pathname_ (arg, dn, en, code); 147 if code ^= 0 then do; 148 call com_err_ (code, me, "^a", arg); 149 return; 150 end; 151 end; 152 153 call cu_$arg_ptr (i + 1, arg_ptr, arg_len, code); 154 155 quota_value = cv_dec_check_ (arg, code); 156 if code ^= 0 then do; 157 call com_err_ (0, me, "Invalid numeric argument. ^a", arg); 158 return; 159 end; 160 161 if dir_quota_sw then call hcs_$dir_quota_move (dn, en, quota_value, code); 162 else call hcs_$quota_move (dn, en, quota_value, code); 163 164 if code ^= 0 then do; 165 call com_err_ (code, me, "^a", pathname_ (dn, en)); 166 return; 167 end; 168 end; 169 170 return; 171 172 get_quota: getquota: gq: entry; 173 174 me = "get_quota"; 175 dir_quota_sw = "0"b; 176 go to GET_COMMON; 177 178 get_dir_quota: entry; 179 180 me = "get_dir_quota"; 181 dir_quota_sw = "1"b; 182 183 GET_COMMON: 184 call cu_$af_return_arg (arg_count, return_ptr, return_len, code); 185 if code = 0 then do; 186 af_sw = "1"b; 187 get_arg = cu_$af_arg_ptr; 188 complain = active_fnc_err_; 189 end; 190 else if code = error_table_$not_act_fnc then do; 191 af_sw = "0"b; 192 get_arg = cu_$arg_ptr; 193 complain = com_err_; 194 end; 195 else do; 196 call com_err_ (code, me); 197 return; 198 end; 199 200 long_sw, nonzero_sw, quota_sw, records_left_sw, records_used_sw = "0"b; 201 sort_sw, total_sw, type_specified_sw, wdir_sw, zero_sw = "0"b; 202 path_count = 0; 203 204 do i = 1 to arg_count; 205 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 206 if index (arg, "-") = 1 then 207 if arg = "-all" | arg = "-a" then do; 208 LONG: 209 if af_sw then do; 210 BAD_OPT: call complain (error_table_$badopt, me, "^a", arg); 211 return; 212 end; 213 long_sw, quota_sw, records_left_sw, records_used_sw = "1"b; 214 end; 215 else if arg = "-long" | arg = "-lg" then go to LONG; 216 else if arg = "-nonzero" | arg = "-nz" then 217 if af_sw then go to BAD_OPT; 218 else nonzero_sw = "1"b; 219 else if arg = "-quota" then quota_sw, type_specified_sw = "1"b; 220 else if arg = "-records_left" | arg = "-rec_left" | arg = "-left" then 221 records_left_sw, type_specified_sw = "1"b; 222 else if arg = "-records_used" | arg = "-rec_used" | arg = "-ru" | arg = "-used" then 223 records_used_sw, type_specified_sw = "1"b; 224 else if arg = "-sort" then 225 if af_sw then go to BAD_OPT; 226 else sort_sw = "1"b; 227 else if arg = "-total" | arg = "-tt" then total_sw = "1"b; 228 else if arg = "-working_directory" | arg = "-working_dir" | arg = "-wd" then 229 if af_sw & path_count > 0 then go to AF_TWO_PATHS; 230 else do; 231 wdir_sw = "1"b; 232 path_count = path_count + 1; 233 end; 234 else if arg = "-zero" then 235 if af_sw then go to BAD_OPT; 236 else zero_sw = "1"b; 237 else go to BAD_OPT; 238 else do; 239 if af_sw & path_count > 0 then do; 240 AF_TWO_PATHS: 241 call complain (0, me, "Only one directory allowed."); 242 return; 243 end; 244 path_count = path_count + 1; 245 end; 246 end; 247 248 if nonzero_sw & zero_sw then do; 249 call complain (0, me, "Incompatible control arguments -zero and -nonzero"); 250 return; 251 end; 252 253 if af_sw then 254 if (quota_sw & records_left_sw) | 255 (records_left_sw & records_used_sw) | 256 (quota_sw & records_used_sw) then do; 257 call complain (0, me, "Only one of -quota, -records_left, -records_used is allowed."); 258 return; 259 end; 260 261 if ^type_specified_sw then 262 if af_sw then quota_sw = "1"b; /* af default: just return quota */ 263 else quota_sw, records_used_sw = "1"b; 264 265 if sort_sw then do; /* decide which value to sort by */ 266 if quota_sw & ^records_left_sw & ^records_used_sw then sort_by = QUOTA; 267 else if records_left_sw & ^quota_sw & ^records_used_sw then sort_by = RECORDS_LEFT; 268 else sort_by = RECORDS_USED; 269 node_count = 0; 270 end; 271 272 default_lvname = ""; 273 print_header_sw = "1"b; 274 some_nonzero, some_zero, star_sw = "0"b; 275 total_quota, total_records_used = 0; 276 277 star_entry_ptr, star_names_ptr = null; 278 first_node_ptr, last_node_ptr = null; 279 area_ptr = get_system_free_area_ (); 280 281 on cleanup call clean_up; 282 283 if wdir_sw | path_count = 0 then do; 284 call process_path (get_wdir_ ()); 285 if path_count < 2 then go to TOTAL; /* no args or -wd by itself */ 286 end; 287 288 do i = 1 to arg_count; 289 290 call get_arg (i, arg_ptr, arg_len, code); 291 292 if index (arg, "-") ^= 1 then do; /* pathname */ 293 294 call absolute_pathname_ (arg, path, code); 295 if code ^= 0 then do; 296 call complain (code, me, "^a", arg); 297 return; 298 end; 299 300 star_sw = "0"b; 301 if path ^= ">" then do; 302 call check_star_name_$path (path, code); 303 if code = error_table_$badstar then do; 304 call complain (code, me, "^a", path); 305 return; 306 end; 307 star_sw = (code ^= 0); 308 end; 309 310 if ^star_sw then call process_path (path); 311 312 else do; /* starname */ 313 314 if af_sw then do; 315 call complain (error_table_$nostars, me, "^a", path); 316 return; 317 end; 318 319 call expand_pathname_ (path, dn, en, code); 320 if code ^= 0 then do; /* absolute_pathname_ probably caught this */ 321 call complain (code, me, "^a", path); 322 return; 323 end; 324 325 if dir_quota_sw then call hcs_$dir_quota_read (dn, quota_value, trp, time_updated, 326 sons_lvid, terminal_quota, records_used, code); 327 else call hcs_$quota_read (dn, quota_value, trp, time_updated, 328 sons_lvid, terminal_quota, records_used, code); 329 if code ^= 0 then do; 330 call complain (code, me, "^a", dn); 331 return; 332 end; 333 334 call mdc_$find_lvname (sons_lvid, default_lvname, code); 335 if code ^= 0 then do; 336 call complain (code, me, "^a ^w", dn, sons_lvid); 337 return; 338 end; 339 340 call hcs_$star_ (dn, en, star_BRANCHES_ONLY, area_ptr, star_entry_count, 341 star_entry_ptr, star_names_ptr, code); 342 if code ^= 0 then do; 343 call complain (code, me, "^a", pathname_ (dn, en)); 344 return; 345 end; 346 347 some_matches = "0"b; 348 349 do j = 1 to star_entry_count; 350 351 if star_entries (j).type = star_DIRECTORY then do; 352 353 some_matches = "1"b; 354 355 call process_path (pathname_ (dn, star_names (star_entries (j).nindex))); 356 end; 357 end; 358 359 if ^some_matches then call complain (0, me, "No directories match starname ^a", 360 pathname_ (dn, en)); 361 362 call clean_up_stars; 363 end; 364 end; 365 end; 366 367 TOTAL: 368 if nonzero_sw & ^some_nonzero then 369 call com_err_ (0, me, "No directories with nonzero quota-used."); 370 else if zero_sw & ^some_zero then 371 call com_err_ (0, me, "No directories with zero quota-used."); 372 373 if sort_sw then 374 begin; 375 dcl 1 sort_array aligned, 376 2 n fixed bin (18), 377 2 eltp (node_count) ptr unaligned; 378 379 sort_array.n = node_count; 380 i = 0; 381 382 do p = first_node_ptr repeat (p -> node.next) while (p ^= null); 383 i = i + 1; 384 sort_array.eltp (i) = addr (p -> node.sort_value); 385 end; 386 387 call sort_items_$fixed_bin (addr (sort_array)); 388 389 do i = sort_array.n by -1 to 1; 390 p = eltp (i); 391 lvname = p -> node.lvname; 392 trp = p -> node.trp; 393 time_updated = p -> node.time_updated; 394 terminal_quota = p -> node.terminal_quota; 395 quota_value = p -> node.quota_value; 396 records_left = p -> node.records_left; 397 records_used = p -> node.records_used; 398 399 call print_line (p -> node.path); 400 end; 401 end; 402 403 if star_sw & ^af_sw & ^print_header_sw & ^long_sw then 404 if (quota_sw | records_used_sw) then call ioa_ ("^/^[^6d^-^;^s^]^[^6d^-^;^s^]^[^-^]^-Total^/", 405 quota_sw, total_quota, records_used_sw, total_records_used, records_left_sw); 406 else call ioa_ (""); 407 408 return; 409 410 add_node: proc () returns (ptr); 411 412 dcl newp ptr; 413 414 allocate node in (area) set (newp); 415 unspec (newp -> node) = "0"b; 416 newp -> node.next = null; 417 if first_node_ptr = null then first_node_ptr, last_node_ptr = newp; 418 else do; 419 last_node_ptr -> node.next = newp; 420 last_node_ptr = newp; 421 end; 422 423 node_count = node_count + 1; 424 425 return (newp); 426 427 end add_node; 428 429 clean_up: proc; 430 431 dcl (nextp, p) ptr; 432 433 call clean_up_stars; 434 435 if first_node_ptr ^= null then 436 do p = first_node_ptr repeat (nextp) while (p ^= null); 437 nextp = p -> node.next; 438 free p -> node in (area); 439 end; 440 441 end clean_up; 442 443 clean_up_stars: proc; 444 445 if star_names_ptr ^= null then free star_names in (area); 446 if star_entry_ptr ^= null then free star_entries in (area); 447 star_entry_ptr, star_names_ptr = null; 448 449 end clean_up_stars; 450 451 entryname: proc (P_path) returns (char (*)); 452 453 dcl P_path char (*); 454 dcl (i, j) fixed bin; 455 456 if P_path = ">" then return (">"); 457 i = index (reverse (P_path), ">"); 458 if i = 0 then return (P_path); 459 j = length (P_path) - i + 2; 460 return (substr (P_path, j)); 461 462 end entryname; 463 464 get_records_left: proc (P_path, P_quota_value, P_records_used, P_terminal_quota) returns (fixed bin); 465 466 /* This procedure calls itself recursively */ 467 468 dcl P_path char (*); 469 dcl (P_quota_value, P_records_used, P_terminal_quota) fixed bin; 470 dcl (dn, target_dn) char (168); 471 dcl (en, target_en) char (32); 472 dcl (quota_value, records_used, terminal_quota) fixed bin; 473 dcl code fixed bin (35); 474 475 if P_terminal_quota ^= 0 then return (P_quota_value - P_records_used); 476 477 else do; 478 479 call expand_pathname_ (P_path, dn, en, code); 480 481 call hcs_$get_link_target (dn, en, target_dn, target_en, code); 482 /* if nonlink, target_foo set same as foo */ 483 if code ^= 0 then return (NO_ACCESS); 484 485 if dir_quota_sw then call hcs_$dir_quota_read (target_dn, quota_value, 0, 0, "0"b, terminal_quota, 486 records_used, code); 487 else call hcs_$quota_read (target_dn, quota_value, 0, 0, "0"b, terminal_quota, 488 records_used, code); 489 490 if code ^= 0 then return (NO_ACCESS); 491 492 else return (get_records_left (target_dn, quota_value, records_used, terminal_quota)); 493 end; 494 495 end get_records_left; 496 497 print_line: proc (P_path); 498 499 dcl P_path char (*); 500 501 if ^long_sw then 502 if ^star_sw & path_count < 2 then call ioa_ 503 ("^[quota = ^d^[; ^]^;^2s^]^[used = ^d^[; ^]^;^2s^]^[remaining = ^[(no access)^;^d^]^]", 504 quota_sw, quota_value, records_left_sw | records_used_sw, 505 records_used_sw, records_used, records_left_sw, 506 records_left_sw, records_left = NO_ACCESS, records_left); 507 508 else do; /* star case */ 509 if print_header_sw then do; /* print heading first time */ 510 call ioa_ ("^/^[^xquota^-^]^[^2xused^-^]^[^2xremaining^-^]^-directory name^/", 511 quota_sw, records_used_sw, records_left_sw); 512 print_header_sw = "0"b; 513 end; 514 if lvname = default_lvname then lvname_string = ""; 515 else call ioa_$rsnnl ("(^a)", lvname_string, 0, lvname); 516 call ioa_ ("^[^6d^-^;^s^]^[^6d^-^;^s^]^[^[no access^s^;^6d^]^-^;^2s^]^-^a ^a", 517 quota_sw, quota_value, 518 records_used_sw, records_used, 519 records_left_sw, records_left = NO_ACCESS, records_left, 520 entryname (P_path), lvname_string); 521 end; 522 523 else do; /* -long */ 524 call ioa_ ("^/quota for: ^a^/", P_path); 525 call date_time_$fstime (time_updated, time_string); 526 record_days = (float (trp) + 43200.) / 86400.; 527 call ioa_ ("quota:^28t^d pages ^[(space is charged to superior directory)^]", 528 quota_value, terminal_quota = 0); 529 call ioa_ ("used:^28t^d pages", records_used); 530 call ioa_ ("remaining:^28t^[(no access)^;^d pages^]", records_left = NO_ACCESS, records_left); 531 call ioa_ ("sons volume:^28t^a", lvname); 532 if time_updated ^= 0 then do; 533 call ioa_ ("time-record-product:^28t^.3f record-days", record_days); 534 call ioa_ ("trp last updated:^28t^a", time_string); 535 call user_info_$rs_number (rate_structure_number); 536 disk_rate = 0; 537 call system_info_$prices_rs (rate_structure_number, 538 dummy_rate, dummy_rate, dummy_rate, dummy_rate, disk_rate, dummy_float); 539 if disk_rate > 0 then 540 call ioa_ ("trp price at current rate:^28t$^.2f", trp * disk_rate); 541 call ioa_ (""); 542 end; 543 end; 544 545 end print_line; 546 547 process_path: proc (P_path); 548 549 dcl P_path char (*); 550 551 if dir_quota_sw then call hcs_$dir_quota_read (P_path, quota_value, trp, time_updated, 552 sons_lvid, terminal_quota, records_used, code); 553 else call hcs_$quota_read (P_path, quota_value, trp, time_updated, 554 sons_lvid, terminal_quota, records_used, code); 555 if code ^= 0 then do; 556 call complain (code, me, "^a", P_path); 557 return; 558 end; 559 560 if total_sw & terminal_quota ^= 0 then 561 records_used = records_used + subdir_records_used (P_path); 562 563 if nonzero_sw then 564 if records_used = 0 then return; 565 else some_nonzero = "1"b; 566 else if zero_sw then 567 if records_used ^= 0 then return; 568 else some_zero = "1"b; 569 570 call mdc_$find_lvname (sons_lvid, lvname, code); 571 if code ^= 0 then call complain (code, me, "^a ^w", P_path, sons_lvid); 572 573 total_quota = total_quota + quota_value; 574 total_records_used = total_records_used + records_used; 575 576 if records_left_sw then records_left = get_records_left (P_path, quota_value, records_used, terminal_quota); 577 578 if af_sw then do; 579 call ioa_$rsnnl ("^[^d^;^s^]^[^d^;^s^]^[^d^]", return_arg, return_len, 580 quota_sw, quota_value, records_left_sw, records_left, records_used_sw, records_used); 581 return; 582 end; 583 584 if ^sort_sw then call print_line (P_path); 585 586 else do; /* -sort: save data for sorting */ 587 p = add_node (); 588 p -> node.path = P_path; 589 p -> node.lvname = lvname; 590 p -> node.trp = trp; 591 p -> node.time_updated = time_updated; 592 p -> node.terminal_quota = terminal_quota; 593 p -> node.quota_value = quota_value; 594 p -> node.records_left = records_left; 595 p -> node.records_used = records_used; 596 if sort_by = QUOTA then p -> node.sort_value = quota_value; 597 else if sort_by = RECORDS_LEFT then p -> node.sort_value = records_left; 598 else p -> node.sort_value = records_used; 599 end; 600 601 end process_path; 602 603 subdir_records_used: proc (P_dn) returns (fixed bin); 604 605 dcl P_dn char (*); 606 dcl path char (168); 607 dcl (eptr, nptr) ptr; 608 dcl (ecount, j, lcount, records_used, terminal_quota, total_ru) fixed bin; 609 dcl code fixed bin (35); 610 611 eptr, nptr = null; 612 on cleanup call local_cleanup; 613 614 total_ru = 0; 615 616 call hcs_$star_dir_list_ (P_dn, "**", star_BRANCHES_ONLY, area_ptr, ecount, lcount, eptr, nptr, code); 617 if code = 0 & ecount > 0 then do; 618 star_branch_count = ecount; /* to satisfy the structure declarations */ 619 star_link_count = lcount; 620 star_select_sw = star_BRANCHES_ONLY; 621 do j = 1 to ecount; 622 if eptr -> star_dir_list_branch (j).type = star_DIRECTORY then do; 623 path = pathname_ 624 (P_dn, (nptr -> star_list_names (eptr -> star_dir_list_branch (j).nindex))); 625 if eptr -> star_dir_list_branch (j).master_dir then call complain (0, me, 626 "^a is a master directory; its quota will not be included in the total.", path); 627 else do; 628 if dir_quota_sw then call hcs_$dir_quota_read (path, 0, 0, 0, "0"b, 629 terminal_quota, records_used, code); 630 else call hcs_$quota_read (path, 0, 0, 0, "0"b, 631 terminal_quota, records_used, code); 632 if code ^= 0 then call complain (code, me, 633 "^a^/Directory's quota will not be included in the total.", path); 634 else if terminal_quota ^= 0 then 635 total_ru = total_ru + records_used + subdir_records_used (path); 636 end; 637 end; 638 end; 639 call local_cleanup; 640 end; 641 else if code ^= 0 & code ^= error_table_$nomatch then call complain (code, me, "^a", P_dn); 642 643 return(total_ru); 644 645 local_cleanup: proc; 646 647 star_list_branch_ptr = eptr; /* to make the declaration happy */ 648 if nptr ^= null then free nptr -> star_list_names in (area); 649 if eptr ^= null then free eptr -> star_dir_list_branch in (area); 650 651 end local_cleanup; 652 653 end subdir_records_used; 654 1 1 /* BEGIN INCLUDE FILE . . . star_structures.incl.pl1 */ 1 2 1 3 /* This include file contains structures for the hcs_$star_, 1 4* hcs_$star_list_ and hcs_$star_dir_list_ entry points. 1 5* 1 6* Written 23 October 1978 by Monte Davidoff. 1 7* Modified January 1979 by Michael R. Jordan to use unsigned and different pointers for different structures. 1 8* Modified June 1981 by C. Hornig to count link pathnames more efficiently. 1 9**/ 1 10 1 11 /* automatic */ 1 12 1 13 declare star_branch_count fixed binary; /* hcs_$star_list_, hcs_$star_dir_list_: matching branch count */ 1 14 declare star_entry_count fixed binary; /* hcs_$star_: number of matching entries */ 1 15 declare star_entry_ptr pointer; /* hcs_$star_: pointer to array of entry information */ 1 16 declare star_list_branch_ptr pointer; /* hcs_$star_list_, hcs_$star_dir_list_: ptr to array of info */ 1 17 declare star_link_count fixed binary; /* hcs_$star_list_, hcs_$star_dir_list_: matching link count */ 1 18 declare star_linkx fixed binary; /* hcs_$star_list_, hcs_$star_dir_list_: index into star_links */ 1 19 declare star_names_ptr pointer; /* hcs_$star_: pointer to array of entry names */ 1 20 declare star_list_names_ptr pointer; /* hcs_$star_list_, hcs_$star_dir_list_: ptr to entry names */ 1 21 declare star_select_sw fixed binary (3); /* hcs_$star_list_, hcs_$star_dir_list_: what info to return */ 1 22 1 23 /* based */ 1 24 1 25 /* hcs_$star_ entry structure */ 1 26 1 27 declare 1 star_entries (star_entry_count) aligned based (star_entry_ptr), 1 28 2 type fixed binary (2) unsigned unaligned, 1 29 /* storage system type */ 1 30 2 nnames fixed binary (16) unsigned unaligned, 1 31 /* number of names of entry that match star_name */ 1 32 2 nindex fixed binary (18) unsigned unaligned; 1 33 /* index of first name in star_names */ 1 34 1 35 /* hcs_$star_ name structure */ 1 36 1 37 declare star_names (sum (star_entries (*).nnames)) char (32) based (star_names_ptr); 1 38 1 39 /* hcs_$star_list_ branch structure */ 1 40 1 41 declare 1 star_list_branch (star_branch_count + star_link_count) aligned based (star_list_branch_ptr), 1 42 2 type fixed binary (2) unsigned unaligned, 1 43 /* storage system type */ 1 44 2 nnames fixed binary (16) unsigned unaligned, 1 45 /* number of names of entry that match star_name */ 1 46 2 nindex fixed binary (18) unsigned unaligned, 1 47 /* index of first name in star_list_names */ 1 48 2 dtcm bit (36) unaligned, /* date-time contents of branch were last modified */ 1 49 2 dtu bit (36) unaligned, /* date-time branch was last used */ 1 50 2 mode bit (5) unaligned, /* user's access mode to the branch */ 1 51 2 raw_mode bit (5) unaligned, /* user's ACL access mode */ 1 52 2 master_dir bit (1) unaligned, /* is branch a master directory */ 1 53 2 pad bit (7) unaligned, 1 54 2 records fixed binary (18) unsigned unaligned; 1 55 /* records used by branch */ 1 56 1 57 /* hcs_$star_dir_list_ branch structure */ 1 58 1 59 declare 1 star_dir_list_branch (star_branch_count + star_link_count) aligned based (star_list_branch_ptr), 1 60 2 type fixed binary (2) unsigned unaligned, 1 61 /* storage system type */ 1 62 2 nnames fixed binary (16) unsigned unaligned, 1 63 /* number of names of entry that match star_name */ 1 64 2 nindex fixed binary (18) unsigned unaligned, 1 65 /* index of first name in star_list_names */ 1 66 2 dtem bit (36) unaligned, /* date-time directory entry of branch was last modified */ 1 67 2 pad bit (36) unaligned, 1 68 2 mode bit (5) unaligned, /* user's access mode to the branch */ 1 69 2 raw_mode bit (5) unaligned, /* user's ACL access mode */ 1 70 2 master_dir bit (1) unaligned, /* is branch a master directory */ 1 71 2 bit_count fixed binary (24) unaligned; 1 72 /* bit count of the branch */ 1 73 1 74 /* hcs_$star_list_ and hcs_$star_dir_list_ link structure */ 1 75 1 76 declare 1 star_links (star_branch_count + star_link_count) aligned based (star_list_branch_ptr), 1 77 2 type fixed binary (2) unsigned unaligned, 1 78 /* storage system type */ 1 79 2 nnames fixed binary (16) unsigned unaligned, 1 80 /* number of names of entry that match star_name */ 1 81 2 nindex fixed binary (18) unsigned unaligned, 1 82 /* index of first name in star_list_names */ 1 83 2 dtem bit (36) unaligned, /* date-time link was last modified */ 1 84 2 dtd bit (36) unaligned, /* date-time the link was last dumped */ 1 85 2 pathname_len fixed binary (18) unsigned unaligned, 1 86 /* length of the pathname of the link */ 1 87 2 pathname_index fixed binary (18) unsigned unaligned; 1 88 /* index of start of pathname in star_list_names */ 1 89 1 90 /* hcs_$star_list_ and hcs_$star_dir_list_ name array */ 1 91 1 92 declare star_list_names char (32) based (star_list_names_ptr) 1 93 dimension (star_links (star_branch_count + star_link_count).nindex 1 94 + star_links (star_branch_count + star_link_count).nnames 1 95 + divide (star_links (star_branch_count + star_link_count).pathname_len + 31, 32, 17, 0) 1 96 * binary ( 1 97 (star_links (star_branch_count + star_link_count).type = star_LINK) 1 98 & (star_select_sw >= star_LINKS_ONLY_WITH_LINK_PATHS), 1)); 1 99 1 100 /* hcs_$star_list_ and hcs_$star_dir_list_ link pathname */ 1 101 1 102 declare star_link_pathname char (star_links (star_linkx).pathname_len) 1 103 based (addr (star_list_names (star_links (star_linkx).pathname_index))); 1 104 1 105 /* internal static */ 1 106 1 107 /* star_select_sw values */ 1 108 1 109 declare star_LINKS_ONLY fixed binary (2) internal static options (constant) initial (1); 1 110 declare star_BRANCHES_ONLY fixed binary (2) internal static options (constant) initial (2); 1 111 declare star_ALL_ENTRIES fixed binary (2) internal static options (constant) initial (3); 1 112 declare star_LINKS_ONLY_WITH_LINK_PATHS 1 113 fixed binary (3) internal static options (constant) initial (5); 1 114 declare star_ALL_ENTRIES_WITH_LINK_PATHS 1 115 fixed binary (3) internal static options (constant) initial (7); 1 116 1 117 /* storage system types */ 1 118 1 119 declare star_LINK fixed binary (2) unsigned internal static options (constant) initial (0); 1 120 declare star_SEGMENT fixed binary (2) unsigned internal static options (constant) initial (1); 1 121 declare star_DIRECTORY fixed binary (2) unsigned internal static options (constant) initial (2); 1 122 1 123 /* END INCLUDE FILE . . . star_structures.incl.pl1 */ 655 656 657 end move_quota; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 02/21/85 0927.6 move_quota.pl1 >special_ldd>online>6981.pbf>move_quota.pl1 655 1 06/10/82 1045.5 star_structures.incl.pl1 >ldd>include>star_structures.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. NO_ACCESS 006546 constant fixed bin(17,0) initial dcl 30 ref 483 490 501 516 530 P_dn parameter char unaligned dcl 605 set ref 603 616* 623* 641* P_path parameter char unaligned dcl 549 in procedure "process_path" set ref 547 551* 553* 556* 560* 571* 576* 584* 588 P_path parameter char unaligned dcl 499 in procedure "print_line" set ref 497 516* 524* P_path parameter char unaligned dcl 453 in procedure "entryname" ref 451 456 457 458 459 460 P_path parameter char unaligned dcl 468 in procedure "get_records_left" set ref 464 479* P_quota_value parameter fixed bin(17,0) dcl 469 ref 464 475 P_records_used parameter fixed bin(17,0) dcl 469 ref 464 475 P_terminal_quota parameter fixed bin(17,0) dcl 469 ref 464 475 QUOTA constant fixed bin(17,0) initial dcl 31 ref 266 596 RECORDS_LEFT constant fixed bin(17,0) initial dcl 31 ref 267 597 RECORDS_USED constant fixed bin(17,0) initial dcl 31 ref 268 absolute_pathname_ 000022 constant entry external dcl 81 ref 294 active_fnc_err_ 000024 constant entry external dcl 82 ref 188 addr builtin function dcl 108 ref 384 387 387 af_sw 000306 automatic bit(1) unaligned dcl 57 set ref 186* 191* 208 216 224 228 234 239 253 261 314 403 578 area based area(1024) dcl 35 ref 414 438 445 446 648 649 area_ptr 000330 automatic pointer dcl 60 set ref 279* 340* 414 438 445 446 616* 648 649 arg based char unaligned dcl 47 set ref 136 136 136 136 142* 146* 148* 155* 157* 206 206 206 210* 215 215 216 216 219 220 220 220 222 222 222 222 224 227 227 228 228 228 234 292 294* 296* arg_count 000345 automatic fixed bin(17,0) dcl 63 set ref 121* 128 128 133 183* 204 288 arg_len 000361 automatic fixed bin(21,0) dcl 65 set ref 135* 136 136 136 136 142 142 146 146 148 148 153* 155 155 157 157 205* 206 206 206 210 210 215 215 216 216 219 220 220 220 222 222 222 222 224 227 227 228 228 228 234 290* 292 294 294 296 296 arg_ptr 000332 automatic pointer dcl 60 set ref 135* 136 136 136 136 142 146 148 153* 155 157 205* 206 206 206 210 215 215 216 216 219 220 220 220 222 222 222 222 224 227 227 228 228 228 234 290* 292 294 296 binary builtin function dcl 108 ref 648 check_star_name_$path 000026 constant entry external dcl 83 ref 302 cleanup 000414 stack reference condition dcl 110 ref 281 612 code 000247 automatic fixed bin(35,0) dcl 473 in procedure "get_records_left" set ref 479* 481* 483 485* 487* 490 code 000363 automatic fixed bin(35,0) dcl 66 in procedure "mq" set ref 121* 123 124* 135* 146* 147 148* 153* 155* 156 161* 162* 164 165* 183* 185 190 196* 205* 290* 294* 295 296* 302* 303 304* 307 319* 320 321* 325* 327* 329 330* 334* 335 336* 340* 342 343* 551* 553* 555 556* 570* 571 571* code 000164 automatic fixed bin(35,0) dcl 609 in procedure "subdir_records_used" set ref 616* 617 628* 630* 632 632* 641 641 641* com_err_ 000030 constant entry external dcl 84 ref 124 142 148 157 165 193 196 367 370 com_err_$suppress_name 000032 constant entry external dcl 84 ref 129 complain 000404 automatic entry variable dcl 78 set ref 188* 193* 210 240 249 257 296 304 315 321 330 336 343 359 556 571 625 632 641 cu_$af_arg_ptr 000040 constant entry external dcl 87 ref 187 cu_$af_return_arg 000034 constant entry external dcl 85 ref 183 cu_$arg_count 000036 constant entry external dcl 86 ref 121 cu_$arg_ptr 000042 constant entry external dcl 87 ref 135 153 192 205 cv_dec_check_ 000044 constant entry external dcl 88 ref 155 date_time_$fstime 000046 constant entry external dcl 89 ref 525 default_lvname 000235 automatic char(32) unaligned dcl 54 set ref 272* 334* 514 dir_quota_sw 000307 automatic bit(1) unaligned dcl 57 set ref 113* 119* 161 175* 181* 325 485 551 628 disk_rate 000401 automatic float bin(27) dcl 70 set ref 536* 537* 539 539 divide builtin function dcl 108 ref 648 dn 000100 automatic char(168) unaligned dcl 470 in procedure "get_records_left" set ref 479* 481* dn 000100 automatic char(168) unaligned dcl 52 in procedure "mq" set ref 138* 146* 161* 162* 165* 165* 319* 325* 327* 330* 336* 340* 343* 343* 355* 355* 359* 359* dummy_float 000402 automatic float bin(27) dcl 70 set ref 537* dummy_rate 000371 automatic float bin(27) array dcl 69 set ref 537* 537* 537* 537* ecount 000156 automatic fixed bin(17,0) dcl 608 set ref 616* 617 618 621 eltp 1 000100 automatic pointer array level 2 packed unaligned dcl 375 set ref 384* 390 en 000245 automatic char(32) unaligned dcl 54 in procedure "mq" set ref 139* 146* 161* 162* 165* 165* 319* 340* 343* 343* 359* 359* en 000224 automatic char(32) unaligned dcl 471 in procedure "get_records_left" set ref 479* 481* eptr 000152 automatic pointer dcl 607 set ref 611* 616* 622 623 625 647 649 649 error_table_$badopt 000010 external static fixed bin(35,0) dcl 72 set ref 142* 210* error_table_$badstar 000012 external static fixed bin(35,0) dcl 73 ref 303 error_table_$nomatch 000014 external static fixed bin(35,0) dcl 74 ref 641 error_table_$nostars 000016 external static fixed bin(35,0) dcl 75 set ref 315* error_table_$not_act_fnc 000020 external static fixed bin(35,0) dcl 76 ref 190 expand_pathname_ 000050 constant entry external dcl 90 ref 146 319 479 first_node_ptr 000334 automatic pointer dcl 60 set ref 278* 382 417 417* 435 435 float builtin function dcl 108 ref 526 get_arg 000410 automatic entry variable dcl 79 set ref 187* 192* 290 get_system_free_area_ 000052 constant entry external dcl 91 ref 279 get_wdir_ 000054 constant entry external dcl 92 ref 138 284 284 hcs_$dir_quota_move 000056 constant entry external dcl 93 ref 161 hcs_$dir_quota_read 000062 constant entry external dcl 94 ref 325 485 551 628 hcs_$get_link_target 000066 constant entry external dcl 96 ref 481 hcs_$quota_move 000060 constant entry external dcl 93 ref 162 hcs_$quota_read 000064 constant entry external dcl 94 ref 327 487 553 630 hcs_$star_ 000070 constant entry external dcl 97 ref 340 hcs_$star_dir_list_ 000072 constant entry external dcl 98 ref 616 i 000346 automatic fixed bin(17,0) dcl 63 in procedure "mq" set ref 133* 135* 153* 204* 205* 288* 290* 380* 383* 383 384 389* 390* i 000100 automatic fixed bin(17,0) dcl 454 in procedure "entryname" set ref 457* 458 459 index builtin function dcl 108 ref 136 206 292 457 info 4 based structure level 2 dcl 37 ioa_ 000074 constant entry external dcl 100 ref 403 406 501 510 516 524 527 529 530 531 533 534 539 541 ioa_$rsnnl 000076 constant entry external dcl 100 ref 515 579 j 000157 automatic fixed bin(17,0) dcl 608 in procedure "subdir_records_used" set ref 621* 622 623 625* j 000101 automatic fixed bin(17,0) dcl 454 in procedure "entryname" set ref 459* 460 j 000347 automatic fixed bin(17,0) dcl 63 in procedure "mq" set ref 349* 351 355 355* last_node_ptr 000336 automatic pointer dcl 60 set ref 278* 417* 419 420* lcount 000160 automatic fixed bin(17,0) dcl 608 set ref 616* 619 length builtin function dcl 108 ref 459 long_sw 000310 automatic bit(1) unaligned dcl 57 set ref 200* 213* 403 501 lvname 56 based char(36) level 3 in structure "node" dcl 37 in procedure "mq" set ref 391 589* lvname 000255 automatic char(32) unaligned dcl 54 in procedure "mq" set ref 391* 514 515* 531* 570* 589 lvname_string 000224 automatic char(36) unaligned dcl 53 set ref 514* 515* 516* master_dir 3(10) based bit(1) array level 2 packed unaligned dcl 1-59 ref 625 mdc_$find_lvname 000100 constant entry external dcl 101 ref 334 570 me 000265 automatic char(32) unaligned dcl 54 set ref 112* 118* 124* 129* 129* 142* 148* 157* 165* 174* 180* 196* 210* 240* 249* 257* 296* 304* 315* 321* 330* 336* 343* 359* 367* 370* 556* 571* 625* 632* 641* mod builtin function dcl 108 ref 128 n 000100 automatic fixed bin(18,0) level 2 dcl 375 set ref 379* 389 newp 000452 automatic pointer dcl 412 set ref 414* 415 416 417 419 420 425 next 2 based pointer level 2 dcl 37 set ref 385 416* 419* 437 nextp 000106 automatic pointer dcl 431 set ref 437* 439 nindex 0(18) based fixed bin(18,0) array level 2 in structure "star_dir_list_branch" packed unsigned unaligned dcl 1-59 in procedure "mq" ref 623 nindex 0(18) based fixed bin(18,0) array level 2 in structure "star_links" packed unsigned unaligned dcl 1-76 in procedure "mq" ref 648 nindex 0(18) based fixed bin(18,0) array level 2 in structure "star_entries" packed unsigned unaligned dcl 1-27 in procedure "mq" ref 355 355 nnames 0(02) based fixed bin(16,0) array level 2 in structure "star_links" packed unsigned unaligned dcl 1-76 in procedure "mq" ref 648 nnames 0(02) based fixed bin(16,0) array level 2 in structure "star_entries" packed unsigned unaligned dcl 1-27 in procedure "mq" ref 445 node based structure level 1 dcl 37 set ref 414 415* 438 node_count 000350 automatic fixed bin(17,0) dcl 63 set ref 269* 375 379 423* 423 nonzero_sw 000311 automatic bit(1) unaligned dcl 57 set ref 200* 218* 248 367 563 nptr 000154 automatic pointer dcl 607 set ref 611* 616* 623 648 648 null builtin function dcl 108 ref 277 278 382 416 417 435 435 445 446 447 611 648 649 p 000110 automatic pointer dcl 431 in procedure "clean_up" set ref 435* 435* 437 438* p 000340 automatic pointer dcl 60 in procedure "mq" set ref 382* 382* 384* 385 390* 391 392 393 394 395 396 397 399 587* 588 589 590 591 592 593 594 595 596 597 598 path 000100 automatic char(168) unaligned dcl 606 in procedure "subdir_records_used" set ref 623* 625* 628* 630* 632* 634* path 4 based char(168) level 3 in structure "node" packed unaligned dcl 37 in procedure "mq" set ref 399* 588* path 000152 automatic char(168) unaligned dcl 52 in procedure "mq" set ref 294* 301 302* 304* 310* 315* 319* 321* path_count 000351 automatic fixed bin(17,0) dcl 63 set ref 202* 228 232* 232 239 244* 244 283 285 501 pathname_ 000102 constant entry external dcl 102 ref 165 165 343 343 355 355 359 359 623 pathname_len 3 based fixed bin(18,0) array level 2 packed unsigned unaligned dcl 1-76 ref 648 print_header_sw 000312 automatic bit(1) unaligned dcl 57 set ref 273* 403 509 512* quota_sw 000313 automatic bit(1) unaligned dcl 57 set ref 200* 213* 219* 253 253 261* 263* 266 267 403 403* 501* 510* 516* 579* quota_value 000244 automatic fixed bin(17,0) dcl 472 in procedure "get_records_left" set ref 485* 487* 492* quota_value 75 based fixed bin(17,0) level 3 in structure "node" dcl 37 in procedure "mq" set ref 395 593* quota_value 000352 automatic fixed bin(17,0) dcl 63 in procedure "mq" set ref 155* 161* 162* 325* 327* 395* 501* 516* 527* 551* 553* 573 576* 579* 593 596 rate_structure_number 000344 automatic fixed bin(9,0) dcl 62 set ref 535* 537* record_days 000370 automatic float bin(27) dcl 68 set ref 526* 533* records_left 76 based fixed bin(17,0) level 3 in structure "node" dcl 37 in procedure "mq" set ref 396 594* records_left 000353 automatic fixed bin(17,0) dcl 63 in procedure "mq" set ref 396* 501 501* 516 516* 530 530* 576* 579* 594 597 records_left_sw 000314 automatic bit(1) unaligned dcl 57 set ref 200* 213* 220* 253 253 266 267 403* 501 501* 501* 510* 516* 576 579* records_used 000354 automatic fixed bin(17,0) dcl 63 in procedure "mq" set ref 325* 327* 397* 501* 516* 529* 551* 553* 560* 560 563 566 574 576* 579* 595 598 records_used 000161 automatic fixed bin(17,0) dcl 608 in procedure "subdir_records_used" set ref 628* 630* 634 records_used 000245 automatic fixed bin(17,0) dcl 472 in procedure "get_records_left" set ref 485* 487* 492* records_used 77 based fixed bin(17,0) level 3 in structure "node" dcl 37 in procedure "mq" set ref 397 595* records_used_sw 000315 automatic bit(1) unaligned dcl 57 set ref 200* 213* 222* 253 253 263* 266 267 403 403* 501 501* 510* 516* 579* return_arg based varying char dcl 48 set ref 579* return_len 000362 automatic fixed bin(21,0) dcl 65 set ref 183* 579 579* return_ptr 000342 automatic pointer dcl 60 set ref 183* 579 reverse builtin function dcl 108 ref 457 some_matches 000316 automatic bit(1) unaligned dcl 58 set ref 347* 353* 359 some_nonzero 000317 automatic bit(1) unaligned dcl 58 set ref 274* 367 565* some_zero 000320 automatic bit(1) unaligned dcl 58 set ref 274* 370 568* sons_lvid 000305 automatic bit(36) unaligned dcl 56 set ref 325* 327* 334* 336* 551* 553* 570* 571* sort_array 000100 automatic structure level 1 dcl 375 set ref 387 387 sort_by 000355 automatic fixed bin(17,0) dcl 64 set ref 266* 267* 268* 596 597 sort_items_$fixed_bin 000104 constant entry external dcl 103 ref 387 sort_sw 000321 automatic bit(1) unaligned dcl 58 set ref 201* 226* 265 373 584 sort_value based fixed bin(35,0) level 2 dcl 37 set ref 384 596* 597* 598* star_BRANCHES_ONLY 000062 constant fixed bin(2,0) initial dcl 1-110 set ref 340* 616* 620 star_DIRECTORY constant fixed bin(2,0) initial unsigned dcl 1-121 ref 351 622 star_LINK constant fixed bin(2,0) initial unsigned dcl 1-119 ref 648 star_LINKS_ONLY_WITH_LINK_PATHS constant fixed bin(3,0) initial dcl 1-112 ref 648 star_branch_count 000422 automatic fixed bin(17,0) dcl 1-13 set ref 618* 648 648 648 648 649 star_dir_list_branch based structure array level 1 dcl 1-59 ref 649 star_entries based structure array level 1 dcl 1-27 ref 446 star_entry_count 000423 automatic fixed bin(17,0) dcl 1-14 set ref 340* 349 445 446 star_entry_ptr 000424 automatic pointer dcl 1-15 set ref 277* 340* 351 355 355 445 446 446 447* star_link_count 000430 automatic fixed bin(17,0) dcl 1-17 set ref 619* 648 648 648 648 649 star_links based structure array level 1 dcl 1-76 star_list_branch_ptr 000426 automatic pointer dcl 1-16 set ref 647* 648 648 648 648 star_list_names based char(32) array unaligned dcl 1-92 ref 623 648 star_names based char(32) array unaligned dcl 1-37 set ref 355* 355* 445 star_names_ptr 000432 automatic pointer dcl 1-19 set ref 277* 340* 355 355 445 445 447* star_select_sw 000434 automatic fixed bin(3,0) dcl 1-21 set ref 620* 648 star_sw 000322 automatic bit(1) unaligned dcl 58 set ref 274* 300* 307* 310 403 501 substr builtin function dcl 108 ref 460 sum builtin function dcl 108 ref 445 system_info_$prices_rs 000106 constant entry external dcl 104 ref 537 target_dn 000152 automatic char(168) unaligned dcl 470 set ref 481* 485* 487* 492* target_en 000234 automatic char(32) unaligned dcl 471 set ref 481* terminal_quota 000246 automatic fixed bin(17,0) dcl 472 in procedure "get_records_left" set ref 485* 487* 492* terminal_quota 000356 automatic fixed bin(17,0) dcl 64 in procedure "mq" set ref 325* 327* 394* 527 551* 553* 560 576* 592 terminal_quota 000162 automatic fixed bin(17,0) dcl 608 in procedure "subdir_records_used" set ref 628* 630* 634 terminal_quota 74 based fixed bin(17,0) level 3 in structure "node" dcl 37 in procedure "mq" set ref 394 592* time_string 000275 automatic char(32) unaligned dcl 54 set ref 525* 534* time_updated 000364 automatic fixed bin(35,0) dcl 66 in procedure "mq" set ref 325* 327* 393* 525* 532 551* 553* 591 time_updated 72 based fixed bin(36,0) level 3 in structure "node" dcl 37 in procedure "mq" set ref 393 591* total_quota 000357 automatic fixed bin(17,0) dcl 64 set ref 275* 403* 573* 573 total_records_used 000360 automatic fixed bin(17,0) dcl 64 set ref 275* 403* 574* 574 total_ru 000163 automatic fixed bin(17,0) dcl 608 set ref 614* 634* 634 643 total_sw 000323 automatic bit(1) unaligned dcl 58 set ref 201* 227* 560 trp 70 based fixed bin(71,0) level 3 in structure "node" dcl 37 in procedure "mq" set ref 392 590* trp 000366 automatic fixed bin(71,0) dcl 67 in procedure "mq" set ref 325* 327* 392* 526 539 551* 553* 590 type based fixed bin(2,0) array level 2 in structure "star_dir_list_branch" packed unsigned unaligned dcl 1-59 in procedure "mq" ref 622 type based fixed bin(2,0) array level 2 in structure "star_links" packed unsigned unaligned dcl 1-76 in procedure "mq" ref 648 type based fixed bin(2,0) array level 2 in structure "star_entries" packed unsigned unaligned dcl 1-27 in procedure "mq" ref 351 type_specified_sw 000324 automatic bit(1) unaligned dcl 58 set ref 201* 219* 220* 222* 261 unspec builtin function dcl 108 set ref 415* user_info_$rs_number 000110 constant entry external dcl 106 ref 535 wdir_sw 000325 automatic bit(1) unaligned dcl 58 set ref 201* 231* 283 zero_sw 000326 automatic bit(1) unaligned dcl 58 set ref 201* 236* 248 370 566 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. star_ALL_ENTRIES internal static fixed bin(2,0) initial dcl 1-111 star_ALL_ENTRIES_WITH_LINK_PATHS internal static fixed bin(3,0) initial dcl 1-114 star_LINKS_ONLY internal static fixed bin(2,0) initial dcl 1-109 star_SEGMENT internal static fixed bin(2,0) initial unsigned dcl 1-120 star_link_pathname based char unaligned dcl 1-102 star_linkx automatic fixed bin(17,0) dcl 1-18 star_list_branch based structure array level 1 dcl 1-41 star_list_names_ptr automatic pointer dcl 1-20 NAMES DECLARED BY EXPLICIT CONTEXT. AF_TWO_PATHS 002035 constant label dcl 240 ref 228 BAD_OPT 001600 constant label dcl 210 ref 216 224 234 234 GET_COMMON 001430 constant label dcl 183 ref 176 LONG 001576 constant label dcl 208 ref 215 MOVE_COMMON 000626 constant label dcl 121 ref 114 TOTAL 003330 constant label dcl 367 ref 285 add_node 003615 constant entry internal dcl 410 ref 587 clean_up 003647 constant entry internal dcl 429 ref 281 clean_up_stars 003702 constant entry internal dcl 443 ref 362 433 entryname 003760 constant entry internal dcl 451 ref 516 get_dir_quota 001416 constant entry external dcl 178 get_quota 001403 constant entry external dcl 172 get_records_left 004054 constant entry internal dcl 464 ref 492 576 getquota 001374 constant entry external dcl 172 gq 001365 constant entry external dcl 172 local_cleanup 006430 constant entry internal dcl 645 ref 612 639 move_dir_quota 000614 constant entry external dcl 116 move_quota 000601 constant entry external dcl 6 movequota 000572 constant entry external dcl 6 mq 000563 constant entry external dcl 6 print_line 004342 constant entry internal dcl 497 ref 399 584 process_path 005210 constant entry internal dcl 547 ref 284 310 355 subdir_records_used 005713 constant entry internal dcl 603 ref 560 634 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 7302 7414 6551 7312 Length 7734 6551 112 304 530 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mq 496 external procedure is an external procedure. on unit on line 281 74 on unit begin block on line 373 80 begin block uses auto adjustable storage. add_node internal procedure shares stack frame of external procedure mq. clean_up internal procedure shares stack frame of on unit on line 281. clean_up_stars 66 internal procedure is called by several nonquick procedures. entryname 68 internal procedure uses returns(char(*)) or returns(bit(*)). get_records_left 248 internal procedure calls itself recursively. print_line 132 internal procedure is called by several nonquick procedures. process_path internal procedure shares stack frame of external procedure mq. subdir_records_used 203 internal procedure enables or reverts conditions. on unit on line 612 64 on unit local_cleanup 67 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME begin block on line 373 000100 sort_array begin block on line 373 entryname 000100 i entryname 000101 j entryname get_records_left 000100 dn get_records_left 000152 target_dn get_records_left 000224 en get_records_left 000234 target_en get_records_left 000244 quota_value get_records_left 000245 records_used get_records_left 000246 terminal_quota get_records_left 000247 code get_records_left mq 000100 dn mq 000152 path mq 000224 lvname_string mq 000235 default_lvname mq 000245 en mq 000255 lvname mq 000265 me mq 000275 time_string mq 000305 sons_lvid mq 000306 af_sw mq 000307 dir_quota_sw mq 000310 long_sw mq 000311 nonzero_sw mq 000312 print_header_sw mq 000313 quota_sw mq 000314 records_left_sw mq 000315 records_used_sw mq 000316 some_matches mq 000317 some_nonzero mq 000320 some_zero mq 000321 sort_sw mq 000322 star_sw mq 000323 total_sw mq 000324 type_specified_sw mq 000325 wdir_sw mq 000326 zero_sw mq 000330 area_ptr mq 000332 arg_ptr mq 000334 first_node_ptr mq 000336 last_node_ptr mq 000340 p mq 000342 return_ptr mq 000344 rate_structure_number mq 000345 arg_count mq 000346 i mq 000347 j mq 000350 node_count mq 000351 path_count mq 000352 quota_value mq 000353 records_left mq 000354 records_used mq 000355 sort_by mq 000356 terminal_quota mq 000357 total_quota mq 000360 total_records_used mq 000361 arg_len mq 000362 return_len mq 000363 code mq 000364 time_updated mq 000366 trp mq 000370 record_days mq 000371 dummy_rate mq 000401 disk_rate mq 000402 dummy_float mq 000404 complain mq 000410 get_arg mq 000422 star_branch_count mq 000423 star_entry_count mq 000424 star_entry_ptr mq 000426 star_list_branch_ptr mq 000430 star_link_count mq 000432 star_names_ptr mq 000434 star_select_sw mq 000452 newp add_node on unit on line 281 000106 nextp clean_up 000110 p clean_up subdir_records_used 000100 path subdir_records_used 000152 eptr subdir_records_used 000154 nptr subdir_records_used 000156 ecount subdir_records_used 000157 j subdir_records_used 000160 lcount subdir_records_used 000161 records_used subdir_records_used 000162 terminal_quota subdir_records_used 000163 total_ru subdir_records_used 000164 code subdir_records_used THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as r_ne_as r_ge_a enter_begin leave_begin call_var_desc call_var call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other return alloc_auto_adj mpfx2 mod_fx1 enable shorten_stack ext_entry int_entry int_entry_desc return_chars_eis alloc_based free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. absolute_pathname_ active_fnc_err_ check_star_name_$path com_err_ com_err_$suppress_name cu_$af_arg_ptr cu_$af_return_arg cu_$arg_count cu_$arg_ptr cv_dec_check_ date_time_$fstime expand_pathname_ get_system_free_area_ get_wdir_ hcs_$dir_quota_move hcs_$dir_quota_read hcs_$get_link_target hcs_$quota_move hcs_$quota_read hcs_$star_ hcs_$star_dir_list_ ioa_ ioa_$rsnnl mdc_$find_lvname pathname_ sort_items_$fixed_bin system_info_$prices_rs user_info_$rs_number THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$badstar error_table_$nomatch error_table_$nostars error_table_$not_act_fnc LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000562 112 000606 113 000611 114 000612 116 000613 118 000621 119 000624 121 000626 123 000637 124 000641 125 000656 128 000657 129 000665 130 000715 133 000716 135 000725 136 000742 138 000772 139 001001 140 001004 142 001005 143 001037 144 001040 146 001041 147 001071 148 001073 149 001125 153 001126 155 001146 156 001172 157 001174 158 001230 161 001231 162 001261 164 001306 165 001310 166 001357 168 001360 170 001363 172 001364 174 001410 175 001413 176 001414 178 001415 180 001423 181 001426 183 001430 185 001445 186 001447 187 001451 188 001456 189 001461 190 001462 191 001465 192 001466 193 001472 194 001475 196 001476 197 001512 200 001513 201 001520 202 001525 204 001526 205 001535 206 001552 208 001576 210 001600 211 001632 213 001633 214 001643 215 001644 216 001654 218 001666 219 001671 220 001702 222 001723 224 001750 226 001756 227 001761 228 001774 231 002014 232 002016 233 002017 234 002020 236 002026 239 002031 240 002035 242 002061 244 002062 246 002063 248 002065 249 002071 250 002115 253 002116 257 002142 258 002166 261 002167 263 002176 265 002202 266 002204 267 002222 268 002235 269 002237 272 002240 273 002243 274 002245 275 002250 277 002252 278 002255 279 002260 281 002267 283 002305 284 002311 285 002323 288 002326 290 002335 292 002351 294 002365 295 002411 296 002413 297 002444 300 002445 301 002446 302 002452 303 002467 304 002473 305 002521 307 002522 310 002525 314 002533 315 002535 316 002564 319 002565 320 002611 321 002613 322 002641 325 002642 327 002707 329 002751 330 002753 331 003001 334 003002 335 003023 336 003025 337 003057 340 003060 342 003123 343 003125 344 003173 347 003174 349 003175 351 003205 353 003212 355 003214 357 003246 359 003250 362 003322 365 003326 367 003330 370 003362 373 003413 375 003420 379 003425 380 003427 382 003430 383 003437 384 003440 385 003443 387 003447 389 003460 390 003470 391 003472 392 003475 393 003477 394 003501 395 003503 396 003505 397 003507 399 003511 400 003522 401 003526 403 003527 406 003603 408 003614 410 003615 414 003617 415 003624 416 003627 417 003631 419 003637 420 003641 423 003642 425 003643 429 003647 433 003650 435 003655 437 003670 438 003673 439 003675 441 003700 443 003701 445 003707 446 003743 447 003752 449 003756 451 003757 456 003773 457 004010 458 004021 459 004031 460 004035 464 004053 475 004067 479 004076 481 004122 483 004151 485 004157 487 004232 490 004301 492 004307 497 004341 501 004355 509 004451 510 004453 512 004500 514 004502 515 004513 516 004543 521 004643 524 004645 525 004670 526 004706 527 004717 529 004746 530 004767 531 005020 532 005044 533 005047 534 005067 535 005113 536 005123 537 005126 539 005146 541 005176 545 005207 547 005210 551 005221 553 005270 555 005334 556 005336 557 005366 560 005367 563 005413 565 005420 566 005423 568 005430 570 005432 571 005453 573 005511 574 005513 576 005515 578 005547 579 005551 581 005625 584 005626 587 005643 588 005645 589 005654 590 005657 591 005661 592 005664 593 005666 594 005670 595 005672 596 005674 597 005702 598 005707 601 005711 603 005712 611 005726 612 005731 614 005753 616 005754 617 006027 618 006033 619 006035 620 006037 621 006041 622 006051 623 006060 625 006114 628 006154 630 006230 632 006300 634 006333 638 006356 639 006360 640 006364 641 006365 643 006423 645 006427 647 006435 648 006442 649 006507 651 006522 ----------------------------------------------------------- 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