COMPILATION LISTING OF SEGMENT get_at_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phx. Az., Sys-M Compiled on: 08/07/87 1507.3 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1986 * 6* * * 7* *********************************************************** */ 8 9 /****^ HISTORY COMMENTS: 10* 1) change(86-09-01,Flegel), approve(87-07-15,MCR7580), 11* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 12* Created. 13* 2) change(86-10-07,Flegel), approve(87-07-15,MCR7580), 14* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 15* Allowed to provide a match to a second parameter in the attach 16* description for searching. 17* 3) change(86-11-27,Flegel), approve(86-11-27,MCR7580), 18* audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): 19* Approved. 20* END HISTORY COMMENTS */ 21 /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ 22 get_at_: 23 proc (p_io_name, p_attached_to, p_iocb_ptr, p_code); 24 25 /* : PROGRAM FUNCTION 26* 27*Find the iocb attached to before p_io_name. 28**/ 29 30 /* : NOTES 31* 32*If none can be found, p_code is set to error_table_$no_iocb and iocb_ptr 33*is null. 34**/ 35 36 37 /* INPUT PARAMETERS */ 38 dcl p_io_name char (*); /* IO module name to look for */ 39 dcl p_attached_to char (*); /* Second name in description to look for */ 40 41 42 /* OUTPUT PARAMETERS */ 43 dcl p_code fixed bin (35); 44 dcl p_iocb_ptr ptr; /* Pointer to iocb which is above p_io_name */ 45 46 47 /* MISC VARIABLES */ 48 dcl right fixed bin; /* Right index into attach descript */ 49 dcl left fixed bin; /* Left index into attach descript */ 50 dcl atd_ptr ptr; /* Temp pointer to attach description */ 51 dcl atd char (256) var based (atd_ptr); 52 /* Attach description */ 53 dcl switch_name char (256) var; 54 dcl found bit (1); 55 dcl code fixed bin (35); 56 dcl iocb_ptr ptr; /* IOCB pointer */ 57 58 59 /* SYSTEM CALLS */ 60 dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); 61 62 63 /* SYSTEM CALL SUPPORT */ 64 dcl error_table_$no_iocb fixed bin (35) ext static; 65 dcl iox_$user_io ptr ext static; 66 67 68 /* BUILTINS */ 69 dcl null builtin; 70 dcl index builtin; 71 dcl length builtin; 72 dcl ltrim builtin; 73 dcl rtrim builtin; 74 dcl substr builtin; 75 76 /* */ 77 78 /* INITIALIZATION */ 79 p_code = 0; 80 81 /* MAIN */ 82 83 /* : Traverse the attach descriptions to find tty_ */ 84 85 iocb_ptr = iox_$user_io; 86 atd_ptr = iocb_ptr -> iocb.attach_descrip_ptr; 87 found = "0"b; 88 do while (^found); 89 90 /* : - If found who is attached to p_io_name and p_attached_to if not null */ 91 92 found = (ltrim (rtrim (substr (atd, 1, index (atd, " ") - 1))) 93 = p_io_name); 94 if found & p_attached_to ^= "" then 95 found = (ltrim (rtrim (substr (atd, index (atd, " ") + 1, 96 length (p_attached_to)))) = p_attached_to); 97 98 /* : - Else get the next iocb 99* -- Calculate the name of the next iocb */ 100 101 if ^found then do; 102 left = index (atd_ptr -> atd, " "); 103 switch_name = ltrim (substr (atd_ptr -> atd, left)); 104 right = index (switch_name, " "); 105 if right ^= 0 then 106 switch_name = rtrim (substr (switch_name, 1, right)); 107 108 /* : -- Find next iocb, if none then error */ 109 110 call iox_$look_iocb ( 111 substr (switch_name, 1, length (switch_name)), 112 iocb_ptr, code); 113 if code ^= 0 | atd_ptr = null then do; 114 p_code = error_table_$no_iocb; 115 p_iocb_ptr = null; 116 return; 117 end; 118 atd_ptr = iocb_ptr -> iocb.attach_descrip_ptr; 119 end; 120 end; 121 122 /* : Found switch name */ 123 124 p_iocb_ptr = iocb_ptr; 125 126 127 /* INCLUDE FILES */ 1 1 1 2 dcl 1 iocb aligned based (iocb_ptr), 1 3 /* I/O control block. */ 1 4 2 iocb_version fixed init (1), /* Version number of structure. */ 1 5 2 name char (32), /* I/O name of this block. */ 1 6 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 7 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 8 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 9 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 10 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 11 2 reserved bit (72), /* Reserved for future use. */ 1 12 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 13 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 14 /* open(p,mode,not_used,s) */ 1 15 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 16 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 17 /* get_line(p,bufptr,buflen,actlen,s) */ 1 18 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 19 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 20 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 21 /* put_chars(p,bufptr,buflen,s) */ 1 22 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 23 /* modes(p,newmode,oldmode,s) */ 1 24 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 25 /* position(p,u1,u2,s) */ 1 26 2 control entry (ptr, char (*), ptr, fixed (35)), 1 27 /* control(p,order,infptr,s) */ 1 28 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 29 /* read_record(p,bufptr,buflen,actlen,s) */ 1 30 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 31 /* write_record(p,bufptr,buflen,s) */ 1 32 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 33 /* rewrite_record(p,bufptr,buflen,s) */ 1 34 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 35 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 36 /* seek_key(p,key,len,s) */ 1 37 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 38 /* read_key(p,key,len,s) */ 1 39 2 read_length entry (ptr, fixed (21), fixed (35)); 1 40 /* read_length(p,len,s) */ 1 41 128 129 130 /* : END */ 131 end get_at_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/07/87 1454.9 get_at_.pl1 >special_ldd>install>MR12.1-1075>get_at_.pl1 128 1 07/02/81 1905.0 iocbv.incl.pl1 >ldd>include>iocbv.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. atd based varying char(256) dcl 51 ref 92 92 94 94 102 103 atd_ptr 000102 automatic pointer dcl 50 set ref 86* 92 92 94 94 102 103 113 118* attach_descrip_ptr 14 based pointer level 2 dcl 1-2 ref 86 118 code 000206 automatic fixed bin(35,0) dcl 55 set ref 110* 113 error_table_$no_iocb 000012 external static fixed bin(35,0) dcl 64 ref 114 found 000205 automatic bit(1) unaligned dcl 54 set ref 87* 88 92* 94 94* 101 index builtin function dcl 70 ref 92 94 102 104 iocb based structure level 1 dcl 1-2 iocb_ptr 000210 automatic pointer dcl 56 set ref 85* 86 110* 118 124 iox_$look_iocb 000010 constant entry external dcl 60 ref 110 iox_$user_io 000014 external static pointer dcl 65 ref 85 left 000101 automatic fixed bin(17,0) dcl 49 set ref 102* 103 length builtin function dcl 71 ref 94 110 110 ltrim builtin function dcl 72 ref 92 94 103 null builtin function dcl 69 ref 113 115 p_attached_to parameter char unaligned dcl 39 ref 22 94 94 94 p_code parameter fixed bin(35,0) dcl 43 set ref 22 79* 114* p_io_name parameter char unaligned dcl 38 ref 22 92 p_iocb_ptr parameter pointer dcl 44 set ref 22 115* 124* right 000100 automatic fixed bin(17,0) dcl 48 set ref 104* 105 105 rtrim builtin function dcl 73 ref 92 94 105 substr builtin function dcl 74 ref 92 94 103 105 110 110 switch_name 000104 automatic varying char(256) dcl 53 set ref 103* 104 105* 105 110 110 110 110 NAME DECLARED BY EXPLICIT CONTEXT. get_at_ 000013 constant entry external dcl 22 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 410 426 336 420 Length 610 336 16 145 51 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_at_ 160 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_at_ 000100 right get_at_ 000101 left get_at_ 000102 atd_ptr get_at_ 000104 switch_name get_at_ 000205 found get_at_ 000206 code get_at_ 000210 iocb_ptr get_at_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_char_temp call_ext_out_desc return_mac shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. iox_$look_iocb THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$no_iocb iox_$user_io LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000006 79 000033 85 000035 86 000040 87 000043 88 000044 92 000046 94 000121 101 000170 102 000172 103 000174 104 000230 105 000242 110 000260 113 000310 114 000317 115 000323 116 000325 118 000326 120 000331 124 000332 131 000335 ----------------------------------------------------------- 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