COMPILATION LISTING OF SEGMENT dfast_list_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/05/82 1305.5 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 dfast_list_: proc (arg_edit_info_ptr, temp_seg_id, line_number, header, punch, code); 7 8 /* This procedure lists or punches the current or the alter segment. 9* * 10* * temp_seg_id = alt List the alter segment. 11* * = cur List the current segment. 12* * = "" Merge the alter and current segments and then list the current segment. 13* * 14* * line_number = -1 List the entire segment. 15* * = n List the segment beginning with line "n". If "n" is greater than the highest 16* * line number, then the last line will be listed. 17* * 18* * code = bad_sort The current segment is out of order so that the merge can't be completed. 19* * = alt_empty The alter segment is empty. 20* * = cur_empty The current segment is empty. 21**/ 22 /* parameters */ 23 24 dcl arg_edit_info_ptr ptr; /* ptr. to dfast_edit_info_ */ 25 dcl temp_seg_id char (*); /* temporary seg. to list: alt, cur, "" */ 26 dcl line_number fixed bin (21); /* line at which to begin printing */ 27 dcl header bit (1) unal; /* ON if header should be printed. */ 28 29 /* automatic */ 30 31 dcl edit_info_ptr ptr; /* ptr to dfast_edit_info */ 32 dcl start fixed bin (21); /* character index at which to begin printing */ 33 dcl name char (32); /* name for error message OR name for header */ 34 dcl punch bit (1) unal; /* ON if the output should be punched. */ 35 dcl code fixed bin (35); /* Multics OR fast error code */ 36 37 dcl old_modes char (132); /* old modes for restore */ 38 /* external */ 39 40 dcl dfast_error_ entry (fixed bin (35), char (*), char (*)); 41 dcl dfast_header_ entry (char (*), char (*)); 42 dcl dfast_merge_ entry (bit (1) unal, ptr, fixed bin (35)); 43 dcl iox_$put_chars entry (ptr, ptr, fixed bin (21), fixed bin (35)); 44 dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); 45 dcl cv_dec_check_ entry (char (*), fixed bin (35)) returns (fixed bin (21)); 46 dcl iox_$user_output ptr ext static; 47 48 /* constants */ 49 50 dcl punch_header char (16) int static options (constant) init (""); /* CTRL-R (15) \177 */ 51 dcl punch_trailer char (17) int static options (constant) init (""); /* CTRL-S (15) \177 CTRL-T */ 52 dcl new_line char (1) int static options (constant) init (" 53 "); 54 dcl digit char (10) int static options (constant) init ("0123456789"); 55 56 /* based */ 57 58 dcl 1 f aligned like dfast_edit_info based (edit_info_ptr); 59 60 dcl (addr, index, length, substr, reverse) builtin; 61 1 1 /* BEGIN INCLUDE FILE -- dfast_edit_info.incl.pl1 1 2* written 5/75 by S.E.Barr 1 3**/ 1 4 dcl 1 dfast_edit_info aligned based (edit_info_ptr), 1 5 2 flags aligned, 1 6 3 brief_mode bit (1) unal, /* ON if short messages to be used */ 1 7 3 build_mode bit (1) unal, /* On if in build mode */ 1 8 3 source_segment bit (1) unal, /* ON if segment is source */ 1 9 3 edit_done bit (1) unal, /* ON if current segment has been edited since save */ 1 10 3 basic_system bit (1) unal, /* ON if basic, OFF if fortran */ 1 11 3 caps_mode bit (1) unal, /* ON if running in CAPS mode */ 1 12 3 dbasic bit (1) unal, /* ON if double prec basic */ 1 13 3 pad bit (29) unal, 1 14 2 system_info aligned, 1 15 3 max_seg_size fixed bin (21), /* maximum segment size in characters */ 1 16 3 user_name char (32) aligned, /* person id */ 1 17 3 tty_id char (6) unal, /* terminal id of the form "ttynnn" */ 1 18 3 current_name char (256) var aligned, /* name of current segment */ 1 19 3 current_length fixed bin (21), /* length in characters of current segment */ 1 20 3 alter_length fixed bin (21), /* length in characters of the alter segment */ 1 21 3 current_ptr ptr, /* ptr to current segment */ 1 22 3 alter_ptr ptr, 1 23 3 home_dir char (168) var, /* home directory from pit */ 1 24 3 user_id char (32) var, /* login id */ 1 25 3 project_id char (32) var, /* login home directory */ 1 26 3 source_directory char (168) aligned, /* directory of where the source was. For COMPILE. */ 1 27 3 source_entryname char (32); /* name of the source. For COMPILE. */ 1 28 1 29 /* END INCLUDE FILE -- dfast_edit_info.incl.pl1 */ 62 2 1 /* BEGIN INCLUDE ... dfast_error_codes.incl.pl1 */ 2 2 2 3 dcl error_alt_empty fixed bin (35) int static init (1)options (constant); 2 4 dcl error_max_size fixed bin (35) int static init (2)options (constant); 2 5 dcl error_cur_empty fixed bin (35) int static init (3)options (constant); 2 6 dcl error_not_saved fixed bin (35) int static init (4)options (constant); 2 7 dcl error_name_dup fixed bin (35) int static init (5)options (constant); 2 8 dcl error_long_rec fixed bin (35) int static init (6)options (constant); 2 9 dcl error_unknown_arg fixed bin (35) int static init (7)options (constant); 2 10 dcl error_no_expl fixed bin (35) int static init (8)options (constant); 2 11 dcl error_bad_name fixed bin (35) int static init (9)options (constant); 2 12 dcl error_bad_req fixed bin (35) int static init (10)options (constant); 2 13 dcl error_syntax_string fixed bin (35) int static init (11)options (constant); 2 14 dcl error_name_miss fixed bin (35) int static init (12)options (constant); 2 15 dcl error_no_comp fixed bin (35) int static init (13)options (constant); 2 16 dcl error_no_main fixed bin (35) int static init (14)options (constant); 2 17 dcl error_block_spec fixed bin (35) int static init (15)options (constant); 2 18 dcl error_obj_nop fixed bin (35) int static init (16)options (constant); 2 19 dcl error_sav_cur fixed bin (35) int static init (17)options (constant); 2 20 dcl error_bad_type fixed bin (35) int static init (18)options (constant); 2 21 dcl error_unkn_sys fixed bin (35) int static init (19)options (constant); 2 22 dcl error_no_suffix fixed bin (35) int static init (20)options (constant); 2 23 dcl error_no_nl fixed bin (35) int static init (21)options (constant); 2 24 dcl error_bad_sort fixed bin (35) int static init (22)options (constant); 2 25 dcl error_no_num fixed bin (35) int static init (23)options (constant); 2 26 dcl error_line_miss fixed bin (35) int static init (24)options (constant); 2 27 dcl error_request_miss fixed bin (35) int static init (25)options (constant); 2 28 dcl error_bad_line fixed bin (35) int static init (26)options (constant); 2 29 dcl error_no_string fixed bin (35) int static init (27)options (constant); 2 30 dcl error_line_order fixed bin (35) int static init (28)options (constant); 2 31 dcl error_max_lines fixed bin (35) int static init (29)options (constant); 2 32 dcl error_bad_pathname fixed bin (35) int static init (30)options (constant); 2 33 dcl error_access_mode fixed bin (35) int static init (31)options (constant); 2 34 dcl error_delimiter_miss fixed bin (35) int static init (32)options (constant); 2 35 dcl error_size_fixed_record fixed bin (35) int static init (33)options (constant); 2 36 dcl error_bad_rec_len fixed bin (35) int static init (34)options (constant); 2 37 dcl error_string_size fixed bin (35) int static init (35)options (constant); 2 38 dcl error_max_line_number fixed bin (35) int static init (36)options (constant); 2 39 dcl error_max_args fixed bin (35) int static init (37)options (constant); 2 40 dcl error_name_sys fixed bin (35) int static init (38)options (constant); 2 41 dcl error_dprint_map fixed bin (35) int static init (39)options (constant); 2 42 dcl error_max_num fixed bin (35) int static options (constant) init (40); 2 43 dcl error_edit_max_num fixed bin (35) int static options (constant) init (41); 2 44 dcl error_un_num_text fixed bin (35) int static options (constant) init (42); 2 45 dcl error_no_new_line fixed bin (35) int static options (constant) init (43); 2 46 2 47 /* END INCLUDE ... dfast_error_codes.incl.pl1 */ 63 64 65 /* */ 66 edit_info_ptr = arg_edit_info_ptr; 67 68 if f.source_segment then do; 69 if temp_seg_id = "alt" then do; 70 name = "alter"; 71 if f.alter_length > 0 then call list (f.alter_ptr, f.alter_length); 72 else code = error_alt_empty; 73 end; 74 75 else do; 76 if temp_seg_id ^= "cur" then do; 77 if f.alter_length > 0 then call dfast_merge_ ("0"b, edit_info_ptr, code); 78 if code ^= 0 then return; 79 name = f.current_name; 80 end; 81 else name = "current"; 82 83 if f.current_length > 0 then call list (f.current_ptr, f.current_length); 84 else code = error_cur_empty; 85 end; 86 end; 87 else code = error_obj_nop; 88 89 if code ^= 0 then do; 90 if punch then name = "punch"; 91 else name = "list"; 92 93 call dfast_error_ (code, name, ""); 94 end; 95 96 return; 97 98 /* */ 99 list: proc (temp_ptr, temp_length); 100 101 /* parameters */ 102 103 dcl temp_ptr ptr; /* ptr. to segment to list */ 104 dcl temp_length fixed bin (21); /* number of characters in segment */ 105 106 dcl temp_seg char (temp_length) based (temp_ptr); 107 108 if line_number < 0 then start = 1; 109 else do; 110 111 call find_line (temp_ptr, temp_length, start, code); 112 if code ^= 0 then return; 113 end; 114 115 if punch then call output_special_chars (punch_header); 116 117 else if header then call dfast_header_ (name, ""); 118 119 call iox_$put_chars (iox_$user_output, addr (substr (temp_seg, start, 1)), temp_length - start + 1, code); 120 if punch then call output_special_chars (punch_trailer); 121 122 return; 123 124 end list; 125 126 find_line: proc (temp_ptr, temp_length, start, code); 127 128 dcl temp_ptr ptr; 129 dcl temp_length fixed bin (21); 130 dcl start fixed bin (21); 131 dcl code fixed bin (35); 132 133 dcl (i, j) fixed bin (21); 134 135 dcl temp_seg char (temp_length) based (temp_ptr); 136 137 start = 1; 138 139 do while (start <= temp_length & code = 0); 140 i = verify (substr (temp_seg, start), digit); 141 142 if i > 1 then do; 143 j = cv_dec_check_ (substr (temp_seg, start, i), code); 144 if code = 0 145 then if j >= line_number then return; 146 else; 147 else code = error_bad_sort; 148 end; 149 i = index (substr (temp_seg, start), new_line); 150 if i > 0 151 then start = start + i; 152 else code = error_no_nl; 153 end; 154 155 if code = 0 then start = start - i; 156 157 return; 158 159 end find_line; 160 161 /* */ 162 output_special_chars: proc (string); 163 164 dcl string char (*); 165 dcl acode fixed bin (35); 166 167 old_modes = ""; 168 call iox_$modes (iox_$user_output, "rawo", old_modes, acode); 169 call iox_$put_chars (iox_$user_output, addr (string), length (string), acode); 170 call iox_$modes (iox_$user_output, old_modes, "", code); 171 172 return; 173 174 end output_special_chars; 175 176 end dfast_list_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1659.2 dfast_list_.pl1 >spec>on>comp-dir>dfast_list_.pl1 62 1 03/27/82 0439.4 dfast_edit_info.incl.pl1 >ldd>include>dfast_edit_info.incl.pl1 63 2 03/27/82 0439.4 dfast_error_codes.incl.pl1 >ldd>include>dfast_error_codes.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. acode 000200 automatic fixed bin(35,0) dcl 165 set ref 168* 169* addr builtin function dcl 60 ref 119 119 169 169 alter_length 117 based fixed bin(21,0) level 3 dcl 58 set ref 71 71* 77 alter_ptr 122 based pointer level 3 dcl 58 set ref 71* arg_edit_info_ptr parameter pointer dcl 24 ref 6 66 code parameter fixed bin(35,0) dcl 35 in procedure "dfast_list_" set ref 6 72* 77* 78 84* 87* 89 93* 111* 112 119* 170* code parameter fixed bin(35,0) dcl 131 in procedure "find_line" set ref 126 139 143* 144 147* 152* 155 current_length 116 based fixed bin(21,0) level 3 dcl 58 set ref 83 83* current_name 15 based varying char(256) level 3 dcl 58 ref 79 current_ptr 120 based pointer level 3 dcl 58 set ref 83* cv_dec_check_ 000022 constant entry external dcl 45 ref 143 dfast_edit_info based structure level 1 dcl 1-4 dfast_error_ 000010 constant entry external dcl 40 ref 93 dfast_header_ 000012 constant entry external dcl 41 ref 117 dfast_merge_ 000014 constant entry external dcl 42 ref 77 digit 000000 constant char(10) initial unaligned dcl 54 ref 140 edit_info_ptr 000100 automatic pointer dcl 31 set ref 66* 68 71 71 71 77 77* 79 83 83 83 error_alt_empty constant fixed bin(35,0) initial dcl 2-3 ref 72 error_bad_sort constant fixed bin(35,0) initial dcl 2-24 ref 147 error_cur_empty constant fixed bin(35,0) initial dcl 2-5 ref 84 error_no_nl constant fixed bin(35,0) initial dcl 2-23 ref 152 error_obj_nop constant fixed bin(35,0) initial dcl 2-18 ref 87 f based structure level 1 dcl 58 flags based structure level 2 dcl 58 header parameter bit(1) unaligned dcl 27 ref 6 117 i 000170 automatic fixed bin(21,0) dcl 133 set ref 140* 142 143 143 149* 150 150 155 index builtin function dcl 60 ref 149 iox_$modes 000020 constant entry external dcl 44 ref 168 170 iox_$put_chars 000016 constant entry external dcl 43 ref 119 169 iox_$user_output 000024 external static pointer dcl 46 set ref 119* 168* 169* 170* j 000171 automatic fixed bin(21,0) dcl 133 set ref 143* 144 length builtin function dcl 60 ref 169 169 line_number parameter fixed bin(21,0) dcl 26 ref 6 108 144 name 000103 automatic char(32) unaligned dcl 33 set ref 70* 79* 81* 90* 91* 93* 117* new_line constant char(1) initial unaligned dcl 52 ref 149 old_modes 000113 automatic char(132) unaligned dcl 37 set ref 167* 168* 170* punch parameter bit(1) unaligned dcl 34 ref 6 90 115 120 punch_header 000010 constant char(16) initial unaligned dcl 50 set ref 115* punch_trailer 000003 constant char(17) initial unaligned dcl 51 set ref 120* source_segment 0(02) based bit(1) level 3 packed unaligned dcl 58 ref 68 start 000102 automatic fixed bin(21,0) dcl 32 in procedure "dfast_list_" set ref 108* 111* 119 119 119 start parameter fixed bin(21,0) dcl 130 in procedure "find_line" set ref 126 137* 139 140 143 143 149 150* 150 155* 155 string parameter char unaligned dcl 164 set ref 162 169 169 169 169 substr builtin function dcl 60 ref 119 119 140 143 143 149 system_info 2 based structure level 2 dcl 58 temp_length parameter fixed bin(21,0) dcl 104 in procedure "list" set ref 99 111* 119 119 119 temp_length parameter fixed bin(21,0) dcl 129 in procedure "find_line" ref 126 139 140 143 143 149 temp_ptr parameter pointer dcl 103 in procedure "list" set ref 99 111* 119 119 temp_ptr parameter pointer dcl 128 in procedure "find_line" ref 126 140 143 143 149 temp_seg based char unaligned dcl 106 in procedure "list" set ref 119 119 temp_seg based char unaligned dcl 135 in procedure "find_line" ref 140 143 143 149 temp_seg_id parameter char unaligned dcl 25 ref 6 69 76 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. error_access_mode internal static fixed bin(35,0) initial dcl 2-33 error_bad_line internal static fixed bin(35,0) initial dcl 2-28 error_bad_name internal static fixed bin(35,0) initial dcl 2-11 error_bad_pathname internal static fixed bin(35,0) initial dcl 2-32 error_bad_rec_len internal static fixed bin(35,0) initial dcl 2-36 error_bad_req internal static fixed bin(35,0) initial dcl 2-12 error_bad_type internal static fixed bin(35,0) initial dcl 2-20 error_block_spec internal static fixed bin(35,0) initial dcl 2-17 error_delimiter_miss internal static fixed bin(35,0) initial dcl 2-34 error_dprint_map internal static fixed bin(35,0) initial dcl 2-41 error_edit_max_num internal static fixed bin(35,0) initial dcl 2-43 error_line_miss internal static fixed bin(35,0) initial dcl 2-26 error_line_order internal static fixed bin(35,0) initial dcl 2-30 error_long_rec internal static fixed bin(35,0) initial dcl 2-8 error_max_args internal static fixed bin(35,0) initial dcl 2-39 error_max_line_number internal static fixed bin(35,0) initial dcl 2-38 error_max_lines internal static fixed bin(35,0) initial dcl 2-31 error_max_num internal static fixed bin(35,0) initial dcl 2-42 error_max_size internal static fixed bin(35,0) initial dcl 2-4 error_name_dup internal static fixed bin(35,0) initial dcl 2-7 error_name_miss internal static fixed bin(35,0) initial dcl 2-14 error_name_sys internal static fixed bin(35,0) initial dcl 2-40 error_no_comp internal static fixed bin(35,0) initial dcl 2-15 error_no_expl internal static fixed bin(35,0) initial dcl 2-10 error_no_main internal static fixed bin(35,0) initial dcl 2-16 error_no_new_line internal static fixed bin(35,0) initial dcl 2-45 error_no_num internal static fixed bin(35,0) initial dcl 2-25 error_no_string internal static fixed bin(35,0) initial dcl 2-29 error_no_suffix internal static fixed bin(35,0) initial dcl 2-22 error_not_saved internal static fixed bin(35,0) initial dcl 2-6 error_request_miss internal static fixed bin(35,0) initial dcl 2-27 error_sav_cur internal static fixed bin(35,0) initial dcl 2-19 error_size_fixed_record internal static fixed bin(35,0) initial dcl 2-35 error_string_size internal static fixed bin(35,0) initial dcl 2-37 error_syntax_string internal static fixed bin(35,0) initial dcl 2-13 error_un_num_text internal static fixed bin(35,0) initial dcl 2-44 error_unkn_sys internal static fixed bin(35,0) initial dcl 2-21 error_unknown_arg internal static fixed bin(35,0) initial dcl 2-9 reverse builtin function dcl 60 NAMES DECLARED BY EXPLICIT CONTEXT. dfast_list_ 000050 constant entry external dcl 6 find_line 000371 constant entry internal dcl 126 ref 111 list 000241 constant entry internal dcl 99 ref 71 83 output_special_chars 000530 constant entry internal dcl 162 ref 115 120 NAME DECLARED BY CONTEXT OR IMPLICATION. verify builtin function ref 140 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1164 1212 1060 1174 Length 1424 1060 26 176 103 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dfast_list_ 210 external procedure is an external procedure. list internal procedure shares stack frame of external procedure dfast_list_. find_line internal procedure shares stack frame of external procedure dfast_list_. output_special_chars internal procedure shares stack frame of external procedure dfast_list_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dfast_list_ 000100 edit_info_ptr dfast_list_ 000102 start dfast_list_ 000103 name dfast_list_ 000113 old_modes dfast_list_ 000170 i find_line 000171 j find_line 000200 acode output_special_chars THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cv_dec_check_ dfast_error_ dfast_header_ dfast_merge_ iox_$modes iox_$put_chars THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. iox_$user_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000042 66 000063 68 000067 69 000072 70 000077 71 000102 72 000115 73 000117 76 000120 77 000124 78 000142 79 000145 80 000152 81 000153 83 000156 84 000172 86 000175 87 000176 89 000200 90 000203 91 000214 93 000217 96 000240 99 000241 108 000243 111 000251 112 000266 115 000272 117 000303 119 000325 120 000357 122 000370 126 000371 137 000373 139 000375 140 000403 142 000425 143 000427 144 000457 146 000470 147 000471 149 000473 150 000515 152 000520 153 000522 155 000523 157 000527 162 000530 167 000541 168 000544 169 000573 170 000615 172 000643 ----------------------------------------------------------- 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