COMPILATION LISTING OF SEGMENT get_at_entry_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1013.3 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 /* Last modified (date and reason): 14* Aug 10, 1977 by S. Webber to remove references to obsolete dims 15**/ 16 17 /* format: style4,delnl,insnl,ifthenstmt,indnoniterend */ 18 get_at_entry_: 19 proc (stream, dim, device, mode) returns (fixed (35)); 20 21 22 /* Parameters. */ 23 24 dcl dim char (*); 25 dcl device char (*); 26 dcl mode char (*); 27 dcl stream char (*); 28 29 /* Automatic. */ 30 31 dcl (i, j) fixed; 32 dcl (p, iocb_ptr) ptr; 33 dcl 1 ics aligned, 34 2 sdbptr ptr, 35 2 dimptr ptr, 36 2 entry fixed; 37 dcl 1 status aligned, 38 2 code fixed (35), 39 2 bits bit (36); 40 41 /* Procedures. */ 42 43 dcl iox_$ios_call ext entry options (variable); 44 dcl iox_$look_iocb ext entry (char (*), ptr) returns (fixed (35)); 45 dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); 46 47 /* Constants. */ 48 49 dcl changemode_offset fixed int static init (14); 50 dcl error_table_$ioname_not_found fixed (35) ext; 51 dcl error_table_$missent fixed (35) ext; 52 dcl error_table_$multiple_io_attachment fixed (35) ext; 53 54 /* Builtin. */ 55 56 dcl (addr, index, null, substr, verify) builtin; 57 58 /* Based. */ 59 60 dcl 1 vcs aligned based, 61 2 len fixed, 62 2 str char (0 refer (vcs.len)); 63 dcl 1 sdb aligned based (ics.sdbptr), 64 2 dim char (32), 65 2 device_list_ptr ptr; 66 dcl 1 device_list aligned based (ics.sdbptr -> sdb.device_list_ptr), 67 2 next_ptr ptr, 68 2 name_size fixed, 69 2 name char (0 refer (device_list.name_size)); 1 1 /* BEGIN INCLUDE FILE iocbx.incl.pl1 */ 1 2 /* written 27 Dec 1973, M. G. Smith */ 1 3 /* returns attributes removed, hashing support BIM Spring 1981 */ 1 4 /* version made character string June 1981 BIM */ 1 5 /* Modified 11/29/82 by S. Krupp to add new entries and to change 1 6* version number to IOX2. */ 1 7 /* format: style2 */ 1 8 1 9 dcl 1 iocb aligned based, /* I/O control block. */ 1 10 2 version character (4) aligned, /* IOX2 */ 1 11 2 name char (32), /* I/O name of this block. */ 1 12 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 13 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 14 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 15 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 16 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 17 2 event_channel bit (72), /* Event channel for asynchronous I/O. */ 1 18 2 detach_iocb entry (ptr, fixed bin (35)), 1 19 /* detach_iocb(p) */ 1 20 2 open entry (ptr, fixed, bit (1) aligned, fixed bin (35)), 1 21 /* open(p,mode,not_used) */ 1 22 2 close entry (ptr, fixed bin (35)), 1 23 /* close(p) */ 1 24 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed bin (35)), 1 25 /* get_line(p,bufptr,buflen,actlen) */ 1 26 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed bin (35)), 1 27 /* get_chars(p,bufptr,buflen,actlen) */ 1 28 2 put_chars entry (ptr, ptr, fixed (21), fixed bin (35)), 1 29 /* put_chars(p,bufptr,buflen) */ 1 30 2 modes entry (ptr, char (*), char (*), fixed bin (35)), 1 31 /* modes(p,newmode,oldmode) */ 1 32 2 position entry (ptr, fixed, fixed (21), fixed bin (35)), 1 33 /* position(p,u1,u2) */ 1 34 2 control entry (ptr, char (*), ptr, fixed bin (35)), 1 35 /* control(p,order,infptr) */ 1 36 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed bin (35)), 1 37 /* read_record(p,bufptr,buflen,actlen) */ 1 38 2 write_record entry (ptr, ptr, fixed (21), fixed bin (35)), 1 39 /* write_record(p,bufptr,buflen) */ 1 40 2 rewrite_record entry (ptr, ptr, fixed (21), fixed bin (35)), 1 41 /* rewrite_record(p,bufptr,buflen) */ 1 42 2 delete_record entry (ptr, fixed bin (35)), 1 43 /* delete_record(p) */ 1 44 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed bin (35)), 1 45 /* seek_key(p,key,len) */ 1 46 2 read_key entry (ptr, char (256) varying, fixed (21), fixed bin (35)), 1 47 /* read_key(p,key,len) */ 1 48 2 read_length entry (ptr, fixed (21), fixed bin (35)), 1 49 /* read_length(p,len) */ 1 50 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 1 51 /* open_file(p,mode,desc,not_used,s) */ 1 52 2 close_file entry (ptr, char (*), fixed bin (35)), 1 53 /* close_file(p,desc,s) */ 1 54 2 detach entry (ptr, char (*), fixed bin (35)), 1 55 /* detach(p,desc,s) */ 1 56 /* Hidden information, to support SYN attachments. */ 1 57 2 ios_compatibility ptr, /* Ptr to old DIM's IOS transfer vector. */ 1 58 2 syn_inhibits bit (36), /* Operations inhibited by SYN. */ 1 59 2 syn_father ptr, /* IOCB immediately SYNed to. */ 1 60 2 syn_brother ptr, /* Next IOCB SYNed as this one is. */ 1 61 2 syn_son ptr, /* First IOCB SYNed to this one. */ 1 62 2 hash_chain_ptr ptr; /* Next IOCB in hash bucket */ 1 63 1 64 declare iox_$iocb_version_sentinel 1 65 character (4) aligned external static; 1 66 1 67 /* END INCLUDE FILE iocbx.incl.pl1 */ 70 71 72 /* End of declarations. */ 73 74 75 76 77 78 status.code = iox_$look_iocb (stream, iocb_ptr); 79 if status.code ^= 0 then return (error_table_$ioname_not_found); 80 p = iocb_ptr -> iocb.attach_descrip_ptr; 81 if p = null () then return (error_table_$ioname_not_found); 82 if iocb_ptr -> actual_iocb_ptr = iocb_ptr 83 then if iocb_ptr -> iocb.ios_compatibility ^= null () then do; 84 85 /* This is an old IOS-style DIM, hence we can return literally identical results 86* to the old "get_at_entry_". */ 87 88 ics.sdbptr = iocb_ptr -> iocb.open_data_ptr; 89 ics.dimptr = iocb_ptr -> iocb.ios_compatibility; 90 ics.entry = changemode_offset; 91 dim = ics.sdbptr -> sdb.dim; 92 device = ics.sdbptr -> sdb.device_list_ptr -> device_list.name; 93 call iox_$ios_call (addr (ics), "", mode, status); 94 if status.code ^= 0 then mode = ""; 95 if status.code = error_table_$missent then status.code = 0; 96 if ics.sdbptr -> sdb.device_list_ptr -> device_list.next_ptr ^= null () 97 then status.code = error_table_$multiple_io_attachment; 98 return (status.code); 99 end; 100 101 /* The DIM in question is not an old-style DIM so we must do the best we 102* can, or else this is a SYN attachment and thus not handled by the DIM. To begin 103* with, we assume that the DIM name is the first word of the attach description. */ 104 105 i = index (p -> vcs.str, " ") - 1; 106 if i < 0 then i = p -> vcs.len; 107 dim = substr (p -> vcs.str, 1, i); 108 if dim = "tty_" then dim = "tw_"; 109 else if dim = "syn_" then dim = "syn"; 110 else if dim = "netd_" then dim = "ntw_"; 111 else if dim = "mr_" then dim = "mrd_"; 112 else if dim = "ocd_" then dim = "oc_"; 113 else if dim = "discard_" then dim = "discard_output_"; 114 115 /* Next we assume that the device is the second word of the attach description. */ 116 117 j = verify (substr (p -> vcs.str, i + 1), " ") - 1; 118 if j < 0 then j = p -> vcs.len - i; 119 i = i + j; 120 j = index (substr (p -> vcs.str, i + 1), " ") - 1; 121 if j < 0 then j = p -> vcs.len - i; 122 device = substr (p -> vcs.str, i + 1, j); 123 124 /* If this is a SYN attachment, then the mode is null. Otherwise, we obtain the mode 125* by issuing a "modes" call. */ 126 127 mode = ""; 128 if iocb_ptr -> iocb.actual_iocb_ptr = iocb_ptr then do; 129 call iox_$modes (iocb_ptr, "", mode, (0)); 130 end; 131 return (0); 132 133 134 135 136 137 end get_at_entry_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0802.8 get_at_entry_.pl1 >spec>install>1110>get_at_entry_.pl1 70 1 06/03/83 1008.5 iocbx.incl.pl1 >ldd>include>iocbx.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. actual_iocb_ptr 12 based pointer level 2 dcl 1-9 ref 82 128 addr builtin function dcl 56 ref 93 93 attach_descrip_ptr 14 based pointer level 2 dcl 1-9 ref 80 changemode_offset constant fixed bin(17,0) initial dcl 49 ref 90 code 000114 automatic fixed bin(35,0) level 2 dcl 37 set ref 78* 79 94 95 95* 96* 98 device parameter char packed unaligned dcl 25 set ref 18 92* 122* device_list based structure level 1 dcl 66 device_list_ptr 10 based pointer level 2 dcl 63 ref 92 96 dim based char(32) level 2 in structure "sdb" dcl 63 in procedure "get_at_entry_" ref 91 dim parameter char packed unaligned dcl 24 in procedure "get_at_entry_" set ref 18 91* 107* 108 108* 109 109* 110 110* 111 111* 112 112* 113 113* dimptr 2 000106 automatic pointer level 2 dcl 33 set ref 89* entry 4 000106 automatic fixed bin(17,0) level 2 dcl 33 set ref 90* error_table_$ioname_not_found 000016 external static fixed bin(35,0) dcl 50 ref 79 81 error_table_$missent 000020 external static fixed bin(35,0) dcl 51 ref 95 error_table_$multiple_io_attachment 000022 external static fixed bin(35,0) dcl 52 ref 96 i 000100 automatic fixed bin(17,0) dcl 31 set ref 105* 106 106* 107 117 118 119* 119 120 121 122 ics 000106 automatic structure level 1 dcl 33 set ref 93 93 index builtin function dcl 56 ref 105 120 iocb based structure level 1 dcl 1-9 iocb_ptr 000104 automatic pointer dcl 32 set ref 78* 80 82 82 82 88 89 128 128 129* ios_compatibility 142 based pointer level 2 dcl 1-9 ref 82 89 iox_$ios_call 000010 constant entry external dcl 43 ref 93 iox_$look_iocb 000012 constant entry external dcl 44 ref 78 iox_$modes 000014 constant entry external dcl 45 ref 129 j 000101 automatic fixed bin(17,0) dcl 31 set ref 117* 118 118* 119 120* 121 121* 122 len based fixed bin(17,0) level 2 dcl 60 ref 105 106 107 117 118 120 121 122 mode parameter char packed unaligned dcl 26 set ref 18 93* 94* 127* 129* name 3 based char level 2 dcl 66 ref 92 name_size 2 based fixed bin(17,0) level 2 dcl 66 ref 92 next_ptr based pointer level 2 dcl 66 ref 96 null builtin function dcl 56 ref 81 82 96 open_data_ptr 22 based pointer level 2 dcl 1-9 ref 88 p 000102 automatic pointer dcl 32 set ref 80* 81 105 106 107 117 118 120 121 122 sdb based structure level 1 dcl 63 sdbptr 000106 automatic pointer level 2 dcl 33 set ref 88* 91 92 96 status 000114 automatic structure level 1 dcl 37 set ref 93* str 1 based char level 2 dcl 60 ref 105 107 117 120 122 stream parameter char packed unaligned dcl 27 set ref 18 78* substr builtin function dcl 56 ref 107 117 120 122 vcs based structure level 1 dcl 60 verify builtin function dcl 56 ref 117 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. iox_$iocb_version_sentinel external static char(4) dcl 1-64 NAME DECLARED BY EXPLICIT CONTEXT. get_at_entry_ 000040 constant entry external dcl 18 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 566 612 464 576 Length 1000 464 24 152 102 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_at_entry_ 118 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_at_entry_ 000100 i get_at_entry_ 000101 j get_at_entry_ 000102 p get_at_entry_ 000104 iocb_ptr get_at_entry_ 000106 ics get_at_entry_ 000114 status get_at_entry_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return_mac ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. iox_$ios_call iox_$look_iocb iox_$modes THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$ioname_not_found error_table_$missent error_table_$multiple_io_attachment LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000033 78 000072 79 000113 80 000122 81 000125 82 000136 88 000147 89 000151 90 000153 91 000155 92 000164 93 000173 94 000223 95 000233 96 000237 98 000246 105 000252 106 000263 107 000266 108 000274 109 000304 110 000314 111 000324 112 000334 113 000344 117 000353 118 000367 119 000373 120 000374 121 000407 122 000413 127 000420 128 000425 129 000432 131 000461 ----------------------------------------------------------- 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