COMPILATION LISTING OF SEGMENT clean_card_pool Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/27/85 1133.3 mst Wed 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 clean_card_pool: proc; 12 13 /* Originally written in Feb 1975 by Stan C. Vestal */ 14 15 dcl age fixed bin; /* age of entries to delete */ 16 dcl age_flag bit (1) aligned init ("0"b); /* on if -age specified */ 17 dcl arglen fixed bin; /* length of an argument */ 18 dcl argptr ptr init (null); /* pointer to argument */ 19 dcl argstr char (arglen) based (argptr); /* argument overlay */ 20 dcl card_dir char (168) aligned int static init ("System_Card_Pool"); /* path for the card pool root */ 21 dcl code fixed bin (35); /* error return code */ 22 dcl default_npages fixed bin; /* default grace_quota */ 23 dcl entry char (15); /* entryname of the entry point called */ 24 dcl grace_flag bit (1) aligned init ("0"b); /* on if -grace_quota specified */ 25 dcl grace_quota fixed bin; /* quota to leave on undeleted pool dirs */ 26 dcl i fixed bin; /* loop index */ 27 dcl keyword char (168) aligned; /* pool name */ 28 dcl nargs fixed bin; /* number of arguments called with */ 29 dcl tape_dir char (168) aligned int static init ("System_Tape_Pool"); /* path for the tape pool root */ 30 dcl (error_table_$wrong_no_of_args, 31 error_table_$noarg, 32 error_table_$bad_arg) ext fixed bin (35); 33 34 dcl (substr, null) builtin; 35 36 dcl cu_$arg_count entry (fixed bin); 37 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 38 dcl cv_dec_check_ entry (char (*), fixed bin (35)) returns (fixed bin); 39 dcl pool_manager_$clean_pool entry (char (*) aligned, fixed bin, fixed bin, fixed bin (35)); 40 dcl (com_err_, ioa_) entry options (variable); 41 42 43 /* */ 44 45 /* clean_card_pool entry point */ 46 47 entry = "clean_card_pool"; /* for com_err_ calls */ 48 keyword = card_dir; 49 default_npages = 0; /* leave no spare pages for cards */ 50 go to COMMON; 51 52 53 /* clean_tape_pool entry */ 54 55 clean_tape_pool: entry; 56 57 entry = "clean_tape_pool"; 58 keyword = tape_dir; 59 default_npages = 50; /* more sharing in the tape pool */ 60 61 62 /* Common processing */ 63 64 COMMON: 65 grace_quota = default_npages; /* assign the defaults in case user supplies no arguments */ 66 age = -1; /* start with an illegal value to be sure it is set */ 67 68 call cu_$arg_count (nargs); 69 if nargs = 0 then go to PRINT_HELP; /* give the user some advice */ 70 71 if nargs ^= 2 & nargs ^= 4 then do; /* arguments must be in pairs */ 72 code = error_table_$wrong_no_of_args; 73 go to ERROR; 74 end; 75 76 do i = 1 to nargs; /* process the arguments */ 77 call cu_$arg_ptr (i, argptr, arglen, code); 78 if code ^= 0 then go to ERROR; 79 if age_flag then do; /* already seen the -age argument */ 80 age_flag = "0"b; 81 age = cv_dec_check_ (argstr, code); /* this argument must be ndays */ 82 if code ^= 0 | age < 0 then go to arg_err; 83 go to end_arg_loop; 84 end; 85 86 if grace_flag then do; /* already seen the -grace_quota argument */ 87 grace_flag = "0"b; 88 grace_quota = cv_dec_check_ (argstr, code); 89 if code ^= 0 | grace_quota < 0 then go to arg_err; 90 go to end_arg_loop; 91 end; 92 93 if argstr = "-age" then do; /* -age found */ 94 age_flag = "1"b; 95 go to end_arg_loop; 96 end; 97 98 if argstr = "-quota" then do; 99 grace_flag = "1"b; /* -quota found */ 100 go to end_arg_loop; 101 end; 102 103 104 arg_err: 105 106 code = error_table_$bad_arg; /* unknown argument */ 107 call com_err_ (code, entry, "^a", substr (argstr, 1, arglen)); 108 return; 109 end_arg_loop: 110 end; 111 112 if age < 0 then do; /* true if age arg was not given */ 113 call com_err_ (error_table_$noarg, entry, "The ""-age N"" control arg must be given."); 114 return; 115 end; 116 117 118 code = 0; /* initialize the return code */ 119 120 call pool_manager_$clean_pool (keyword, age, grace_quota, code); 121 122 ERROR: if code ^= 0 then do; 123 call com_err_ (code, entry); 124 return; 125 end; 126 127 call ioa_ ("All entries older than ^d days have been removed.", age); 128 129 return; 130 131 132 /* help for operators */ 133 134 PRINT_HELP: 135 call ioa_ ("Usage is: ^a -age ndays [-quota npages]", entry); 136 137 call ioa_ ("Where ndays is the time segments are allowed to remain in the pool, and npages 138 is the amount of unused quota for sharing among users of an access class. 139 When quota is not specified, the default is ^d pages.", default_npages); 140 141 return; 142 143 144 test_card_pool: entry (dir); /* entry to set the card pool root dirname */ 145 146 dcl dir char (*); 147 148 card_dir = dir; 149 return; 150 151 152 test_tape_pool: entry (dir); /* entry to set the tape pool root dirname */ 153 154 tape_dir = dir; 155 return; 156 157 end clean_card_pool; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/27/85 1132.0 clean_card_pool.pl1 >spec>on>7.ds>clean_card_pool.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. age 000100 automatic fixed bin(17,0) dcl 15 set ref 66* 81* 82 112 120* 127* age_flag 000101 automatic bit(1) initial dcl 16 set ref 16* 79 80* 94* arglen 000102 automatic fixed bin(17,0) dcl 17 set ref 77* 81 81 88 88 93 98 107 107 107 107 argptr 000104 automatic pointer initial dcl 18 set ref 18* 77* 81 88 93 98 107 107 argstr based char unaligned dcl 19 set ref 81* 88* 93 98 107 107 card_dir 000010 internal static char(168) initial dcl 20 set ref 48 148* code 000106 automatic fixed bin(35,0) dcl 21 set ref 72* 77* 78 81* 82 88* 89 104* 107* 118* 120* 122 123* com_err_ 000152 constant entry external dcl 40 ref 107 113 123 cu_$arg_count 000142 constant entry external dcl 36 ref 68 cu_$arg_ptr 000144 constant entry external dcl 37 ref 77 cv_dec_check_ 000146 constant entry external dcl 38 ref 81 88 default_npages 000107 automatic fixed bin(17,0) dcl 22 set ref 49* 59* 64 137* dir parameter char unaligned dcl 146 ref 144 148 152 154 entry 000110 automatic char(15) unaligned dcl 23 set ref 47* 57* 107* 113* 123* 134* error_table_$bad_arg 000140 external static fixed bin(35,0) dcl 30 ref 104 error_table_$noarg 000136 external static fixed bin(35,0) dcl 30 set ref 113* error_table_$wrong_no_of_args 000134 external static fixed bin(35,0) dcl 30 ref 72 grace_flag 000114 automatic bit(1) initial dcl 24 set ref 24* 86 87* 99* grace_quota 000115 automatic fixed bin(17,0) dcl 25 set ref 64* 88* 89 120* i 000116 automatic fixed bin(17,0) dcl 26 set ref 76* 77* ioa_ 000154 constant entry external dcl 40 ref 127 134 137 keyword 000117 automatic char(168) dcl 27 set ref 48* 58* 120* nargs 000171 automatic fixed bin(17,0) dcl 28 set ref 68* 69 71 71 76 null builtin function dcl 34 ref 18 pool_manager_$clean_pool 000150 constant entry external dcl 39 ref 120 substr builtin function dcl 34 ref 107 107 tape_dir 000062 internal static char(168) initial dcl 29 set ref 58 154* NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 000230 constant label dcl 64 ref 50 ERROR 000533 constant label dcl 122 ref 73 78 PRINT_HELP 000574 constant label dcl 134 set ref 69 arg_err 000412 constant label dcl 104 ref 82 89 clean_card_pool 000170 constant entry external dcl 11 clean_tape_pool 000211 constant entry external dcl 55 end_arg_loop 000455 constant label dcl 109 ref 83 90 95 100 test_card_pool 000640 constant entry external dcl 144 test_tape_pool 000666 constant entry external dcl 152 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1062 1240 712 1072 Length 1430 712 156 153 150 124 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME clean_card_pool 227 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 card_dir clean_card_pool 000062 tape_dir clean_card_pool STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME clean_card_pool 000100 age clean_card_pool 000101 age_flag clean_card_pool 000102 arglen clean_card_pool 000104 argptr clean_card_pool 000106 code clean_card_pool 000107 default_npages clean_card_pool 000110 entry clean_card_pool 000114 grace_flag clean_card_pool 000115 grace_quota clean_card_pool 000116 i clean_card_pool 000117 keyword clean_card_pool 000171 nargs clean_card_pool THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr cv_dec_check_ ioa_ pool_manager_$clean_pool THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$noarg error_table_$wrong_no_of_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 16 000161 18 000162 24 000164 11 000167 47 000176 48 000202 49 000206 50 000207 55 000210 57 000217 58 000222 59 000226 64 000230 66 000232 68 000234 69 000242 71 000244 72 000250 73 000253 76 000254 77 000263 78 000300 79 000302 80 000304 81 000305 82 000331 83 000335 86 000336 87 000340 88 000341 89 000365 90 000371 93 000372 94 000400 95 000402 98 000403 99 000407 100 000411 104 000412 107 000415 108 000453 109 000455 112 000457 113 000461 114 000505 118 000506 120 000507 122 000533 123 000535 124 000552 127 000553 129 000573 134 000574 137 000614 141 000634 144 000635 148 000654 149 000663 152 000664 154 000702 155 000711 ----------------------------------------------------------- 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