COMPILATION LISTING OF SEGMENT window_display_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phx. Az., Sys-M Compiled on: 08/13/87 1327.5 mst Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 /* format: style2 */ 14 window_display_: 15 procedure (P_window, P_image, P_code); 16 17 /* Written by James R.Davis February 1981 18* SKrupp was here 19* 5/7/81 fixed bug where image_memory.assoc(*).window should be 20* initialized to null when image_memory is allocated. 21* Maintained by Kyzivat.SST 22* 6/11/81 corrected a problem where data was transmitted via ioa_, 23* and thus had trailing blanks removed. Also added a minimal 24* form of redisplay which works on changed lines but doesn't 25* detect inserted or deleted lines. Also made change to clear 26* changed part of the window when the size of the image changes. 27* Also added an entrypoint to totally refresh the window. 28* 6/12/81 Made minor tweaks to improve the efficiency of access to the 29* image arrays. 30* Stolen by Benson I. Margulies 31* Updated to new window_ calling sequence, July 1981. 32* IPS masking added in august. 33* Changed to use terminal control's screen image, September 2, 1981. 34*Adopted by William M. York in 1982. */ 35 36 /* Modified 20 October 1982 by WMY to use clear_to_end_of_line rather than 37* overwriting with spaces. */ 38 /* Modified 21 October 1982 by WMY to perform simple insert/delete characters 39* optimizations. */ 40 /* Modified 25 October 1982 by WMY to clear regions, not just line-at-a-time. */ 41 /* Modified 9 December 1982 by WMY to restrict the cases where insert/delete 42* characters is used in response to complaints from XMAIL users. */ 43 /* Modified 8 January 1983 by Jon A. Rochlis to add support for partial width 44* windows (i.e. windows who don't start at col 1, or who are shorter than 45* screen width). */ 46 47 dcl P_window pointer parameter; 48 dcl P_image (*) char (*) unaligned parameter; 49 dcl P_code fixed binary (35) parameter; 50 51 dcl saved_mask bit (36) aligned; 52 dcl terminal_iocb_ptr pointer; 53 dcl video_data_$as_only_mask bit (36) aligned external static; 54 dcl cleanup condition; 55 dcl nlines fixed bin; 56 dcl ncols fixed bin; 57 dcl lx fixed bin; 58 dcl long_string character (256) unaligned; 59 dcl start_col fixed bin; 60 dcl start_line fixed bin; 61 dcl region_start_line fixed bin; 62 dcl short_image bit (1) aligned; 63 64 dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); 65 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 66 67 dcl (addr, hbound, length, min, null, string) 68 builtin; 69 70 dcl 1 wpi aligned like window_position_info; 71 72 1 1 /* Begin include file tc_screen_image.incl.pl1 BIM Sept 81 */ 1 2 /* format: style3 */ 1 3 1 4 declare 1 screen aligned based (screen_ptr), 1 5 2 n_lines fixed bin, 1 6 2 n_columns fixed bin, 1 7 2 is_clear bit (1) aligned, /* opt */ 1 8 2 lines (screen_n_lines refer (screen.n_lines)) 1 9 character (screen_n_columns refer (screen.n_columns)) unaligned; 1 10 1 11 1 12 declare screen_ptr pointer; 1 13 declare (screen_n_lines, screen_n_columns) 1 14 fixed bin; 1 15 1 16 /* End include file tc_screen_image.incl.pl1 */ 73 74 2 1 /* begin include fine window_dcls.incl.pl1 BIM June 1981 */ 2 2 /* Modified 9 October 1983 by Jon A. Rochlis to add window_$edit_line. */ 2 3 2 4 /* format: style3 */ 2 5 2 6 declare window_$bell entry (pointer, fixed binary (35)); 2 7 declare window_$clear_region 2 8 entry (pointer, fixed binary, fixed binary, fixed binary, fixed binary, fixed binary (35)); 2 9 declare window_$clear_to_end_of_line 2 10 entry (pointer, fixed binary (35)); 2 11 declare window_$clear_to_end_of_window 2 12 entry (pointer, fixed binary (35)); 2 13 declare window_$clear_window 2 14 entry (pointer, fixed binary (35)); 2 15 declare window_$delete_chars 2 16 entry (pointer, fixed binary, fixed binary (35)); 2 17 declare window_$get_cursor_position 2 18 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 2 19 2 20 /* Call window_$get_echoed_chars (iocb_ptr, n_to_read, read_buffer, n_read, read_break, code); */ 2 21 2 22 declare window_$get_echoed_chars 2 23 entry (pointer, fixed binary (21), character (*), fixed binary (21), character (1) var, 2 24 fixed binary (35)); 2 25 declare window_$get_unechoed_chars 2 26 entry (pointer, fixed binary (21), character (*), fixed binary (21), character (1) var, 2 27 fixed binary (35)); 2 28 declare window_$insert_text entry (pointer, character (*), fixed binary (35)); 2 29 declare window_$overwrite_text 2 30 entry (pointer, character (*), fixed binary (35)); 2 31 declare window_$position_cursor 2 32 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 2 33 2 34 /* Call window_$position_cursor_rel (iocb_ptr, delta_line, delta_column, code); */ 2 35 2 36 declare window_$position_cursor_rel 2 37 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 2 38 2 39 /* Call window_$scroll_region (iocb_ptr, first_line_of_region, n_lines_of_region, distance_to_scroll_region_negative_is_up, 2 40* code); */ 2 41 2 42 declare window_$scroll_region 2 43 entry (pointer, fixed binary, fixed binary, fixed binary, fixed binary (35)); 2 44 declare window_$sync entry (pointer, fixed binary (35)); 2 45 2 46 /* Call window_$write_raw_text (iocb_ptr, text_string, code); */ 2 47 2 48 declare window_$write_raw_text 2 49 entry (pointer, character (*), fixed binary (35)); 2 50 2 51 /* Call window_$write_sync_read (iocb_ptr, prompt_string, n_to_read, read_buffer, n_read, break_char, code); */ 2 52 2 53 declare window_$write_sync_read 2 54 entry (pointer, character (*), fixed bin (21), character (*), fixed binary (21), 2 55 character (1) var, fixed binary (35)); 2 56 2 57 /* Call window_$change_line (iocb_ptr, new_line, code); */ 2 58 2 59 declare window_$change_line entry (pointer, fixed binary, fixed binary (35)); 2 60 2 61 /* Call window_$change_column (iocb_ptr, new_column, code); */ 2 62 2 63 declare window_$change_column 2 64 entry (pointer, fixed binary, fixed binary (35)); 2 65 2 66 /* Call window_$get_one_unechoed (iocb_ptr, char_or_len_0, block_flag, code); */ 2 67 declare ( 2 68 window_$get_one_unechoed, 2 69 window_$get_one_unechoed_char 2 70 ) entry (pointer, character (1) var, bit (1) aligned, fixed binary (35)); 2 71 2 72 declare window_$create entry (pointer, pointer, pointer, fixed binary (35)); 2 73 2 74 declare window_$destroy entry (pointer, fixed binary (35)); 2 75 2 76 declare window_$edit_line entry (pointer, pointer, pointer, fixed bin(21), fixed bin(21), fixed bin(35)); 2 77 2 78 /* call window_$edit_line (iocb_ptr, window_edit_line_info_ptr, buffer_ptr, 2 79* buffer_len, n_returned, code); */ 2 80 2 81 2 82 /* end include file window_dcls.incl.pl1 */ 75 76 3 1 /* BEGIN INCLUDE FILE ... window_control_info.incl.pl1 JRD */ 3 2 /* format: style3 */ 3 3 3 4 /* Modified 26 January 1982 by William York to add the set_more_handler 3 5* and reset_more_handler control orders. */ 3 6 /* Modified October 1982 by WMY to add set and get_token_characters, 3 7* set and get_more_prompt. */ 3 8 /* Modified February 1983 by WMY to add the line_editor_key_binding_info 3 9* structure. */ 3 10 /* Modified 30 September 1983 by Jon A. Rochlis to add the origin.column for 3 11* partial screen width windows. */ 3 12 /* Modified 9 October 1983 by JR to add version 1 window_edit_line_info. 3 13* This should be removed when window_info.incl.pl1 is created. */ 3 14 /* Modified 29 February 1984 by Barmar to add version 1 3 15* get_editor_key_bindings_info. */ 3 16 /* Modified 1 March 1984 by Barmar to add version 1 3 17* set_editor_key_bindings_info. */ 3 18 /* Modified 2 March 1984 by Barmar to upgrade to version 3 3 19* line_editor_key_bindings_info, which includes the name, description, and 3 20* info path */ 3 21 3 22 /* structure for the set_window_info and get_window_info 3 23* control orders. */ 3 24 3 25 dcl 1 window_position_info 3 26 based (window_position_info_ptr), 3 27 2 version fixed bin, 3 28 2 origin, 3 29 3 column fixed bin, 3 30 3 line fixed bin, 3 31 2 extent, 3 32 3 width fixed bin, 3 33 3 height fixed bin; 3 34 3 35 dcl (window_position_info_version, window_position_info_version_1) 3 36 fixed bin internal static init (1) options (constant); 3 37 dcl window_position_info_ptr 3 38 pointer; 3 39 3 40 /* structure for the set_window_status and get_window_status 3 41* control orders */ 3 42 3 43 declare window_status_info_ptr 3 44 pointer; 3 45 declare 1 window_status_info 3 46 aligned based (window_status_info_ptr), 3 47 2 version fixed bin, 3 48 2 status_string bit (36) aligned; /* string (window_status) */ 3 49 /* see window_status.incl.pl1 for the contents of this string */ 3 50 3 51 3 52 declare (window_status_version, window_status_version_1) 3 53 fixed bin internal static init (1) options (constant); 3 54 3 55 /* info structure for the set_more_responses and get_more_responses control 3 56* orders */ 3 57 3 58 3 59 dcl 1 more_responses_info 3 60 aligned based (more_responses_info_ptr), 3 61 2 version fixed bin, 3 62 2 n_yeses fixed bin, /* how many valid characters in the strings below */ 3 63 2 n_noes fixed bin, 3 64 2 yeses char (32) unaligned, 3 65 2 noes char (32) unaligned; 3 66 3 67 dcl (more_responses_info_version_1, more_responses_version) 3 68 fixed bin internal static init (1) options (constant); 3 69 dcl more_responses_info_ptr 3 70 pointer; 3 71 3 72 /* structure for the set_break_table and get_break_table 3 73* control orders */ 3 74 3 75 declare break_table_ptr pointer; 3 76 declare 1 break_table_info aligned based (break_table_ptr), 3 77 2 version fixed bin, 3 78 2 breaks (0:127) bit (1) unaligned; 3 79 3 80 declare (break_table_info_version, break_table_info_version_1) 3 81 fixed bin init (1) internal static options (constant); 3 82 3 83 declare 1 more_handler_info aligned based (more_handler_info_ptr), 3 84 2 version fixed bin, 3 85 2 flags unaligned, 3 86 3 old_handler_valid 3 87 bit(1), 3 88 3 pad bit(35), 3 89 2 more_handler entry (pointer, bit(1) aligned), 3 90 2 old_more_handler entry (pointer, bit(1) aligned); 3 91 3 92 declare more_handler_info_ptr pointer; 3 93 3 94 declare (more_handler_info_version, more_handler_info_version_3) 3 95 fixed bin internal static options (constant) init (3); 3 96 3 97 declare 1 token_characters_info aligned based (token_characters_info_ptr), 3 98 2 version char(8), 3 99 2 token_character_count 3 100 fixed bin, 3 101 2 token_characters 3 102 char (128) unaligned; 3 103 3 104 declare token_characters_info_ptr pointer; 3 105 3 106 declare token_characters_info_version_1 char(8) internal static options (constant) init ("wtci0001"); 3 107 3 108 declare 1 more_prompt_info aligned based (more_prompt_info_ptr), 3 109 2 version char(8), 3 110 2 more_prompt char(80); 3 111 3 112 declare more_prompt_info_ptr pointer; 3 113 3 114 declare more_prompt_info_version_1 char(8) static options (constant) init ("wsmp0001"); 3 115 3 116 /* Line editor stuff ... */ 3 117 3 118 dcl line_editor_key_binding_info_ptr 3 119 pointer; 3 120 3 121 dcl line_editor_binding_count 3 122 fixed bin; 3 123 dcl line_editor_longest_sequence 3 124 fixed bin; 3 125 /* For each binding, action defines what to do for that sequence. Constants 3 126* are defined in window_editor_values.incl.pl1. Only if action is set to 3 127* EXTERNAL_ROUTINE does the editor_routine entry variable get examined. */ 3 128 3 129 dcl 1 line_editor_key_binding_info 3 130 aligned based (line_editor_key_binding_info_ptr), 3 131 2 version char(8), 3 132 2 binding_count fixed bin, 3 133 2 longest_sequence fixed bin, 3 134 2 bindings (line_editor_binding_count refer 3 135 (line_editor_key_binding_info.binding_count)), 3 136 3 sequence char(line_editor_longest_sequence refer 3 137 (line_editor_key_binding_info.longest_sequence)) varying, 3 138 3 action fixed bin, 3 139 3 numarg_action fixed binary, 3 140 3 editor_routine entry (pointer, fixed bin(35)), 3 141 3 name char (64) varying unaligned, 3 142 3 description char (256) varying unaligned, 3 143 3 info_path unaligned, 3 144 4 info_dir char (168), 3 145 4 info_entry char (32); 3 146 3 147 3 148 dcl line_editor_key_binding_info_version_3 3 149 char(8) static options (constant) init ("lekbi003"); 3 150 3 151 dcl 1 get_editor_key_bindings_info aligned based (get_editor_key_bindings_info_ptr), 3 152 2 version char (8), 3 153 2 flags, 3 154 3 entire_state bit (1) unaligned, 3 155 3 mbz bit (35) unaligned, 3 156 2 key_binding_info_ptr ptr, 3 157 2 entire_state_ptr ptr; 3 158 3 159 dcl get_editor_key_bindings_info_ptr ptr; 3 160 dcl get_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("gekbi_01"); 3 161 3 162 dcl 1 set_editor_key_bindings_info aligned 3 163 based (set_editor_key_bindings_info_ptr), 3 164 2 version char (8), 3 165 2 flags, 3 166 3 replace bit (1) unaligned, 3 167 3 update bit (1) unaligned, 3 168 3 mbz bit (34) unaligned, 3 169 2 key_binding_info_ptr ptr; 3 170 3 171 dcl set_editor_key_bindings_info_ptr ptr; 3 172 dcl set_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("sekbi_01"); 3 173 3 174 /* This should be moved to window_info.incl.pl1 when that include file is 3 175* created. JR 2/1/84 */ 3 176 3 177 dcl 1 window_edit_line_info 3 178 based (window_edit_line_info_ptr), 3 179 2 version char (8), 3 180 2 line_ptr ptr, 3 181 2 line_length fixed bin (21); /* later we will hack initial cursor position, key bindings, etc. */ 3 182 3 183 dcl window_edit_line_info_version_1 3 184 char (8) static options (constant) init ("wedl0001"); 3 185 3 186 dcl window_edit_line_info_ptr 3 187 ptr; 3 188 3 189 /* END INCLUDE FILE window_control_info.incl.pl1 */ 77 78 4 1 /* --------------- BEGIN include file iox_dcls.incl.pl1 --------------- */ 4 2 4 3 /* Written 05/04/78 by C. D. Tavares */ 4 4 /* Fixed declaration of iox_$find_iocb_n 05/07/80 by R. Holmstedt */ 4 5 /* Modified 5/83 by S. Krupp to add declarations for: iox_$open_file, 4 6* iox_$close_file, iox_$detach and iox_$attach_loud entries. */ 4 7 4 8 dcl iox_$attach_name entry (char (*), pointer, char (*), pointer, fixed bin (35)), 4 9 iox_$attach_ptr entry (pointer, char (*), pointer, fixed bin (35)), 4 10 iox_$close entry (pointer, fixed bin (35)), 4 11 iox_$control entry (pointer, char (*), pointer, fixed bin (35)), 4 12 iox_$delete_record entry (pointer, fixed bin (35)), 4 13 iox_$destroy_iocb entry (pointer, fixed bin (35)), 4 14 iox_$detach_iocb entry (pointer, fixed bin (35)), 4 15 iox_$err_not_attached entry options (variable), 4 16 iox_$err_not_closed entry options (variable), 4 17 iox_$err_no_operation entry options (variable), 4 18 iox_$err_not_open entry options (variable), 4 19 iox_$find_iocb entry (char (*), pointer, fixed bin (35)), 4 20 iox_$find_iocb_n entry (fixed bin, ptr, fixed bin(35)), 4 21 iox_$get_chars entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 4 22 iox_$get_line entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 4 23 iox_$look_iocb entry (char (*), pointer, fixed bin (35)), 4 24 iox_$modes entry (pointer, char (*), char (*), fixed bin (35)), 4 25 iox_$move_attach entry (pointer, pointer, fixed bin (35)), 4 26 iox_$open entry (pointer, fixed bin, bit (1) aligned, fixed bin (35)), 4 27 iox_$position entry (pointer, fixed bin, fixed bin (21), fixed bin (35)), 4 28 iox_$propagate entry (pointer), 4 29 iox_$put_chars entry (pointer, pointer, fixed bin (21), fixed bin (35)), 4 30 iox_$read_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 4 31 iox_$read_length entry (pointer, fixed bin (21), fixed bin (35)), 4 32 iox_$read_record entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 4 33 iox_$rewrite_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 4 34 iox_$seek_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 4 35 iox_$write_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 4 36 iox_$open_file entry(ptr, fixed bin, char(*), bit(1) aligned, fixed bin(35)), 4 37 iox_$close_file entry(ptr, char(*), fixed bin(35)), 4 38 iox_$detach entry(ptr, char(*), fixed bin(35)), 4 39 iox_$attach_loud entry(ptr, char(*), ptr, fixed bin(35)); 4 40 4 41 dcl (iox_$user_output, 4 42 iox_$user_input, 4 43 iox_$user_io, 4 44 iox_$error_output) external static pointer; 4 45 4 46 /* ---------------- END include file iox_dcls.incl.pl1 ---------------- */ 79 80 81 82 saved_mask = ""b; 83 on cleanup 84 begin; 85 if saved_mask ^= ""b 86 then call hcs_$reset_ips_mask (saved_mask, ""b); 87 end; 88 89 P_code = 0; 90 91 show_block: 92 begin; 93 94 dcl temp_line char (length (P_image (1))) defined (long_string) position (1); 95 96 nlines = hbound (P_image, 1); 97 ncols = length (P_image (1)); 98 99 call iox_$control (P_window, "get_terminal_iocb_ptr", terminal_iocb_ptr, P_code); 100 if P_code ^= 0 101 then go to RETURN; 102 103 wpi.version = window_position_info_version_1; 104 call iox_$control (P_window, "get_window_info", addr (wpi), P_code); 105 if P_code ^= 0 106 then go to RETURN; 107 108 start_col = wpi.origin.column; 109 start_line = wpi.origin.line; 110 111 /* We mask down, to prevent async changes from invalidating the image we 112* are using */ 113 /* Perhaps a pclock would be more polite */ 114 115 call hcs_$set_ips_mask (video_data_$as_only_mask, saved_mask); 116 117 /* First try some global optimization. Clear any groups of 118* lines in the new image that are blank. */ 119 120 do lx = 1 to wpi.extent.height; 121 region_start_line = lx; 122 /* skip blank lines */ 123 do lx = lx to wpi.extent.height while (P_image(lx) = ""); 124 end; 125 if lx > region_start_line 126 then do; 127 call window_$clear_region (P_window, region_start_line, 1, lx - region_start_line, wpi.extent.width, P_code); 128 if P_code ^= 0 129 then goto RETURN; 130 end; 131 end; 132 133 call iox_$control (terminal_iocb_ptr, "get_screen_image_ptr", screen_ptr, P_code); 134 if P_code ^= 0 135 then go to RETURN; 136 137 short_image = (ncols < wpi.extent.width); 138 139 do lx = start_line to start_line + nlines - 1; 140 begin; 141 142 /* lx is terminal screen line no */ 143 dcl cur_image character (wpi.extent.width) defined (screen.lines (lx)) position (start_col) unaligned; 144 145 dcl image_line_no fixed bin; 146 147 image_line_no = lx - start_line + 1; 148 if cur_image ^= P_image (image_line_no) 149 then call redisplay_one_line (cur_image, P_image (image_line_no), temp_line, 150 image_line_no /* Window line */, P_code); 151 if P_code ^= 0 152 then go to RETURN; 153 end; 154 end; 155 156 /*** !! See >udd>m>bsg>mepap for details of the (better) Emacs redisplay ***/ 157 158 call hcs_$reset_ips_mask (saved_mask, ""b); 159 saved_mask = ""b; 160 161 if nlines < wpi.extent.height 162 then do; 163 call window_$clear_region (P_window, nlines + 1, (1), wpi.extent.height - nlines, 164 wpi.extent.width, P_code); 165 if P_code ^= 0 166 then go to RETURN; 167 end; 168 169 170 RETURN: 171 if saved_mask ^= ""b 172 then call hcs_$reset_ips_mask (saved_mask, ""b); 173 return; 174 175 /* Real guts of redisplay. The basic algorithm is to first check for a 176*simple insertion or deletion of characters at one point in the new string. 177*If we find one, fix it up and go on to the next step. That next step is 178*to find all the sections of the current screen image (old line) that 179*differ from the new line and overwrite the new stuff. */ 180 181 redisplay_one_line: 182 proc (old_arg, new_arg, diff_arg, lineno, code); 183 184 dcl old_arg char (*) parameter; 185 dcl new_arg char (*) parameter; 186 dcl diff_arg char (*) parameter; 187 dcl lineno fixed bin parameter; 188 dcl code fixed bin (35) parameter; 189 190 dcl diff_l fixed bin; 191 dcl new_l fixed bin; 192 dcl SPACE char (1) init (" ") static options (constant); 193 dcl SAME char (1) init ("" /* byte (0) */) static options (constant); 194 dcl RUN_OF_SAME char (4) init ("") internal static options (constant); 195 196 dcl pos fixed bin; 197 dcl i fixed bin; 198 dcl real_len fixed bin; 199 dcl len fixed bin; 200 201 dcl diff_string char(diff_l) based (addr (diff_arg)); 202 203 dcl (addr, before, length, rtrim, substr, verify) 204 builtin; 205 206 if new_arg = "" 207 then do; 208 call window_$position_cursor (P_window, lineno, 1, code); 209 if code ^= 0 210 then return; 211 call window_$clear_to_end_of_line (P_window, code); 212 return; 213 end; 214 215 /* we consider as much as the shorter string. */ 216 217 diff_l = min (length (old_arg), length (new_arg)); 218 219 /* The PL/1 code for the bool bif is horrible. 220* unspec (diff) = bool (unspec (old), unspec (new), "0110"b ); */ 221 222 /* XOR produces "000000000"b (^@) for equality */ 223 dcl video_alm_util_$XOR_chars entry (fixed bin, pointer, pointer, pointer); 224 225 /* Find the place where they are different */ 226 227 call video_alm_util_$XOR_chars (diff_l, addr (old_arg), addr (new_arg), addr (diff_arg)); 228 229 /* Now try to be clever about simple insert/delete characters 230* optimizations. */ 231 232 pos = verify (diff_string, SAME); /* Skip common stuff */ 233 if pos = 0 234 then go to CHECK_SHORT_IMAGE; 235 236 len = length (rtrim (diff_string, SAME)); 237 238 crossmatch: 239 begin; 240 241 dcl old_in_new fixed bin; 242 dcl new_in_old fixed bin; 243 dcl count fixed bin; 244 245 dcl old_string char(len - pos + 1) defined (old_arg) position (pos); 246 dcl new_string char(len - pos + 1) defined (new_arg) position (pos); 247 248 if (old_string = "") | (new_string = "") 249 then goto no_crossmatch; 250 251 /* check for simple delete chars. */ 252 new_in_old = index (old_string, substr (new_string, 1, 4)); 253 /* and simple insert chars. */ 254 old_in_new = index (new_string, substr (old_string, 1, 4)); 255 256 /* Make sure the match extends to the end of the string */ 257 if new_in_old > 0 258 then if substr (old_string, new_in_old) ^= substr (new_string, 1, length (old_string) - new_in_old + 1) 259 then new_in_old = 0; 260 261 if old_in_new > 0 262 then if substr (new_string, old_in_new) ^= substr (old_string, 1, length (new_string) - old_in_new + 1) 263 then old_in_new = 0; 264 265 266 /* find shortest distance for a match */ 267 if (new_in_old = 0) & (old_in_new = 0) 268 then goto no_crossmatch; 269 else if (new_in_old = 0) 270 then count = old_in_new; 271 else if (old_in_new = 0) 272 then count = -(new_in_old); 273 else if (old_in_new < new_in_old) 274 then count = old_in_new; 275 else count = -(new_in_old); 276 277 if (count > 0) 278 then do; 279 /* Insert chars case. */ 280 /* first clear out stuff at end */ 281 if length (old_string) > wpi.extent.width - (count - 1) then do; 282 call window_$position_cursor (P_window, lineno, wpi.extent.width - (count - 1) + 1, code); 283 if code ^= 0 then return; 284 call window_$clear_to_end_of_line (P_window, code); 285 if code ^= 0 then return; 286 end; 287 /* now insert new stuff in middle */ 288 call window_$position_cursor (P_window, lineno, pos, code); 289 if code ^= 0 then return; 290 call window_$insert_text (P_window, substr (new_string, 1, count - 1), code); 291 if code ^= 0 then return; 292 end; 293 else do; 294 /* Delete chars case. */ 295 count = - count; 296 call window_$position_cursor (P_window, lineno, pos, code); 297 if code ^= 0 then return; 298 call window_$delete_chars (P_window, count - 1, code); 299 if code ^= 0 then return; 300 end; 301 302 /* Now we have to re-try the match. */ 303 call video_alm_util_$XOR_chars (diff_l, addr (old_arg), addr (new_arg), addr (diff_arg)); 304 305 no_crossmatch: 306 end crossmatch; 307 308 diff_l = length (rtrim (diff_string, SAME)); 309 /* Can't be zero or verify above would fail. */ 310 311 /* Get length of new neglecting number of trailing spaces. */ 312 new_l = length (rtrim (new_arg, SPACE)); 313 /* new_l can't = 0 or check for new = "" above would have caught it. */ 314 315 /* We only want to process the different characters, or until we 316* run out of new stuff. */ 317 318 real_len = min (new_l, diff_l); 319 320 overwrite_changes: 321 begin; 322 323 dcl new char (real_len) defined (new_arg) position (1); 324 dcl diff char (real_len) defined (diff_arg) position (1); 325 326 dcl trimmed fixed bin; 327 328 /* Find the first spot where the strings differ. */ 329 pos = verify (diff, SAME); 330 if pos = 0 331 then goto CLEAR_IF_NECESSARY; 332 333 call window_$position_cursor (P_window, lineno, pos, code); 334 if code ^= 0 335 then return; 336 337 /* Loop through rest of string overwriting parts that are 338* different with new stuff. Stop when we have passed all 339* the common stuff of reached the end of the new string. */ 340 341 do while (pos <= real_len); 342 343 /* How many characters before a run of 4 characters that 344* are the same in both strings? */ 345 346 i = length (before (substr (diff, pos), RUN_OF_SAME)); 347 348 /* If we overshoot the end of the new stuff, back up. */ 349 if (pos + i - 1) > real_len 350 then i = real_len - pos + 1; 351 352 call window_$overwrite_text (P_window, substr (new, pos, i), code); 353 if code ^= 0 354 then return; 355 356 pos = pos + i; 357 358 /* Now skip over the next chunk the new and old have in 359* common. */ 360 361 i = verify (substr (diff, pos), SAME) - 1; 362 if i < 0 363 then pos = real_len + 1; /* all same to end */ 364 else do; 365 /* Skip over stuff that's the same. */ 366 call window_$position_cursor_rel (P_window, 0, i, code); 367 if code ^= 0 368 then return; 369 pos = pos + i; 370 end; 371 372 /* We are now either all done, or at the beginning of some 373* stuff that's different between the two strings. */ 374 375 end; /* do while */ 376 377 end overwrite_changes; 378 379 CLEAR_IF_NECESSARY: 380 381 /* If the new line ends in whitespace and is shorter than the 382* old stuff, clear the rest of the line. */ 383 384 if real_len = new_l /* see assignment of real_len above */ 385 then do; 386 call window_$position_cursor (P_window, lineno, new_l + 1, code); 387 if code ^= 0 388 then return; 389 390 call window_$clear_to_end_of_line (P_window, code); 391 if code ^= 0 392 then return; 393 end; 394 395 CHECK_SHORT_IMAGE: 396 397 /* If the supplied screen image is shorter than the width of the 398* window, clear to the end of line. */ 399 if short_image 400 then call window_$clear_region (P_window, lineno, ncols + 1, (1), wpi.extent.width - ncols, code); 401 402 return; 403 404 end redisplay_one_line; 405 406 end show_block; 407 408 end window_display_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/13/87 1323.4 window_display_.pl1 >special_ldd>install>MR12.1-1086>window_display_.pl1 73 1 03/27/82 0424.8 tc_screen_image.incl.pl1 >ldd>include>tc_screen_image.incl.pl1 75 2 09/12/84 0916.7 window_dcls.incl.pl1 >ldd>include>window_dcls.incl.pl1 77 3 09/12/84 0916.7 window_control_info.incl.pl1 >ldd>include>window_control_info.incl.pl1 79 4 05/23/83 0916.6 iox_dcls.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. P_code parameter fixed bin(35,0) dcl 49 set ref 14 89* 99* 100 104* 105 127* 128 133* 134 148* 151 163* 165 P_image parameter char array unaligned dcl 48 set ref 14 94 96 97 123 148 148* P_window parameter pointer dcl 47 set ref 14 99* 104* 127* 163* 208* 211* 282* 284* 288* 290* 296* 298* 333* 352* 366* 386* 390* 395* RUN_OF_SAME 001757 constant char(4) initial unaligned dcl 194 ref 346 SAME constant char(1) initial unaligned dcl 193 ref 232 236 308 329 361 SPACE constant char(1) initial unaligned dcl 192 ref 312 addr builtin function dcl 203 in procedure "redisplay_one_line" ref 227 227 227 227 227 227 232 236 303 303 303 303 303 303 308 addr builtin function dcl 67 in procedure "window_display_" ref 104 104 before builtin function dcl 203 ref 346 cleanup 000104 stack reference condition dcl 54 ref 83 code parameter fixed bin(35,0) dcl 188 set ref 181 208* 209 211* 282* 283 284* 285 288* 289 290* 291 296* 297 298* 299 333* 334 352* 353 366* 367 386* 387 390* 391 395* column 1 000221 automatic fixed bin(17,0) level 3 dcl 70 set ref 108 count 000256 automatic fixed bin(17,0) dcl 243 set ref 269* 271* 273* 275* 277 281 282 290 290 295* 295 298 cur_image defined char unaligned dcl 143 set ref 148 148* diff defined char unaligned dcl 324 ref 329 346 361 diff_arg parameter char unaligned dcl 186 set ref 181 227 227 232 236 303 303 308 329 329 346 346 361 361 diff_l 000246 automatic fixed bin(17,0) dcl 190 set ref 217* 227* 232 236 303* 308* 308 318 diff_string based char unaligned dcl 201 ref 232 236 308 extent 3 000221 automatic structure level 2 dcl 70 hbound builtin function dcl 67 ref 96 hcs_$reset_ips_mask 000014 constant entry external dcl 65 ref 85 158 170 hcs_$set_ips_mask 000012 constant entry external dcl 64 ref 115 height 4 000221 automatic fixed bin(17,0) level 3 dcl 70 set ref 120 123 161 163 i 000251 automatic fixed bin(17,0) dcl 197 set ref 346* 349 349* 352 352 356 361* 362 366* 369 image_line_no 000235 automatic fixed bin(17,0) dcl 145 set ref 147* 148 148 148* iox_$control 000034 constant entry external dcl 4-8 ref 99 104 133 len 000253 automatic fixed bin(17,0) dcl 199 set ref 236* 245 246 length builtin function dcl 203 in procedure "redisplay_one_line" ref 217 217 236 257 261 281 308 312 346 length builtin function dcl 67 in procedure "window_display_" ref 94 97 line 2 000221 automatic fixed bin(17,0) level 3 dcl 70 set ref 109 lineno parameter fixed bin(17,0) dcl 187 set ref 181 208* 282* 288* 296* 333* 386* 395* lines 3 based char array level 2 packed unaligned dcl 1-4 ref 148 148 148 148 long_string 000115 automatic char(256) unaligned dcl 58 ref 148 148 lx 000114 automatic fixed bin(17,0) dcl 57 set ref 120* 121 123* 123 123* 125 127* 139* 147 148 148 min builtin function dcl 67 ref 217 318 n_columns 1 based fixed bin(17,0) level 2 dcl 1-4 ref 148 148 148 148 148 148 ncols 000113 automatic fixed bin(17,0) dcl 56 set ref 97* 137 395 395 new defined char unaligned dcl 323 ref 352 352 new_arg parameter char unaligned dcl 185 set ref 181 206 217 227 227 248 248 252 252 254 254 257 257 261 261 261 261 290 290 290 290 303 303 312 352 352 352 352 new_in_old 000255 automatic fixed bin(17,0) dcl 242 set ref 252* 257 257 257 257* 267 269 271 273 275 new_l 000247 automatic fixed bin(17,0) dcl 191 set ref 312* 318 379 386 new_string defined char unaligned dcl 246 ref 248 252 254 257 261 261 290 290 nlines 000112 automatic fixed bin(17,0) dcl 55 set ref 96* 139 161 163 163 old_arg parameter char unaligned dcl 184 set ref 181 217 227 227 248 248 252 252 254 254 257 257 257 257 261 261 281 281 303 303 old_in_new 000254 automatic fixed bin(17,0) dcl 241 set ref 254* 261 261 261 261* 267 269 271 273 273 old_string defined char unaligned dcl 245 ref 248 252 254 257 257 261 281 origin 1 000221 automatic structure level 2 dcl 70 pos 000250 automatic fixed bin(17,0) dcl 196 set ref 232* 233 245 246 248 248 252 252 254 254 257 257 257 261 261 261 281 288* 290 290 296* 329* 330 333* 341 346 349 349 352 352 356* 356 361 362* 369* 369 real_len 000252 automatic fixed bin(17,0) dcl 198 set ref 318* 323 324 341 349 349 362 379 region_start_line 000217 automatic fixed bin(17,0) dcl 61 set ref 121* 125 127* 127 rtrim builtin function dcl 203 ref 236 308 312 saved_mask 000100 automatic bit(36) dcl 51 set ref 82* 85 85* 115* 158* 159* 170 170* screen based structure level 1 dcl 1-4 screen_ptr 000226 automatic pointer dcl 1-12 set ref 133* 148 148 short_image 000220 automatic bit(1) dcl 62 set ref 137* 395 start_col 000215 automatic fixed bin(17,0) dcl 59 set ref 108* 148 148 start_line 000216 automatic fixed bin(17,0) dcl 60 set ref 109* 139 139 147 substr builtin function dcl 203 ref 252 254 257 257 261 261 290 290 346 352 352 361 temp_line defined char unaligned dcl 94 set ref 148* terminal_iocb_ptr 000102 automatic pointer dcl 52 set ref 99* 133* verify builtin function dcl 203 ref 232 329 361 version 000221 automatic fixed bin(17,0) level 2 dcl 70 set ref 103* video_alm_util_$XOR_chars 000036 constant entry external dcl 223 ref 227 303 video_data_$as_only_mask 000010 external static bit(36) dcl 53 set ref 115* width 3 000221 automatic fixed bin(17,0) level 3 dcl 70 set ref 127* 137 143 163* 281 282 395 window_$clear_region 000016 constant entry external dcl 2-7 ref 127 163 395 window_$clear_to_end_of_line 000020 constant entry external dcl 2-9 ref 211 284 390 window_$delete_chars 000022 constant entry external dcl 2-15 ref 298 window_$insert_text 000024 constant entry external dcl 2-28 ref 290 window_$overwrite_text 000026 constant entry external dcl 2-29 ref 352 window_$position_cursor 000030 constant entry external dcl 2-31 ref 208 282 288 296 333 386 window_$position_cursor_rel 000032 constant entry external dcl 2-36 ref 366 window_position_info based structure level 1 unaligned dcl 3-25 window_position_info_version_1 constant fixed bin(17,0) initial dcl 3-35 ref 103 wpi 000221 automatic structure level 1 dcl 70 set ref 104 104 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. break_table_info based structure level 1 dcl 3-76 break_table_info_version internal static fixed bin(17,0) initial dcl 3-80 break_table_info_version_1 internal static fixed bin(17,0) initial dcl 3-80 break_table_ptr automatic pointer dcl 3-75 get_editor_key_bindings_info based structure level 1 dcl 3-151 get_editor_key_bindings_info_ptr automatic pointer dcl 3-159 get_editor_key_bindings_info_version_1 internal static char(8) initial unaligned dcl 3-160 iox_$attach_loud 000000 constant entry external dcl 4-8 iox_$attach_name 000000 constant entry external dcl 4-8 iox_$attach_ptr 000000 constant entry external dcl 4-8 iox_$close 000000 constant entry external dcl 4-8 iox_$close_file 000000 constant entry external dcl 4-8 iox_$delete_record 000000 constant entry external dcl 4-8 iox_$destroy_iocb 000000 constant entry external dcl 4-8 iox_$detach 000000 constant entry external dcl 4-8 iox_$detach_iocb 000000 constant entry external dcl 4-8 iox_$err_no_operation 000000 constant entry external dcl 4-8 iox_$err_not_attached 000000 constant entry external dcl 4-8 iox_$err_not_closed 000000 constant entry external dcl 4-8 iox_$err_not_open 000000 constant entry external dcl 4-8 iox_$error_output external static pointer dcl 4-41 iox_$find_iocb 000000 constant entry external dcl 4-8 iox_$find_iocb_n 000000 constant entry external dcl 4-8 iox_$get_chars 000000 constant entry external dcl 4-8 iox_$get_line 000000 constant entry external dcl 4-8 iox_$look_iocb 000000 constant entry external dcl 4-8 iox_$modes 000000 constant entry external dcl 4-8 iox_$move_attach 000000 constant entry external dcl 4-8 iox_$open 000000 constant entry external dcl 4-8 iox_$open_file 000000 constant entry external dcl 4-8 iox_$position 000000 constant entry external dcl 4-8 iox_$propagate 000000 constant entry external dcl 4-8 iox_$put_chars 000000 constant entry external dcl 4-8 iox_$read_key 000000 constant entry external dcl 4-8 iox_$read_length 000000 constant entry external dcl 4-8 iox_$read_record 000000 constant entry external dcl 4-8 iox_$rewrite_record 000000 constant entry external dcl 4-8 iox_$seek_key 000000 constant entry external dcl 4-8 iox_$user_input external static pointer dcl 4-41 iox_$user_io external static pointer dcl 4-41 iox_$user_output external static pointer dcl 4-41 iox_$write_record 000000 constant entry external dcl 4-8 line_editor_binding_count automatic fixed bin(17,0) dcl 3-121 line_editor_key_binding_info based structure level 1 dcl 3-129 line_editor_key_binding_info_ptr automatic pointer dcl 3-118 line_editor_key_binding_info_version_3 internal static char(8) initial unaligned dcl 3-148 line_editor_longest_sequence automatic fixed bin(17,0) dcl 3-123 more_handler_info based structure level 1 dcl 3-83 more_handler_info_ptr automatic pointer dcl 3-92 more_handler_info_version internal static fixed bin(17,0) initial dcl 3-94 more_handler_info_version_3 internal static fixed bin(17,0) initial dcl 3-94 more_prompt_info based structure level 1 dcl 3-108 more_prompt_info_ptr automatic pointer dcl 3-112 more_prompt_info_version_1 internal static char(8) initial unaligned dcl 3-114 more_responses_info based structure level 1 dcl 3-59 more_responses_info_ptr automatic pointer dcl 3-69 more_responses_info_version_1 internal static fixed bin(17,0) initial dcl 3-67 more_responses_version internal static fixed bin(17,0) initial dcl 3-67 null builtin function dcl 67 screen_n_columns automatic fixed bin(17,0) dcl 1-13 screen_n_lines automatic fixed bin(17,0) dcl 1-13 set_editor_key_bindings_info based structure level 1 dcl 3-162 set_editor_key_bindings_info_ptr automatic pointer dcl 3-171 set_editor_key_bindings_info_version_1 internal static char(8) initial unaligned dcl 3-172 string builtin function dcl 67 token_characters_info based structure level 1 dcl 3-97 token_characters_info_ptr automatic pointer dcl 3-104 token_characters_info_version_1 internal static char(8) initial unaligned dcl 3-106 trimmed automatic fixed bin(17,0) dcl 326 window_$bell 000000 constant entry external dcl 2-6 window_$change_column 000000 constant entry external dcl 2-63 window_$change_line 000000 constant entry external dcl 2-59 window_$clear_to_end_of_window 000000 constant entry external dcl 2-11 window_$clear_window 000000 constant entry external dcl 2-13 window_$create 000000 constant entry external dcl 2-72 window_$destroy 000000 constant entry external dcl 2-74 window_$edit_line 000000 constant entry external dcl 2-76 window_$get_cursor_position 000000 constant entry external dcl 2-17 window_$get_echoed_chars 000000 constant entry external dcl 2-22 window_$get_one_unechoed 000000 constant entry external dcl 2-67 window_$get_one_unechoed_char 000000 constant entry external dcl 2-67 window_$get_unechoed_chars 000000 constant entry external dcl 2-25 window_$scroll_region 000000 constant entry external dcl 2-42 window_$sync 000000 constant entry external dcl 2-44 window_$write_raw_text 000000 constant entry external dcl 2-48 window_$write_sync_read 000000 constant entry external dcl 2-53 window_edit_line_info based structure level 1 unaligned dcl 3-177 window_edit_line_info_ptr automatic pointer dcl 3-186 window_edit_line_info_version_1 internal static char(8) initial unaligned dcl 3-183 window_position_info_ptr automatic pointer dcl 3-37 window_position_info_version internal static fixed bin(17,0) initial dcl 3-35 window_status_info based structure level 1 dcl 3-45 window_status_info_ptr automatic pointer dcl 3-43 window_status_version internal static fixed bin(17,0) initial dcl 3-52 window_status_version_1 internal static fixed bin(17,0) initial dcl 3-52 NAMES DECLARED BY EXPLICIT CONTEXT. CHECK_SHORT_IMAGE 001720 constant label dcl 395 ref 233 CLEAR_IF_NECESSARY 001651 constant label dcl 379 ref 330 RETURN 000605 constant label dcl 170 ref 100 105 128 134 151 165 crossmatch 000776 constant label dcl 238 no_crossmatch 001404 constant label dcl 305 ref 248 267 overwrite_changes 001440 constant label dcl 320 redisplay_one_line 000625 constant entry internal dcl 181 ref 148 show_block 000113 constant label dcl 91 window_display_ 000043 constant entry external dcl 14 NAME DECLARED BY CONTEXT OR IMPLICATION. index builtin function ref 252 254 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2154 2214 1760 2164 Length 2504 1760 40 254 173 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME window_display_ 318 external procedure is an external procedure. on unit on line 83 72 on unit begin block on line 91 begin block shares stack frame of external procedure window_display_. begin block on line 140 begin block shares stack frame of external procedure window_display_. redisplay_one_line internal procedure shares stack frame of external procedure window_display_. begin block on line 238 begin block shares stack frame of external procedure window_display_. begin block on line 320 begin block shares stack frame of external procedure window_display_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME window_display_ 000100 saved_mask window_display_ 000102 terminal_iocb_ptr window_display_ 000112 nlines window_display_ 000113 ncols window_display_ 000114 lx window_display_ 000115 long_string window_display_ 000215 start_col window_display_ 000216 start_line window_display_ 000217 region_start_line window_display_ 000220 short_image window_display_ 000221 wpi window_display_ 000226 screen_ptr window_display_ 000235 image_line_no begin block on line 140 000246 diff_l redisplay_one_line 000247 new_l redisplay_one_line 000250 pos redisplay_one_line 000251 i redisplay_one_line 000252 real_len redisplay_one_line 000253 len redisplay_one_line 000254 old_in_new begin block on line 238 000255 new_in_old begin block on line 238 000256 count begin block on line 238 THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_l_a alloc_char_temp call_ext_out_desc call_ext_out begin_return_mac return_mac enable_op shorten_stack ext_entry_desc int_entry set_chars_eis index_chars_eis index_before_cs THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. hcs_$reset_ips_mask hcs_$set_ips_mask iox_$control video_alm_util_$XOR_chars window_$clear_region window_$clear_to_end_of_line window_$delete_chars window_$insert_text window_$overwrite_text window_$position_cursor window_$position_cursor_rel THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. video_data_$as_only_mask LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 14 000037 82 000056 83 000057 85 000073 87 000110 89 000111 94 000113 96 000121 97 000124 99 000126 100 000156 103 000161 104 000163 105 000215 108 000220 109 000222 115 000224 120 000235 121 000245 123 000246 124 000275 125 000277 127 000302 128 000331 131 000334 133 000336 134 000371 137 000374 139 000400 143 000411 147 000413 148 000417 151 000525 154 000530 158 000532 159 000545 161 000546 163 000551 165 000602 170 000605 173 000622 406 000624 181 000625 206 000650 208 000657 209 000677 211 000703 212 000715 217 000716 227 000723 232 000746 233 000763 236 000764 245 000776 246 001003 248 001006 252 001023 254 001035 257 001046 261 001077 267 001130 269 001134 271 001141 273 001146 275 001152 277 001154 281 001156 282 001164 283 001204 284 001210 285 001222 288 001226 289 001244 290 001250 291 001303 292 001310 295 001311 296 001313 297 001331 298 001335 299 001354 303 001360 308 001404 312 001420 318 001434 323 001440 324 001442 329 001443 330 001457 333 001460 334 001476 341 001502 346 001505 349 001524 352 001534 353 001567 356 001574 361 001576 362 001616 366 001623 367 001642 369 001646 375 001650 379 001651 386 001654 387 001676 390 001702 391 001714 395 001720 402 001755 408 001756 ----------------------------------------------------------- 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