COMPILATION LISTING OF SEGMENT linus_print_query Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 0958.1 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* format: off */ 7 8 /* This is the main level procedure called by ssu_ to implement the 9* linus print_query request. Description and usage follows. 10* 11* Description: 12* 13* This request prints the query when called as a request, and returns the 14* query when called as an active request. 15* 16* Usage: print_query or [print_query] 17* 18* Both parameters are passed to this request by ssu_. 19* 20* Known Bugs: 21* 22* Other Problems: 23* 24* History: 25* 26* Written - Al Dupuis - August 1983 27* 28**/ 29 30 linus_print_query: proc ( 31 32 sci_ptr_parm, /* input: ptr to the subsystem control info structure */ 33 lcb_ptr_parm /* input: ptr to the linus control block info structure */ 34 ); 35 36 dcl sci_ptr_parm ptr parm; 37 dcl lcb_ptr_parm ptr parm; 38 39 /* 40* Mainline Processing Overview: 41* 42* (1) Check to make sure a data base is open and get the current 43* query. 44* 45* (2) Print or return it. 46**/ 47 48 call initialize; 49 call print_or_return_the_query; 50 51 return; 52 53 initialize: proc; 54 55 sci_ptr = sci_ptr_parm; 56 lcb_ptr = lcb_ptr_parm; 57 58 if lcb.db_index = 0 59 then call ssu_$abort_line (sci_ptr, linus_error_$no_db); 60 61 call ssu_$return_arg (sci_ptr, number_of_args_supplied, 62 active_request, return_string_ptr, return_string_length); 63 if number_of_args_supplied ^= 0 64 then call ssu_$abort_line (sci_ptr, error_table_$too_many_args, 65 "^/This request does not accept any control arguments."); 66 67 call linus_query_mgr$get (lcb_ptr, query_segment_ptr, 68 query_segment_length, code); 69 if code ^= 0 70 then call ssu_$abort_line (sci_ptr, code); 71 72 return; 73 74 end initialize; 75 76 print_or_return_the_query: proc; 77 78 if active_request 79 then return_string = requote_string_ (query_segment); 80 else do; 81 call iox_$put_chars (iox_$user_output, 82 query_segment_ptr, query_segment_length, code); 83 if code ^= 0 84 then call ssu_$abort_line (sci_ptr, code); 85 end; 86 87 return; 88 89 end print_or_return_the_query; 90 91 dcl active_request bit (1) aligned; 92 dcl addr builtin; 93 94 dcl code fixed bin (35); 95 96 dcl error_table_$too_many_args fixed bin(35) ext static; 97 98 dcl fixed builtin; 99 100 dcl iox_$put_chars entry (ptr, ptr, fixed bin(21), fixed bin(35)); 101 dcl iox_$user_output ptr ext static; 102 103 dcl linus_error_$no_db fixed bin(35) ext static; 104 dcl linus_query_mgr$get entry (ptr, ptr, fixed bin(21), fixed bin(35)); 105 106 dcl number_of_args_supplied fixed bin; 107 108 dcl query_segment char (query_segment_length) based (query_segment_ptr); 109 dcl query_segment_length fixed bin (21); 110 dcl query_segment_ptr ptr; 111 112 dcl rel builtin; 113 dcl requote_string_ entry (char (*)) returns (char (*)); 114 dcl return_string char (return_string_length) varying based (return_string_ptr); 115 dcl return_string_length fixed bin (21); 116 dcl return_string_ptr ptr; 117 118 dcl sci_ptr ptr; 119 dcl ssu_$abort_line entry() options(variable); 120 dcl ssu_$return_arg entry (ptr, fixed bin, bit(1) aligned, ptr, fixed bin(21)); 121 dcl sys_info$max_seg_size fixed bin(35) ext static; 122 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 */ 123 124 125 end linus_print_query; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0939.6 linus_print_query.pl1 >special_ldd>install>MR12.0-1106>linus_print_query.pl1 123 1 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.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. active_request 000100 automatic bit(1) dcl 91 set ref 61* 78 code 000101 automatic fixed bin(35,0) dcl 94 set ref 67* 69 69* 81* 83 83* db_index based fixed bin(35,0) level 2 dcl 1-53 ref 58 error_table_$too_many_args 000010 external static fixed bin(35,0) dcl 96 set ref 63* iox_$put_chars 000012 constant entry external dcl 100 ref 81 iox_$user_output 000014 external static pointer dcl 101 set ref 81* lcb based structure level 1 dcl 1-53 lcb_ptr 000114 automatic pointer dcl 1-121 set ref 56* 58 67* lcb_ptr_parm parameter pointer dcl 37 ref 30 56 linus_error_$no_db 000016 external static fixed bin(35,0) dcl 103 set ref 58* linus_query_mgr$get 000020 constant entry external dcl 104 ref 67 number_of_args_supplied 000102 automatic fixed bin(17,0) dcl 106 set ref 61* 63 query_segment based char unaligned dcl 108 set ref 78* query_segment_length 000103 automatic fixed bin(21,0) dcl 109 set ref 67* 78 78 81* query_segment_ptr 000104 automatic pointer dcl 110 set ref 67* 78 81* requote_string_ 000022 constant entry external dcl 113 ref 78 return_string based varying char dcl 114 set ref 78* return_string_length 000106 automatic fixed bin(21,0) dcl 115 set ref 61* 78 return_string_ptr 000110 automatic pointer dcl 116 set ref 61* 78 sci_ptr 000112 automatic pointer dcl 118 set ref 55* 58* 61* 63* 69* 83* sci_ptr_parm parameter pointer dcl 36 ref 30 55 ssu_$abort_line 000024 constant entry external dcl 119 ref 58 63 69 83 ssu_$return_arg 000026 constant entry external dcl 120 ref 61 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. addr builtin function dcl 92 fixed builtin function dcl 98 rel builtin function dcl 112 sys_info$max_seg_size external static fixed bin(35,0) dcl 121 NAMES DECLARED BY EXPLICIT CONTEXT. initialize 000036 constant entry internal dcl 53 ref 48 linus_print_query 000026 constant entry external dcl 30 print_or_return_the_query 000167 constant entry internal dcl 76 ref 49 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 414 444 267 424 Length 654 267 30 173 125 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_print_query 154 external procedure is an external procedure. initialize internal procedure shares stack frame of external procedure linus_print_query. print_or_return_the_query internal procedure shares stack frame of external procedure linus_print_query. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_print_query 000100 active_request linus_print_query 000101 code linus_print_query 000102 number_of_args_supplied linus_print_query 000103 query_segment_length linus_print_query 000104 query_segment_ptr linus_print_query 000106 return_string_length linus_print_query 000110 return_string_ptr linus_print_query 000112 sci_ptr linus_print_query 000114 lcb_ptr linus_print_query THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. iox_$put_chars linus_query_mgr$get requote_string_ ssu_$abort_line ssu_$return_arg THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$too_many_args iox_$user_output linus_error_$no_db LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 30 000022 48 000033 49 000034 51 000035 53 000036 55 000037 56 000043 58 000046 61 000065 63 000104 67 000132 69 000147 72 000166 76 000167 78 000170 80 000231 81 000232 83 000247 87 000266 ----------------------------------------------------------- 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