COMPILATION LISTING OF SEGMENT print_disk Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 09/18/84 1228.1 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 print_disk: proc; 12 13 /* This program prints out a disk usage listing 14* from the disk usage figures in "projfile" 15* which were placed there by "charge_disk". 16* 17* THVV 4/70 18* Modified by T. Casey April 1976 to print directory pages used column. 19* Modified Feb 1980 by M. B. Armstrong to implement multiple rate structures. 20**/ 21 22 dcl (hp, pp) ptr, /* pointer to input */ 23 tid char (9) aligned, 24 (path, dn) char (168) aligned, /* file system names */ 25 en char (32) aligned, /* .. */ 26 (coxx, dpxx) char (64) aligned, /* company & department */ 27 temp fixed bin (71), /* temp for disk use */ 28 dols float bin, /* dollar charge */ 29 tdols float bin init (0.0e0), /* total charge */ 30 tqta fixed bin (35) init (0), /* total quota */ 31 (tduse, tuse) fixed bin (35) init (0), /* total use */ 32 qta fixed bin (35), /* project quota */ 33 (duse, use) fixed bin (35), /* project use */ 34 disk_price (0:9) float bin, 35 dummy1 float bin, 36 dummy (0: 7) float bin, 37 (i, np) fixed bin; /* misc */ 38 dcl ec fixed bin (35); 39 dcl rs_number fixed bin; /* rate structure index */ 40 dcl rs_name char (32); 41 dcl rs_count fixed bin; 42 43 dcl get_wdir_ entry () returns (char (168) aligned), 44 system_info_$titles entry (char (*) aligned, char (*) aligned), 45 system_info_$prices_rs entry (fixed bin, 46 (0: 7) float bin, (0: 7) float bin, (0: 7) float bin, (0: 7) float bin, float bin, float bin), 47 system_info_$rs_name entry (fixed bin, char (*), fixed bin (35)), 48 system_info_$max_rs_number entry (fixed bin), 49 search_sat_$rs_number entry (char (*), fixed bin, fixed bin (35)), 50 search_sat_$clean_up entry, 51 ioa_ entry options (variable), /* output printing procedure */ 52 hcs_$initiate entry (char (*) aligned, char (*) aligned, char (*) aligned, fixed bin (1), 53 fixed bin (2), ptr, fixed bin (35)), 54 hcs_$terminate_noname entry (ptr, fixed bin (35)), /* file system */ 55 com_err_ entry options (variable); /* error reporter */ 56 dcl error_table_$noentry external fixed bin (35); 57 58 dcl (hbound, null) builtin; 59 60 dcl format char (32) int static aligned init /* output formats */ 61 ("^-^9a^4x^6d^4x^6d^4x^6d^4x^15.2f"), 62 head char (49) aligned int static init 63 ("^/^/^-Project^5xs-quota^5xs-use^5xd-use^13xCharge"), 64 dash char (54) aligned int static init 65 ("^----------^5x-----^5x-----^5x-----^5x--------------^/"); 66 1 1 /* BEGIN INCLUDE FILE .. projfile.incl.pl1 */ 1 2 /* Modified by T. Casey April 1976 to change disk_infs (obsolete) to dir_disk_use */ 1 3 /* Modified 1984-07-09 BIM for dir_disk_quota, version */ 1 4 /* Modified 1984-09-14 BIM for reasonable array size */ 1 5 1 6 dcl 1 projfile based (pp) aligned, /* Project history file */ 1 7 2 nproj fixed bin (35), /* number of entries */ 1 8 2 version fixed bin, 1 9 2 projfilexx0 (6) bit (36) aligned, 1 10 2 projfiletab (3000), /* in seg limit */ 1 11 3 id char (12) unal, /* project ID */ 1 12 3 title char (52) unal, /* project title */ 1 13 3 inv char (32) unal, /* name of principal investigator */ 1 14 3 inv_addr char (32) unal, /* address */ 1 15 3 sup char (32) unal, /* name of supervisor */ 1 16 3 sup_addr char (32) unal, /* address */ 1 17 3 sup_phone char (16) unal, /* telephone */ 1 18 3 on fixed bin (71), /* date on */ 1 19 3 off fixed bin (71), /* date off */ 1 20 3 disk_psec fixed bin (71), /* project disk page-seconds */ 1 21 3 disk_quota fixed bin (35), /* project disk quota */ 1 22 3 dir_disk_quota fixed bin (35), /* project dir disk quota */ 1 23 3 disk_use fixed bin (35), /* total segment pages used */ 1 24 3 dir_disk_use fixed bin (35), /* total directory pages used */ 1 25 3 misc_charges float bin, /* manuals, etc */ 1 26 3 n_misc fixed bin, /* number of entries */ 1 27 3 processed fixed bin, /* temp for usage-report */ 1 28 3 pad bit (36) aligned; /* out to even number of words */ 1 29 1 30 dcl loph int static fixed bin (17) options (constant) init (8), /* lth of projfile header */ 1 31 lope int static fixed bin (17) options (constant) init (66); /* lth of projflile entry */ 1 32 1 33 dcl PROJFILE_VERSION fixed bin init (3) int static options (constant); 1 34 1 35 /* END INCLUDE FILE ... projfile.incl.pl1 */ 67 68 69 /* - - - - */ 70 71 call system_info_$max_rs_number (rs_count); /* see if site has multiple rate structures */ 72 call hcs_$initiate ((get_wdir_ ()), "projfile", "", 0, 1, pp, ec); 73 if pp = null then do; 74 call com_err_ (ec, "print_disk", "projfile"); 75 return; 76 end; 77 78 do rs_number = 0 to hbound (disk_price, 1); /* get all rates */ 79 call system_info_$rs_name (rs_number, rs_name, ec); /* check if this is a valid rs_number */ 80 if ec ^= 0 then disk_price (rs_number) = disk_price (0); /* assumes default rates are valid */ 81 else call system_info_$prices_rs (rs_number, dummy, dummy, dummy, dummy, disk_price (rs_number), dummy1); 82 end; 83 84 np = projfile.nproj; /* get number of projects */ 85 call system_info_$titles (coxx, dpxx); 86 call ioa_ ("^|^-^a^/^/^-^a", coxx, dpxx); 87 call ioa_ ("^/^/^-Disk usage report"); 88 call ioa_ (head); /* write heading. */ 89 call ioa_ (dash); /* .. */ 90 91 do i = 1 to np; /* loop on all projects */ 92 if id (i) = "" then go to skip; 93 if off (i) ^= 0 then if disk_psec (i) = 0 then go to skip; 94 else tid = "*" || id (i); 95 else tid = id (i); 96 qta = disk_quota (i); /* extract project quota */ 97 use = disk_use (i); /* use */ 98 duse = dir_disk_use (i); 99 temp = disk_psec (i); /* page-seconds */ 100 if rs_count > 0 then do; /* only if site has multiple rate structures */ 101 call search_sat_$rs_number ((id (i)), rs_number, ec); /* get rate index */ 102 if ec ^= 0 then 103 if ec = error_table_$noentry then 104 call com_err_ (ec, 105 "print_disk", 106 "Trying to locate project ""^a"" in the sat. Default rates will be used.", id (i)); 107 else call com_err_ (ec, "print_disk", "Accessing the sat. Default rates will be used"); 108 end; 109 else rs_number = 0; 110 dols = temp * disk_price (rs_number); /* compute charge */ 111 tdols = tdols + dols; /* accumulate totals */ 112 tqta = tqta + qta; 113 tuse = tuse + use; 114 tduse = tduse + duse; 115 call ioa_ (format, tid, qta, use, duse, dols); 116 skip: end; 117 call ioa_ (dash); /* write footing */ 118 call ioa_ (format, "TOTAL", tqta, tuse, tduse, tdols); 119 call hcs_$terminate_noname (pp, ec); /* terminate input */ 120 if rs_count > 0 then call search_sat_$clean_up; /* tidy up */ 121 end print_disk; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/18/84 0758.4 print_disk.pl1 >special_ldd>online>09/18/84>print_disk.pl1 67 1 09/18/84 1000.6 projfile.incl.pl1 >special_ldd>online>09/18/84>projfile.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. com_err_ 000100 constant entry external dcl 43 ref 74 102 107 coxx 000105 automatic char(64) dcl 22 set ref 85* 86* dash 000035 internal static char(54) initial dcl 60 set ref 89* 117* dir_disk_use 105 based fixed bin(35,0) array level 3 dcl 1-6 ref 98 disk_price 000160 automatic float bin(27) array dcl 22 set ref 78 80* 80 81* 110 disk_psec 100 based fixed bin(71,0) array level 3 dcl 1-6 ref 93 99 disk_quota 102 based fixed bin(35,0) array level 3 dcl 1-6 ref 96 disk_use 104 based fixed bin(35,0) array level 3 dcl 1-6 ref 97 dols 000150 automatic float bin(27) dcl 22 set ref 110* 111 115* dpxx 000125 automatic char(64) dcl 22 set ref 85* 86* dummy 000173 automatic float bin(27) array dcl 22 set ref 81* 81* 81* 81* dummy1 000172 automatic float bin(27) dcl 22 set ref 81* duse 000156 automatic fixed bin(35,0) dcl 22 set ref 98* 114 115* ec 000205 automatic fixed bin(35,0) dcl 38 set ref 72* 74* 79* 80 101* 102 102 102* 107* 119* error_table_$noentry 000102 external static fixed bin(35,0) dcl 56 ref 102 format 000010 internal static char(32) initial dcl 60 set ref 115* 118* get_wdir_ 000054 constant entry external dcl 43 ref 72 hbound builtin function dcl 58 ref 78 hcs_$initiate 000074 constant entry external dcl 43 ref 72 hcs_$terminate_noname 000076 constant entry external dcl 43 ref 119 head 000020 internal static char(49) initial dcl 60 set ref 88* i 000203 automatic fixed bin(17,0) dcl 22 set ref 91* 92 93 93 94 95 96 97 98 99 101 102* id 10 based char(12) array level 3 packed unaligned dcl 1-6 set ref 92 94 95 101 102* ioa_ 000072 constant entry external dcl 43 ref 86 87 88 89 115 117 118 np 000204 automatic fixed bin(17,0) dcl 22 set ref 84* 91 nproj based fixed bin(35,0) level 2 dcl 1-6 ref 84 null builtin function dcl 58 ref 73 off 76 based fixed bin(71,0) array level 3 dcl 1-6 ref 93 pp 000100 automatic pointer dcl 22 set ref 72* 73 84 92 93 93 94 95 96 97 98 99 101 102 119* projfile based structure level 1 dcl 1-6 projfiletab 10 based structure array level 2 dcl 1-6 qta 000155 automatic fixed bin(35,0) dcl 22 set ref 96* 112 115* rs_count 000217 automatic fixed bin(17,0) dcl 41 set ref 71* 100 120 rs_name 000207 automatic char(32) unaligned dcl 40 set ref 79* rs_number 000206 automatic fixed bin(17,0) dcl 39 set ref 78* 79* 80 81* 81* 101* 109* 110 search_sat_$clean_up 000070 constant entry external dcl 43 ref 120 search_sat_$rs_number 000066 constant entry external dcl 43 ref 101 system_info_$max_rs_number 000064 constant entry external dcl 43 ref 71 system_info_$prices_rs 000060 constant entry external dcl 43 ref 81 system_info_$rs_name 000062 constant entry external dcl 43 ref 79 system_info_$titles 000056 constant entry external dcl 43 ref 85 tdols 000151 automatic float bin(27) initial dcl 22 set ref 22* 111* 111 118* tduse 000153 automatic fixed bin(35,0) initial dcl 22 set ref 22* 114* 114 118* temp 000146 automatic fixed bin(71,0) dcl 22 set ref 99* 110 tid 000102 automatic char(9) dcl 22 set ref 94* 95* 115* tqta 000152 automatic fixed bin(35,0) initial dcl 22 set ref 22* 112* 112 118* tuse 000154 automatic fixed bin(35,0) initial dcl 22 set ref 22* 113* 113 118* use 000157 automatic fixed bin(35,0) dcl 22 set ref 97* 113 115* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. PROJFILE_VERSION internal static fixed bin(17,0) initial dcl 1-33 dn automatic char(168) dcl 22 en automatic char(32) dcl 22 hp automatic pointer dcl 22 lope internal static fixed bin(17,0) initial dcl 1-30 loph internal static fixed bin(17,0) initial dcl 1-30 path automatic char(168) dcl 22 NAMES DECLARED BY EXPLICIT CONTEXT. print_disk 000112 constant entry external dcl 11 skip 000710 constant label dcl 116 ref 92 93 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1152 1256 1002 1162 Length 1470 1002 104 176 150 44 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME print_disk 226 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 format print_disk 000020 head print_disk 000035 dash print_disk STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME print_disk 000100 pp print_disk 000102 tid print_disk 000105 coxx print_disk 000125 dpxx print_disk 000146 temp print_disk 000150 dols print_disk 000151 tdols print_disk 000152 tqta print_disk 000153 tduse print_disk 000154 tuse print_disk 000155 qta print_disk 000156 duse print_disk 000157 use print_disk 000160 disk_price print_disk 000172 dummy1 print_disk 000173 dummy print_disk 000203 i print_disk 000204 np print_disk 000205 ec print_disk 000206 rs_number print_disk 000207 rs_name print_disk 000217 rs_count print_disk THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ get_wdir_ hcs_$initiate hcs_$terminate_noname ioa_ search_sat_$clean_up search_sat_$rs_number system_info_$max_rs_number system_info_$prices_rs system_info_$rs_name system_info_$titles THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noentry LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000111 22 000117 71 000124 72 000132 73 000207 74 000213 75 000242 78 000243 79 000247 80 000270 81 000276 82 000317 84 000321 85 000323 86 000337 87 000365 88 000401 89 000412 91 000423 92 000433 93 000443 94 000451 95 000466 96 000474 97 000477 98 000501 99 000503 100 000505 101 000507 102 000535 107 000600 108 000627 109 000630 110 000631 111 000637 112 000641 113 000645 114 000651 115 000655 116 000710 117 000712 118 000723 119 000760 120 000771 121 001000 ----------------------------------------------------------- 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