COMPILATION LISTING OF SEGMENT linus_lila 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.8 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 linus_lila: 19 proc (sci_ptr_parm, lcb_ptr_parm); 20 21 dcl lcb_ptr_parm ptr parm; 22 dcl sci_ptr_parm ptr parm; 23 24 25 /* DESCRIPTION: 26* 27* This procedure functions as an extremely simple-minded editor, used in 28* entering and manipulating lila expressions. This editor looks very much 29* like a subset of the editor in the basic system, and uses a vfile_ keyed 30* sequential file to hold the text. The contents of this file are retained 31* from one invocation of lila to the next, and the file is refreshed only if a 32* -new control argument is specified in the LINUS "lila" request or the LILA 33* "new" request is specified. 34* 35* HISTORY: 36* 37* 77-04-01 J. A. Weeldreyer: Initially written. 38* 39* 79-12-04 Rickie E. Brinegar: Modified to return to linus request level when 40* a macro is invoked with too few arguments. 41* 42* 80-04-12 Rickie E. Brinegar: Modified to use linus_define_area instead of 43* get_system_free_area_. 44* 45* 81-02-03 Rickie E. Brinegar: removed unreferenced variable sex. Added rel 46* builtin to the declarations. 47* 48* 81-04-10 Rickie E. Brinegar: changed linus version number from 2 to 3.0. 49* 50* 81-07-14 Rickie E. Brinegar: added conversion condition trap. 51* 52* 81-10-07 Rickie E. Brinegar: changed linus_translate to 53* linus_lila_translate to make it a LILA module as only LILA calls it. 54* 55* 81-11-06 Rickie E. Brinegar: Removed the calls to linus_free_se as the 56* allocation of the selection expression is now in the lila temporary segment 57* instead of the lcb.static area. 58* 59* 82-01-29 DJ Schimke: Implemented build mode (automatic line numbering). 60* Added build, last_line_num, and write_line (pulled from process_line) 61* internal procedures. This is in response to PFS 4.9.5 for MR10. 62* 63* 82-02-01 DJ Schimke: Added "new" request to delete the existing LILA file. 64* This was added to compliment the build request. 65* 66* 82-02-03 DJ Schimke: Added "list_requests" and "?" requests to help the 67* user. Changed the inv_lila_req error message to inform the user about "?". 68* Added "sv" short name to save request for convenience. 69* 70* 82-02-08 Paul W. Benjamin: Conversion of LINUS (not lila) to ssu_. 71* 72* 82-06-22 DJ Schimke: Changed lila to not abort the linus invocation when 73* the get_line calls return a linus_err_$no_macro_arg error code. 74* 75* 82-08-30 DJ Schimke: Modified lila build mode prompt to contain an asterisk 76* at the end rather than a space if the line which is being input will 77* overwrite an existing text line. Also improved the build (request & ctl_arg) 78* parameter processing code to eliminate a logic error and clean it up. 79* 80* 82-12-06 DJ Schimke: Modified lila to not prompt if the prompt string is 81* just blanks (null character string). Also added the -prompt and -no_prompt 82* control args which override the currrent subsystem prompting flag. 83* Fixes an annoying problem when using the new exec_com facility in linus. 84* 85* 83-02-10 DJ Schimke: Removed a call to linus_canon which was meant to be 86* removed as part of the ssu conversion. Because the calling sequence for 87* linus_canon was changed as part of the ssu conversion, we were getting fault 88* tag 1 errors.The linus_invoke_ module calls linus_canon to expand macro args 89* so this module no longer needs to worry about them. 90* 91* 83-03-24 DJ Schimke: Added code to set lcb.si_ptr to null when a user tries 92* to proc with a null lila file. 93* 94* 83-08-23 Al Dupuis: Added the initialize_lila_file entry as part of the 95* input_query work. The main entry point used to use sci_ptr and lcb_ptr 96* as parms instead of the automatic ptrs they should have been, so I 97* changed it so the parms are now declared explicitely and moved to the 98* auto ptrs. 99* 100* 83-08-30 Bert Moberg: Added code for the translate_query request work. 101* 102**/ 103 1 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 1 7* install(86-07-29,MR12.0-1106): 1 8* Added general_work_area_ptr and renamed sfr_ptr to 1 9* force_retrieve_scope_ptr. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* HISTORY: 1 14* 1 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 1 16* 1 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 1 18* a part of the attribute level control work. 1 19* 1 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 1 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 1 22* scope information. 1 23* 1 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 1 25* retaining various vcpu times to be collected when in timing mode. The 1 26* times to be collected are: LINUS parsing time, LINUS processing time, and 1 27* MRDS processing time. 1 28* 1 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 1 30* part of the line numbering implementation. This allows for possible later 1 31* LINUS control of the build defaults. 1 32* 1 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 1 34* information is now retained by ssu_. Removed parse_timer as no longer 1 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 1 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 1 37* 1 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 1 39* subsystem_invocation_level, and selection_expression_identifier. 1 40* 1 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 1 42* table_control_info_ptr. 1 43* 1 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 1 45* 1 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 1 47* 1 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 1 49* 1 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 1 51**/ 1 52 1 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 1 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 1 55 2 rb_len fixed bin (21), /* length of request buffer */ 1 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 1 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 1 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 1 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 1 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 1 61 2 test_flag bit (1) unal, /* on if in test mode */ 1 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 1 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 1 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 1 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 1 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 1 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 1 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 1 69 2 reserved bit (27) unal, 1 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 1 71 2 rb_ptr ptr, /* ptr to request buffer */ 1 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 1 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 1 74 2 ttn_ptr ptr, /* pointer to table info structure */ 1 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 1 76 2 lv_ptr ptr, /* pointer linus variables */ 1 77 2 si_ptr ptr, /* pointer to select_info structure */ 1 78 2 setfi_ptr ptr, /* pointer to set function information */ 1 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 1 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 1 81 2 lit_ptr ptr, /* pointer to literal pool */ 1 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 1 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 1 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 1 85* (MR7.0) */ 1 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 1 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 1 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 1 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 1 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 1 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 1 92* for current lila expression */ 1 93 2 unused_timer float bin (63), /* future expansion */ 1 94 2 request_time float bin (63), /* How much request time was spent 1 95* in LINUS. (-1 = user has just enabled 1 96* timing, do not report) */ 1 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 1 98 2 build_increment fixed bin, /* default increment for build mode */ 1 99 2 build_start fixed bin, /* default start count for build mode */ 1 100 2 linus_version char (4), /* current version of LINUS */ 1 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 1 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 1 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 1 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 1 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 1 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 1 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 1 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 1 109 2 word_pad (6) bit (36) unal, 1 110 /* procedures that will be optionally */ 1 111 /* replaced by the user. Saved so they */ 1 112 /* can be reinstated if desired. */ 1 113 2 ssu_abort_line entry options (variable), 1 114 2 ssu_post_request_line variable entry (ptr), 1 115 2 ssu_pre_request_line variable entry (ptr), 1 116 1 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 1 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 1 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 1 120 1 121 dcl lcb_ptr ptr; 1 122 1 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 104 105 2 1 /* BEGIN INCLUDE FILE linus_char_argl.incl.pl1 -- jaw 2/11/77 */ 2 2 2 3 /* HISTORY: 2 4* 2 5* 82-02-05 Paul W. Benjamin: Changed arg_len to fixed bin (21). 2 6* 2 7**/ 2 8 2 9 dcl 1 char_argl aligned based (ca_ptr), /* structure for general char. arg. list */ 2 10 2 nargs fixed bin, /* number of args */ 2 11 2 arg (nargs_init refer (char_argl.nargs)), 2 12 3 arg_ptr ptr, /* ptr to first char. of arg */ 2 13 3 arg_len fixed bin (21); /* no. of chars. in arg */ 2 14 2 15 dcl ca_ptr ptr; 2 16 dcl nargs_init fixed bin; 2 17 2 18 /* END INCLUDE FILE linus_char_argl.incl.pl1 */ 106 107 3 1 /* BEGIN INCLUDE FILE -- linus_rel_array.incl.pl1 -- reb 09/09/80 3 2* 3 3* 80-09-09 Rickie E. Brinegar: Initially written. 3 4* 3 5* 81-01-29 Rickie E. Brinegar: changed to comform to standards for include 3 6* files. 3 7* 3 8**/ 3 9 3 10 dcl 1 linus_rel_array based (linus_rel_array_ptr), 3 11 2 num_of_rels fixed bin, 3 12 2 rels (num_of_rels_init refer (linus_rel_array.num_of_rels)), 3 13 3 rel_name char (32), 3 14 3 rslt_info_ptr ptr; 3 15 3 16 dcl linus_rel_array_ptr ptr; 3 17 3 18 dcl num_of_rels_init fixed bin init (0); 3 19 3 20 /* END INCLUDE FILE linus_rel_array.incl.pl1 */ 3 21 108 109 110 dcl sci_ptr ptr; /* for ssu_ */ 111 112 dcl ( 113 nread, /* number of chars in input line */ 114 rec_len, /* no. of chars in lila record */ 115 read_len 116 ) fixed bin (21); /* no. of chars read from lila file */ 117 118 dcl cmd_len fixed bin; 119 120 dcl ( 121 ref_ptr init (null), /* referencing ptr for calls */ 122 ica_ptr init (null), /* ptr to char_argl for invoke */ 123 acmd_ptr init (null), /* for escaping to command processor */ 124 siocb_ptr init (null), /* save iocb pointer */ 125 env_ptr init (null) 126 ) ptr; /* sink for environment ptr */ 127 128 dcl ( 129 code, /* status code */ 130 icode 131 ) fixed bin (35); /* internal status code */ 132 133 dcl aligned_cmd char (cmd_len) based (acmd_ptr); 134 dcl arg char (char_argl.arg.arg_len (arg_index)) 135 based (char_argl.arg.arg_ptr (arg_index)); 136 /* input arg */ 137 dcl arg_index fixed bin; /* arg index */ 138 dcl atd char (173); /* save attach desc */ 139 dcl build_increment fixed bin; /* current increment */ 140 dcl build_mode bit (1); /* on if in build mode */ 141 dcl next_build_line pic "9999"; /* next automatic line number*/ 142 dcl chars (nread) char (1) unal based (lcb.rb_ptr); 143 /* another version of request */ 144 dcl control_arg bit (1) unal; /* control arg flag */ 145 dcl done bit (1) unal; /* completion flag */ 146 dcl lila_prompt_flag bit (1) unal; /* -prompt/-no_prompt flag */ 147 dcl i fixed bin; /* index for do */ 148 dcl key pic "9999"; /* line number */ 149 dcl key_var char (256) var; /* var. version of line no. */ 150 dcl parameter fixed bin; /* parameter to request or control arg */ 151 dcl parameter_number fixed bin; /* parameter index */ 152 dcl prompt_char char (32) varying 153 based (lcb.lila_promp_chars_ptr); 154 dcl req_index fixed bin (17); /* loop index */ 155 dcl request char (nread) based (lcb.rb_ptr); 156 /* input line */ 157 dcl request_count fixed bin init (11) int static options (constant); 158 dcl 1 request_table (request_count) aligned, /* table of requests and short names */ 159 /* Must be changed whenever requests are added. */ 160 2 name char (15) var 161 init (".", "?", "build", "execute", "invoke", 162 "list_requests", "list", "new", "proc", "quit", 163 "save"), 164 2 short char (5) var 165 init ("", "", "", "e", "i", "lr", "ls", "", "", 166 "q", "sv"), 167 2 summary char (60) var 168 init ("Print the current lila status.", 169 "List all lila request names.", 170 "Enter build mode to insert/overwrite text.", 171 "Execute a Multics command line.", 172 "Invoke the specified Linus macro.", 173 "List brief information on lila requests.", 174 "List the current file.", 175 "Delete all text from the current lila file.", 176 "Process the current lila file.", "Leave LILA.", 177 "Save the current text into the specified linus macro." 178 ); 179 dcl token char (15) var; /* first token in lila line */ 180 dcl work_area area (sys_info$max_seg_size) 181 based (lcb.lila_area_ptr); 182 183 dcl 1 list_buf aligned, 184 2 key char (4) unal, 185 2 data char (256) unal; 186 187 dcl WHT_SPC char (3) int static options (constant) init (" 188 "); /* NL, SP, HT */ 189 dcl NO_KILL fixed bin (35) int static options (constant) 190 init (0); 191 dcl KILL fixed bin (35) int static options (constant) 192 init (1); 193 dcl NL char (1) int static options (constant) init (" 194 "); 195 dcl BOF fixed bin int static options (constant) init (-1); 196 dcl KSU fixed bin int static options (constant) init (10); 197 dcl SO fixed bin int static options (constant) init (2); 198 199 dcl ( 200 error_table_$end_of_info, 201 error_table_$no_record, 202 linus_data_$lila_id, 203 linus_error_$bad_stmt_no, 204 linus_error_$build_overflow, 205 linus_error_$conv, 206 linus_error_$integer_too_large, 207 linus_error_$integer_too_small, 208 linus_error_$inv_arg, 209 linus_error_$inv_lila_req, 210 linus_error_$no_db, 211 linus_error_$no_lila_data, 212 linus_error_$no_macro_arg, 213 linus_error_$no_path, 214 linus_error_$nonex_del, 215 linus_error_$non_integer, 216 linus_error_$bad_num_args, 217 sys_info$max_seg_size 218 ) ext fixed bin (35); 219 220 dcl ( 221 iox_$user_input, 222 iox_$user_output 223 ) ptr ext; 224 225 dcl (cleanup, conversion) 226 condition; 227 228 dcl (addr, after, bin, char, divide, before, fixed, index, length, ltrim, 229 mod, null, rel, rtrim, search, substr, string, verify) 230 builtin; 231 232 /* Multics Subroutines */ 233 234 dcl cu_$cp entry (ptr, fixed bin, fixed bin (35)); 235 dcl cu_$decode_entry_value 236 entry (entry, ptr, ptr); 237 dcl cv_dec_check_ entry (char (*), fixed bin (35)) 238 returns (fixed bin (35)); 239 dcl ioa_ entry options (variable); 240 dcl ioa_$ioa_switch entry options (variable); 241 dcl ioa_$nnl entry options (variable); 242 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, 243 fixed bin (35)); 244 dcl iox_$close entry (ptr, fixed bin (35)); 245 dcl iox_$delete_record entry (ptr, fixed bin (35)); 246 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 247 dcl iox_$get_line entry (ptr, ptr, fixed bin (21), fixed bin (21), 248 fixed bin (35)); 249 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, 250 fixed bin (35)); 251 dcl iox_$position entry (ptr, fixed bin, fixed bin (21), 252 fixed bin (35)); 253 dcl iox_$read_key entry (ptr, char (256) var, fixed bin (21), 254 fixed bin (35)); 255 dcl iox_$read_record entry (ptr, ptr, fixed bin (21), fixed bin (21), 256 fixed bin (35)); 257 dcl iox_$rewrite_record entry (ptr, ptr, fixed bin (21), fixed bin (35)); 258 dcl iox_$seek_key entry (ptr, char (256) var, fixed bin (21), 259 fixed bin (35)); 260 dcl iox_$write_record entry (ptr, ptr, fixed bin (21), fixed bin (35)); 261 dcl get_pdir_ entry returns (char (168)); 262 dcl ssu_$abort_line entry options (variable); 263 dcl ssu_$abort_subsystem entry options (variable); 264 dcl ssu_$arg_count entry (ptr, fixed bin); 265 dcl ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin (21)); 266 dcl ssu_$execute_line entry (ptr, ptr, fixed bin (21), fixed bin (35)); 267 dcl unique_chars_ entry (bit (*)) returns (char (15)); 268 269 /* LINUS/MRDS Subroutines */ 270 271 dcl linus_convert_code entry (fixed bin (35), fixed bin (35), 272 fixed bin (35)); 273 dcl linus_invoke$pop_all 274 entry (ptr, fixed bin (35)); 275 dcl linus_print_error entry (fixed bin (35), char (*)); 276 dcl linus_translate_query$proc 277 entry (ptr, fixed bin (35)); 278 279 sci_ptr = sci_ptr_parm; 280 lcb_ptr = lcb_ptr_parm; 281 build_mode = "0"b; /* initialize */ 282 lila_prompt_flag = lcb.prompt_flag; 283 ica_ptr, siocb_ptr = null; 284 call cu_$decode_entry_value (linus_lila, ref_ptr, env_ptr); 285 /* for later calls */ 286 287 on cleanup call tidy_up; 288 on conversion call error (linus_error_$conv, "", NO_KILL); 289 290 ca_ptr = null; 291 if lcb.db_index = 0 then 292 call error (linus_error_$no_db, "", NO_KILL); 293 294 call ssu_$arg_count (sci_ptr, nargs_init); 295 296 if nargs_init ^= 0 /* if have arg */ 297 then do; 298 allocate char_argl in (lcb.static_area); 299 do i = 1 to nargs_init; 300 call ssu_$arg_ptr (sci_ptr, i, char_argl.arg.arg_ptr (i), char_argl.arg.arg_len (i)); 301 end; 302 do arg_index = 1 to char_argl.nargs; /* request arg loop */ 303 if arg = "-new" 304 then do; /* if -new, must start with new file */ 305 if lcb.liocb_ptr = null /* no old file */ 306 then call init_lila_file;/* just make new one */ 307 else if lcb.lila_count > 0 308 then call delete_old_file; /* delete old data */ 309 end; /* -new */ 310 311 else if arg = "-no_prompt" 312 then lila_prompt_flag = "0"b; /* if -no_prompt */ 313 314 else if arg = "-prompt" 315 then lila_prompt_flag = "1"b; /* if -prompt */ 316 317 else if arg = "-build" 318 then do; /* if -build */ 319 build_increment = lcb.build_increment; /* default */ 320 next_build_line = 0; /* init */ 321 322 parameter_number = 1; 323 control_arg = "0"b; 324 do while ((arg_index + 1 <= char_argl.nargs) & (^control_arg)); 325 arg_index = arg_index + 1; /* look at next arg */ 326 parameter = cv_dec_check_ (arg, code); 327 if code ^= 0 328 then do; 329 control_arg = "1"b; 330 arg_index = arg_index - 1; 331 end; 332 else do; /* have parameters */ 333 if (parameter < 1) 334 then call error (linus_error_$integer_too_small, arg, NO_KILL); 335 if (parameter > 9999) 336 then call error (linus_error_$integer_too_large, arg, NO_KILL); 337 338 if parameter_number = 1 339 then next_build_line = parameter; 340 else if parameter_number = 2 341 then build_increment = parameter; 342 else call error (linus_error_$bad_num_args, "^/""-build"" allows a maximum of two parameters. " || arg, NO_KILL); /* no third parameter allowed */ 343 344 parameter_number = parameter_number + 1; 345 end; /* have parameters */ 346 end; /* do while */ 347 build_mode = "1"b; 348 end; /* if -build */ 349 350 else call error (linus_error_$inv_arg, arg, NO_KILL); 351 end; /* request loop */ 352 end; /* if have arg */ 353 354 if build_mode 355 then call set_build_start ("0"b); 356 357 if lcb.liocb_ptr = null then /* if no lila file 358* 359**/ 360 call init_lila_file; /* make one */ 361 362 done = "0"b; /* init completion flag */ 363 code = 0; 364 365 do while (^done); /* until user types end */ 366 367 if build_mode then 368 call build; /* building */ 369 370 if lila_prompt_flag then do; /* if prompting */ 371 if lcb.is_ptr = iox_$user_input 372 & prompt_char ^= "" then 373 call ioa_$nnl ("^a ", prompt_char); 374 end; 375 376 call iox_$get_line (iox_$user_input, lcb.rb_ptr, lcb.rb_len, nread, icode); 377 /* read next line */ 378 379 if icode = linus_error_$no_macro_arg then /* if no_macro arg */ 380 call error (icode, "reading LILA build text", NO_KILL); 381 else if icode ^= 0 then /* if other error */ 382 call error (icode, "reading LILA text", KILL); 383 else call process_line; /* if OK */ 384 if lcb.is_ptr ^= iox_$user_input & code ^= 0 then 385 do; 386 call linus_invoke$pop_all (lcb_ptr, icode); 387 call tidy_up; 388 end; 389 390 end; /* main LILA loop */ 391 392 code = 0; 393 exit: 394 if ca_ptr ^= null 395 then free char_argl; 396 if code ^= 0 397 then call ssu_$abort_subsystem (sci_ptr, code); 398 return; 399 400 initialize_lila_file: entry ( 401 402 lcb_ptr_parm /* input: ptr to the linus control block */ 403 ); 404 405 lcb_ptr = lcb_ptr_parm; 406 sci_ptr = lcb.subsystem_control_info_ptr; 407 if lcb.liocb_ptr = null () 408 then call init_lila_file; 409 else call delete_old_file; 410 lcb.lila_chars = 0; 411 lcb.lila_count = 0; 412 413 return; 414 415 error: 416 proc (icode, msg, fatal_flag); 417 418 /* Error procedure, calls convert_code and print_error and then returns. */ 419 420 dcl (ucode, icode, fatal_flag) 421 fixed bin (35); 422 dcl msg char (*); 423 424 if lcb.is_ptr ^= iox_$user_input then 425 call linus_invoke$pop_all (lcb_ptr, code); 426 call linus_convert_code (icode, ucode, linus_data_$lila_id); 427 code = fatal_flag; 428 call tidy_up; 429 if fatal_flag = NO_KILL 430 then call ssu_$abort_line (sci_ptr, ucode, msg); 431 else call ssu_$abort_subsystem (sci_ptr, ucode, msg); 432 433 434 end error; 435 436 tidy_up: 437 proc; 438 439 /* procedure to clean up if interrupted */ 440 441 if (icode ^= 0 | code ^= 0) & ^lcb.prompt_flag then 442 call linus_print_error (0, "Returning to linus request level."); 443 if ca_ptr ^= null 444 then free char_argl; 445 if siocb_ptr ^= null then 446 do; /* if open save switch */ 447 call iox_$close (siocb_ptr, icode); 448 call iox_$detach_iocb (siocb_ptr, icode); 449 end; 450 451 end tidy_up; 452 453 process_line: 454 proc; 455 456 /* Procedure to process a LILA input line */ 457 458 dcl (i, j) fixed bin; 459 460 i = verify (request, WHT_SPC); /* search for first data */ 461 if i <= 0 then 462 return; /* was null line */ 463 j = search (substr (request, i), WHT_SPC); /* look for end of token */ 464 if j <= 0 then 465 j = nread - i + 1; /* was at end of request */ 466 else j = j - 1; 467 468 token = substr (request, i, j); /* isolate line no. or request */ 469 if token >= "0" & token <= "9999" then 470 do; /* token may be number */ 471 if verify (token, "0123456789") ^= 0 /* if not really numeric */ 472 | length (token) > 4 then 473 do; /* or too many digits */ 474 call linus_print_error (linus_error_$bad_stmt_no, (token)); 475 return; 476 end; 477 key = fixed (token); /* canonize to 4 digits */ 478 i = i + j; /* first char beyond stmt no. */ 479 j = verify (substr (request, i), WHT_SPC); /* search for data following stmt no. */ 480 if j <= 0 then 481 do; /* no more data, is delete */ 482 call iox_$seek_key (lcb.liocb_ptr, (key), rec_len, icode); 483 /* find the line */ 484 if icode ^= 0 then /* if not found */ 485 call linus_print_error (linus_error_$nonex_del, (token)); 486 else 487 do; /* found the line, delete it */ 488 lcb.si_ptr = null; /* force new proc */ 489 call iox_$delete_record (lcb.liocb_ptr, icode); 490 if icode ^= 0 then /* problems */ 491 call error (icode, "", KILL); 492 lcb.lila_chars = lcb.lila_chars - rec_len; 493 /* decr. char count */ 494 lcb.lila_count = lcb.lila_count - 1; /* decrement line count */ 495 end; /* line deletion */ 496 end; /* delete operation */ 497 else call write_line ((key), addr (chars (i)), nread - i + 1); 498 /* source line specified */ 499 end; /* if key is possible number */ 500 501 else if token = "." then /* user wants reassurance */ 502 call ioa_ ("linus version ^a (lila)", lcb.linus_version); 503 504 else if token = "list" | token = "ls" then 505 do; /* user wants list of file */ 506 if lcb.lila_count <= 0 then /* no lines in file */ 507 call linus_print_error (linus_error_$no_lila_data, request); 508 else call list_file (iox_$user_output); /* there is data, list it */ 509 end; /* list command */ 510 511 else if token = "proc" then 512 do; /* user wants to translate */ 513 call linus_translate_query$proc (lcb_ptr, code); /* create MRDS selection expression */ 514 if code ^= 0 then go to exit; 515 end; /* processing end */ 516 517 else if token = "quit" | token = "q" then 518 done = "1"b; 519 520 else if token = "invoke" | token = "i" then 521 do; /* process invoke request */ 522 call ssu_$execute_line (sci_ptr, lcb.rb_ptr, nread, icode); 523 if icode ^= 0 then 524 go to exit; 525 ica_ptr = null; 526 end; /* invoke */ 527 528 else if token = "save" | token = "sv" then 529 do; /* process save */ 530 if lcb.lila_count <= 0 then 531 call linus_print_error (linus_error_$no_lila_data, request); 532 else 533 do; /* if have lines to save */ 534 call get_token; 535 if j > 0 then 536 do; /* if path supplied */ 537 if substr (request, i + j - 6, 6) = ".linus" then 538 /* if suffix spec. */ 539 atd = "vfile_ " || substr (request, i, j); 540 else atd = "vfile_ " || substr (request, i, j) 541 || ".linus"; 542 call 543 iox_$attach_name (unique_chars_ ("0"b) 544 || ".lila_save", siocb_ptr, atd, ref_ptr, icode); 545 if icode ^= 0 then 546 call soft_error (icode, atd); 547 call iox_$open (siocb_ptr, SO, "0"b, icode); 548 if icode ^= 0 then 549 call soft_error (icode, atd); 550 call list_file (siocb_ptr); /* list into save file */ 551 call iox_$close (siocb_ptr, icode); 552 if icode ^= 0 then 553 call soft_error (icode, atd); 554 call iox_$detach_iocb (siocb_ptr, icode); 555 if icode ^= 0 then 556 call soft_error (icode, atd); 557 siocb_ptr = null; 558 end; /* if path supplied */ 559 else call soft_error (linus_error_$no_path, (token)); 560 end; /* if have lines to save */ 561 end; /* save */ 562 else if token = "e" | token = "execute" | index (token, "..") = 1 then 563 do; 564 cmd_len = nread; 565 allocate aligned_cmd in (work_area); 566 if index (token, "..") = 1 then 567 token = ".."; 568 aligned_cmd = ltrim (after (request, rtrim (token))); 569 call cu_$cp (acmd_ptr, cmd_len, icode); 570 acmd_ptr = null; 571 end; 572 573 else if token = "build" 574 then 575 do; /* build request */ 576 build_increment = lcb.build_increment; /* default */ 577 next_build_line = 0; /* init */ 578 call get_token; 579 parameter_number = 1; 580 do while (j > 0); /* while we have parameters */ 581 parameter = cv_dec_check_ (substr (request, i, j), code); 582 if code ^= 0 583 then call soft_error (linus_error_$non_integer, substr (request, i, j)); 584 if (parameter < 1) 585 then call soft_error (linus_error_$integer_too_small, substr (request, i, j)); 586 if (parameter > 9999) 587 then call soft_error (linus_error_$integer_too_large, substr (request, i, j)); 588 589 if parameter_number = 1 590 then next_build_line = parameter; 591 else if parameter_number = 2 592 then build_increment = parameter; 593 else call soft_error (linus_error_$bad_num_args, "^/""build"" allows a maximum of two parameters. " || substr (request, i, j)); /* no third parameter allowed */ 594 call get_token; 595 parameter_number = parameter_number + 1; 596 end; /* have parameters */ 597 build_mode = "1"b; 598 call set_build_start ("1"b); 599 end; /* build request */ 600 601 else if token = "new" then 602 do; /* new file request */ 603 if lcb.lila_count > 0 then 604 call delete_old_file; /* delete old text file */ 605 end; 606 607 else if token = "?" then 608 do; /* list requests */ 609 call ioa_ ("^/Available lila requests:^/"); /* in 3 columns */ 610 do req_index = 1 to divide (request_count, 3, 17) * 3 by 3; 611 call 612 ioa_ ( 613 "^a^[^s^;, ^a^]^[^25t^a^[^s^;, ^a^]^[^50t^a^[^s^;, ^a^]^]^]", 614 request_table.name (req_index), 615 (request_table.short (req_index) = ""), 616 request_table.short (req_index), 617 (req_index + 1 <= request_count), 618 request_table.name (req_index + 1), 619 (request_table.short (req_index + 1) = ""), 620 request_table.short (req_index + 1), 621 (req_index + 2 <= request_count), 622 request_table.name (req_index + 2), 623 (request_table.short (req_index + 2) = ""), 624 request_table.short (req_index + 2)); 625 end; 626 if mod (request_count, 3) = 2 then 627 call 628 ioa_ ("^a^[^s^;, ^a^]^25t^a^[^s^;, ^a^]", 629 request_table.name (req_index), 630 (request_table.short (req_index) = ""), 631 request_table.short (req_index), 632 request_table.name (req_index + 1), 633 (request_table.short (req_index + 1) = ""), 634 request_table.short (req_index + 1)); 635 636 if mod (request_count, 3) = 1 then 637 call 638 ioa_ ("^a^[^s^;, ^a^]", request_table.name (req_index), 639 (request_table.short (req_index) = ""), 640 request_table.short (req_index)); 641 642 call 643 ioa_ ( 644 "^/Type ""list_requests"" for a short description of the requests.^/" 645 ); 646 end; 647 648 else if token = "list_requests" | token = "lr" then 649 do; /* list requests briefly */ 650 call ioa_ ("^/Summary of lila requests:"); 651 call 652 ioa_ ( 653 "^/Use "".. COMMAND_LINE"" to escape a command line to Multics.^/") 654 ; 655 do req_index = 1 to request_count; 656 call 657 ioa_ ("^a^[^s^;, ^a^]^20t^a", request_table.name (req_index), 658 (request_table.short (req_index) = ""), 659 request_table.short (req_index), 660 request_table.summary (req_index)); 661 end; 662 call 663 ioa_ ( 664 "^/Type ""help"" at LINUS request level for more information.^/"); 665 end; 666 667 else /* invalid LILA request */ 668 call linus_print_error (linus_error_$inv_lila_req, (" bad request: " || token)); 669 670 list_file: 671 proc (iocb_ptr); 672 673 /* Procedure to write the LILA file to a stream file */ 674 675 dcl iocb_ptr ptr; 676 677 call iox_$position (lcb.liocb_ptr, BOF, 0, icode);/* to start of file */ 678 if icode ^= 0 then 679 call error (icode, "", KILL); 680 do while (icode = 0); /* read and print each line */ 681 string (list_buf) = " "; /* clear the print line */ 682 call iox_$read_key (lcb.liocb_ptr, key_var, rec_len, icode); 683 if icode = 0 then 684 do; 685 call 686 iox_$read_record (lcb.liocb_ptr, addr (list_buf.data), 687 rec_len, read_len, icode); 688 if icode = 0 then 689 do; 690 list_buf.key = key_var; 691 call 692 ioa_$ioa_switch (iocb_ptr, "^a", 693 before (string (list_buf), NL)); 694 end; /* printing line */ 695 end; /* reading line data */ 696 end; /* loop through file */ 697 if icode ^= error_table_$end_of_info then 698 call error (icode, "", KILL); 699 700 end list_file; 701 702 get_token: 703 proc; 704 705 /* Procedure to get index and length of next token in request */ 706 707 i = i + j; /* first char past token */ 708 if i <= nread then 709 do; /* if still within request */ 710 j = verify (substr (request, i), WHT_SPC); /* first char of next token */ 711 if j > 0 then 712 do; /* if found another token */ 713 i = i + j - 1; /* ditto */ 714 j = search (substr (request, i), WHT_SPC); /* get length */ 715 if j <= 0 then 716 j = nread - i + 1; 717 else j = j - 1; 718 end; /* if found another token */ 719 end; /* if still within request */ 720 else j = 0; 721 722 end get_token; 723 724 soft_error: 725 proc (cd, msg); 726 727 /* Procedure to fail very softly */ 728 729 dcl (cd, ucd) fixed bin (35); 730 dcl msg char (*); 731 732 call linus_convert_code (cd, ucd, linus_data_$lila_id); 733 call linus_print_error (ucd, msg); 734 go to pl_exit; 735 736 end soft_error; 737 738 pl_exit: 739 end process_line; 740 741 init_lila_file: 742 proc; 743 744 /* Procedure to create and init a keyed seq. file to contain lila statements. */ 745 746 lcb.lila_fn = unique_chars_ ("0"b) || ".lila"; /* name of file */ 747 call 748 iox_$attach_name (unique_chars_ ("0"b) || ".lila_switch", 749 lcb.liocb_ptr, 750 "vfile_ " || before (get_pdir_ (), " ") || ">" || lcb.lila_fn, ref_ptr, 751 icode); 752 if icode ^= 0 then 753 call error (icode, "", KILL); 754 call iox_$open (lcb.liocb_ptr, KSU, "0"b, icode); 755 if icode ^= 0 then 756 call error (icode, "", KILL); 757 else 758 do; /* init */ 759 call write_line ((1), addr (chars (1)), 0); 760 call delete_old_file; 761 end; 762 763 end init_lila_file; 764 765 delete_old_file: 766 proc; 767 768 /* Procedure to delete existing lines from a lila file */ 769 770 lcb.si_ptr = null; /* force new proc */ 771 call iox_$position (lcb.liocb_ptr, BOF, 0, icode);/* start from BOF */ 772 if icode ^= 0 then 773 call error (icode, "", KILL); 774 775 do while (icode = 0); /* delete all lines */ 776 call iox_$delete_record (lcb.liocb_ptr, icode); 777 end; 778 779 if icode ^= error_table_$no_record then 780 call error (icode, "", KILL); 781 lcb.lila_chars, lcb.lila_count = 0; /* indicate true line and char count */ 782 783 end delete_old_file; 784 785 write_line: 786 proc (source_key, source_ptr, source_len); 787 788 /* procedure to insert a new lila source line */ 789 /* (or replace an old lila source line) */ 790 791 dcl source_key pic "9999" parameter; /* line number */ 792 dcl source_ptr ptr parameter; /* ptr to input string */ 793 dcl source_len fixed bin (21) parameter; /* length of input string */ 794 795 lcb.si_ptr = null; /* force new proc */ 796 call iox_$seek_key (lcb.liocb_ptr, (source_key), rec_len, icode); 797 /* see if line exists */ 798 if icode = 0 then 799 do; /* line exists, change it */ 800 call 801 iox_$rewrite_record (lcb.liocb_ptr, source_ptr, source_len, 802 icode); 803 if icode ^= 0 then 804 call error (icode, "", KILL); 805 lcb.lila_chars = lcb.lila_chars - rec_len + source_len; 806 end; /* changing line */ 807 else if icode = error_table_$no_record then 808 do; /* is new line, write it */ 809 call 810 iox_$write_record (lcb.liocb_ptr, source_ptr, source_len, icode); 811 if icode ^= 0 then 812 call error (icode, "", KILL); 813 lcb.lila_chars = lcb.lila_chars + source_len; 814 lcb.lila_count = lcb.lila_count + 1; /* increment line count */ 815 end; /* writing new line */ 816 else call error (icode, "", KILL); /* problems */ 817 818 819 end write_line; 820 821 build: 822 proc; 823 824 /* procedure to handle input during "build" */ 825 826 do while (build_mode); 827 828 if lcb.is_ptr = iox_$user_input 829 then do; /* prompt */ 830 call iox_$seek_key (lcb.liocb_ptr, (next_build_line), rec_len, icode); 831 if icode = 0 832 then call ioa_$nnl ("^a*", next_build_line); /* line exists */ 833 else call ioa_$nnl ("^a ", next_build_line); 834 end; 835 836 call iox_$get_line (iox_$user_input, lcb.rb_ptr, lcb.rb_len, nread, icode); 837 /* read next line */ 838 839 if icode = linus_error_$no_macro_arg then /* if no_macro arg */ 840 call error (icode, "reading build text", NO_KILL); 841 842 else if icode ^= 0 then /* if other error */ 843 call error (icode, "reading build text", KILL); 844 845 if verify (request, WHT_SPC) > 0 then 846 do; /* wasn't null line */ 847 if substr (request, 1, nread - 1) = "." then 848 build_mode = "0"b; /* done */ 849 850 else 851 do; /* build input line */ 852 nread = nread + 1; 853 request = " " || substr (request, 1, nread - 1); 854 call 855 write_line ((next_build_line), addr (chars (1)), nread); 856 /* write the line */ 857 if next_build_line + build_increment > 9999 then 858 do; /* line number grew too big */ 859 build_mode = "0"b; /* must stop */ 860 call 861 linus_print_error (linus_error_$build_overflow, 862 char (next_build_line + build_increment)); 863 end; 864 else next_build_line = next_build_line + build_increment; 865 /* increment automatic line */ 866 867 end; /* build input line */ 868 869 end; 870 end; 871 872 end build; 873 874 last_line_num: 875 proc returns (pic "9999"); 876 877 /* Procedure to return the last (largest) line number in the current lila */ 878 /* selection expression. */ 879 880 dcl line_number pic "9999"; 881 dcl line_number_key char (256) var; 882 dcl EOF fixed bin int static options (constant) init (+1); 883 884 if lcb.lila_count = 0 then 885 line_number = 0; 886 else 887 do; 888 call iox_$position (lcb.liocb_ptr, EOF, 0, icode); 889 if icode ^= 0 then 890 call error (icode, "", NO_KILL); 891 892 call iox_$position (lcb.liocb_ptr, 0, -1, icode); 893 if icode ^= 0 then 894 call error (icode, "", NO_KILL); 895 896 call iox_$read_key (lcb.liocb_ptr, line_number_key, rec_len, icode); 897 if icode ^= 0 then 898 call error (icode, "", NO_KILL); 899 line_number = bin (line_number_key); 900 end; 901 return (line_number); 902 end last_line_num; 903 904 set_build_start: 905 proc (request); 906 907 dcl request bit(1) unal parm; 908 909 if next_build_line = 0 910 then do; 911 next_build_line = last_line_num (); 912 913 if next_build_line + build_increment <= 9999 914 then next_build_line = next_build_line + build_increment; /* default start is offset from current largest line num */ 915 else do; /* error */ 916 build_mode = "0"b; 917 if ^request 918 then call error (0, "The build increment (" || ltrim (char (build_increment)) 919 || ") is too large.", NO_KILL); 920 call linus_print_error (linus_error_$integer_too_large, "The build increment (" || ltrim (char (build_increment)) 921 || ") is too large."); 922 return; 923 end; 924 end; 925 end set_build_start; 926 927 end linus_lila; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0939.8 linus_lila.pl1 >special_ldd>install>MR12.0-1106>linus_lila.pl1 104 1 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.incl.pl1 106 2 11/23/82 1327.3 linus_char_argl.incl.pl1 >ldd>include>linus_char_argl.incl.pl1 108 3 03/27/82 0434.5 linus_rel_array.incl.pl1 >ldd>include>linus_rel_array.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. BOF 000027 constant fixed bin(17,0) initial dcl 195 set ref 677* 771* EOF 000056 constant fixed bin(17,0) initial dcl 882 set ref 888* KILL 000056 constant fixed bin(35,0) initial dcl 191 set ref 381* 490* 678* 697* 752* 755* 772* 779* 803* 811* 816* 842* KSU 000054 constant fixed bin(17,0) initial dcl 196 set ref 754* NL constant char(1) initial unaligned dcl 193 ref 691 691 NO_KILL 000053 constant fixed bin(35,0) initial dcl 189 set ref 288* 291* 333* 335* 342* 350* 379* 429 839* 889* 893* 897* 917* SO 000055 constant fixed bin(17,0) initial dcl 197 set ref 547* WHT_SPC 000000 constant char(3) initial unaligned dcl 187 ref 460 463 479 710 714 845 acmd_ptr 000120 automatic pointer initial dcl 120 set ref 120* 565* 568 569* 570* addr builtin function dcl 228 ref 497 497 685 685 759 759 854 854 after builtin function dcl 228 ref 568 aligned_cmd based char unaligned dcl 133 set ref 565 568* arg 2 based structure array level 2 in structure "char_argl" dcl 2-9 in procedure "linus_lila" arg based char unaligned dcl 134 in procedure "linus_lila" set ref 303 311 314 317 326* 333* 335* 342 350* arg_index 000130 automatic fixed bin(17,0) dcl 137 set ref 302* 303 303 311 311 314 314 317 317 324 325* 325 326 326 326 330* 330 333 333 333 335 335 335 342 342 350 350 350* arg_len 4 based fixed bin(21,0) array level 3 dcl 2-9 set ref 300* 303 311 314 317 326 326 333 333 335 335 342 350 350 arg_ptr 2 based pointer array level 3 dcl 2-9 set ref 300* 303 311 314 317 326 333 335 342 350 atd 000131 automatic char(173) unaligned dcl 138 set ref 537* 540* 542* 545* 548* 552* 555* before builtin function dcl 228 ref 691 691 747 bin builtin function dcl 228 ref 899 build_increment 000205 automatic fixed bin(17,0) dcl 139 in procedure "linus_lila" set ref 319* 340* 576* 591* 857 860 860 864 913 913 917 920 build_increment 76 based fixed bin(17,0) level 2 in structure "lcb" dcl 1-53 in procedure "linus_lila" ref 319 576 build_mode 000206 automatic bit(1) unaligned dcl 140 set ref 281* 347* 354 367 597* 826 847* 859* 916* ca_ptr 000102 automatic pointer dcl 2-15 set ref 290* 298* 300 300 302 303 303 311 311 314 314 317 317 324 326 326 326 333 333 333 335 335 335 342 342 350 350 350 393 393 443 443 cd parameter fixed bin(35,0) dcl 729 set ref 724 732* char builtin function dcl 228 ref 860 860 917 920 char_argl based structure level 1 dcl 2-9 set ref 298 393 443 chars based char(1) array unaligned dcl 142 set ref 497 497 759 759 854 854 cleanup 000430 stack reference condition dcl 225 ref 287 cmd_len 000113 automatic fixed bin(17,0) dcl 118 set ref 564* 565 565 568 569* code 000126 automatic fixed bin(35,0) dcl 128 set ref 326* 327 363* 384 392* 396 396* 424* 427* 441 513* 514 581* 582 control_arg 000210 automatic bit(1) unaligned dcl 144 set ref 323* 324 329* conversion 000436 stack reference condition dcl 225 ref 288 cu_$cp 000056 constant entry external dcl 234 ref 569 cu_$decode_entry_value 000060 constant entry external dcl 235 ref 284 cv_dec_check_ 000062 constant entry external dcl 237 ref 326 581 data 1 000326 automatic char(256) level 2 packed unaligned dcl 183 set ref 685 685 db_index based fixed bin(35,0) level 2 dcl 1-53 ref 291 divide builtin function dcl 228 ref 610 done 000211 automatic bit(1) unaligned dcl 145 set ref 362* 365 517* env_ptr 000124 automatic pointer initial dcl 120 set ref 120* 284* error_table_$end_of_info 000010 external static fixed bin(35,0) dcl 199 ref 697 error_table_$no_record 000012 external static fixed bin(35,0) dcl 199 ref 779 807 fatal_flag parameter fixed bin(35,0) dcl 420 ref 415 427 429 fixed builtin function dcl 228 ref 477 get_pdir_ 000122 constant entry external dcl 261 ref 747 i 000470 automatic fixed bin(17,0) dcl 458 in procedure "process_line" set ref 460* 461 463 464 468 478* 478 479 497 497 497 537 537 540 581 581 582 582 584 584 586 586 593 707* 707 708 710 713* 713 714 715 i 000213 automatic fixed bin(17,0) dcl 147 in procedure "linus_lila" set ref 299* 300* 300 300* ica_ptr 000116 automatic pointer initial dcl 120 set ref 120* 283* 525* icode 000127 automatic fixed bin(35,0) dcl 128 in procedure "linus_lila" set ref 376* 379 379* 381 381* 386* 441 447* 448* 482* 484 489* 490 490* 522* 523 542* 545 545* 547* 548 548* 551* 552 552* 554* 555 555* 569* 677* 678 678* 680 682* 683 685* 688 697 697* 747* 752 752* 754* 755 755* 771* 772 772* 775 776* 779 779* 796* 798 800* 803 803* 807 809* 811 811* 816* 830* 831 836* 839 839* 842 842* 888* 889 889* 892* 893 893* 896* 897 897* icode parameter fixed bin(35,0) dcl 420 in procedure "error" set ref 415 426* index builtin function dcl 228 ref 562 566 ioa_ 000064 constant entry external dcl 239 ref 501 609 611 626 636 642 650 651 656 662 ioa_$ioa_switch 000066 constant entry external dcl 240 ref 691 ioa_$nnl 000070 constant entry external dcl 241 ref 371 831 833 iocb_ptr parameter pointer dcl 675 set ref 670 691* iox_$attach_name 000072 constant entry external dcl 242 ref 542 747 iox_$close 000074 constant entry external dcl 244 ref 447 551 iox_$delete_record 000076 constant entry external dcl 245 ref 489 776 iox_$detach_iocb 000100 constant entry external dcl 246 ref 448 554 iox_$get_line 000102 constant entry external dcl 247 ref 376 836 iox_$open 000104 constant entry external dcl 249 ref 547 754 iox_$position 000106 constant entry external dcl 251 ref 677 771 888 892 iox_$read_key 000110 constant entry external dcl 253 ref 682 896 iox_$read_record 000112 constant entry external dcl 255 ref 685 iox_$rewrite_record 000114 constant entry external dcl 257 ref 800 iox_$seek_key 000116 constant entry external dcl 258 ref 482 796 830 iox_$user_input 000052 external static pointer dcl 220 set ref 371 376* 384 424 828 836* iox_$user_output 000054 external static pointer dcl 220 set ref 508* iox_$write_record 000120 constant entry external dcl 260 ref 809 is_ptr 22 based pointer level 2 dcl 1-53 ref 371 384 424 828 j 000471 automatic fixed bin(17,0) dcl 458 set ref 463* 464 464* 466* 466 468 478 479* 480 535 537 537 540 580 581 581 582 582 584 584 586 586 593 707 710* 711 713 714* 715 715* 717* 717 720* key 000326 automatic char(4) level 2 in structure "list_buf" packed unaligned dcl 183 in procedure "linus_lila" set ref 690* key 000214 automatic picture(4) unaligned dcl 148 in procedure "linus_lila" set ref 477* 482 497 key_var 000215 automatic varying char(256) dcl 149 set ref 682* 690 lcb based structure level 1 dcl 1-53 lcb_ptr 000100 automatic pointer dcl 1-121 set ref 280* 282 291 298 305 307 319 357 371 371 371 376 376 384 386* 405* 406 407 410 411 424 424* 441 460 463 468 479 482 488 489 492 492 494 494 497 497 501 506 506 513* 522 530 530 537 537 540 565 568 576 581 581 582 582 584 584 586 586 593 603 677 682 685 710 714 746 747 747 754 759 759 770 771 776 781 781 795 796 800 805 805 809 813 813 814 814 828 830 836 836 845 847 853 853 854 854 884 888 892 896 lcb_ptr_parm parameter pointer dcl 21 ref 18 280 400 405 length builtin function dcl 228 ref 471 lila_area_ptr 62 based pointer level 2 dcl 1-53 ref 565 lila_chars 3 based fixed bin(35,0) level 2 dcl 1-53 set ref 410* 492* 492 781* 805* 805 813* 813 lila_count 2 based fixed bin(35,0) level 2 dcl 1-53 set ref 307 411* 494* 494 506 530 603 781* 814* 814 884 lila_fn 5 based char(32) level 2 packed unaligned dcl 1-53 set ref 746* 747 lila_promp_chars_ptr 56 based pointer level 2 dcl 1-53 ref 371 371 lila_prompt_flag 000212 automatic bit(1) unaligned dcl 146 set ref 282* 311* 314* 370 line_number 000546 automatic picture(4) unaligned dcl 880 set ref 884* 899* 901 line_number_key 000547 automatic varying char(256) dcl 881 set ref 896* 899 linus_convert_code 000140 constant entry external dcl 271 ref 426 732 linus_data_$lila_id 000014 external static fixed bin(35,0) dcl 199 set ref 426* 732* linus_error_$bad_num_args 000050 external static fixed bin(35,0) dcl 199 set ref 342* 593* linus_error_$bad_stmt_no 000016 external static fixed bin(35,0) dcl 199 set ref 474* linus_error_$build_overflow 000020 external static fixed bin(35,0) dcl 199 set ref 860* linus_error_$conv 000022 external static fixed bin(35,0) dcl 199 set ref 288* linus_error_$integer_too_large 000024 external static fixed bin(35,0) dcl 199 set ref 335* 586* 920* linus_error_$integer_too_small 000026 external static fixed bin(35,0) dcl 199 set ref 333* 584* linus_error_$inv_arg 000030 external static fixed bin(35,0) dcl 199 set ref 350* linus_error_$inv_lila_req 000032 external static fixed bin(35,0) dcl 199 set ref 667* linus_error_$no_db 000034 external static fixed bin(35,0) dcl 199 set ref 291* linus_error_$no_lila_data 000036 external static fixed bin(35,0) dcl 199 set ref 506* 530* linus_error_$no_macro_arg 000040 external static fixed bin(35,0) dcl 199 ref 379 839 linus_error_$no_path 000042 external static fixed bin(35,0) dcl 199 set ref 559* linus_error_$non_integer 000046 external static fixed bin(35,0) dcl 199 set ref 582* linus_error_$nonex_del 000044 external static fixed bin(35,0) dcl 199 set ref 484* linus_invoke$pop_all 000142 constant entry external dcl 273 ref 386 424 linus_print_error 000144 constant entry external dcl 275 ref 441 474 484 506 530 667 733 860 920 linus_translate_query$proc 000146 constant entry external dcl 276 ref 513 linus_version 100 based char(4) level 2 dcl 1-53 set ref 501* liocb_ptr 16 based pointer level 2 dcl 1-53 set ref 305 357 407 482* 489* 677* 682* 685* 747* 754* 771* 776* 796* 800* 809* 830* 888* 892* 896* list_buf 000326 automatic structure level 1 dcl 183 set ref 681* 691 691 ltrim builtin function dcl 228 ref 568 917 920 mod builtin function dcl 228 ref 626 636 msg parameter char unaligned dcl 730 in procedure "soft_error" set ref 724 733* msg parameter char unaligned dcl 422 in procedure "error" set ref 415 429* 431* name 000321 automatic varying char(15) initial array level 2 dcl 158 set ref 158* 158* 158* 158* 158* 158* 158* 158* 158* 158* 158* 611* 611* 611* 626* 626* 636* 656* nargs based fixed bin(17,0) level 2 dcl 2-9 set ref 298* 302 324 393 443 nargs_init 000104 automatic fixed bin(17,0) dcl 2-16 set ref 294* 296 298 298 299 next_build_line 000207 automatic picture(4) unaligned dcl 141 set ref 320* 338* 577* 589* 830 831* 833* 854 857 860 860 864* 864 909 911* 913 913* 913 nread 000110 automatic fixed bin(21,0) dcl 112 set ref 376* 460 463 464 468 479 497 506 506 522* 530 530 537 537 540 564 568 581 581 582 582 584 584 586 586 593 708 710 714 715 836* 845 847 847 852* 852 853 853 853 854* null builtin function dcl 228 ref 120 120 120 120 120 283 290 305 357 393 407 443 445 488 525 557 570 770 795 num_of_rels_init 000105 automatic fixed bin(17,0) initial dcl 3-18 set ref 3-18* parameter 000316 automatic fixed bin(17,0) dcl 150 set ref 326* 333 335 338 340 581* 584 586 589 591 parameter_number 000317 automatic fixed bin(17,0) dcl 151 set ref 322* 338 340 344* 344 579* 589 591 595* 595 prompt_char based varying char(32) dcl 152 set ref 371 371* prompt_flag 15 based bit(1) level 2 packed unaligned dcl 1-53 ref 282 441 rb_len 1 based fixed bin(21,0) level 2 dcl 1-53 set ref 376* 836* rb_ptr 20 based pointer level 2 dcl 1-53 set ref 376* 460 463 468 479 497 497 506 522* 530 537 537 540 568 581 581 582 582 584 584 586 586 593 710 714 759 759 836* 845 847 853 853 854 854 read_len 000112 automatic fixed bin(21,0) dcl 112 set ref 685* rec_len 000111 automatic fixed bin(21,0) dcl 112 set ref 482* 492 682* 685* 796* 805 830* 896* ref_ptr 000114 automatic pointer initial dcl 120 set ref 120* 284* 542* 747* req_index 000320 automatic fixed bin(17,0) dcl 154 set ref 610* 611 611 611 611 611 611 611 611 611 611 611* 626 626 626 626 626 626 636 636 636 655* 656 656 656 656* request based char unaligned dcl 155 in procedure "linus_lila" set ref 460 463 468 479 506* 530* 537 537 540 568 581 581 582 582 584 584 586 586 593 710 714 845 847 853* 853 request parameter bit(1) unaligned dcl 907 in procedure "set_build_start" ref 904 917 request_count constant fixed bin(17,0) initial dcl 157 ref 158 610 611 611 626 636 655 request_table 000321 automatic structure array level 1 dcl 158 rtrim builtin function dcl 228 ref 568 sci_ptr 000106 automatic pointer dcl 110 set ref 279* 294* 300* 396* 406* 429* 431* 522* sci_ptr_parm parameter pointer dcl 22 ref 18 279 search builtin function dcl 228 ref 463 714 short 5 000321 automatic varying char(5) initial array level 2 dcl 158 set ref 158* 158* 158* 158* 158* 158* 158* 158* 158* 158* 158* 611 611* 611 611* 611 611* 626 626* 626 626* 636 636* 656 656* si_ptr 34 based pointer level 2 dcl 1-53 set ref 488* 770* 795* siocb_ptr 000122 automatic pointer initial dcl 120 set ref 120* 283* 445 447* 448* 542* 547* 550* 551* 554* 557* source_key parameter picture(4) unaligned dcl 791 ref 785 796 source_len parameter fixed bin(21,0) dcl 793 set ref 785 800* 805 809* 813 source_ptr parameter pointer dcl 792 set ref 785 800* 809* ssu_$abort_line 000124 constant entry external dcl 262 ref 429 ssu_$abort_subsystem 000126 constant entry external dcl 263 ref 396 431 ssu_$arg_count 000130 constant entry external dcl 264 ref 294 ssu_$arg_ptr 000132 constant entry external dcl 265 ref 300 ssu_$execute_line 000134 constant entry external dcl 266 ref 522 static_area 144 based area level 2 dcl 1-53 ref 298 string builtin function dcl 228 set ref 681* 691 691 substr builtin function dcl 228 ref 463 468 479 537 537 540 581 581 582 582 584 584 586 586 593 710 714 847 853 subsystem_control_info_ptr 102 based pointer level 2 dcl 1-53 ref 406 summary 10 000321 automatic varying char(60) initial array level 2 dcl 158 set ref 158* 158* 158* 158* 158* 158* 158* 158* 158* 158* 158* 656* token 000321 automatic varying char(15) dcl 179 set ref 468* 469 469 471 471 474 477 484 501 504 504 511 517 517 520 520 528 528 559 562 562 562 566 566* 568 573 601 607 648 648 667 ucd 000100 automatic fixed bin(35,0) dcl 729 set ref 732* 733* ucode 000100 automatic fixed bin(35,0) dcl 420 set ref 426* 429* 431* unique_chars_ 000136 constant entry external dcl 267 ref 542 746 747 verify builtin function dcl 228 ref 460 471 479 710 845 work_area based area dcl 180 ref 565 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. linus_rel_array based structure level 1 unaligned dcl 3-10 linus_rel_array_ptr automatic pointer dcl 3-16 rel builtin function dcl 228 sys_info$max_seg_size external static fixed bin(35,0) dcl 199 NAMES DECLARED BY EXPLICIT CONTEXT. build 006161 constant entry internal dcl 821 ref 367 delete_old_file 005650 constant entry internal dcl 765 ref 307 409 603 760 error 002251 constant entry internal dcl 415 ref 288 291 333 335 342 350 379 381 490 678 697 752 755 772 779 803 811 816 839 842 889 893 897 917 exit 002163 constant label dcl 393 ref 514 523 get_token 005226 constant entry internal dcl 702 ref 534 578 594 init_lila_file 005364 constant entry internal dcl 741 ref 305 357 407 initialize_lila_file 002217 constant entry external dcl 400 last_line_num 006504 constant entry internal dcl 874 ref 911 linus_lila 001173 constant entry external dcl 18 ref 284 284 list_file 005021 constant entry internal dcl 670 ref 508 550 pl_exit 005017 constant label dcl 738 ref 734 process_line 002504 constant entry internal dcl 453 ref 383 set_build_start 006703 constant entry internal dcl 904 ref 354 598 soft_error 005314 constant entry internal dcl 724 ref 545 548 552 555 559 582 584 586 593 tidy_up 002403 constant entry internal dcl 436 ref 287 387 428 write_line 005757 constant entry internal dcl 785 ref 497 759 854 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 10622 10772 10026 10632 Length 11370 10026 150 362 573 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_lila 1154 external procedure is an external procedure. on unit on line 287 64 on unit on unit on line 288 82 on unit error 94 internal procedure is called during a stack extension. tidy_up 86 internal procedure is called by several nonquick procedures. process_line internal procedure shares stack frame of external procedure linus_lila. list_file internal procedure shares stack frame of external procedure linus_lila. get_token internal procedure shares stack frame of external procedure linus_lila. soft_error 84 internal procedure is called during a stack extension. init_lila_file internal procedure shares stack frame of external procedure linus_lila. delete_old_file internal procedure shares stack frame of external procedure linus_lila. write_line internal procedure shares stack frame of external procedure linus_lila. build internal procedure shares stack frame of external procedure linus_lila. last_line_num internal procedure shares stack frame of external procedure linus_lila. set_build_start internal procedure shares stack frame of external procedure linus_lila. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME error 000100 ucode error linus_lila 000100 lcb_ptr linus_lila 000102 ca_ptr linus_lila 000104 nargs_init linus_lila 000105 num_of_rels_init linus_lila 000106 sci_ptr linus_lila 000110 nread linus_lila 000111 rec_len linus_lila 000112 read_len linus_lila 000113 cmd_len linus_lila 000114 ref_ptr linus_lila 000116 ica_ptr linus_lila 000120 acmd_ptr linus_lila 000122 siocb_ptr linus_lila 000124 env_ptr linus_lila 000126 code linus_lila 000127 icode linus_lila 000130 arg_index linus_lila 000131 atd linus_lila 000205 build_increment linus_lila 000206 build_mode linus_lila 000207 next_build_line linus_lila 000210 control_arg linus_lila 000211 done linus_lila 000212 lila_prompt_flag linus_lila 000213 i linus_lila 000214 key linus_lila 000215 key_var linus_lila 000316 parameter linus_lila 000317 parameter_number linus_lila 000320 req_index linus_lila 000321 token linus_lila 000321 request_table linus_lila 000326 list_buf linus_lila 000470 i process_line 000471 j process_line 000546 line_number last_line_num 000547 line_number_key last_line_num soft_error 000100 ucd soft_error THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as r_le_a alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other return tra_ext alloc_auto_adj mod_fx1 enable shorten_stack ext_entry int_entry int_entry_desc set_cs_eis any_to_any_tr unpack_pic alloc_based free_based index_after_cs THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$cp cu_$decode_entry_value cv_dec_check_ get_pdir_ ioa_ ioa_$ioa_switch ioa_$nnl iox_$attach_name iox_$close iox_$delete_record iox_$detach_iocb iox_$get_line iox_$open iox_$position iox_$read_key iox_$read_record iox_$rewrite_record iox_$seek_key iox_$write_record linus_convert_code linus_invoke$pop_all linus_print_error linus_translate_query$proc ssu_$abort_line ssu_$abort_subsystem ssu_$arg_count ssu_$arg_ptr ssu_$execute_line unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$end_of_info error_table_$no_record iox_$user_input iox_$user_output linus_data_$lila_id linus_error_$bad_num_args linus_error_$bad_stmt_no linus_error_$build_overflow linus_error_$conv linus_error_$integer_too_large linus_error_$integer_too_small linus_error_$inv_arg linus_error_$inv_lila_req linus_error_$no_db linus_error_$no_lila_data linus_error_$no_macro_arg linus_error_$no_path linus_error_$non_integer linus_error_$nonex_del LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 3 18 000536 120 000537 158 000545 611 001157 656 001163 18 001167 279 001204 280 001210 281 001213 282 001214 283 001217 284 001222 287 001241 288 001263 290 001320 291 001322 294 001344 296 001355 298 001357 299 001371 300 001377 301 001416 302 001420 303 001427 305 001440 307 001447 309 001452 311 001453 314 001461 317 001470 319 001474 320 001477 322 001503 323 001505 324 001506 325 001514 326 001515 327 001546 329 001550 330 001552 331 001554 333 001555 335 001607 338 001641 340 001654 342 001661 344 001723 346 001725 347 001726 348 001730 350 001731 351 001754 354 001756 357 001764 362 001772 363 001773 365 001774 367 001776 370 002001 371 002003 376 002035 379 002055 381 002104 383 002134 384 002135 386 002145 387 002155 390 002161 392 002162 393 002163 396 002174 398 002213 400 002214 405 002230 406 002233 407 002235 409 002243 410 002244 411 002246 413 002247 415 002250 424 002264 426 002302 427 002316 428 002322 429 002327 431 002356 434 002401 436 002402 441 002410 443 002441 445 002453 447 002460 448 002471 451 002503 453 002504 460 002505 461 002522 463 002524 464 002543 466 002551 468 002553 469 002563 471 002576 474 002614 475 002641 477 002643 478 002662 479 002664 480 002706 482 002707 484 002730 486 002760 488 002761 489 002764 490 002776 492 003017 494 003026 496 003034 497 003035 499 003051 501 003052 504 003100 506 003112 508 003135 509 003144 511 003145 513 003152 514 003163 515 003165 517 003166 520 003203 522 003215 523 003232 525 003234 526 003236 528 003237 530 003251 534 003274 535 003275 537 003277 540 003325 542 003355 545 003433 547 003451 548 003470 550 003506 551 003510 552 003521 554 003537 555 003550 557 003566 558 003570 559 003571 560 003616 561 003617 562 003620 564 003645 565 003647 566 003657 568 003676 569 003750 570 003763 571 003765 573 003766 576 003773 577 003775 578 004001 579 004002 580 004004 581 004006 582 004041 584 004073 586 004126 589 004161 591 004175 593 004202 594 004237 595 004241 596 004242 597 004243 598 004245 599 004250 601 004251 603 004256 605 004261 607 004262 609 004267 610 004303 611 004315 625 004444 626 004447 636 004540 642 004611 646 004625 648 004626 650 004640 651 004654 655 004670 656 004677 661 004746 662 004750 665 004764 667 004765 738 005017 670 005021 677 005023 678 005042 680 005063 681 005066 682 005071 683 005107 685 005111 688 005133 690 005135 691 005141 694 005201 696 005202 697 005203 700 005225 702 005226 707 005227 708 005231 710 005234 711 005255 713 005256 714 005261 715 005300 717 005306 719 005310 720 005311 722 005312 724 005313 732 005327 733 005342 734 005361 741 005364 746 005365 747 005420 752 005550 754 005572 755 005612 759 005634 760 005646 763 005647 765 005650 770 005651 771 005654 772 005673 775 005714 776 005716 777 005730 779 005731 781 005753 783 005756 785 005757 795 005761 796 005764 798 006010 800 006012 803 006031 805 006052 806 006063 807 006064 809 006067 811 006105 813 006126 814 006134 815 006140 816 006141 819 006160 821 006161 826 006162 828 006164 830 006172 831 006212 833 006234 836 006253 839 006273 842 006325 845 006354 847 006371 852 006401 853 006402 854 006422 857 006431 859 006445 860 006446 863 006472 864 006473 870 006502 872 006503 874 006504 884 006506 888 006516 889 006534 892 006555 893 006576 896 006617 897 006635 899 006656 901 006675 904 006703 909 006705 911 006715 913 006717 916 006743 917 006744 920 007040 922 007124 925 007126 ----------------------------------------------------------- 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