COMPILATION LISTING OF SEGMENT display_mrds_temp_dir Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1013.4 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 /* HISTORY: 19* 20* Originally written by Jim Gray - - August 1979 21* Modified by Jim Gray - - 80,9-24, to make use of the new common 22* routine dsl_$get_opening_temp_dir, for getting the temp dir of a particular opening. 23* 24**/ 25 26 display_mrds_temp_dir: dmtd: procedure (); 27 28 /* DESCRIPTION: 29* 30* this routine is called from command level with one argument, 31* to display either the temporary storage that is being 32* used by a currently open MRDS database by giving the 33* database index returned by the call to dsl_$open, 34* or the current temporary directory that would be used 35* by the next call to dsl_$open by giving "-cur" 36* or "-current" as the argument, instead of a database index. 37* the display is a pathname down the temporary directory. 38* the current pathname can be changed by a call to the command 39* set_mrds_temp_dir, giving the new path as the argument. 40* 41**/ 42 43 /* PARAMETERS: 44* 45* database_index - - (input) an integer between 1 and 64, that was returned by 46* a call to dsl_$open, for that particular database opening. 47* both a database index and the "-current" argument can not be given. 48* 49* option - - (input) either "-current" or "-cur" may be given in place of a database 50* index, but not both. 51* 52* temporary_directory - - (output) pathname donw to the directory where temporary storage will/is to be stored. 53* if a database index was the input, the temporary storage directory 54* for that opening is dislayed, for the -current option, the temporary directory 55* that would be used for the next open will be displayed. 56* 57* error_messages - - (output) via com_err_, in case unrecogizable, insufficient, 58* or invalid arguments are given 59* 60**/ 61 62 /* check for only one argument */ 63 64 call cu_$arg_count (nargs); 65 if nargs ^= 1 then 66 call com_err_ (error_table_$wrong_no_of_args, caller_name, "^/^a ^d ^a", 67 "The number of arguments =", nargs, "was not 1, either a database index, or ""-current"" option."); 68 else do; 69 70 /* get the argument, and check for option or index */ 71 72 call cu_$arg_ptr (1, arg_ptr, arg_len, error_code); 73 if error_code ^= 0 then 74 call com_err_ (error_code, caller_name, "^/^a", "Unable to obtain the given argument."); 75 else do; 76 if argument = "-current" | argument = "-cur" then do; 77 78 /* get current status of temporary directory pathname */ 79 80 pathname = mrds_dsl_resultant_storage$get (); 81 call display_path (ON); 82 end; 83 else do; 84 85 /* check for a valid database index */ 86 87 valid_index = ON; 88 if verify (argument, "0123456789") ^= 0 | length (argument) > 2 then valid_index = OFF; 89 else do; 90 database_index = fixed (argument); 91 if database_index < 1 | database_index > mrds_data_$max_dbs then valid_index = OFF; 92 end; 93 if ^valid_index then call com_err_ (error_table_$bad_arg, caller_name, "^/^a^a^a ^d^a", 94 "The database index argument """, argument, 95 """ is not an integer between 1 and", mrds_data_$max_dbs, "."); 96 else do; 97 98 /* good index, get a pathname from the dbcb segment pointer */ 99 100 pathname = mrds_dsl_resultant_storage$get_opening_temp_dir (database_index, error_code); 101 if error_code ^= 0 then 102 call com_err_ (error_code, caller_name, "^/^a^d^a", 103 "The database index """, database_index, 104 """ could not be expanded into a temporary directory pathname."); 105 else call display_path (OFF); 106 end; 107 end; 108 end; 109 return; 110 end; 111 112 display_path: procedure (current_option); 113 114 /* output the temporary directory pathname obtained */ 115 116 if pathname = BLANK then do; 117 118 call ioa_ ("^/The temporary directory is not set, it will default to the user's process directory.^/"); 119 120 end; 121 122 else do; 123 124 if current_option then 125 call ioa_ ("^/The current temporary directory is:^/"); 126 else call ioa_ ("^/The temporary directory for database index ^d is:^/", database_index); 127 128 call ioa_ ("^a^/", pathname); 129 130 end; 131 132 133 134 declare current_option bit (1); /* on => -current option, else database index */ 135 136 end; 137 138 declare BLANK char (1) init (" "); /* space character */ 139 declare mrds_dsl_resultant_storage$get_opening_temp_dir entry (fixed bin (35), fixed bin (35)) 140 returns (char (168)); /* gets temp dir for db index */ 141 declare database_index fixed bin (35); /* opening index */ 142 declare error_code fixed bin (35); /* error status encoding */ 143 declare caller_name char (21) init ("display_mrds_temp_dir"); /* name of calling routine */ 144 declare pathname char (168); /* temp dir path to be displayed */ 145 declare error_table_$bad_arg fixed bin (35) ext;/* bad command argument */ 146 declare error_table_$wrong_no_of_args fixed bin (35) ext; /* arg count ^= 1 */ 147 declare nargs fixed bin; /* current argument count */ 148 declare cu_$arg_count entry (fixed bin); /* gets number of arguments */ 149 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); /* gets argument */ 150 declare arg_ptr ptr; /* points to argument */ 151 declare arg_len fixed bin (21); /* length of argument */ 152 declare argument char (arg_len) based (arg_ptr); /* input argument */ 153 declare com_err_ entry options (variable); /* reports errors */ 154 declare mrds_dsl_resultant_storage$get entry returns (char (168)); /* gets current temp dir */ 155 declare ioa_ entry options (variable); /* displays/formats pathname */ 156 declare (verify, length, fixed) builtin; 157 declare ON bit (1) init ("1"b); /* true value */ 158 declare OFF bit (1) init ("0"b); /* false value */ 159 declare valid_index bit (1); /* on => good db index value */ 160 declare mrds_data_$max_dbs fixed bin (35) ext;/* most open dbs at one time */ 161 162 163 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0906.3 display_mrds_temp_dir.pl1 >special_ldd>online>mrds.pbf-04/18/85>display_mrds_temp_dir.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. BLANK 000100 automatic char(1) initial unaligned dcl 138 set ref 116 138* OFF 000170 automatic bit(1) initial unaligned dcl 158 set ref 88 91 105* 158* ON 000167 automatic bit(1) initial unaligned dcl 157 set ref 81* 87 157* arg_len 000166 automatic fixed bin(21,0) dcl 151 set ref 72* 76 76 88 88 90 93 93 arg_ptr 000164 automatic pointer dcl 150 set ref 72* 76 76 88 88 90 93 argument based char unaligned dcl 152 set ref 76 76 88 88 90 93* caller_name 000103 automatic char(21) initial unaligned dcl 143 set ref 65* 73* 93* 101* 143* com_err_ 000022 constant entry external dcl 153 ref 65 73 93 101 cu_$arg_count 000016 constant entry external dcl 148 ref 64 cu_$arg_ptr 000020 constant entry external dcl 149 ref 72 current_option parameter bit(1) unaligned dcl 134 ref 112 124 database_index 000101 automatic fixed bin(35,0) dcl 141 set ref 90* 91 91 100* 101* 126* error_code 000102 automatic fixed bin(35,0) dcl 142 set ref 72* 73 73* 100* 101 101* error_table_$bad_arg 000012 external static fixed bin(35,0) dcl 145 set ref 93* error_table_$wrong_no_of_args 000014 external static fixed bin(35,0) dcl 146 set ref 65* fixed builtin function dcl 156 ref 90 ioa_ 000026 constant entry external dcl 155 ref 118 124 126 128 length builtin function dcl 156 ref 88 mrds_data_$max_dbs 000030 external static fixed bin(35,0) dcl 160 set ref 91 93* mrds_dsl_resultant_storage$get 000024 constant entry external dcl 154 ref 80 mrds_dsl_resultant_storage$get_opening_temp_dir 000010 constant entry external dcl 139 ref 100 nargs 000163 automatic fixed bin(17,0) dcl 147 set ref 64* 65 65* pathname 000111 automatic char(168) unaligned dcl 144 set ref 80* 100* 116 128* valid_index 000171 automatic bit(1) unaligned dcl 159 set ref 87* 88* 91* 93 verify builtin function dcl 156 ref 88 NAMES DECLARED BY EXPLICIT CONTEXT. display_mrds_temp_dir 000260 constant entry external dcl 26 display_path 000700 constant entry internal dcl 112 ref 81 105 dmtd 000250 constant entry external dcl 26 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1356 1410 1216 1366 Length 1606 1216 32 161 140 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dmtd 383 external procedure is an external procedure. display_path internal procedure shares stack frame of external procedure dmtd. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dmtd 000100 BLANK dmtd 000101 database_index dmtd 000102 error_code dmtd 000103 caller_name dmtd 000111 pathname dmtd 000163 nargs dmtd 000164 arg_ptr dmtd 000166 arg_len dmtd 000167 ON dmtd 000170 OFF dmtd 000171 valid_index dmtd THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry any_to_any_tr THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr ioa_ mrds_dsl_resultant_storage$get mrds_dsl_resultant_storage$get_opening_temp_dir THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$wrong_no_of_args mrds_data_$max_dbs LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 138 000235 143 000237 157 000242 158 000244 26 000247 64 000266 65 000275 72 000351 73 000370 76 000425 80 000437 81 000446 82 000450 87 000451 88 000454 90 000476 91 000510 93 000521 100 000607 101 000622 105 000674 109 000676 163 000677 112 000700 116 000702 118 000706 120 000722 124 000723 126 000745 128 000765 136 001004 ----------------------------------------------------------- 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