COMPILATION LISTING OF SEGMENT mrds_dsm_open Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-18_1123.27_Tue_mdt 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 mrds_dsm_open: proc (submodel_pn, iocb_ptr, code); 19 20 /* 21* This routine opens a submodel for either read, update, shared 22* read, or shared update depending on the entry used. it returns 23* either a zero error code and a pointer to the submodel iocb or a 24* non-zero error code and a null iocb pointer. The prinary entry 25* point mrds_dsm_open should never be called. The file is checked 26* to be sure its a valid submodel after opening and if its not a 27* valid submodel the file is closed and the error code 28* mrds_error_$not_dsm is returned. If for any reason the file 29* cannot be varified it is also closed and an error code returned. 30* 31* Known Bugs: 32* 33* Other Problems: 34* 35* HISTORY 36* 37* 81-01-22 Davids: written. 38* 39* 81-01-30 Davids: modified to verify that the file is really a 40* . submodel by calling mrds_dsm_read_header$version, If the 41* . error code returned is zero its a submodel. 42* 43* 81-04-24 Davids: added the update_share entry point. 44* 45* 83-06-17 Davids: Modified to return mrds_error_$version_1_dsm if the 46* submodel being opened is a version 1 submodel. A version 1 submodel 47* will not be opened 48**/ 49 50 /* PARAMETERS */ 51 52 dcl submodel_pn char (*); /* (input) path to submodel to be opened */ 53 dcl iocb_ptr ptr; /* (output) pointer to submodel iocb */ 54 dcl code fixed bin (35); /* (output) error code */ 55 56 /* AUTOMATIC */ 57 58 dcl atd char (200) init (""); /* attach description */ 59 dcl mode fixed bin; /* opening mode */ 60 61 /* BUILTIN */ 62 63 dcl null builtin; 64 dcl rtrim builtin; 65 66 /* EXTERNAL */ 67 68 dcl error_table_$badcall fixed bin (35) ext static; 69 70 iocb_ptr = null (); 71 code = error_table_$badcall; 72 return; 73 74 75 76 77 78 79 read: entry (submodel_pn, iocb_ptr, code); 80 81 atd = "vfile_ " || submodel_pn; 82 mode = 8; 83 call common; 84 return; 85 86 87 88 89 90 update: entry (submodel_pn, iocb_ptr, code); 91 92 atd = "vfile_ " || submodel_pn; 93 mode = 10; 94 call common; 95 return; 96 97 98 99 100 101 read_share: entry (submodel_pn, iocb_ptr, code); 102 103 atd = "vfile_ " || rtrim (submodel_pn) || " -share"; 104 mode = 8; 105 call common; 106 return; 107 108 109 110 111 112 update_share: entry (submodel_pn, iocb_ptr, code); 113 114 atd = "vfile_ " || rtrim (submodel_pn) || " -share"; 115 mode = 10; 116 call common; 117 return; 118 119 common: proc; 120 121 /* AUTOMATIC */ 122 123 dcl a_code fixed bin (35); /* internal error code */ 124 dcl version fixed bin; /* used as an output parameter to read_header, 125* nothing is done with the returned value */ 126 127 /* EXTERNAL */ 128 129 dcl mrds_error_$version_1_dsm fixed bin (35) ext static; 130 131 /* ENTRIES */ 132 133 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 134 dcl iox_$close entry (ptr, fixed bin (35)); 135 dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); 136 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 137 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 138 dcl mrds_dsm_read_header$version entry (ptr, fixed bin, fixed bin (35)); 139 dcl unique_chars_ entry (bit (*)) returns (char (15)); 140 141 142 143 144 145 call iox_$attach_name (unique_chars_ ("0"b), iocb_ptr, atd, null (), code); 146 if code ^= 0 147 then iocb_ptr = null (); 148 else do; 149 call iox_$open (iocb_ptr, mode, "0"b, code); 150 if code ^= 0 151 then do; 152 call iox_$detach_iocb (iocb_ptr, a_code); 153 call iox_$destroy_iocb (iocb_ptr, a_code); 154 iocb_ptr = null (); 155 end; 156 else do; 157 call mrds_dsm_read_header$version (iocb_ptr, version, code); 158 if code = 0 & version = 1 159 then code = mrds_error_$version_1_dsm; 160 if code ^= 0 161 then do; 162 call iox_$close (iocb_ptr, a_code); 163 call iox_$detach_iocb (iocb_ptr, a_code); 164 call iox_$destroy_iocb (iocb_ptr, a_code); 165 end; 166 end; 167 end; 168 169 return; 170 171 end /* common */; 172 173 end /* mrds_dsm_open */; 174 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/00 1123.2 mrds_dsm_open.pl1 >udd>sm>ds>w>ml>mrds_dsm_open.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. a_code 000172 automatic fixed bin(35,0) dcl 123 set ref 152* 153* 162* 163* 164* atd 000100 automatic char(200) initial packed unaligned dcl 58 set ref 58* 81* 92* 103* 114* 145* code parameter fixed bin(35,0) dcl 54 set ref 18 71* 79 90 101 112 145* 146 149* 150 157* 158 158* 160 error_table_$badcall 000010 external static fixed bin(35,0) dcl 68 ref 71 iocb_ptr parameter pointer dcl 53 set ref 18 70* 79 90 101 112 145* 146* 149* 152* 153* 154* 157* 162* 163* 164* iox_$attach_name 000014 constant entry external dcl 133 ref 145 iox_$close 000016 constant entry external dcl 134 ref 162 iox_$destroy_iocb 000020 constant entry external dcl 135 ref 153 164 iox_$detach_iocb 000022 constant entry external dcl 136 ref 152 163 iox_$open 000024 constant entry external dcl 137 ref 149 mode 000162 automatic fixed bin(17,0) dcl 59 set ref 82* 93* 104* 115* 149* mrds_dsm_read_header$version 000026 constant entry external dcl 138 ref 157 mrds_error_$version_1_dsm 000012 external static fixed bin(35,0) dcl 129 ref 158 null builtin function dcl 63 ref 70 145 145 146 154 rtrim builtin function dcl 64 ref 103 114 submodel_pn parameter char packed unaligned dcl 52 ref 18 79 81 90 92 101 103 112 114 unique_chars_ 000030 constant entry external dcl 139 ref 145 145 version 000173 automatic fixed bin(17,0) dcl 124 set ref 157* 158 NAMES DECLARED BY EXPLICIT CONTEXT. common 000331 constant entry internal dcl 119 ref 83 94 105 116 mrds_dsm_open 000030 constant entry external dcl 18 read 000055 constant entry external dcl 79 read_share 000161 constant entry external dcl 101 update 000117 constant entry external dcl 90 update_share 000246 constant entry external dcl 112 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 730 762 547 740 Length 1150 547 32 152 160 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mrds_dsm_open 168 external procedure is an external procedure. common internal procedure shares stack frame of external procedure mrds_dsm_open. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mrds_dsm_open 000100 atd mrds_dsm_open 000162 mode mrds_dsm_open 000172 a_code common 000173 version common THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. iox_$attach_name iox_$close iox_$destroy_iocb iox_$detach_iocb iox_$open mrds_dsm_read_header$version unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badcall mrds_error_$version_1_dsm LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 58 000017 18 000024 70 000044 71 000047 72 000052 79 000053 81 000071 82 000110 83 000113 84 000114 90 000115 92 000133 93 000152 94 000155 95 000156 101 000157 103 000175 104 000237 105 000242 106 000243 112 000244 114 000262 115 000324 116 000327 117 000330 119 000331 145 000332 146 000404 149 000412 150 000431 152 000434 153 000445 154 000457 155 000462 157 000463 158 000476 160 000507 162 000511 163 000522 164 000534 169 000546 ----------------------------------------------------------- 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