COMPILATION LISTING OF SEGMENT lister_delete_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/05/84 1154.2 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 /* Program to delete a list of records from an ASSIST input_file. 19* Written 750316 by PG 20* Modified 750711 by PG to be able to delete first record in input_file. 21* Modified 760916 by PG to be able to delete first record in file (previous fix assumed that freed 22* storage was not immediately overwritten...an assumption that turned into a bug with the new area package). 23* Modified 761111 by PG to rename from assist_delete_ to lister_delete_. 24* Modified 770707 by PG to keep input_file.n_records accurate. 25**/ 26 27 /* format: style3 */ 28 lister_delete_: 29 procedure (bv_in_file_ptr, bv_selected_records_ptr) options (packed_decimal); 30 31 /* parameters */ 32 33 dcl ( 34 bv_in_file_ptr ptr, 35 bv_selected_records_ptr 36 ptr 37 ) parameter; 38 39 /* automatic */ 40 41 dcl (fieldx, listx) fixed bin; 42 dcl (selected_records_ptr, parentp) 43 ptr; 44 45 /* builtins */ 46 47 dcl (dimension, hbound, lbound, length, null) 48 builtin; 49 50 /* include files */ 51 1 1 /* ====== BEGIN INCLUDE FILE lister_structures.incl.pl1 ================================ */ 1 2 1 3 /* 1 4* Modified 800813 by PB to add PUT_UID to listform declarations. 1 5* Modified 800825 by PB for version 2 lister file. 1 6* Modified 840523 by PB to add SELECT_BEG and SELECT_END. 1 7**/ 1 8 /* MASTER DECLARATIONS */ 1 9 1 10 /* format: style3 */ 1 11 dcl lister_file_version_2 1 12 fixed bin initial (2) internal static options (constant); 1 13 1 14 dcl 1 input_file based (in_file_ptr) aligned, 1 15 2 ( 1 16 field_table_offset, 1 17 record_head, 1 18 record_tail, 1 19 unused (2) 1 20 ) offset (input_file.area), 1 21 2 next_uid fixed bin (24) unsigned, 1 22 2 version fixed bin, 1 23 2 n_records fixed bin (17), 1 24 2 area area (261112); 1 25 1 26 dcl 1 update_file based (up_file_ptr) aligned, 1 27 2 ( 1 28 field_table_offset, 1 29 record_head, 1 30 record_tail, 1 31 unused (2) 1 32 ) offset (update_file.area), 1 33 2 next_uid fixed bin (24) unsigned, 1 34 2 version fixed bin, 1 35 2 n_records fixed bin (17), 1 36 2 area area (261112); 1 37 1 38 dcl 1 output_file based (out_file_ptr) aligned, 1 39 2 ( 1 40 field_table_offset, 1 41 record_head, 1 42 record_tail, 1 43 unused (2) 1 44 ) offset (output_file.area), 1 45 2 next_uid fixed bin (24) unsigned, 1 46 2 version fixed bin, 1 47 2 n_records fixed bin (17), 1 48 2 area area (261112); 1 49 1 50 dcl 1 input_record based (recordp) aligned, 1 51 2 next offset (input_file.area), 1 52 2 uid fixed bin (24) unsigned unaligned, 1 53 2 max_field_index fixed bin (12) unsigned unaligned, 1 54 2 field dim (0:field_table.max_field_index refer (input_record.max_field_index)) 1 55 offset (input_file.area); 1 56 1 57 dcl 1 update_record based aligned, 1 58 2 next offset (update_file.area), 1 59 2 uid fixed bin (24) unsigned unaligned, 1 60 2 max_field_index fixed bin (12) unsigned unaligned, 1 61 2 field dim (0:field_table.max_field_index refer (update_record.max_field_index)) 1 62 offset (update_file.area); 1 63 1 64 dcl 1 output_record based aligned, 1 65 2 next offset (output_file.area), 1 66 2 uid fixed bin (24) unsigned unaligned, 1 67 2 max_field_index fixed bin (12) unsigned unaligned, 1 68 2 field dim (0:field_table.max_field_index refer (output_record.max_field_index)) 1 69 offset (output_file.area); 1 70 1 71 dcl atom char (atom_length) based (atomp) varying aligned, 1 72 atom_length fixed bin initial (0), /* for table option */ 1 73 atomp ptr; 1 74 1 75 dcl (fidp, field_table_ptr, format_table_ptr, in_file_ptr, ltp, recordp, select_ptr, out_file_ptr, up_file_ptr) 1 76 ptr, 1 77 n fixed bin; 1 78 1 79 dcl 1 field_table based (field_table_ptr) aligned, 1 80 2 record_delimiter 1 81 unal char (1), 1 82 2 field_delimiter unal char (1), 1 83 2 max_field_index unal fixed bin (17), 1 84 2 hash_field_id_to_index 1 85 dimension (0:18) offset, 1 86 2 index_to_field_id 1 87 dimension (0:n refer (field_table.max_field_index)) offset; 1 88 1 89 dcl 1 field_identifier based (fidp) aligned, 1 90 2 next offset, 1 91 2 field_index unal fixed bin (17), 1 92 2 size unal fixed bin (17), 1 93 2 string unal char (n refer (field_identifier.size)); 1 94 1 95 dcl system_area area (261120) based (area_ptr); 1 96 dcl area_ptr ptr; 1 97 1 98 /* LISTFORM DECLARATIONS */ 1 99 1 100 declare ( 1 101 PUT_LITERAL initial (-1), 1 102 PUT_SPACES initial (-2), 1 103 PUT_END initial (-3), 1 104 PUT_DATE initial (-4), 1 105 PUT_TIME initial (-5), 1 106 PUT_RECORD_COUNT initial (-6), 1 107 PUT_ARGUMENT initial (-7), 1 108 PUT_UID initial (-8) 1 109 ) fixed bin internal static; 1 110 1 111 dcl 1 format_table aligned based (format_table_ptr), 1 112 2 size fixed bin (17) unal, 1 113 2 before fixed bin (17) unal, 1 114 2 after fixed bin (17) unal, 1 115 2 record fixed bin (17) unal, 1 116 2 literal_table ptr, 1 117 2 item dim (n refer (format_table.size)), 1 118 3 action fixed bin (17) unal, 1 119 3 justification bit (2) unal, 1 120 3 argument_number 1 121 fixed bin (15) unal, 1 122 3 width fixed bin (21); 1 123 1 124 dcl 1 literal_table aligned based (ltp), 1 125 2 size fixed bin, /* number of slots allocated */ 1 126 2 n_literals fixed bin, /* number of slots in use */ 1 127 2 literal dim (n refer (literal_table.size)) ptr unal; 1 128 1 129 dcl ( 1 130 flush_left initial ("00"b), 1 131 center initial ("01"b), 1 132 flush_right initial ("10"b) 1 133 ) bit (2) aligned internal static options (constant); 1 134 1 135 dcl MIN_FIELD_INDEX fixed bin initial (0) internal static options (constant); 1 136 1 137 dcl 1 list_node aligned based, 1 138 2 size fixed bin, 1 139 2 list dimension (n refer (list_node.size)) ptr; 1 140 1 141 /* SELECT DECLARATIONS */ 1 142 1 143 dcl 1 select_expression based (select_ptr) aligned, 1 144 2 literal_table_ptr 1 145 ptr, 1 146 2 size fixed bin, 1 147 2 last_element fixed bin, 1 148 2 element dim (n refer (select_expression.size)), 1 149 3 opcode unal bit (9), 1 150 3 not unal bit (1), 1 151 3 top unal bit (1), 1 152 3 unused unal bit (7), 1 153 3 field_index unal fixed bin (8), 1 154 3 literal_index unal fixed bin (8), 1 155 1 element aligned, 1 156 2 opcode fixed bin, 1 157 2 not bit (1) aligned, 1 158 2 top bit (1) aligned, 1 159 2 field_index fixed bin, 1 160 2 literal_index fixed bin, 1 161 operand1 fixed bin defined (element.field_index), 1 162 operand2 fixed bin defined (element.literal_index); 1 163 1 164 dcl ( 1 165 SELECT_AND init ("000000001"b), 1 166 SELECT_OR init ("000000010"b), 1 167 SELECT_NOT init ("000000011"b), 1 168 SELECT_FIND init ("000000100"b), 1 169 SELECT_EQ init ("000000101"b), 1 170 SELECT_LT init ("000000110"b), 1 171 SELECT_GT init ("000000111"b), 1 172 SELECT_LE init ("000001000"b), 1 173 SELECT_GE init ("000001001"b), 1 174 SELECT_NEQ init ("000001010"b), 1 175 SELECT_NLT init ("000001011"b), 1 176 SELECT_NGT init ("000001100"b), 1 177 SELECT_NLE init ("000001101"b), 1 178 SELECT_NGE init ("000001110"b), 1 179 SELECT_BEG init ("000001111"b), 1 180 SELECT_END init ("000010000"b) 1 181 ) bit (9) aligned internal static; 1 182 1 183 dcl ( 1 184 ANY_FIELD init (-1), 1 185 NULL_FIELD init (-2), 1 186 NUMERIC_FIELD init (-3), 1 187 UID init (-4) 1 188 ) aligned fixed bin (8) static; 1 189 1 190 dcl 1 numeric_atom aligned based (atomp), 1 191 2 flag fixed bin (35), /* must be -1 */ 1 192 2 value float dec (29) unal; 1 193 1 194 dcl numeric_flag fixed bin (35) internal static initial (-1) options (constant); 1 195 1 196 /* SORT DECLARATIONS */ 1 197 1 198 declare n_items_to_sort fixed bin, 1 199 sort_list_ptr ptr; 1 200 1 201 declare 1 sort_list aligned based (sort_list_ptr), 1 202 2 n_keys fixed bin, 1 203 2 key (n_items_to_sort refer (sort_list.n_keys)), 1 204 3 field_index fixed bin, 1 205 3 ascending bit (1) aligned, 1 206 3 numeric bit (1) aligned; 1 207 1 208 /* MERGE DECLARATIONS */ 1 209 1 210 dcl ( 1 211 MERGE_ADD init (0), 1 212 MERGE_AND init (1), 1 213 MERGE_OR init (2), 1 214 MERGE_SUBTRACT init (3) 1 215 ) fixed bin internal static options (constant); 1 216 1 217 /* ------ END INCLUDE FILE lister_structures.incl.pl1 -------------------------------- */ 52 53 54 /* program */ 55 56 in_file_ptr = bv_in_file_ptr; 57 selected_records_ptr = bv_selected_records_ptr; 58 59 if selected_records_ptr = null 60 then return; /* nothing to do */ 61 62 parentp = input_file.record_head; 63 64 do listx = lbound (selected_records_ptr -> list, 1) to hbound (selected_records_ptr -> list, 1); 65 recordp = selected_records_ptr -> list (listx); 66 67 /* First find the record before the record to be deleted. The list 68* of records to be deleted is assumed to be in the same relative 69* order as the file itself. 70* 71* Next, unthread the record to be deleted from the 72* file's record list. There are three cases: 73* 74* case 1: the record is the first record on the list. 75* case 2: the record is neither the first nor the last on the list. 76* case 3: the record is the last record on the list. 77**/ 78 79 if input_file.record_head ^= recordp /* if not first record */ 80 then do; 81 do parentp = parentp repeat parentp -> input_record.next 82 while (parentp -> input_record.next ^= recordp); 83 end; 84 85 parentp -> input_record.next = input_record.next; 86 /* case 2 */ 87 end; 88 else parentp, input_file.record_head = input_record.next; 89 /* case 1 */ 90 91 if input_file.record_tail = recordp 92 then input_file.record_tail = parentp; /* case 3 */ 93 94 /* Free all storage assigned to this record */ 95 96 do fieldx = lbound (input_record.field, 1) to hbound (input_record.field, 1); 97 atomp = input_record.field (fieldx); 98 99 if atomp ^= null /* Is there a data item there? */ 100 then do; 101 atom_length = length (atom); /* set varying string max length */ 102 free atom in (input_file.area); 103 end; 104 end; 105 106 free input_record in (input_file.area); 107 end; /* do listx = */ 108 109 input_file.n_records = input_file.n_records - dimension (selected_records_ptr -> list_node.list, 1); 110 111 end /* lister_delete_ */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/05/84 1151.5 lister_delete_.pl1 >special_ldd>online>6883-11/02/84>lister_delete_.pl1 52 1 11/02/84 1208.5 lister_structures.incl.pl1 >special_ldd>online>6883-11/02/84>lister_structures.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. area 10 based area(261112) level 2 dcl 1-14 ref 62 79 81 83 88 91 91 97 102 106 atom based varying char dcl 1-71 ref 101 102 atom_length 000106 automatic fixed bin(17,0) initial dcl 1-71 set ref 101* 102 1-71* atomp 000110 automatic pointer dcl 1-71 set ref 97* 99 101 102 bv_in_file_ptr parameter pointer dcl 33 ref 28 56 bv_selected_records_ptr parameter pointer dcl 33 ref 28 57 dimension builtin function dcl 47 ref 109 field 2 based offset array level 2 dcl 1-50 ref 96 96 97 fieldx 000100 automatic fixed bin(17,0) dcl 41 set ref 96* 97* hbound builtin function dcl 47 ref 64 96 in_file_ptr 000112 automatic pointer dcl 1-75 set ref 56* 62 62 79 79 81 83 88 88 91 91 91 91 97 102 106 109 109 input_file based structure level 1 dcl 1-14 input_record based structure level 1 dcl 1-50 set ref 106 lbound builtin function dcl 47 ref 64 96 length builtin function dcl 47 ref 101 list 2 based pointer array level 2 dcl 1-137 ref 64 64 65 109 list_node based structure level 1 dcl 1-137 listx 000101 automatic fixed bin(17,0) dcl 41 set ref 64* 65* max_field_index 1(24) based fixed bin(12,0) level 2 packed unsigned unaligned dcl 1-50 ref 96 106 n_records 7 based fixed bin(17,0) level 2 dcl 1-14 set ref 109* 109 next based offset level 2 dcl 1-50 set ref 81 83 85* 85 88 null builtin function dcl 47 ref 59 99 parentp 000104 automatic pointer dcl 42 set ref 62* 81* 81 81* 83 85 88* 91 record_head 1 based offset level 2 dcl 1-14 set ref 62 79 88* record_tail 2 based offset level 2 dcl 1-14 set ref 91 91* recordp 000114 automatic pointer dcl 1-75 set ref 65* 79 81 85 88 91 96 96 97 106 selected_records_ptr 000102 automatic pointer dcl 42 set ref 57* 59 64 64 65 109 size based fixed bin(17,0) level 2 dcl 1-137 ref 64 109 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ANY_FIELD internal static fixed bin(8,0) initial dcl 1-183 MERGE_ADD internal static fixed bin(17,0) initial dcl 1-210 MERGE_AND internal static fixed bin(17,0) initial dcl 1-210 MERGE_OR internal static fixed bin(17,0) initial dcl 1-210 MERGE_SUBTRACT internal static fixed bin(17,0) initial dcl 1-210 MIN_FIELD_INDEX internal static fixed bin(17,0) initial dcl 1-135 NULL_FIELD internal static fixed bin(8,0) initial dcl 1-183 NUMERIC_FIELD internal static fixed bin(8,0) initial dcl 1-183 PUT_ARGUMENT internal static fixed bin(17,0) initial dcl 1-100 PUT_DATE internal static fixed bin(17,0) initial dcl 1-100 PUT_END internal static fixed bin(17,0) initial dcl 1-100 PUT_LITERAL internal static fixed bin(17,0) initial dcl 1-100 PUT_RECORD_COUNT internal static fixed bin(17,0) initial dcl 1-100 PUT_SPACES internal static fixed bin(17,0) initial dcl 1-100 PUT_TIME internal static fixed bin(17,0) initial dcl 1-100 PUT_UID internal static fixed bin(17,0) initial dcl 1-100 SELECT_AND internal static bit(9) initial dcl 1-164 SELECT_BEG internal static bit(9) initial dcl 1-164 SELECT_END internal static bit(9) initial dcl 1-164 SELECT_EQ internal static bit(9) initial dcl 1-164 SELECT_FIND internal static bit(9) initial dcl 1-164 SELECT_GE internal static bit(9) initial dcl 1-164 SELECT_GT internal static bit(9) initial dcl 1-164 SELECT_LE internal static bit(9) initial dcl 1-164 SELECT_LT internal static bit(9) initial dcl 1-164 SELECT_NEQ internal static bit(9) initial dcl 1-164 SELECT_NGE internal static bit(9) initial dcl 1-164 SELECT_NGT internal static bit(9) initial dcl 1-164 SELECT_NLE internal static bit(9) initial dcl 1-164 SELECT_NLT internal static bit(9) initial dcl 1-164 SELECT_NOT internal static bit(9) initial dcl 1-164 SELECT_OR internal static bit(9) initial dcl 1-164 UID internal static fixed bin(8,0) initial dcl 1-183 area_ptr automatic pointer dcl 1-96 center internal static bit(2) initial dcl 1-129 element automatic structure level 1 dcl 1-143 fidp automatic pointer dcl 1-75 field_identifier based structure level 1 dcl 1-89 field_table based structure level 1 dcl 1-79 field_table_ptr automatic pointer dcl 1-75 flush_left internal static bit(2) initial dcl 1-129 flush_right internal static bit(2) initial dcl 1-129 format_table based structure level 1 dcl 1-111 format_table_ptr automatic pointer dcl 1-75 lister_file_version_2 internal static fixed bin(17,0) initial dcl 1-11 literal_table based structure level 1 dcl 1-124 ltp automatic pointer dcl 1-75 n automatic fixed bin(17,0) dcl 1-75 n_items_to_sort automatic fixed bin(17,0) dcl 1-198 numeric_atom based structure level 1 dcl 1-190 numeric_flag internal static fixed bin(35,0) initial dcl 1-194 operand1 defined fixed bin(17,0) dcl 1-143 operand2 defined fixed bin(17,0) dcl 1-143 out_file_ptr automatic pointer dcl 1-75 output_file based structure level 1 dcl 1-38 output_record based structure level 1 dcl 1-64 select_expression based structure level 1 dcl 1-143 select_ptr automatic pointer dcl 1-75 sort_list based structure level 1 dcl 1-201 sort_list_ptr automatic pointer dcl 1-198 system_area based area(261120) dcl 1-95 up_file_ptr automatic pointer dcl 1-75 update_file based structure level 1 dcl 1-26 update_record based structure level 1 dcl 1-57 NAME DECLARED BY EXPLICIT CONTEXT. lister_delete_ 000010 constant entry external dcl 28 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 224 234 177 234 Length 424 177 10 153 25 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME lister_delete_ 88 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME lister_delete_ 000100 fieldx lister_delete_ 000101 listx lister_delete_ 000102 selected_records_ptr lister_delete_ 000104 parentp lister_delete_ 000106 atom_length lister_delete_ 000110 atomp lister_delete_ 000112 in_file_ptr lister_delete_ 000114 recordp lister_delete_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return ext_entry pointer_hard offset_hard free_based NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 28 000004 1 71 000015 56 000016 57 000022 59 000025 62 000031 64 000035 65 000045 79 000051 81 000061 83 000074 85 000101 87 000103 88 000104 91 000113 96 000127 97 000137 99 000145 101 000150 102 000152 104 000157 106 000161 107 000167 109 000171 111 000176 ----------------------------------------------------------- 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