COMPILATION LISTING OF SEGMENT video_system_ctl_util_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/15/84 1147.8 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1981 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 /* PL/1 utilities for the Emacs video_system terminal controller. 11* Cleaned up and installed June 1981 Richard Mark Soley 12* Modified 810811 by William M. York to add get_terminal_capabilities 13* entry so video_system ctl can set flags properly. 14* Modified 3 June 1982 by B Margolin to subtract one from width (for 15* end-of-line cursor positioning) and to divide line_speed by 16* 10 when setting ospeed. 17* Modified 3 December 1983 by B. Margolin to fix get_terminal_capabilities 18* and get_window_info to check codes before using the returned info 19* (prevents arithmetic faults). 20* Modified 2 November 1984 by B. Margolin to make $get_window_info return 21* the correct starting column, even though video_system.ctl doesn't 22* actually care about that parameter. 23**/ 24 25 video_system_ctl_util_: procedure (); 26 return; /* Dummy */ 27 28 /* System Entries */ 29 dcl iox_$control entry(ptr, char(*), ptr, fixed bin(35)); 30 31 /* Automatic */ 32 dcl code fixed bin(35); 33 dcl iocb_ptr ptr; 34 35 dcl 1 WPI aligned like window_position_info; 36 dcl 1 capabilities like capabilities_info; 37 38 /* Builtin */ 39 dcl (addr, divide) builtin; 40 41 /* Parameters */ 42 dcl (P_line, P_col, P_width, P_height) fixed bin parameter; 43 dcl (P_constant_t, P_constant_nil) fixed bin(71) parameter; 44 dcl (P_scroll_region_availablep, P_idel_chars_availablep, P_overstrike_availablep) 45 fixed bin(71) parameter; 46 dcl P_line_speed fixed bin parameter; 47 dcl P_code fixed bin(35) parameter; 48 dcl P_iocb_ptr ptr parameter; 49 50 /* Include Files */ 1 1 /* BEGIN INCLUDE FILE ... window_control_info.incl.pl1 JRD */ 1 2 /* format: style3 */ 1 3 1 4 /* Modified 26 January 1982 by William York to add the set_more_handler 1 5* and reset_more_handler control orders. */ 1 6 /* Modified October 1982 by WMY to add set and get_token_characters, 1 7* set and get_more_prompt. */ 1 8 /* Modified February 1983 by WMY to add the line_editor_key_binding_info 1 9* structure. */ 1 10 /* Modified 30 September 1983 by Jon A. Rochlis to add the origin.column for 1 11* partial screen width windows. */ 1 12 /* Modified 9 October 1983 by JR to add version 1 window_edit_line_info. 1 13* This should be removed when window_info.incl.pl1 is created. */ 1 14 /* Modified 29 February 1984 by Barmar to add version 1 1 15* get_editor_key_bindings_info. */ 1 16 /* Modified 1 March 1984 by Barmar to add version 1 1 17* set_editor_key_bindings_info. */ 1 18 /* Modified 2 March 1984 by Barmar to upgrade to version 3 1 19* line_editor_key_bindings_info, which includes the name, description, and 1 20* info path */ 1 21 1 22 /* structure for the set_window_info and get_window_info 1 23* control orders. */ 1 24 1 25 dcl 1 window_position_info 1 26 based (window_position_info_ptr), 1 27 2 version fixed bin, 1 28 2 origin, 1 29 3 column fixed bin, 1 30 3 line fixed bin, 1 31 2 extent, 1 32 3 width fixed bin, 1 33 3 height fixed bin; 1 34 1 35 dcl (window_position_info_version, window_position_info_version_1) 1 36 fixed bin internal static init (1) options (constant); 1 37 dcl window_position_info_ptr 1 38 pointer; 1 39 1 40 /* structure for the set_window_status and get_window_status 1 41* control orders */ 1 42 1 43 declare window_status_info_ptr 1 44 pointer; 1 45 declare 1 window_status_info 1 46 aligned based (window_status_info_ptr), 1 47 2 version fixed bin, 1 48 2 status_string bit (36) aligned; /* string (window_status) */ 1 49 /* see window_status.incl.pl1 for the contents of this string */ 1 50 1 51 1 52 declare (window_status_version, window_status_version_1) 1 53 fixed bin internal static init (1) options (constant); 1 54 1 55 /* info structure for the set_more_responses and get_more_responses control 1 56* orders */ 1 57 1 58 1 59 dcl 1 more_responses_info 1 60 aligned based (more_responses_info_ptr), 1 61 2 version fixed bin, 1 62 2 n_yeses fixed bin, /* how many valid characters in the strings below */ 1 63 2 n_noes fixed bin, 1 64 2 yeses char (32) unaligned, 1 65 2 noes char (32) unaligned; 1 66 1 67 dcl (more_responses_info_version_1, more_responses_version) 1 68 fixed bin internal static init (1) options (constant); 1 69 dcl more_responses_info_ptr 1 70 pointer; 1 71 1 72 /* structure for the set_break_table and get_break_table 1 73* control orders */ 1 74 1 75 declare break_table_ptr pointer; 1 76 declare 1 break_table_info aligned based (break_table_ptr), 1 77 2 version fixed bin, 1 78 2 breaks (0:127) bit (1) unaligned; 1 79 1 80 declare (break_table_info_version, break_table_info_version_1) 1 81 fixed bin init (1) internal static options (constant); 1 82 1 83 declare 1 more_handler_info aligned based (more_handler_info_ptr), 1 84 2 version fixed bin, 1 85 2 flags unaligned, 1 86 3 old_handler_valid 1 87 bit(1), 1 88 3 pad bit(35), 1 89 2 more_handler entry (pointer, bit(1) aligned), 1 90 2 old_more_handler entry (pointer, bit(1) aligned); 1 91 1 92 declare more_handler_info_ptr pointer; 1 93 1 94 declare (more_handler_info_version, more_handler_info_version_3) 1 95 fixed bin internal static options (constant) init (3); 1 96 1 97 declare 1 token_characters_info aligned based (token_characters_info_ptr), 1 98 2 version char(8), 1 99 2 token_character_count 1 100 fixed bin, 1 101 2 token_characters 1 102 char (128) unaligned; 1 103 1 104 declare token_characters_info_ptr pointer; 1 105 1 106 declare token_characters_info_version_1 char(8) internal static options (constant) init ("wtci0001"); 1 107 1 108 declare 1 more_prompt_info aligned based (more_prompt_info_ptr), 1 109 2 version char(8), 1 110 2 more_prompt char(80); 1 111 1 112 declare more_prompt_info_ptr pointer; 1 113 1 114 declare more_prompt_info_version_1 char(8) static options (constant) init ("wsmp0001"); 1 115 1 116 /* Line editor stuff ... */ 1 117 1 118 dcl line_editor_key_binding_info_ptr 1 119 pointer; 1 120 1 121 dcl line_editor_binding_count 1 122 fixed bin; 1 123 dcl line_editor_longest_sequence 1 124 fixed bin; 1 125 /* For each binding, action defines what to do for that sequence. Constants 1 126* are defined in window_editor_values.incl.pl1. Only if action is set to 1 127* EXTERNAL_ROUTINE does the editor_routine entry variable get examined. */ 1 128 1 129 dcl 1 line_editor_key_binding_info 1 130 aligned based (line_editor_key_binding_info_ptr), 1 131 2 version char(8), 1 132 2 binding_count fixed bin, 1 133 2 longest_sequence fixed bin, 1 134 2 bindings (line_editor_binding_count refer 1 135 (line_editor_key_binding_info.binding_count)), 1 136 3 sequence char(line_editor_longest_sequence refer 1 137 (line_editor_key_binding_info.longest_sequence)) varying, 1 138 3 action fixed bin, 1 139 3 numarg_action fixed binary, 1 140 3 editor_routine entry (pointer, fixed bin(35)), 1 141 3 name char (64) varying unaligned, 1 142 3 description char (256) varying unaligned, 1 143 3 info_path unaligned, 1 144 4 info_dir char (168), 1 145 4 info_entry char (32); 1 146 1 147 1 148 dcl line_editor_key_binding_info_version_3 1 149 char(8) static options (constant) init ("lekbi003"); 1 150 1 151 dcl 1 get_editor_key_bindings_info aligned based (get_editor_key_bindings_info_ptr), 1 152 2 version char (8), 1 153 2 flags, 1 154 3 entire_state bit (1) unaligned, 1 155 3 mbz bit (35) unaligned, 1 156 2 key_binding_info_ptr ptr, 1 157 2 entire_state_ptr ptr; 1 158 1 159 dcl get_editor_key_bindings_info_ptr ptr; 1 160 dcl get_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("gekbi_01"); 1 161 1 162 dcl 1 set_editor_key_bindings_info aligned 1 163 based (set_editor_key_bindings_info_ptr), 1 164 2 version char (8), 1 165 2 flags, 1 166 3 replace bit (1) unaligned, 1 167 3 update bit (1) unaligned, 1 168 3 mbz bit (34) unaligned, 1 169 2 key_binding_info_ptr ptr; 1 170 1 171 dcl set_editor_key_bindings_info_ptr ptr; 1 172 dcl set_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("sekbi_01"); 1 173 1 174 /* This should be moved to window_info.incl.pl1 when that include file is 1 175* created. JR 2/1/84 */ 1 176 1 177 dcl 1 window_edit_line_info 1 178 based (window_edit_line_info_ptr), 1 179 2 version char (8), 1 180 2 line_ptr ptr, 1 181 2 line_length fixed bin (21); /* later we will hack initial cursor position, key bindings, etc. */ 1 182 1 183 dcl window_edit_line_info_version_1 1 184 char (8) static options (constant) init ("wedl0001"); 1 185 1 186 dcl window_edit_line_info_ptr 1 187 ptr; 1 188 1 189 /* END INCLUDE FILE window_control_info.incl.pl1 */ 51 2 1 /* BEGIN INCLUDE FILE terminal_capabilities.incl.pl1 BIM May 1981 */ 2 2 /* format: style3 */ 2 3 dcl 1 capabilities_info aligned based (capabilities_info_ptr), 2 4 2 version fixed bin, 2 5 2 screensize, 2 6 3 columns fixed bin, 2 7 3 rows fixed bin, 2 8 2 flags, 2 9 3 scroll_region bit (1) unal, 2 10 3 insert_chars bit (1) unal, 2 11 3 insert_mode bit (1) unal, 2 12 3 delete_chars bit (1) unal, 2 13 3 overprint bit (1) unal, 2 14 3 pad bit (31) unal, 2 15 2 line_speed fixed bin; /* chars per sec */ 2 16 2 17 dcl (capabilities_info_version_1, capabilities_info_version) 2 18 fixed bin internal static init (1) options (constant); 2 19 dcl capabilities_info_ptr 2 20 pointer; 2 21 2 22 /* END INCLUDE FILE terminal_capabilities.incl.pl1 */ 52 53 54 get_window_info: 55 entry(P_iocb_ptr, P_line, P_col, P_width, P_height, P_code); 56 57 WPI.version = window_position_info_version_1; 58 59 call iox_$control (P_iocb_ptr, "get_window_info", addr (WPI), code); 60 61 if code = 0 then do; 62 P_line = WPI.line; 63 P_col = WPI.column; 64 P_width = WPI.width - 1; /* Leave an extra column */ 65 P_height = WPI.height; 66 end; 67 P_code = code; 68 69 return; 70 71 get_terminal_capabilities: 72 entry (P_iocb_ptr, P_constant_t, P_constant_nil, P_scroll_region_availablep, P_idel_chars_availablep, P_overstrike_availablep, P_line_speed, P_code); 73 74 /* This subroutine is called from Lisp with the symbols "t" and "nil" so 75* it can return Lisp logical values without having to call into the Lisp 76* world to get their values. */ 77 78 capabilities.version = capabilities_info_version_1; 79 80 call iox_$control (P_iocb_ptr, "get_capabilities", addr (capabilities), P_code); 81 82 if P_code = 0 then do; 83 if capabilities.flags.scroll_region 84 then P_scroll_region_availablep = P_constant_t; 85 else P_scroll_region_availablep = P_constant_nil; 86 87 if (capabilities.flags.insert_chars & capabilities.flags.delete_chars) 88 then P_idel_chars_availablep = P_constant_t; 89 else P_idel_chars_availablep = P_constant_nil; 90 91 if capabilities.flags.overprint 92 then P_overstrike_availablep = P_constant_t; 93 else P_overstrike_availablep = P_constant_nil; 94 95 P_line_speed = divide (capabilities.line_speed, 10, 17, 0); 96 end; 97 return; 98 99 end video_system_ctl_util_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/84 0849.0 video_system_ctl_util_.pl1 >spec>on>6599-11/15/84>video_system_ctl_util_.pl1 51 1 09/12/84 0916.7 window_control_info.incl.pl1 >ldd>include>window_control_info.incl.pl1 52 2 03/27/82 0429.7 terminal_capabilities.incl.pl1 >ldd>include>terminal_capabilities.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. P_code parameter fixed bin(35,0) dcl 47 set ref 54 67* 71 80* 82 P_col parameter fixed bin(17,0) dcl 42 set ref 54 63* P_constant_nil parameter fixed bin(71,0) dcl 43 ref 71 85 89 93 P_constant_t parameter fixed bin(71,0) dcl 43 ref 71 83 87 91 P_height parameter fixed bin(17,0) dcl 42 set ref 54 65* P_idel_chars_availablep parameter fixed bin(71,0) dcl 44 set ref 71 87* 89* P_iocb_ptr parameter pointer dcl 48 set ref 54 59* 71 80* P_line parameter fixed bin(17,0) dcl 42 set ref 54 62* P_line_speed parameter fixed bin(17,0) dcl 46 set ref 71 95* P_overstrike_availablep parameter fixed bin(71,0) dcl 44 set ref 71 91* 93* P_scroll_region_availablep parameter fixed bin(71,0) dcl 44 set ref 71 83* 85* P_width parameter fixed bin(17,0) dcl 42 set ref 54 64* WPI 000101 automatic structure level 1 dcl 35 set ref 59 59 addr builtin function dcl 39 ref 59 59 80 80 capabilities 000106 automatic structure level 1 unaligned dcl 36 set ref 80 80 capabilities_info based structure level 1 dcl 2-3 capabilities_info_version_1 constant fixed bin(17,0) initial dcl 2-17 ref 78 code 000100 automatic fixed bin(35,0) dcl 32 set ref 59* 61 67 column 1 000101 automatic fixed bin(17,0) level 3 dcl 35 set ref 63 delete_chars 3(03) 000106 automatic bit(1) level 3 packed unaligned dcl 36 set ref 87 divide builtin function dcl 39 ref 95 extent 3 000101 automatic structure level 2 dcl 35 flags 3 000106 automatic structure level 2 packed unaligned dcl 36 height 4 000101 automatic fixed bin(17,0) level 3 dcl 35 set ref 65 insert_chars 3(01) 000106 automatic bit(1) level 3 packed unaligned dcl 36 set ref 87 iox_$control 000010 constant entry external dcl 29 ref 59 80 line 2 000101 automatic fixed bin(17,0) level 3 dcl 35 set ref 62 line_speed 4 000106 automatic fixed bin(17,0) level 2 dcl 36 set ref 95 origin 1 000101 automatic structure level 2 dcl 35 overprint 3(04) 000106 automatic bit(1) level 3 packed unaligned dcl 36 set ref 91 scroll_region 3 000106 automatic bit(1) level 3 packed unaligned dcl 36 set ref 83 version 000106 automatic fixed bin(17,0) level 2 in structure "capabilities" dcl 36 in procedure "video_system_ctl_util_" set ref 78* version 000101 automatic fixed bin(17,0) level 2 in structure "WPI" dcl 35 in procedure "video_system_ctl_util_" set ref 57* width 3 000101 automatic fixed bin(17,0) level 3 dcl 35 set ref 64 window_position_info based structure level 1 unaligned dcl 1-25 window_position_info_version_1 constant fixed bin(17,0) initial dcl 1-35 ref 57 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. break_table_info based structure level 1 dcl 1-76 break_table_info_version internal static fixed bin(17,0) initial dcl 1-80 break_table_info_version_1 internal static fixed bin(17,0) initial dcl 1-80 break_table_ptr automatic pointer dcl 1-75 capabilities_info_ptr automatic pointer dcl 2-19 capabilities_info_version internal static fixed bin(17,0) initial dcl 2-17 get_editor_key_bindings_info based structure level 1 dcl 1-151 get_editor_key_bindings_info_ptr automatic pointer dcl 1-159 get_editor_key_bindings_info_version_1 internal static char(8) initial unaligned dcl 1-160 iocb_ptr automatic pointer dcl 33 line_editor_binding_count automatic fixed bin(17,0) dcl 1-121 line_editor_key_binding_info based structure level 1 dcl 1-129 line_editor_key_binding_info_ptr automatic pointer dcl 1-118 line_editor_key_binding_info_version_3 internal static char(8) initial unaligned dcl 1-148 line_editor_longest_sequence automatic fixed bin(17,0) dcl 1-123 more_handler_info based structure level 1 dcl 1-83 more_handler_info_ptr automatic pointer dcl 1-92 more_handler_info_version internal static fixed bin(17,0) initial dcl 1-94 more_handler_info_version_3 internal static fixed bin(17,0) initial dcl 1-94 more_prompt_info based structure level 1 dcl 1-108 more_prompt_info_ptr automatic pointer dcl 1-112 more_prompt_info_version_1 internal static char(8) initial unaligned dcl 1-114 more_responses_info based structure level 1 dcl 1-59 more_responses_info_ptr automatic pointer dcl 1-69 more_responses_info_version_1 internal static fixed bin(17,0) initial dcl 1-67 more_responses_version internal static fixed bin(17,0) initial dcl 1-67 set_editor_key_bindings_info based structure level 1 dcl 1-162 set_editor_key_bindings_info_ptr automatic pointer dcl 1-171 set_editor_key_bindings_info_version_1 internal static char(8) initial unaligned dcl 1-172 token_characters_info based structure level 1 dcl 1-97 token_characters_info_ptr automatic pointer dcl 1-104 token_characters_info_version_1 internal static char(8) initial unaligned dcl 1-106 window_edit_line_info based structure level 1 unaligned dcl 1-177 window_edit_line_info_ptr automatic pointer dcl 1-186 window_edit_line_info_version_1 internal static char(8) initial unaligned dcl 1-183 window_position_info_ptr automatic pointer dcl 1-37 window_position_info_version internal static fixed bin(17,0) initial dcl 1-35 window_status_info based structure level 1 dcl 1-45 window_status_info_ptr automatic pointer dcl 1-43 window_status_version internal static fixed bin(17,0) initial dcl 1-52 window_status_version_1 internal static fixed bin(17,0) initial dcl 1-52 NAMES DECLARED BY EXPLICIT CONTEXT. get_terminal_capabilities 000126 constant entry external dcl 71 get_window_info 000033 constant entry external dcl 54 video_system_ctl_util_ 000017 constant entry external dcl 25 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 314 326 234 324 Length 542 234 12 177 57 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME video_system_ctl_util_ 102 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME video_system_ctl_util_ 000100 code video_system_ctl_util_ 000101 WPI video_system_ctl_util_ 000106 capabilities video_system_ctl_util_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. iox_$control NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 25 000016 26 000024 54 000025 57 000043 59 000045 61 000100 62 000102 63 000105 64 000107 65 000112 67 000114 69 000116 71 000117 78 000136 80 000140 82 000173 83 000175 85 000204 87 000207 89 000216 91 000220 93 000226 95 000230 97 000233 ----------------------------------------------------------- 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