COMPILATION LISTING OF SEGMENT linus_invoke_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 1001.6 mst Tue 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 19 linus_invoke_: 20 proc; 21 22 /* This is the IO module that is used when a LINUS macro has been invoked via 23* the LINUS invoke request. The user_input IO switch is attached through this 24* module to a segment. When an get_line operation is done (by ssu_$listen 25* or by linus_lila) 2 items of interest occur: 1) argument substitution 26* occurs and 2) if at end of file (error_table_$end_of_info) the attachment 27* is changed (via linus_invoke$pop) back to either another file or user_i/o. 28* Beyond that there is nothing outstanding here, just an ordinary, pain in 29* the backside to code and debug, IO module. 30* 31* It should be noted that this is NOT a general purpose IO module. It knows 32* its caller intimately and therefore does not account for as many error 33* situations as a general purpose IO module would. 34* 35* Written 82-02-22 by Paul W. Benjamin 36* 37* 82-03-18 DJ Schimke: Fixed bug which caused linus to blow up when a macro 38* didn't end in a new_line character. Problem was in linus_invoke_get_line 39* which checked for et$_end_of_info but not for et$_short_record. Fixed a 40* stringrange error resulting from adding the NL to the get_line buffer. 41* 42* 82-08-31 DJ Schimke: Replaced the call to the undocumented entrypoint 43* syn_$syn_attach_ with a call to iox_$attach_ptr. Declared iox_$attach_ptr 44* and codeptr builtin. This is in response to phx13314. Also replaced call 45* to old entrypoint iox_$attach_ioname with call to iox_$attach_name and 46* replaced the declaration of iox_$attach_ioname with iox_$attach_name. 47**/ 48 49 /* Parameters */ 50 /* These are all standard in iox_$XXX calls */ 51 52 dcl iocbp ptr parameter; 53 dcl option (*) char (*) varying parameter; 54 dcl ignore_this bit (1) aligned parameter; /* will always be ""b */ 55 dcl code fixed bin (35) parameter; 56 dcl mode fixed bin parameter; 57 dcl bufptr ptr parameter; 58 dcl buflen fixed bin (21) parameter; 59 dcl nread fixed bin (21) parameter; 60 61 /* Automatic */ 62 63 dcl attach_data_ptr ptr; 64 dcl attach_descrip_len fixed bin; 65 dcl attach_descrip_ptr ptr; 66 dcl dummy_code fixed bin (35); 67 dcl mask bit (36) aligned; 68 dcl prompt char (64) varying; 69 dcl rq_name char (32); 70 dcl sci_ptr ptr; 71 dcl source_iocbp ptr; 72 dcl switch_name char (32); 73 74 dcl 1 ti aligned, /* data structure for terminate_process_. */ 75 2 version fixed bin, 76 2 code fixed bin (35); 77 78 /* Based */ 79 80 dcl buf char (nread) based (bufptr); 81 82 dcl 1 attach_descrip based (attach_descrip_ptr), 83 2 length fixed bin, 84 2 string char (attach_descrip_len refer (attach_descrip.length)); 85 86 dcl 1 attach_data based (attach_data_ptr), 87 2 lcb_ptr ptr, 88 2 sci_ptr ptr, 89 2 source_iocbp ptr; 90 91 /* Builtin */ 92 93 dcl (addr, codeptr, fixed, length, null, rel, search, substr) builtin; 94 95 /* Condition */ 96 97 dcl (any_other, cleanup) condition; 98 99 /* Constant */ 100 101 dcl NL char (1) internal static options (constant) init (" 102 "); 103 104 /* Entries */ 105 106 dcl continue_to_signal_ entry (fixed bin (35)); 107 dcl cv_ptr_ entry (char (*), fixed bin (35)) returns (ptr); 108 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 109 dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); 110 dcl ioa_$nnl entry () options (variable); 111 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 112 dcl iox_$attach_ptr entry (ptr, char (*), ptr, fixed bin (35)); 113 dcl iox_$close entry (ptr, fixed bin (35)); 114 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 115 dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); 116 dcl iox_$get_line entry (ptr, ptr, fixed bin (21), fixed bin (21), 117 fixed bin (35)); 118 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 119 dcl iox_$propagate entry (ptr); 120 dcl linus_canon_input entry (ptr, ptr, fixed bin (21), fixed bin (35)); 121 dcl linus_invoke$pop entry (ptr, fixed bin (35)); 122 dcl ssu_$get_prompt entry (ptr) returns (char (64) varying); 123 dcl ssu_$get_request_name entry (ptr) returns (char (32)); 124 dcl ssu_$set_prompt_mode entry (ptr, bit (*)); 125 dcl terminate_process_ entry (char (*), ptr); 126 dcl unique_chars_ entry (bit (*)) returns (char (15)); 127 128 /* External */ 129 130 dcl error_table_$end_of_info fixed bin (35) ext static; 131 dcl error_table_$long_record fixed bin (35) ext static; 132 dcl error_table_$not_closed fixed bin (35) ext static; 133 dcl error_table_$not_detached fixed bin (35) ext static; 134 dcl error_table_$short_record fixed bin (35) ext static; 135 dcl error_table_$unable_to_do_io fixed bin (35) ext static; 136 dcl iox_$user_input ptr ext static; 137 dcl iox_$user_io ptr ext static; 138 dcl linus_data_$max_invocs ext static; 139 dcl sys_info$max_seg_size fixed bin (35) ext static; 140 141 /* Internal Static */ 142 143 dcl 1 static_open_descrip internal static, 144 2 length fixed bin (17) init (12), 145 2 string char (12) init ("stream_input"); 146 147 /* Include */ 148 1 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 1 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 1 3* version number to IOX2. */ 1 4 /* format: style2 */ 1 5 1 6 dcl 1 iocb aligned based, /* I/O control block. */ 1 7 2 version character (4) aligned, /* IOX2 */ 1 8 2 name char (32), /* I/O name of this block. */ 1 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 14 2 reserved bit (72), /* Reserved for future use. */ 1 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 17 /* open(p,mode,not_used,s) */ 1 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 20 /* get_line(p,bufptr,buflen,actlen,s) */ 1 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 24 /* put_chars(p,bufptr,buflen,s) */ 1 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 26 /* modes(p,newmode,oldmode,s) */ 1 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 28 /* position(p,u1,u2,s) */ 1 29 2 control entry (ptr, char (*), ptr, fixed (35)), 1 30 /* control(p,order,infptr,s) */ 1 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 32 /* read_record(p,bufptr,buflen,actlen,s) */ 1 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 34 /* write_record(p,bufptr,buflen,s) */ 1 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 36 /* rewrite_record(p,bufptr,buflen,s) */ 1 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 39 /* seek_key(p,key,len,s) */ 1 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 41 /* read_key(p,key,len,s) */ 1 42 2 read_length entry (ptr, fixed (21), fixed (35)), 1 43 /* read_length(p,len,s) */ 1 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 1 45 /* open_file(p,mode,desc,not_used,s) */ 1 46 2 close_file entry (ptr, char (*), fixed bin (35)), 1 47 /* close_file(p,desc,s) */ 1 48 2 detach entry (ptr, char (*), fixed bin (35)); 1 49 /* detach(p,desc,s) */ 1 50 1 51 declare iox_$iocb_version_sentinel 1 52 character (4) aligned external static; 1 53 1 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 149 150 2 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 2 2 2 3 2 4 2 5 /****^ HISTORY COMMENTS: 2 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 2 7* install(86-07-29,MR12.0-1106): 2 8* Added general_work_area_ptr and renamed sfr_ptr to 2 9* force_retrieve_scope_ptr. 2 10* END HISTORY COMMENTS */ 2 11 2 12 2 13 /* HISTORY: 2 14* 2 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 2 16* 2 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 2 18* a part of the attribute level control work. 2 19* 2 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 2 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 2 22* scope information. 2 23* 2 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 2 25* retaining various vcpu times to be collected when in timing mode. The 2 26* times to be collected are: LINUS parsing time, LINUS processing time, and 2 27* MRDS processing time. 2 28* 2 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 2 30* part of the line numbering implementation. This allows for possible later 2 31* LINUS control of the build defaults. 2 32* 2 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 2 34* information is now retained by ssu_. Removed parse_timer as no longer 2 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 2 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 2 37* 2 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 2 39* subsystem_invocation_level, and selection_expression_identifier. 2 40* 2 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 2 42* table_control_info_ptr. 2 43* 2 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 2 45* 2 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 2 47* 2 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 2 49* 2 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 2 51**/ 2 52 2 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 2 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 2 55 2 rb_len fixed bin (21), /* length of request buffer */ 2 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 2 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 2 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 2 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 2 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 2 61 2 test_flag bit (1) unal, /* on if in test mode */ 2 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 2 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 2 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 2 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 2 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 2 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 2 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 2 69 2 reserved bit (27) unal, 2 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 2 71 2 rb_ptr ptr, /* ptr to request buffer */ 2 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 2 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 2 74 2 ttn_ptr ptr, /* pointer to table info structure */ 2 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 2 76 2 lv_ptr ptr, /* pointer linus variables */ 2 77 2 si_ptr ptr, /* pointer to select_info structure */ 2 78 2 setfi_ptr ptr, /* pointer to set function information */ 2 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 2 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 2 81 2 lit_ptr ptr, /* pointer to literal pool */ 2 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 2 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 2 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 2 85* (MR7.0) */ 2 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 2 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 2 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 2 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 2 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 2 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 2 92* for current lila expression */ 2 93 2 unused_timer float bin (63), /* future expansion */ 2 94 2 request_time float bin (63), /* How much request time was spent 2 95* in LINUS. (-1 = user has just enabled 2 96* timing, do not report) */ 2 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 2 98 2 build_increment fixed bin, /* default increment for build mode */ 2 99 2 build_start fixed bin, /* default start count for build mode */ 2 100 2 linus_version char (4), /* current version of LINUS */ 2 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 2 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 2 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 2 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 2 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 2 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 2 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 2 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 2 109 2 word_pad (6) bit (36) unal, 2 110 /* procedures that will be optionally */ 2 111 /* replaced by the user. Saved so they */ 2 112 /* can be reinstated if desired. */ 2 113 2 ssu_abort_line entry options (variable), 2 114 2 ssu_post_request_line variable entry (ptr), 2 115 2 ssu_pre_request_line variable entry (ptr), 2 116 2 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 2 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 2 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 2 120 2 121 dcl lcb_ptr ptr; 2 122 2 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 151 152 3 1 /* BEGIN INCLUDE FILE linus_invoc_stack.incl.pl1 -- jaw 7/19/77 */ 3 2 3 3 dcl 1 invoc_stack aligned based (ivs_ptr), /* invocation info */ 3 4 2 ninvocs fixed bin, /* number of current invocations */ 3 5 2 invoc (linus_data_$max_invocs), /* for each invocation */ 3 6 3 iocb_ptr ptr, /* iocb for input sw */ 3 7 3 arg_ptr ptr; /* pointer to arg list */ 3 8 3 9 dcl ivs_ptr ptr; 3 10 3 11 /* END INCLUDE FILE linus_invoc_stack.incl.pl1 */ 153 154 4 1 /* BEGIN INCLUDE FILE ... ssu_prompt_modes.incl.pl1 */ 4 2 /* Created: 15 February 1982 by G. Palter */ 4 3 4 4 /* Values for use in calls to ssu_$set_prompt_mode to control prompting by the subsystem listener */ 4 5 4 6 dcl PROMPT bit (1) static options (constant) initial ("0"b); 4 7 dcl DONT_PROMPT bit (1) static options (constant) initial ("1"b); 4 8 4 9 dcl PROMPT_AFTER_NULL_LINES bit (2) static options (constant) initial ("01"b); 4 10 dcl DONT_PROMPT_AFTER_NULL_LINES bit (2) static options (constant) initial ("00"b); 4 11 4 12 dcl PROMPT_IF_TYPEAHEAD bit (3) static options (constant) initial ("000"b); 4 13 dcl DONT_PROMPT_IF_TYPEAHEAD bit (3) static options (constant) initial ("001"b); 4 14 4 15 /* For example: 4 16* call ssu_$set_prompt_mode (sci_ptr, PROMPT | DONT_PROMPT_AFTER_NULL_LINES | DONT_PROMPT_IF_TYPEAHEAD); */ 4 17 4 18 /* END INCLUDE FILE ... ssu_prompt_modes.incl.pl1 */ 155 156 157 linus_invoke_attach: 158 entry (iocbp, option, ignore_this, code); 159 160 if iocbp -> iocb.attach_descrip_ptr ^= null 161 then do; 162 code = error_table_$not_detached; 163 return; 164 end; 165 166 source_iocbp = null; 167 attach_descrip_ptr = null; 168 attach_data_ptr = null; 169 170 on cleanup call janitor; 171 172 switch_name = "linus_invoke_." || unique_chars_ (""b) || "_"; /* make unique switchname */ 173 174 call iox_$attach_name (switch_name, source_iocbp, "vfile_ " || option (1), codeptr (linus_invoke_), code); 175 if code ^= 0 176 then do; 177 call janitor; 178 return; 179 end; 180 181 lcb_ptr = cv_ptr_ ((option (2)), code); /* get lcbptr */ 182 if code ^= 0 183 then do; 184 call janitor; 185 return; 186 end; 187 attach_descrip_len = 14 + length (option (1)); 188 allocate attach_descrip in (lcb.static_area); 189 attach_descrip.string = "linus_invoke_ " || option (1); 190 191 allocate attach_data in (lcb.static_area); 192 attach_data.lcb_ptr = lcb_ptr; 193 attach_data.sci_ptr = cv_ptr_ ((option (3)), code); /* & get sci_ptr */ 194 /* & put both in attach data (need 'em later) */ 195 if code ^= 0 196 then do; 197 call janitor; 198 return; 199 end; 200 attach_data.source_iocbp = source_iocbp; 201 202 call iox_$open (source_iocbp, 1, "0"b, code); /* may as well open now, too */ 203 if code ^= 0 204 then do; 205 call janitor; 206 return; 207 end; 208 209 mask = ""b; 210 on any_other call all_hell_broke_loose; /* this is all standard stuff */ 211 call hcs_$set_ips_mask (""b, mask); /* when diddling iocb */ 212 iocbp -> iocb.open = linus_invoke_open; 213 iocbp -> iocb.detach_iocb = linus_invoke_detach; 214 iocbp -> iocb.attach_descrip_ptr = attach_descrip_ptr; 215 iocbp -> iocb.attach_data_ptr = attach_data_ptr; 216 217 call iox_$propagate (iocbp); 218 call hcs_$reset_ips_mask (mask, mask); 219 code = 0; 220 return; 221 222 janitor: proc; 223 224 if source_iocbp ^= null 225 then do; 226 call iox_$close (source_iocbp, dummy_code); 227 call iox_$detach_iocb (source_iocbp, dummy_code); 228 call iox_$destroy_iocb (source_iocbp, dummy_code); 229 end; 230 if attach_descrip_ptr ^= null 231 then free attach_descrip; 232 if attach_data_ptr ^= null 233 then free attach_data; 234 235 end janitor; 236 237 linus_invoke_open: 238 entry (iocbp, mode, ignore_this, code); 239 240 if iocbp -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr ^= null 241 then do; 242 code = error_table_$not_closed; 243 return; 244 end; 245 246 mask = ""b; 247 on any_other call all_hell_broke_loose; 248 call hcs_$set_ips_mask (""b, mask); 249 iocbp -> iocb.actual_iocb_ptr -> iocb.get_line = linus_invoke_get_line; 250 iocbp -> iocb.actual_iocb_ptr -> iocb.close = linus_invoke_close; 251 iocbp -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr = addr (static_open_descrip); 252 call iox_$propagate (iocbp -> iocb.actual_iocb_ptr); 253 call hcs_$reset_ips_mask (mask, mask); 254 revert any_other; 255 return; 256 257 linus_invoke_get_line: 258 entry (iocbp, bufptr, buflen, nread, code); 259 260 lcb_ptr = iocbp -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr -> attach_data.lcb_ptr; 261 sci_ptr = iocbp -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr -> attach_data.sci_ptr; 262 call iox_$get_line (iocbp -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr -> attach_data.source_iocbp, 263 bufptr, buflen, nread, code); 264 if code = error_table_$end_of_info | code = error_table_$short_record 265 then do; 266 if nread > 0 /* file didn't end in NL */ 267 then do; 268 if nread = buflen 269 then code = error_table_$long_record; 270 else do; 271 code = 0; 272 nread = nread + 1; 273 substr (buf, nread, 1) = NL; 274 call to_pop_or_not_to_pop; /* reset 'cause we WERE at EOF */ 275 end; 276 return; 277 end; 278 call to_pop_or_not_to_pop; 279 if lcb.is_ptr ^= iox_$user_input /* read from previous macro */ 280 then call iox_$get_line (iocbp, bufptr, buflen, nread, code); 281 else do; 282 rq_name = ssu_$get_request_name (sci_ptr); 283 if rq_name = "" /* called by ssu_$listen */ 284 then do; 285 if lcb.prompt_flag /* prompt if appropriate */ 286 then do; 287 prompt = ssu_$get_prompt (sci_ptr); 288 call ioa_$nnl (prompt, "0"b, 1); 289 end; 290 code = 0; /* fake blank line */ 291 nread = 1; 292 buf = " "; 293 end; 294 else if rq_name = "lila" /* lila would like a blank line here, too */ 295 then do; 296 code = 0; 297 nread = 1; 298 buf = " "; 299 end; 300 /* Must have been in an editor or something, 301** just do another read */ 302 else call iox_$get_line (iocbp, bufptr, buflen, nread, code); 303 end; 304 return; 305 end; 306 307 if search (buf, "%/") > 0 /* arguments or comments */ 308 then call linus_canon_input (lcb_ptr, bufptr, nread, code); 309 return; 310 311 to_pop_or_not_to_pop: 312 proc; 313 314 if lcb.ivs_ptr ^= null 315 then if lcb.ivs_ptr -> invoc_stack.ninvocs > 0 316 then do; 317 if lcb.prompt_flag & lcb.ivs_ptr -> invoc_stack.ninvocs = 1 318 then call ssu_$set_prompt_mode (sci_ptr, PROMPT | DONT_PROMPT_AFTER_NULL_LINES | PROMPT_IF_TYPEAHEAD); 319 call linus_invoke$pop (lcb_ptr, code); /* reset to previous input stream */ 320 end; 321 else do; 322 if lcb.prompt_flag 323 then call ssu_$set_prompt_mode (sci_ptr, PROMPT | DONT_PROMPT_AFTER_NULL_LINES | PROMPT_IF_TYPEAHEAD); 324 call iox_$detach_iocb (iox_$user_input, code); 325 if code ^= 0 326 then return; 327 call iox_$attach_ptr (iox_$user_input, "syn_ user_i/o", codeptr (linus_invoke_), code); 328 if code ^= 0 329 then return; 330 lcb.is_ptr = iox_$user_input; 331 end; 332 end to_pop_or_not_to_pop; 333 334 linus_invoke_close: 335 entry (iocbp, code); 336 337 call iox_$close (iocbp -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr -> attach_data.source_iocbp, code); 338 339 mask = ""b; 340 on any_other call all_hell_broke_loose; 341 call hcs_$set_ips_mask (""b, mask); 342 iocbp -> iocb.actual_iocb_ptr -> iocb.open = linus_invoke_open; 343 iocbp -> iocb.actual_iocb_ptr -> iocb.detach_iocb = linus_invoke_detach; 344 iocbp -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr = null; 345 call iox_$propagate (iocbp -> iocb.actual_iocb_ptr); 346 call hcs_$reset_ips_mask (mask, mask); 347 return; 348 349 linus_invoke_detach: 350 entry (iocbp, code); 351 352 attach_data_ptr = iocbp -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 353 attach_descrip_ptr = iocbp -> iocb.actual_iocb_ptr -> iocb.attach_descrip_ptr; 354 lcb_ptr = attach_data_ptr -> attach_data.lcb_ptr; 355 source_iocbp = attach_data_ptr -> attach_data.source_iocbp; 356 357 call iox_$detach_iocb (attach_data_ptr -> attach_data.source_iocbp, code); 358 359 mask = ""b; 360 on any_other call all_hell_broke_loose; 361 call hcs_$set_ips_mask (""b, mask); 362 iocbp -> iocb.attach_descrip_ptr = null; 363 call iox_$propagate (iocbp -> iocb.actual_iocb_ptr); 364 call hcs_$reset_ips_mask (mask, mask); 365 revert any_other; 366 call janitor; 367 return; 368 369 all_hell_broke_loose: 370 proc; 371 372 if mask /* If we are in critical section of manipulating */ 373 then do; 374 ti.version = 0; /* the iocb, then kill the process when a fault */ 375 ti.code = error_table_$unable_to_do_io; /* comes unexpectedly. */ 376 call terminate_process_ ("fatal_error", addr (ti)); 377 end; 378 call continue_to_signal_ (0); /* otherwise pass on the error. */ 379 380 end all_hell_broke_loose; 381 382 end linus_invoke_; 383 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0939.8 linus_invoke_.pl1 >special_ldd>install>MR12.0-1106>linus_invoke_.pl1 149 1 05/20/83 1846.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 151 2 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.incl.pl1 153 3 03/27/82 0434.5 linus_invoc_stack.incl.pl1 >ldd>include>linus_invoc_stack.incl.pl1 155 4 04/13/82 1620.2 ssu_prompt_modes.incl.pl1 >ldd>include>ssu_prompt_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. DONT_PROMPT_AFTER_NULL_LINES constant bit(2) initial unaligned dcl 4-10 ref 317 322 NL constant char(1) initial unaligned dcl 101 ref 273 PROMPT constant bit(1) initial unaligned dcl 4-6 ref 317 322 PROMPT_IF_TYPEAHEAD constant bit(3) initial unaligned dcl 4-12 ref 317 322 actual_iocb_ptr 12 based pointer level 2 dcl 1-6 set ref 240 249 250 251 252* 260 261 262 337 342 343 344 345* 352 353 363* addr builtin function dcl 93 ref 251 376 376 any_other 000160 stack reference condition dcl 97 ref 210 247 254 340 360 365 attach_data based structure level 1 unaligned dcl 86 set ref 191 232 attach_data_ptr 16 based pointer level 2 in structure "iocb" dcl 1-6 in procedure "linus_invoke_" set ref 215* 260 261 262 337 352 attach_data_ptr 000100 automatic pointer dcl 63 in procedure "linus_invoke_" set ref 168* 191* 192 193 200 215 232 232 352* 354 355 357 attach_descrip based structure level 1 unaligned dcl 82 set ref 188 230 attach_descrip_len 000102 automatic fixed bin(17,0) dcl 64 set ref 187* 188 188 attach_descrip_ptr 14 based pointer level 2 in structure "iocb" dcl 1-6 in procedure "linus_invoke_" set ref 160 214* 353 362* attach_descrip_ptr 000104 automatic pointer dcl 65 in procedure "linus_invoke_" set ref 167* 188* 189 214 230 230 353* buf based char unaligned dcl 80 set ref 273* 292* 298* 307 buflen parameter fixed bin(21,0) dcl 58 set ref 257 262* 268 279* 302* bufptr parameter pointer dcl 57 set ref 257 262* 273 279* 292 298 302* 307 307* cleanup 000166 stack reference condition dcl 97 ref 170 close 36 based entry variable level 2 dcl 1-6 set ref 250* code 1 000156 automatic fixed bin(35,0) level 2 in structure "ti" dcl 74 in procedure "linus_invoke_" set ref 375* code parameter fixed bin(35,0) dcl 55 in procedure "linus_invoke_" set ref 157 162* 174* 175 181* 182 193* 195 202* 203 219* 237 242* 257 262* 264 264 268* 271* 279* 290* 296* 302* 307* 319* 324* 325 327* 328 334 337* 349 357* codeptr builtin function dcl 93 ref 174 174 327 327 continue_to_signal_ 000014 constant entry external dcl 106 ref 378 cv_ptr_ 000016 constant entry external dcl 107 ref 181 193 detach_iocb 26 based entry variable level 2 dcl 1-6 set ref 213* 343* dummy_code 000106 automatic fixed bin(35,0) dcl 66 set ref 226* 227* 228* error_table_$end_of_info 000064 external static fixed bin(35,0) dcl 130 ref 264 error_table_$long_record 000066 external static fixed bin(35,0) dcl 131 ref 268 error_table_$not_closed 000070 external static fixed bin(35,0) dcl 132 ref 242 error_table_$not_detached 000072 external static fixed bin(35,0) dcl 133 ref 162 error_table_$short_record 000074 external static fixed bin(35,0) dcl 134 ref 264 error_table_$unable_to_do_io 000076 external static fixed bin(35,0) dcl 135 ref 375 get_line 42 based entry variable level 2 dcl 1-6 set ref 249* hcs_$reset_ips_mask 000020 constant entry external dcl 108 ref 218 253 346 364 hcs_$set_ips_mask 000022 constant entry external dcl 109 ref 211 248 341 361 ignore_this parameter bit(1) dcl 54 ref 157 237 invoc_stack based structure level 1 dcl 3-3 ioa_$nnl 000024 constant entry external dcl 110 ref 288 iocb based structure level 1 dcl 1-6 iocbp parameter pointer dcl 52 set ref 157 160 212 213 214 215 217* 237 240 249 250 251 252 257 260 261 262 279* 302* 334 337 342 343 344 345 349 352 353 362 363 iox_$attach_name 000026 constant entry external dcl 111 ref 174 iox_$attach_ptr 000030 constant entry external dcl 112 ref 327 iox_$close 000032 constant entry external dcl 113 ref 226 337 iox_$destroy_iocb 000036 constant entry external dcl 115 ref 228 iox_$detach_iocb 000034 constant entry external dcl 114 ref 227 324 357 iox_$get_line 000040 constant entry external dcl 116 ref 262 279 302 iox_$open 000042 constant entry external dcl 118 ref 202 iox_$propagate 000044 constant entry external dcl 119 ref 217 252 345 363 iox_$user_input 000100 external static pointer dcl 136 set ref 279 324* 327* 330 is_ptr 22 based pointer level 2 dcl 2-53 set ref 279 330* ivs_ptr 42 based pointer level 2 dcl 2-53 ref 314 314 317 lcb based structure level 1 dcl 2-53 lcb_ptr based pointer level 2 in structure "attach_data" dcl 86 in procedure "linus_invoke_" set ref 192* 260 354 lcb_ptr 000174 automatic pointer dcl 2-121 in procedure "linus_invoke_" set ref 181* 188 191 192 260* 279 285 307* 314 314 317 317 319* 322 330 354* length based fixed bin(17,0) level 2 in structure "attach_descrip" dcl 82 in procedure "linus_invoke_" set ref 188* 189 230 length builtin function dcl 93 in procedure "linus_invoke_" ref 187 linus_canon_input 000046 constant entry external dcl 120 ref 307 linus_invoke$pop 000050 constant entry external dcl 121 ref 319 mask 000107 automatic bit(36) dcl 67 set ref 209* 211* 218* 218* 246* 248* 253* 253* 339* 341* 346* 346* 359* 361* 364* 364* 372 mode parameter fixed bin(17,0) dcl 56 ref 237 ninvocs based fixed bin(17,0) level 2 dcl 3-3 ref 314 317 nread parameter fixed bin(21,0) dcl 59 set ref 257 262* 266 268 272* 272 273 273 279* 291* 292 297* 298 302* 307 307* null builtin function dcl 93 ref 160 166 167 168 224 230 232 240 314 344 362 open 32 based entry variable level 2 dcl 1-6 set ref 212* 342* open_descrip_ptr 20 based pointer level 2 dcl 1-6 set ref 240 251* 344* option parameter varying char array dcl 53 ref 157 174 181 187 189 193 prompt 000110 automatic varying char(64) dcl 68 set ref 287* 288* prompt_flag 15 based bit(1) level 2 packed unaligned dcl 2-53 ref 285 317 322 rq_name 000131 automatic char(32) unaligned dcl 69 set ref 282* 283 294 sci_ptr 000142 automatic pointer dcl 70 in procedure "linus_invoke_" set ref 261* 282* 287* 317* 322* sci_ptr 2 based pointer level 2 in structure "attach_data" dcl 86 in procedure "linus_invoke_" set ref 193* 261 search builtin function dcl 93 ref 307 source_iocbp 4 based pointer level 2 in structure "attach_data" dcl 86 in procedure "linus_invoke_" set ref 200* 262* 337* 355 357* source_iocbp 000144 automatic pointer dcl 71 in procedure "linus_invoke_" set ref 166* 174* 200 202* 224 226* 227* 228* 355* ssu_$get_prompt 000052 constant entry external dcl 122 ref 287 ssu_$get_request_name 000054 constant entry external dcl 123 ref 282 ssu_$set_prompt_mode 000056 constant entry external dcl 124 ref 317 322 static_area 144 based area level 2 dcl 2-53 ref 188 191 static_open_descrip 000010 internal static structure level 1 unaligned dcl 143 set ref 251 string 1 based char level 2 packed unaligned dcl 82 set ref 189* substr builtin function dcl 93 set ref 273* switch_name 000146 automatic char(32) unaligned dcl 72 set ref 172* 174* terminate_process_ 000060 constant entry external dcl 125 ref 376 ti 000156 automatic structure level 1 dcl 74 set ref 376 376 unique_chars_ 000062 constant entry external dcl 126 ref 172 version 000156 automatic fixed bin(17,0) level 2 dcl 74 set ref 374* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DONT_PROMPT internal static bit(1) initial unaligned dcl 4-7 DONT_PROMPT_IF_TYPEAHEAD internal static bit(3) initial unaligned dcl 4-13 PROMPT_AFTER_NULL_LINES internal static bit(2) initial unaligned dcl 4-9 fixed builtin function dcl 93 iox_$iocb_version_sentinel external static char(4) dcl 1-51 iox_$user_io external static pointer dcl 137 ivs_ptr automatic pointer dcl 3-9 linus_data_$max_invocs external static fixed bin(17,0) dcl 138 rel builtin function dcl 93 sys_info$max_seg_size external static fixed bin(35,0) dcl 139 NAMES DECLARED BY EXPLICIT CONTEXT. all_hell_broke_loose 002042 constant entry internal dcl 369 ref 210 247 340 360 janitor 001601 constant entry internal dcl 222 ref 170 177 184 197 205 366 linus_invoke_ 000055 constant entry external dcl 19 ref 174 174 327 327 linus_invoke_attach 000070 constant entry external dcl 157 linus_invoke_close 001321 constant entry external dcl 334 ref 250 linus_invoke_detach 001446 constant entry external dcl 349 ref 213 343 linus_invoke_get_line 001012 constant entry external dcl 257 ref 249 linus_invoke_open 000663 constant entry external dcl 237 ref 212 342 to_pop_or_not_to_pop 001672 constant entry internal dcl 311 ref 274 278 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2760 3062 2313 2770 Length 3430 2313 102 331 445 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_invoke_ 210 external procedure is an external procedure. on unit on line 170 64 on unit on unit on line 210 64 on unit janitor 70 internal procedure is called by several nonquick procedures. on unit on line 247 64 on unit to_pop_or_not_to_pop internal procedure shares stack frame of external procedure linus_invoke_. on unit on line 340 64 on unit on unit on line 360 64 on unit all_hell_broke_loose 80 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 static_open_descrip linus_invoke_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_invoke_ 000100 attach_data_ptr linus_invoke_ 000102 attach_descrip_len linus_invoke_ 000104 attach_descrip_ptr linus_invoke_ 000106 dummy_code linus_invoke_ 000107 mask linus_invoke_ 000110 prompt linus_invoke_ 000131 rq_name linus_invoke_ 000142 sci_ptr linus_invoke_ 000144 source_iocbp linus_invoke_ 000146 switch_name linus_invoke_ 000156 ti linus_invoke_ 000174 lcb_ptr linus_invoke_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this call_int_other return enable shorten_stack ext_entry ext_entry_desc int_entry alloc_based free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. continue_to_signal_ cv_ptr_ hcs_$reset_ips_mask hcs_$set_ips_mask ioa_$nnl iox_$attach_name iox_$attach_ptr iox_$close iox_$destroy_iocb iox_$detach_iocb iox_$get_line iox_$open iox_$propagate linus_canon_input linus_invoke$pop ssu_$get_prompt ssu_$get_request_name ssu_$set_prompt_mode terminate_process_ unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$end_of_info error_table_$long_record error_table_$not_closed error_table_$not_detached error_table_$short_record error_table_$unable_to_do_io iox_$user_input LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 19 000054 157 000062 160 000106 162 000115 163 000117 166 000120 167 000122 168 000123 170 000124 172 000146 174 000203 175 000266 177 000271 178 000275 181 000276 182 000343 184 000346 185 000352 187 000353 188 000370 189 000403 191 000435 192 000444 193 000446 195 000514 197 000517 198 000523 200 000524 202 000527 203 000550 205 000552 206 000556 209 000557 210 000560 211 000602 212 000615 213 000624 214 000627 215 000631 217 000635 218 000644 219 000654 220 000655 237 000656 240 000673 242 000703 243 000706 246 000707 247 000710 248 000732 249 000745 250 000755 251 000760 252 000763 253 000773 254 001003 255 001004 257 001005 260 001022 261 001031 262 001034 264 001054 266 001062 268 001065 271 001072 272 001073 273 001074 274 001102 276 001103 278 001104 279 001105 282 001133 283 001143 285 001147 287 001153 288 001164 290 001211 291 001212 292 001215 293 001222 294 001223 296 001227 297 001230 298 001233 299 001240 302 001241 304 001261 307 001262 309 001314 334 001315 337 001331 339 001347 340 001350 341 001372 342 001405 343 001415 344 001420 345 001422 346 001433 347 001443 349 001444 352 001456 353 001464 354 001466 355 001471 357 001474 359 001506 360 001507 361 001531 362 001544 363 001551 364 001562 365 001572 366 001573 367 001577 222 001600 224 001606 226 001613 227 001623 228 001635 230 001647 232 001662 235 001671 311 001672 314 001673 317 001702 319 001726 320 001737 322 001740 324 001762 325 001773 327 001776 328 002030 330 002033 332 002040 369 002041 372 002047 374 002052 375 002053 376 002055 378 002077 380 002107 ----------------------------------------------------------- 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