COMPILATION LISTING OF SEGMENT e_info_vfilesman_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/30/82 1410.7 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1978 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* * Copyright (c) 1972 by Massachusetts Institute of * 9* * Technology and Honeywell Information Systems, Inc. * 10* * * 11* *********************************************************** */ 12 13 14 e_info_vfilesman_$open: 15 proc (a_env_dir, a_upd_sw, a_code); 16 17 /* This program manipulates the EMACS command info vfile. BSG 9/26/78 */ 1 1 /* include file for info structure used with record_status control order 1 2* created by M. Asherman 1/6/76 */ 1 3 /* modified 6/15/77 to support stationary type records */ 1 4 1 5 dcl rs_info_ptr ptr; 1 6 dcl 1 rs_info based (rs_info_ptr) aligned, 1 7 2 version fixed, /* must be set to 1 or 2 (Input) */ 1 8 2 flags aligned, 1 9 3 lock_sw bit (1) unal, /* Input -- if ="1"b try to lock record */ 1 10 3 unlock_sw bit (1) unal, /* Input -- if ="1"b try to unlock record */ 1 11 3 create_sw bit (1) unal, /* Input--if set creat new record */ 1 12 3 locate_sw bit (1) unal, /* Input--if set causes current rec to be 1 13* located outside the index by descrip, or created without key */ 1 14 3 inc_ref_count bit (1) unal, /* Input--bump reference count of record, if stationary */ 1 15 3 dec_ref_count bit (1) unal, /* Input--decrement ref count if this flag set and record stationary */ 1 16 3 locate_pos_sw bit (1) unal, /* Input--if set the record_length is taken 1 17* as an input argument specifying the absolute logical record positioni to which both the current and next positions will be set */ 1 18 3 mbz1 bit (29) unal, /* must be set to "0"b, reserved for future use */ 1 19 2 record_length fixed (21), /* length in bytes, Input if create_sw set */ 1 20 2 max_rec_len fixed (21), /* max length of contained record 1 21* Input if create_sw is set--overrides min_block_size in effect */ 1 22 2 record_ptr ptr, /* points to first byte of record--will be word aligned */ 1 23 2 descriptor fixed (35), /* Input if locate_sw set and create_sw="0"b */ 1 24 2 ref_count fixed (34), /* Output--should match number of keys on this record-- = -1 if non-stationary record */ 1 25 2 time_last_modified fixed (71), /* Output */ 1 26 2 modifier fixed (35), /* Output--also Input when locking */ 1 27 2 block_ptr ptr unal, /* Output */ 1 28 2 last_image_modifier 1 29 fixed (35), 1 30 2 mbz2 fixed; 1 31 1 32 dcl 1 rs_desc based (addr (rs_info.descriptor)), 1 33 /* record block descriptor structure */ 1 34 2 comp_num fixed (17) unal, /* msf component number */ 1 35 2 offset bit (18) unal; /* word offset of record block */ 1 36 1 37 dcl 1 seq_desc based (addr (rs_info.descriptor)), 1 38 /* for sequential files */ 1 39 2 bitno bit (6) unal, 1 40 2 comp_num fixed (11) unal, /* msf component number */ 1 41 2 wordno bit (18) unal; /* word offset */ 1 42 1 43 dcl rs_info_version_1 static internal fixed init (1); 1 44 dcl rs_info_version_2 static internal fixed init (2); 1 45 18 2 1 /* Begin include file ..... iox_modes.incl.pl1 */ 2 2 2 3 /* Written by C. D. Tavares, 03/17/75 */ 2 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 2 5 2 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 2 7 ("stream_input", "stream_output", "stream_input_output", 2 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 2 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 2 10 "direct_input", "direct_output", "direct_update"); 2 11 2 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 2 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 2 14 2 15 dcl (Stream_input initial (1), 2 16 Stream_output initial (2), 2 17 Stream_input_output initial (3), 2 18 Sequential_input initial (4), 2 19 Sequential_output initial (5), 2 20 Sequential_input_output initial (6), 2 21 Sequential_update initial (7), 2 22 Keyed_sequential_input initial (8), 2 23 Keyed_sequential_output initial (9), 2 24 Keyed_sequential_update initial (10), 2 25 Direct_input initial (11), 2 26 Direct_output initial (12), 2 27 Direct_update initial (13)) fixed bin int static options (constant); 2 28 2 29 /* End include file ..... iox_modes.incl.pl1 */ 19 20 dcl iox_$seek_key entry (ptr, char (256) varying, fixed bin (21), fixed bin (35)); 21 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 22 dcl iox_$write_record entry (ptr, ptr, fixed bin (21), fixed bin (35)); 23 dcl iox_$rewrite_record entry (ptr, ptr, fixed bin (21), fixed bin (35)); 24 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 25 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 26 dcl viocbp ptr init (null ()) static; 27 dcl iox_$close entry (ptr, fixed bin (35)); 28 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 29 dcl s_upd_sw fixed bin (1) static; 30 dcl null builtin; 31 dcl a_env_dir char (*); 32 dcl a_upd_sw fixed bin (1); 33 dcl info_ptr ptr, 34 1 rsi like rs_info aligned automatic; 35 dcl a_code fixed bin (35); 36 dcl code fixed bin (35); 37 38 if viocbp ^= null & a_upd_sw = 1 & s_upd_sw = 0 39 then call close; 40 if viocbp = null 41 then do; 42 call iox_$attach_name ("emacs_info_vfile_", viocbp, 43 "vfile_ " || rtrim (a_env_dir) || ">emacs_info_vfile_ -share", 44 null (), a_code); 45 if a_code = 0 46 then do; 47 if a_upd_sw = 0 48 then call iox_$open (viocbp, Keyed_sequential_input, "0"b, a_code); 49 else call iox_$open (viocbp, Keyed_sequential_update, "0"b, a_code); 50 if a_code ^= 0 51 then call iox_$detach_iocb (viocbp, (0)); 52 end; 53 if a_code = 0 54 then s_upd_sw = a_upd_sw; 55 else viocbp = null; 56 end; 57 else a_code = 0; 58 return; 59 60 61 62 seek: 63 entry (a_key, a_code); 64 65 dcl a_key char (*) varying; 66 dcl key char (256) varying; 67 68 key = a_key; /* Copy for dcl compat */ 69 call iox_$seek_key (viocbp, key, (0), a_code); 70 return; 71 72 73 get_recp: 74 entry (a_recp, a_recl, a_code); 75 76 dcl a_recp ptr, 77 a_recl fixed bin (21); 78 79 a_recp = null (); 80 unspec (rsi) = "0"b; 81 rsi.version = rs_info_version_2; 82 call iox_$control (viocbp, "record_status", addr (rsi), a_code); 83 84 if a_code ^= 0 85 then return; 86 a_recp = rsi.record_ptr; 87 a_recl = rsi.record_length; 88 return; 89 90 91 update: 92 entry (a_data, a_updsw1, a_code); 93 94 dcl a_data char (*); 95 dcl a_updsw1 fixed bin (1); 96 if a_updsw1 = 1 97 then call iox_$write_record (viocbp, addr (a_data), length (a_data), a_code); 98 else call iox_$rewrite_record (viocbp, addr (a_data), length (a_data), a_code); 99 return; 100 101 close: 102 entry (); 103 104 105 if viocbp ^= null 106 then do; 107 call iox_$close (viocbp, (0)); 108 call iox_$detach_iocb (viocbp, (0)); 109 end; 110 viocbp = null; 111 return; 112 end; 113 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/30/82 1332.4 e_info_vfilesman_.pl1 >spec>on>11/30/82>e_info_vfilesman_.pl1 18 1 07/19/79 1547.0 rs_info.incl.pl1 >ldd>include>rs_info.incl.pl1 19 2 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.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. Keyed_sequential_input 000001 constant fixed bin(17,0) initial dcl 2-15 set ref 47* Keyed_sequential_update 000000 constant fixed bin(17,0) initial dcl 2-15 set ref 49* a_code parameter fixed bin(35,0) dcl 35 set ref 14 42* 45 47* 49* 50 53 57* 62 69* 73 82* 84 91 96* 98* a_data parameter char unaligned dcl 94 set ref 91 96 96 96 96 98 98 98 98 a_env_dir parameter char unaligned dcl 31 ref 14 42 a_key parameter varying char dcl 65 ref 62 68 a_recl parameter fixed bin(21,0) dcl 76 set ref 73 87* a_recp parameter pointer dcl 76 set ref 73 79* 86* a_upd_sw parameter fixed bin(1,0) dcl 32 ref 14 38 47 53 a_updsw1 parameter fixed bin(1,0) dcl 95 ref 91 96 iox_$attach_name 000024 constant entry external dcl 24 ref 42 iox_$close 000030 constant entry external dcl 27 ref 107 iox_$control 000026 constant entry external dcl 25 ref 82 iox_$detach_iocb 000032 constant entry external dcl 28 ref 50 108 iox_$open 000016 constant entry external dcl 21 ref 47 49 iox_$rewrite_record 000022 constant entry external dcl 23 ref 98 iox_$seek_key 000014 constant entry external dcl 20 ref 69 iox_$write_record 000020 constant entry external dcl 22 ref 96 key 000116 automatic varying char(256) dcl 66 set ref 68* 69* null builtin function dcl 30 ref 38 40 42 42 55 79 105 110 record_length 2 000100 automatic fixed bin(21,0) level 2 dcl 33 set ref 87 record_ptr 4 000100 automatic pointer level 2 dcl 33 set ref 86 rs_info based structure level 1 dcl 1-6 rs_info_version_2 constant fixed bin(17,0) initial dcl 1-44 ref 81 rsi 000100 automatic structure level 1 dcl 33 set ref 80* 82 82 s_upd_sw 000012 internal static fixed bin(1,0) dcl 29 set ref 38 53* version 000100 automatic fixed bin(17,0) level 2 dcl 33 set ref 81* viocbp 000010 internal static pointer initial dcl 26 set ref 38 40 42* 47* 49* 50* 55* 69* 82* 96* 98* 105 107* 108* 110* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Direct_input internal static fixed bin(17,0) initial dcl 2-15 Direct_output internal static fixed bin(17,0) initial dcl 2-15 Direct_update internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 2-15 Sequential_input internal static fixed bin(17,0) initial dcl 2-15 Sequential_input_output internal static fixed bin(17,0) initial dcl 2-15 Sequential_output internal static fixed bin(17,0) initial dcl 2-15 Sequential_update internal static fixed bin(17,0) initial dcl 2-15 Stream_input internal static fixed bin(17,0) initial dcl 2-15 Stream_input_output internal static fixed bin(17,0) initial dcl 2-15 Stream_output internal static fixed bin(17,0) initial dcl 2-15 code automatic fixed bin(35,0) dcl 36 info_ptr automatic pointer dcl 33 iox_modes internal static char(24) initial array dcl 2-6 rs_desc based structure level 1 packed unaligned dcl 1-32 rs_info_ptr automatic pointer dcl 1-5 rs_info_version_1 internal static fixed bin(17,0) initial dcl 1-43 seq_desc based structure level 1 packed unaligned dcl 1-37 short_iox_modes internal static char(4) initial array dcl 2-12 NAMES DECLARED BY EXPLICIT CONTEXT. close 000534 constant entry external dcl 101 ref 38 e_info_vfilesman_$open 000044 constant entry external dcl 14 get_recp 000361 constant entry external dcl 73 seek 000306 constant entry external dcl 62 update 000445 constant entry external dcl 91 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 82 82 96 96 98 98 length builtin function ref 96 96 98 98 rtrim builtin function ref 42 unspec builtin function ref 80 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 740 774 575 750 Length 1224 575 34 213 143 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME e_info_vfilesman_$open 184 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 viocbp e_info_vfilesman_$open 000012 s_upd_sw e_info_vfilesman_$open STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME e_info_vfilesman_$open 000100 rsi e_info_vfilesman_$open 000116 key e_info_vfilesman_$open THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_in call_ext_out_desc call_ext_out return shorten_stack ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. iox_$attach_name iox_$close iox_$control iox_$detach_iocb iox_$open iox_$rewrite_record iox_$seek_key iox_$write_record NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 14 000040 38 000062 40 000077 42 000104 45 000204 47 000207 49 000232 50 000251 53 000265 55 000274 56 000277 57 000300 58 000301 62 000302 68 000324 69 000336 70 000354 73 000355 79 000371 80 000374 81 000377 82 000401 84 000433 86 000435 87 000440 88 000442 91 000443 96 000463 98 000511 99 000532 101 000533 105 000541 107 000546 108 000557 110 000571 111 000574 ----------------------------------------------------------- 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