COMPILATION LISTING OF SEGMENT linus_opened_database Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 0951.2 mst Tue Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1986 * 4* * * 5* *********************************************************** */ 6 /****^ HISTORY COMMENTS: 7* 1) change(86-01-07,Dupuis), approve(86-05-23,MCR7404), audit(86-07-23,GWMay), 8* install(86-07-29,MR12.0-1106): 9* /* This is the main level procedure called by ssu_ to implement the 10* linus opened_database request. 11* END HISTORY COMMENTS */ 12 /* 13* Description: 14* 15* This request returns true or false to indicate if a databse is opened 16* or closed. 17* 18* Usage: "opened_database {database_pathname}" 19* 20* where database_pathname is the name of a mrds database. If this 21* isn't supplied, true is returned if a database is currently opened. 22**/ 23 /* format: off */ 24 25 linus_opened_database: proc ( 26 27 sci_ptr_parm, /* input: ptr to the subsystem control info structure */ 28 lcb_ptr_parm /* input: ptr to the linus control block info structure */ 29 ); 30 31 dcl lcb_ptr_parm ptr parm; 32 dcl sci_ptr_parm ptr parm; 33 34 call initialize; 35 call check_for_opened_database; 36 37 return; 38 39 check_for_opened_database: proc; 40 41 dcl cfod_code fixed bin (35); 42 dcl cfod_dir_name_1 char (168); 43 dcl cfod_dir_name_2 char (168); 44 dcl cfod_entry_name_1 char (32); 45 dcl cfod_entry_name_2 char (32); 46 dcl cfod_db_pathname char (168) varying; 47 dcl cfod_opening_mode char (20); 48 dcl cfod_suffix char (3); 49 dcl cfod_uid_1 bit (36) aligned; 50 dcl cfod_uid_2 bit (36) aligned; 51 52 if number_of_args_supplied = 0 | lcb.db_index = 0 53 then do; 54 if lcb.db_index ^= 0 55 then return_value = "true"; 56 return; 57 end; 58 59 call dsl_$get_pn (lcb.db_index, cfod_db_pathname, cfod_opening_mode, cfod_code); 60 if cfod_code ^= 0 61 then call ssu_$abort_line (sci_ptr, cfod_code, 62 "^/Unable to get the database pathname."); 63 64 call expand_pathname_ ((cfod_db_pathname), cfod_dir_name_1, cfod_entry_name_1, (0)); 65 call hcs_$get_uid_file (cfod_dir_name_1, cfod_entry_name_1, cfod_uid_1, cfod_code); 66 if cfod_code ^= 0 67 then call ssu_$abort_line (sci_ptr, cfod_code, 68 "^/Unable to get the uid of the opened database."); 69 70 call ssu_$arg_ptr (sci_ptr, 1, arg_ptr, arg_length); 71 cfod_suffix = reverse (before (reverse (arg), ".")); 72 call expand_pathname_$add_suffix (arg, cfod_suffix, 73 cfod_dir_name_2, cfod_entry_name_2, cfod_code); 74 if cfod_code ^= 0 75 then call ssu_$abort_line (sci_ptr, cfod_code, 76 "^/^a could not be expanded.", arg); 77 call hcs_$get_uid_file (cfod_dir_name_2, cfod_entry_name_2, cfod_uid_2, cfod_code); 78 if cfod_code ^= 0 79 then if cfod_code = error_table_$noentry 80 then return; 81 else call ssu_$abort_line (sci_ptr, cfod_code, 82 "^/Unable to get the uid for the supplied arg pathname."); 83 if cfod_uid_1 = cfod_uid_2 84 then return_value = "true"; 85 86 return; 87 88 end check_for_opened_database; 89 90 initialize: proc; 91 92 sci_ptr = sci_ptr_parm; 93 lcb_ptr = lcb_ptr_parm; 94 95 call ssu_$return_arg (sci_ptr, number_of_args_supplied, 96 active_request_flag, return_value_ptr, return_value_length); 97 return_value = "false"; 98 if number_of_args_supplied > 1 99 then call ssu_$abort_line (sci_ptr, error_table_$too_many_args, USAGE_MESSAGE); 100 101 return; 102 103 end initialize; 104 105 dcl USAGE_MESSAGE char (44) internal static options (constant) init ( 106 "^/Usage: opened_database {database_pathname}"); 107 108 dcl active_request_flag bit (1) aligned; 109 dcl addr builtin; 110 dcl after builtin; 111 dcl arg char (arg_length) based (arg_ptr); 112 dcl arg_length fixed bin (21); 113 dcl arg_ptr ptr; 114 115 dcl before builtin; 116 117 dcl dsl_$get_pn entry (fixed bin(35), char(168) var, char(20), fixed bin(35)); 118 119 dcl error_table_$noentry fixed bin(35) ext static; 120 dcl error_table_$too_many_args fixed bin(35) ext static; 121 dcl expand_pathname_ entry (char(*), char(*), char(*), fixed bin(35)); 122 dcl expand_pathname_$add_suffix entry (char(*), char(*), char(*), char(*), fixed bin(35)); 123 124 dcl fixed builtin; 125 126 dcl hcs_$get_uid_file entry (char(*), char(*), bit(36) aligned, fixed bin(35)); 127 128 dcl index builtin; 129 130 dcl number_of_args_supplied fixed bin; 131 132 dcl rel builtin; 133 dcl return_value char (return_value_length) varying based (return_value_ptr); 134 dcl return_value_length fixed bin (21); 135 dcl return_value_ptr ptr; 136 dcl reverse builtin; 137 138 dcl sci_ptr ptr; 139 dcl ssu_$abort_line entry() options(variable); 140 dcl ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin(21)); 141 dcl ssu_$return_arg entry (ptr, fixed bin, bit(1) aligned, ptr, fixed bin(21)); 142 dcl sys_info$max_seg_size fixed bin(35) ext static; 143 144 1 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 1 7* install(86-07-29,MR12.0-1106): 1 8* Added general_work_area_ptr and renamed sfr_ptr to 1 9* force_retrieve_scope_ptr. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* HISTORY: 1 14* 1 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 1 16* 1 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 1 18* a part of the attribute level control work. 1 19* 1 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 1 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 1 22* scope information. 1 23* 1 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 1 25* retaining various vcpu times to be collected when in timing mode. The 1 26* times to be collected are: LINUS parsing time, LINUS processing time, and 1 27* MRDS processing time. 1 28* 1 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 1 30* part of the line numbering implementation. This allows for possible later 1 31* LINUS control of the build defaults. 1 32* 1 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 1 34* information is now retained by ssu_. Removed parse_timer as no longer 1 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 1 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 1 37* 1 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 1 39* subsystem_invocation_level, and selection_expression_identifier. 1 40* 1 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 1 42* table_control_info_ptr. 1 43* 1 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 1 45* 1 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 1 47* 1 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 1 49* 1 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 1 51**/ 1 52 1 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 1 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 1 55 2 rb_len fixed bin (21), /* length of request buffer */ 1 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 1 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 1 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 1 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 1 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 1 61 2 test_flag bit (1) unal, /* on if in test mode */ 1 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 1 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 1 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 1 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 1 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 1 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 1 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 1 69 2 reserved bit (27) unal, 1 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 1 71 2 rb_ptr ptr, /* ptr to request buffer */ 1 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 1 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 1 74 2 ttn_ptr ptr, /* pointer to table info structure */ 1 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 1 76 2 lv_ptr ptr, /* pointer linus variables */ 1 77 2 si_ptr ptr, /* pointer to select_info structure */ 1 78 2 setfi_ptr ptr, /* pointer to set function information */ 1 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 1 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 1 81 2 lit_ptr ptr, /* pointer to literal pool */ 1 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 1 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 1 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 1 85* (MR7.0) */ 1 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 1 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 1 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 1 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 1 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 1 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 1 92* for current lila expression */ 1 93 2 unused_timer float bin (63), /* future expansion */ 1 94 2 request_time float bin (63), /* How much request time was spent 1 95* in LINUS. (-1 = user has just enabled 1 96* timing, do not report) */ 1 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 1 98 2 build_increment fixed bin, /* default increment for build mode */ 1 99 2 build_start fixed bin, /* default start count for build mode */ 1 100 2 linus_version char (4), /* current version of LINUS */ 1 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 1 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 1 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 1 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 1 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 1 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 1 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 1 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 1 109 2 word_pad (6) bit (36) unal, 1 110 /* procedures that will be optionally */ 1 111 /* replaced by the user. Saved so they */ 1 112 /* can be reinstated if desired. */ 1 113 2 ssu_abort_line entry options (variable), 1 114 2 ssu_post_request_line variable entry (ptr), 1 115 2 ssu_pre_request_line variable entry (ptr), 1 116 1 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 1 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 1 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 1 120 1 121 dcl lcb_ptr ptr; 1 122 1 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 145 146 147 end linus_opened_database; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0938.5 linus_opened_database.pl1 >special_ldd>install>MR12.0-1106>linus_opened_database.pl1 145 1 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.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. USAGE_MESSAGE 000000 constant char(44) initial unaligned dcl 105 set ref 98* active_request_flag 000100 automatic bit(1) dcl 108 set ref 95* arg based char unaligned dcl 111 set ref 71 72* 74* arg_length 000101 automatic fixed bin(21,0) dcl 112 set ref 70* 71 72 72 74 74 arg_ptr 000102 automatic pointer dcl 113 set ref 70* 71 72 74 before builtin function dcl 115 ref 71 cfod_code 000122 automatic fixed bin(35,0) dcl 41 set ref 59* 60 60* 65* 66 66* 72* 74 74* 77* 78 78 81* cfod_db_pathname 000267 automatic varying char(168) dcl 46 set ref 59* 64 cfod_dir_name_1 000123 automatic char(168) unaligned dcl 42 set ref 64* 65* cfod_dir_name_2 000175 automatic char(168) unaligned dcl 43 set ref 72* 77* cfod_entry_name_1 000247 automatic char(32) unaligned dcl 44 set ref 64* 65* cfod_entry_name_2 000257 automatic char(32) unaligned dcl 45 set ref 72* 77* cfod_opening_mode 000342 automatic char(20) unaligned dcl 47 set ref 59* cfod_suffix 000347 automatic char(3) unaligned dcl 48 set ref 71* 72* cfod_uid_1 000350 automatic bit(36) dcl 49 set ref 65* 83 cfod_uid_2 000351 automatic bit(36) dcl 50 set ref 77* 83 db_index based fixed bin(35,0) level 2 dcl 1-53 set ref 52 54 59* dsl_$get_pn 000010 constant entry external dcl 117 ref 59 error_table_$noentry 000012 external static fixed bin(35,0) dcl 119 ref 78 error_table_$too_many_args 000014 external static fixed bin(35,0) dcl 120 set ref 98* expand_pathname_ 000016 constant entry external dcl 121 ref 64 expand_pathname_$add_suffix 000020 constant entry external dcl 122 ref 72 hcs_$get_uid_file 000022 constant entry external dcl 126 ref 65 77 lcb based structure level 1 dcl 1-53 lcb_ptr 000112 automatic pointer dcl 1-121 set ref 52 54 59 93* lcb_ptr_parm parameter pointer dcl 31 ref 25 93 number_of_args_supplied 000104 automatic fixed bin(17,0) dcl 130 set ref 52 95* 98 return_value based varying char dcl 133 set ref 54* 83* 97* return_value_length 000105 automatic fixed bin(21,0) dcl 134 set ref 54 83 95* 97 return_value_ptr 000106 automatic pointer dcl 135 set ref 54 83 95* 97 reverse builtin function dcl 136 ref 71 71 sci_ptr 000110 automatic pointer dcl 138 set ref 60* 66* 70* 74* 81* 92* 95* 98* sci_ptr_parm parameter pointer dcl 32 ref 25 92 ssu_$abort_line 000024 constant entry external dcl 139 ref 60 66 74 81 98 ssu_$arg_ptr 000026 constant entry external dcl 140 ref 70 ssu_$return_arg 000030 constant entry external dcl 141 ref 95 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. addr builtin function dcl 109 after builtin function dcl 110 fixed builtin function dcl 124 index builtin function dcl 128 rel builtin function dcl 132 sys_info$max_seg_size external static fixed bin(35,0) dcl 142 NAMES DECLARED BY EXPLICIT CONTEXT. check_for_opened_database 000123 constant entry internal dcl 39 ref 35 initialize 000551 constant entry internal dcl 90 ref 34 linus_opened_database 000113 constant entry external dcl 25 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 766 1020 636 776 Length 1232 636 32 176 130 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_opened_database 334 external procedure is an external procedure. check_for_opened_database internal procedure shares stack frame of external procedure linus_opened_database. initialize internal procedure shares stack frame of external procedure linus_opened_database. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_opened_database 000100 active_request_flag linus_opened_database 000101 arg_length linus_opened_database 000102 arg_ptr linus_opened_database 000104 number_of_args_supplied linus_opened_database 000105 return_value_length linus_opened_database 000106 return_value_ptr linus_opened_database 000110 sci_ptr linus_opened_database 000112 lcb_ptr linus_opened_database 000122 cfod_code check_for_opened_database 000123 cfod_dir_name_1 check_for_opened_database 000175 cfod_dir_name_2 check_for_opened_database 000247 cfod_entry_name_1 check_for_opened_database 000257 cfod_entry_name_2 check_for_opened_database 000267 cfod_db_pathname check_for_opened_database 000342 cfod_opening_mode check_for_opened_database 000347 cfod_suffix check_for_opened_database 000350 cfod_uid_1 check_for_opened_database 000351 cfod_uid_2 check_for_opened_database THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry reverse_cs set_cs_eis THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. dsl_$get_pn expand_pathname_ expand_pathname_$add_suffix hcs_$get_uid_file ssu_$abort_line ssu_$arg_ptr ssu_$return_arg THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noentry error_table_$too_many_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 25 000107 34 000120 35 000121 37 000122 39 000123 52 000124 54 000130 56 000143 59 000144 60 000161 64 000207 65 000245 66 000273 70 000321 71 000340 72 000364 74 000421 77 000456 78 000503 81 000511 83 000534 86 000550 90 000551 92 000552 93 000556 95 000561 97 000600 98 000611 101 000635 ----------------------------------------------------------- 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