COMPILATION LISTING OF SEGMENT terminals_overseer_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/12/82 1240.6 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* format: style2*/ 12 terminals_overseer_: 13 proc; 14 15 /* Special login responder for "Terminals" */ 16 /* Modified 750501 by PG to call logout properly, convert to iox_, and fix minor bugs */ 17 /* Modified 810121 by Benson I. Margulies for a condition wall */ 18 19 /* automatic */ 20 21 dcl buf char (168) varying, 22 command char (8), 23 code fixed bin (35); 24 25 26 /* builtins */ 27 28 dcl (addr, before, ltrim, rtrim) 29 builtin; 30 31 /* internal static */ 32 33 dcl nll label int static; 34 dcl 1 search_rules aligned internal static options (constant), 35 2 number fixed bin initial (5), 36 2 names (5) char (168) 37 initial ("initiated_segments", "referencing_dir", ">system_library_standard", 38 ">system_library_1", ">system_library_tools"); 39 40 /* entries */ 41 42 dcl com_err_ entry options (variable), 43 hcs_$initiate_search_rules 44 entry (ptr, fixed bin (35)), 45 command_query_ entry () options (variable), 46 cu_$ready_proc entry (), 47 change_wdir_ entry (char (168), fixed bin (35)), 48 user_info_$homedir entry (char(*)), 49 default_error_handler_$wall entry, 50 ( 51 cu_$set_command_processor, 52 cu_$get_command_processor, 53 cu_$get_cl_intermediary, 54 cu_$set_cl_intermediary 55 ) entry (entry), 56 ioa_ entry options (variable); 57 58 dcl repeat_line entry options (variable), 59 edm entry options (variable), 60 runoff entry options (variable), 61 print entry options (variable), 62 logout entry options (variable); 63 64 /* static stuff for test entry */ 65 66 declare saved_cl entry variable internal static; 67 declare saved_cp entry variable internal static; 68 declare escape_permitted bit (1) aligned internal static initial ("0"b); 69 70 declare ME char (32) init ("terminals_overseer_") int static options (constant); 71 declare quit condition; 72 declare any_other condition; 73 declare home_dir char (168); 74 75 1 1 /* BEGIN INCLUDE FILE query_info.incl.pl1 TAC June 1, 1973 */ 1 2 /* Renamed to query_info.incl.pl1 and cp_escape_control added, 08/10/78 WOS */ 1 3 /* version number changed to 4, 08/10/78 WOS */ 1 4 /* Version 5 adds explanation_(ptr len) 05/08/81 S. Herbst */ 1 5 1 6 dcl 1 query_info aligned, /* argument structure for command_query_ call */ 1 7 2 version fixed bin, /* version of this structure - must be set, see below */ 1 8 2 switches aligned, /* various bit switch values */ 1 9 3 yes_or_no_sw bit (1) unaligned init ("0"b), /* not a yes-or-no question, by default */ 1 10 3 suppress_name_sw bit (1) unaligned init ("0"b), /* do not suppress command name */ 1 11 3 cp_escape_control bit (2) unaligned init ("00"b), /* obey static default value */ 1 12 /* "01" -> invalid, "10" -> don't allow, "11" -> allow */ 1 13 3 suppress_spacing bit (1) unaligned init ("0"b), /* whether to print extra spacing */ 1 14 3 padding bit (31) unaligned init (""b), /* pads it out to t word */ 1 15 2 status_code fixed bin (35) init (0), /* query not prompted by any error, by default */ 1 16 2 query_code fixed bin (35) init (0), /* currently has no meaning */ 1 17 1 18 /* Limit of data defined for version 2 */ 1 19 1 20 2 question_iocbp ptr init (null ()), /* IO switch to write question */ 1 21 2 answer_iocbp ptr init (null ()), /* IO switch to read answer */ 1 22 2 repeat_time fixed bin (71) init (0), /* repeat question every N seconds if no answer */ 1 23 /* minimum of 30 seconds required for repeat */ 1 24 /* otherwise, no repeat will occur */ 1 25 /* Limit of data defined for version 4 */ 1 26 1 27 2 explanation_ptr ptr init (null ()), /* explanation of question to be printed if */ 1 28 2 explanation_len fixed bin (21) init (0); /* user answers "?" (disabled if ptr=null or len=0) */ 1 29 1 30 dcl query_info_version_3 fixed bin int static options (constant) init (3); 1 31 dcl query_info_version_4 fixed bin int static options (constant) init (4); 1 32 dcl query_info_version_5 fixed bin int static options (constant) init (5); /* the current version number */ 1 33 1 34 /* END INCLUDE FILE query_info.incl.pl1 */ 76 2 1 /* --------------- BEGIN include file iox_dcls.incl.pl1 --------------- */ 2 2 2 3 /* Written 05/04/78 by C. D. Tavares */ 2 4 /* Fixed declaration of iox_$find_iocb_n 05/07/80 by R. Holmstedt */ 2 5 2 6 dcl iox_$attach_name entry (char (*), pointer, char (*), pointer, fixed bin (35)), 2 7 iox_$attach_ptr entry (pointer, char (*), pointer, fixed bin (35)), 2 8 iox_$close entry (pointer, fixed bin (35)), 2 9 iox_$control entry (pointer, char (*), pointer, fixed bin (35)), 2 10 iox_$delete_record entry (pointer, fixed bin (35)), 2 11 iox_$destroy_iocb entry (pointer, fixed bin (35)), 2 12 iox_$detach_iocb entry (pointer, fixed bin (35)), 2 13 iox_$err_not_attached entry options (variable), 2 14 iox_$err_not_closed entry options (variable), 2 15 iox_$err_no_operation entry options (variable), 2 16 iox_$err_not_open entry options (variable), 2 17 iox_$find_iocb entry (char (*), pointer, fixed bin (35)), 2 18 iox_$find_iocb_n entry (fixed bin, ptr, fixed bin(35)), 2 19 iox_$get_chars entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 2 20 iox_$get_line entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 2 21 iox_$look_iocb entry (char (*), pointer, fixed bin (35)), 2 22 iox_$modes entry (pointer, char (*), char (*), fixed bin (35)), 2 23 iox_$move_attach entry (pointer, pointer, fixed bin (35)), 2 24 iox_$open entry (pointer, fixed bin, bit (1) aligned, fixed bin (35)), 2 25 iox_$position entry (pointer, fixed bin, fixed bin (21), fixed bin (35)), 2 26 iox_$propagate entry (pointer), 2 27 iox_$put_chars entry (pointer, pointer, fixed bin (21), fixed bin (35)), 2 28 iox_$read_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 2 29 iox_$read_length entry (pointer, fixed bin (21), fixed bin (35)), 2 30 iox_$read_record entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 2 31 iox_$rewrite_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 2 32 iox_$seek_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 2 33 iox_$write_record entry (pointer, pointer, fixed bin (21), fixed bin (35)) ; 2 34 2 35 dcl (iox_$user_output, 2 36 iox_$user_input, 2 37 iox_$user_io, 2 38 iox_$error_output) external static pointer; 2 39 2 40 /* ---------------- END include file iox_dcls.incl.pl1 ---------------- */ 77 78 79 80 nll = restart; 81 82 on any_other call default_error_handler_$wall; 83 call user_info_$homedir (home_dir); 84 call change_wdir_ (home_dir, code); 85 if code ^= 0 then do; 86 call com_err_ (code, ME, "Could not set working dir to ^a.", home_dir); 87 go to GIVE_UP; 88 end; 89 90 /* print reasonable error messages */ 91 on quit call t_quit; /* and handle quit here */ 92 93 call cu_$get_command_processor (saved_cp); /* save this information for the test entrypoint */ 94 call cu_$get_cl_intermediary (saved_cl); /* so that developer can get process back */ 95 call cu_$set_command_processor (cmproc); /* make us the command processor and get_to_cl */ 96 call cu_$set_cl_intermediary (cl_proc); 97 98 call hcs_$initiate_search_rules (addr (search_rules), code); 99 /* set search rules */ 100 if code ^= 0 101 then do; 102 call com_err_ (code, ME, "Cannot set search rules"); 103 GIVE_UP: 104 call logout (); 105 end; 106 107 call iox_$control (iox_$user_io, "quit_enable", null (), (0)); 108 /* can't fail */ 109 110 call ioa_ ("Terminals subsystem"); 111 query_info.version = query_info_version_4; 112 query_info.suppress_name_sw = "1"b; 113 query_info.cp_escape_control = "10"b; /* we are the command processor, so .. is silly */ 114 query_info.suppress_spacing = "1"b; 115 116 restart: 117 call cu_$ready_proc; 118 restart1: 119 buf = ""; 120 call command_query_ (addr (query_info), buf, ME, ""); 121 /* nothing to say, just read */ 122 if buf = "" 123 then go to restart1; 124 125 command = before (ltrim (rtrim (buf)), " "); /* command query does most of the work */ 126 127 if command = "echo" 128 then do; 129 rpt: 130 call repeat_line; 131 end; 132 133 else if command = "repeat" 134 then go to rpt; 135 else if command = "test" 136 then do; 137 call runoff ("test"); 138 end; 139 else if command = "edm" 140 then do; 141 call edm; 142 end; 143 else if command = "help" 144 then do; 145 call print ("terminals.info"); 146 end; 147 148 else if command = "logout" 149 then do; 150 call ioa_ ("Thank you.^/^/"); 151 call logout; 152 end; 153 154 else if command = "hold" 155 then do; 156 call ioa_ ("Thank you.^/^/"); 157 call logout ("-hold"); 158 end; 159 160 else if escape_permitted & command = "return" 161 then do; 162 call cu_$set_command_processor (saved_cp); 163 /* restore the environment, tho search rules will be broke */ 164 call cu_$set_cl_intermediary (saved_cl); 165 return; 166 end; 167 168 else do; 169 call ioa_ ("""^a"" is not a legal command.^/Type ""help"" for instructions", command); 170 end; 171 172 go to restart; 173 174 175 cl_proc: 176 entry; 177 178 call ioa_ ("Automatic restart.^/"); 179 180 t_quit: 181 entry; 182 183 go to nll; /* nonlocal go to -> automatic storage of first invocation stays */ 184 185 cmproc: 186 entry; 187 188 call ioa_ ("No external command processing."); 189 go to nll; 190 191 test: 192 entry; 193 escape_permitted = "1"b; /* save the poor developer some pain. This should be bound away */ 194 195 end terminals_overseer_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/12/82 1044.0 terminals_overseer_.pl1 >spec>on>11/12/82>terminals_overseer_.pl1 76 1 08/12/81 0911.2 query_info.incl.pl1 >ldd>include>query_info.incl.pl1 77 2 07/22/80 1335.1 iox_entries.incl.pl1 >ldd>include>iox_dcls.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. ME 000323 constant char(32) initial unaligned dcl 70 set ref 86* 102* 120* addr builtin function dcl 28 ref 98 98 120 120 answer_iocbp 6 000246 automatic pointer initial level 2 dcl 1-6 set ref 1-6* any_other 000166 stack reference condition dcl 72 ref 82 before builtin function dcl 28 ref 125 buf 000100 automatic varying char(168) dcl 21 set ref 118* 120* 122 125 change_wdir_ 000036 constant entry external dcl 42 ref 84 code 000156 automatic fixed bin(35,0) dcl 21 set ref 84* 85 86* 98* 100 102* com_err_ 000026 constant entry external dcl 42 ref 86 102 command 000154 automatic char(8) unaligned dcl 21 set ref 125* 127 133 135 139 143 148 154 160 169* command_query_ 000032 constant entry external dcl 42 ref 120 cp_escape_control 1(02) 000246 automatic bit(2) initial level 3 packed unaligned dcl 1-6 set ref 113* 1-6* cu_$get_cl_intermediary 000050 constant entry external dcl 42 ref 94 cu_$get_command_processor 000046 constant entry external dcl 42 ref 93 cu_$ready_proc 000034 constant entry external dcl 42 ref 116 cu_$set_cl_intermediary 000052 constant entry external dcl 42 ref 96 164 cu_$set_command_processor 000044 constant entry external dcl 42 ref 95 162 default_error_handler_$wall 000042 constant entry external dcl 42 ref 82 edm 000060 constant entry external dcl 58 ref 141 escape_permitted 000024 internal static bit(1) initial dcl 68 set ref 160 193* explanation_len 14 000246 automatic fixed bin(21,0) initial level 2 dcl 1-6 set ref 1-6* explanation_ptr 12 000246 automatic pointer initial level 2 dcl 1-6 set ref 1-6* hcs_$initiate_search_rules 000030 constant entry external dcl 42 ref 98 home_dir 000174 automatic char(168) unaligned dcl 73 set ref 83* 84* 86* ioa_ 000054 constant entry external dcl 42 ref 110 150 156 169 178 188 iox_$control 000070 constant entry external dcl 2-6 ref 107 iox_$user_io 000072 external static pointer dcl 2-35 set ref 107* logout 000066 constant entry external dcl 58 ref 103 151 157 ltrim builtin function dcl 28 ref 125 nll 000010 internal static label variable dcl 33 set ref 80* 183 189 padding 1(05) 000246 automatic bit(31) initial level 3 packed unaligned dcl 1-6 set ref 1-6* print 000064 constant entry external dcl 58 ref 145 query_code 3 000246 automatic fixed bin(35,0) initial level 2 dcl 1-6 set ref 1-6* query_info 000246 automatic structure level 1 dcl 1-6 set ref 120 120 query_info_version_4 constant fixed bin(17,0) initial dcl 1-31 ref 111 question_iocbp 4 000246 automatic pointer initial level 2 dcl 1-6 set ref 1-6* quit 000160 stack reference condition dcl 71 ref 91 repeat_line 000056 constant entry external dcl 58 ref 129 repeat_time 10 000246 automatic fixed bin(71,0) initial level 2 dcl 1-6 set ref 1-6* rtrim builtin function dcl 28 ref 125 runoff 000062 constant entry external dcl 58 ref 137 saved_cl 000014 internal static entry variable dcl 66 set ref 94* 164* saved_cp 000020 internal static entry variable dcl 67 set ref 93* 162* search_rules 000000 constant structure level 1 dcl 34 set ref 98 98 status_code 2 000246 automatic fixed bin(35,0) initial level 2 dcl 1-6 set ref 1-6* suppress_name_sw 1(01) 000246 automatic bit(1) initial level 3 packed unaligned dcl 1-6 set ref 112* 1-6* suppress_spacing 1(04) 000246 automatic bit(1) initial level 3 packed unaligned dcl 1-6 set ref 114* 1-6* switches 1 000246 automatic structure level 2 dcl 1-6 user_info_$homedir 000040 constant entry external dcl 42 ref 83 version 000246 automatic fixed bin(17,0) level 2 dcl 1-6 set ref 111* yes_or_no_sw 1 000246 automatic bit(1) initial level 3 packed unaligned dcl 1-6 set ref 1-6* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. iox_$attach_name 000000 constant entry external dcl 2-6 iox_$attach_ptr 000000 constant entry external dcl 2-6 iox_$close 000000 constant entry external dcl 2-6 iox_$delete_record 000000 constant entry external dcl 2-6 iox_$destroy_iocb 000000 constant entry external dcl 2-6 iox_$detach_iocb 000000 constant entry external dcl 2-6 iox_$err_no_operation 000000 constant entry external dcl 2-6 iox_$err_not_attached 000000 constant entry external dcl 2-6 iox_$err_not_closed 000000 constant entry external dcl 2-6 iox_$err_not_open 000000 constant entry external dcl 2-6 iox_$error_output external static pointer dcl 2-35 iox_$find_iocb 000000 constant entry external dcl 2-6 iox_$find_iocb_n 000000 constant entry external dcl 2-6 iox_$get_chars 000000 constant entry external dcl 2-6 iox_$get_line 000000 constant entry external dcl 2-6 iox_$look_iocb 000000 constant entry external dcl 2-6 iox_$modes 000000 constant entry external dcl 2-6 iox_$move_attach 000000 constant entry external dcl 2-6 iox_$open 000000 constant entry external dcl 2-6 iox_$position 000000 constant entry external dcl 2-6 iox_$propagate 000000 constant entry external dcl 2-6 iox_$put_chars 000000 constant entry external dcl 2-6 iox_$read_key 000000 constant entry external dcl 2-6 iox_$read_length 000000 constant entry external dcl 2-6 iox_$read_record 000000 constant entry external dcl 2-6 iox_$rewrite_record 000000 constant entry external dcl 2-6 iox_$seek_key 000000 constant entry external dcl 2-6 iox_$user_input external static pointer dcl 2-35 iox_$user_output external static pointer dcl 2-35 iox_$write_record 000000 constant entry external dcl 2-6 query_info_version_3 internal static fixed bin(17,0) initial dcl 1-30 query_info_version_5 internal static fixed bin(17,0) initial dcl 1-32 NAMES DECLARED BY EXPLICIT CONTEXT. GIVE_UP 000764 constant label dcl 103 ref 87 cl_proc 001402 constant entry external dcl 175 ref 96 96 cmproc 001443 constant entry external dcl 185 ref 95 95 restart 001052 constant label dcl 116 ref 80 172 restart1 001057 constant label dcl 118 ref 122 rpt 001156 constant label dcl 129 ref 133 t_quit 001431 constant entry external dcl 180 ref 91 terminals_overseer_ 000523 constant entry external dcl 12 test 001471 constant entry external dcl 191 NAME DECLARED BY CONTEXT OR IMPLICATION. null builtin function ref 107 107 1-6 1-6 1-6 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2004 2100 1512 2014 Length 2350 1512 74 234 272 16 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME terminals_overseer_ 226 external procedure is an external procedure. on unit on line 82 64 on unit on unit on line 91 64 on unit STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 nll terminals_overseer_ 000014 saved_cl terminals_overseer_ 000020 saved_cp terminals_overseer_ 000024 escape_permitted terminals_overseer_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME terminals_overseer_ 000100 buf terminals_overseer_ 000154 command terminals_overseer_ 000156 code terminals_overseer_ 000174 home_dir terminals_overseer_ 000246 query_info terminals_overseer_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_in call_ext_out_desc call_ext_out return tra_label_var enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. change_wdir_ com_err_ command_query_ cu_$get_cl_intermediary cu_$get_command_processor cu_$ready_proc cu_$set_cl_intermediary cu_$set_command_processor default_error_handler_$wall edm hcs_$initiate_search_rules ioa_ iox_$control logout print repeat_line runoff user_info_$homedir THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. iox_$user_io LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 1 6 000474 12 000522 80 000531 82 000535 83 000556 84 000567 85 000600 86 000602 87 000632 91 000633 93 000654 94 000663 95 000672 96 000705 98 000720 100 000733 102 000735 103 000764 107 000771 110 001024 111 001040 112 001042 113 001044 114 001050 116 001052 118 001057 120 001060 122 001107 125 001114 127 001151 129 001156 131 001163 133 001164 135 001170 137 001175 138 001210 139 001211 141 001216 142 001223 143 001224 145 001231 146 001246 148 001247 150 001253 151 001270 152 001275 154 001276 156 001303 157 001320 158 001333 160 001334 162 001343 164 001351 165 001360 169 001361 172 001400 175 001401 178 001410 180 001427 183 001437 185 001442 188 001451 189 001465 191 001470 193 001477 195 001502 ----------------------------------------------------------- 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