COMPILATION LISTING OF SEGMENT convert_old_value_seg Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/09/85 1131.0 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 /* format: style2 */ 11 /**** Created 1984-12-11 BIM from the old value command. */ 12 13 14 convert_old_value_seg: 15 procedure options (variable); 16 17 dcl entry char (32), 18 dir char (168), 19 segptr ptr, 20 vs_ptr pointer, 21 created bit (1) aligned, 22 set_first bit (1) aligned, 23 i fixed bin, 24 ap ptr, 25 al fixed bin (21), 26 bchr char (al) unal based (ap), 27 code fixed bin (35); 28 29 dcl (null, substr, addr, min) 30 builtin; 31 32 dcl com_err_ entry options (variable); 33 dcl expand_pathname_ entry (character (*), character (*), character (*), fixed binary (35)); 34 dcl expand_pathname_$add_suffix 35 entry (character (*), character (*), character (*), character (*), 36 fixed binary (35)); 37 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 38 dcl cu_$arg_count entry (fixed bin, fixed bin (35)); 39 dcl initiate_file_ entry (character (*), character (*), bit (*), pointer, fixed binary (24), 40 fixed binary (35)); 41 dcl initiate_file_$create entry (character (*), character (*), bit (*), pointer, bit (1) aligned, 42 fixed binary (24), fixed binary (35)); 43 dcl pathname_ entry (character (*), character (*)) returns (character (168)); 44 dcl terminate_file_ entry (pointer, fixed binary (24), bit (*), fixed binary (35)); 45 dcl requote_string_ entry (character (*)) returns (character (*)); 46 dcl value_$init_seg entry (pointer, fixed binary, pointer, fixed binary (19), fixed binary (35)); 47 dcl value_$set entry () options (variable); 48 dcl ioa_ entry options (variable); 49 50 dcl error_table_$not_seg_type 51 fixed bin (35) ext static; 52 53 dcl PERMANENT bit (36) aligned init ("20000000000"b3) int static options (constant); 54 55 56 dcl 1 valueseg based (segptr) aligned, 57 2 laste fixed bin, 58 2 freep fixed bin, 59 2 pad (6) fixed bin, 60 2 arry (14506), 61 3 name char (32), 62 3 valu char (32), 63 3 lth fixed bin, 64 3 chain fixed bin; 65 66 67 call cu_$arg_count (i, code); 68 if code ^= 0 69 then do; 70 call com_err_ (code, "convert_old_value_seg"); 71 return; 72 end; 73 74 if i ^= 2 75 then do; 76 call com_err_ (0, "convert_old_value_seg", "Usage: convert_old_value_seg OLD_PATH NEW_PATH.value"); 77 return; 78 end; 79 80 call cu_$arg_ptr (1, ap, al, (0)); 81 call expand_pathname_ (bchr, dir, entry, code); 82 if code ^= 0 83 then do; 84 call com_err_ (code, "convert_old_value_seg", "old value seg ^a.", bchr); 85 return; 86 end; 87 88 call initiate_file_ (dir, entry, R_ACCESS, segptr, (0), code); 89 if code ^= 0 90 then do; 91 call com_err_ (code, "convert_old_value_seg", "old value seg ^a.", bchr); 92 return; 93 end; 94 95 call cu_$arg_ptr (2, ap, al, (0)); 96 call expand_pathname_$add_suffix (bchr, "value", dir, entry, code); 97 if code ^= 0 98 then do; 99 call com_err_ (code, "convert_old_value_seg", "new value seg ^a.", bchr); 100 return; 101 end; 102 103 call initiate_file_$create (dir, entry, RW_ACCESS, vs_ptr, created, (0), code); 104 if code ^= 0 105 then do; 106 call com_err_ (code, "convert_old_value_seg", "new value seg ^a.", bchr); 107 return; 108 end; 109 110 if created 111 then call ioa_ ("convert_old_value_seg: Created ^a.", pathname_ (dir, entry)); 112 113 if created 114 then call initialize_value_segment; 115 116 set_first = "0"b; 117 118 RETRY_CONVERSION: /* Here if the first set discovered an uninitialized value segment */ 119 do i = 1 to valueseg.laste; /* laste is last in use */ 120 if (valueseg.chain (i) = 0) & (valueseg.name (i) ^= "") 121 then do; 122 call value_$set (vs_ptr, PERMANENT, valueseg.name (i), 123 substr (valueseg.valu (i), 1, valueseg.lth (i)), (""), code); 124 if code = error_table_$not_seg_type 125 then do; 126 if set_first 127 then do; 128 call com_err_ (code, "convert_old_value_seg", 129 "The new value segment became invalid after a vaue was set in it."); 130 go to CLEANUP_RETURN; 131 end; 132 set_first = "1"b; 133 call initialize_value_segment; 134 go to RETRY_CONVERSION; 135 end; 136 if code ^= 0 137 then do; 138 call com_err_ (code, "convert_old_value_seg", 139 "Error setting new value seg variable ^a to ^a.", 140 requote_string_ ((valueseg.name (i))), 141 requote_string_ (substr (valueseg.valu (i), 1, valueseg.lth (i)))); 142 go to CLEANUP_RETURN; 143 end; 144 end; 145 end; 146 147 CLEANUP_RETURN: 148 call terminate_file_ (segptr, (0), TERM_FILE_TERM, (0)); 149 call terminate_file_ (vs_ptr, (0), TERM_FILE_TERM, (0)); 150 return; 151 152 153 154 initialize_value_segment: 155 procedure; 156 157 call value_$init_seg (vs_ptr, 0, null (), 0, code); 158 if code ^= 0 159 then do; 160 call com_err_ (code, "convert_old_value_seg", "Unable to initialize ^a as a value segment.", 161 pathname_ (dir, entry)); 162 go to CLEANUP_RETURN; 163 end; 164 return; 165 end initialize_value_segment; 166 1 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 1 2* 1 3* Values for the "access mode" argument so often used in hardcore 1 4* James R. Davis 26 Jan 81 MCR 4844 1 5* Added constants for SM access 4/28/82 Jay Pattin 1 6* Added text strings 03/19/85 Chris Jones 1 7**/ 1 8 1 9 1 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 1 11 dcl ( 1 12 N_ACCESS init ("000"b), 1 13 R_ACCESS init ("100"b), 1 14 E_ACCESS init ("010"b), 1 15 W_ACCESS init ("001"b), 1 16 RE_ACCESS init ("110"b), 1 17 REW_ACCESS init ("111"b), 1 18 RW_ACCESS init ("101"b), 1 19 S_ACCESS init ("100"b), 1 20 M_ACCESS init ("010"b), 1 21 A_ACCESS init ("001"b), 1 22 SA_ACCESS init ("101"b), 1 23 SM_ACCESS init ("110"b), 1 24 SMA_ACCESS init ("111"b) 1 25 ) bit (3) internal static options (constant); 1 26 1 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 1 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 1 29 1 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 1 31 static options (constant); 1 32 1 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 1 34 static options (constant); 1 35 1 36 dcl ( 1 37 N_ACCESS_BIN init (00000b), 1 38 R_ACCESS_BIN init (01000b), 1 39 E_ACCESS_BIN init (00100b), 1 40 W_ACCESS_BIN init (00010b), 1 41 RW_ACCESS_BIN init (01010b), 1 42 RE_ACCESS_BIN init (01100b), 1 43 REW_ACCESS_BIN init (01110b), 1 44 S_ACCESS_BIN init (01000b), 1 45 M_ACCESS_BIN init (00010b), 1 46 A_ACCESS_BIN init (00001b), 1 47 SA_ACCESS_BIN init (01001b), 1 48 SM_ACCESS_BIN init (01010b), 1 49 SMA_ACCESS_BIN init (01011b) 1 50 ) fixed bin (5) internal static options (constant); 1 51 1 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 167 2 1 /* BEGIN INCLUDE FILE ... terminate_file.incl.pl1 */ 2 2 /* format: style2,^inddcls,idind32 */ 2 3 2 4 declare 1 terminate_file_switches based, 2 5 2 truncate bit (1) unaligned, 2 6 2 set_bc bit (1) unaligned, 2 7 2 terminate bit (1) unaligned, 2 8 2 force_write bit (1) unaligned, 2 9 2 delete bit (1) unaligned; 2 10 2 11 declare TERM_FILE_TRUNC bit (1) internal static options (constant) initial ("1"b); 2 12 declare TERM_FILE_BC bit (2) internal static options (constant) initial ("01"b); 2 13 declare TERM_FILE_TRUNC_BC bit (2) internal static options (constant) initial ("11"b); 2 14 declare TERM_FILE_TERM bit (3) internal static options (constant) initial ("001"b); 2 15 declare TERM_FILE_TRUNC_BC_TERM bit (3) internal static options (constant) initial ("111"b); 2 16 declare TERM_FILE_FORCE_WRITE bit (4) internal static options (constant) initial ("0001"b); 2 17 declare TERM_FILE_DELETE bit (5) internal static options (constant) initial ("00001"b); 2 18 2 19 /* END INCLUDE FILE ... terminate_file.incl.pl1 */ 168 169 end convert_old_value_seg; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/08/85 1134.6 convert_old_value_seg.pl1 >spec>on>41-15>convert_old_value_seg.pl1 167 1 04/09/85 1109.7 access_mode_values.incl.pl1 >spec>on>41-15>access_mode_values.incl.pl1 168 2 04/06/83 1239.4 terminate_file.incl.pl1 >ldd>include>terminate_file.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. PERMANENT 000002 constant bit(36) initial dcl 53 set ref 122* RW_ACCESS 000001 constant bit(3) initial unaligned dcl 1-11 set ref 103* R_ACCESS 000005 constant bit(3) initial unaligned dcl 1-11 set ref 88* TERM_FILE_TERM 000000 constant bit(3) initial unaligned dcl 2-14 set ref 147* 149* al 000174 automatic fixed bin(21,0) dcl 17 set ref 80* 81 81 84 84 91 91 95* 96 96 99 99 106 106 ap 000172 automatic pointer dcl 17 set ref 80* 81 84 91 95* 96 99 106 arry 10 based structure array level 2 dcl 56 bchr based char unaligned dcl 17 set ref 81* 84* 91* 96* 99* 106* chain 31 based fixed bin(17,0) array level 3 dcl 56 ref 120 code 000175 automatic fixed bin(35,0) dcl 17 set ref 67* 68 70* 81* 82 84* 88* 89 91* 96* 97 99* 103* 104 106* 122* 124 128* 136 138* 157* 158 160* com_err_ 000010 constant entry external dcl 32 ref 70 76 84 91 99 106 128 138 160 created 000166 automatic bit(1) dcl 17 set ref 103* 110 113 cu_$arg_count 000020 constant entry external dcl 38 ref 67 cu_$arg_ptr 000016 constant entry external dcl 37 ref 80 95 dir 000110 automatic char(168) unaligned dcl 17 set ref 81* 88* 96* 103* 110* 110* 160* 160* entry 000100 automatic char(32) unaligned dcl 17 set ref 81* 88* 96* 103* 110* 110* 160* 160* error_table_$not_seg_type 000042 external static fixed bin(35,0) dcl 50 ref 124 expand_pathname_ 000012 constant entry external dcl 33 ref 81 expand_pathname_$add_suffix 000014 constant entry external dcl 34 ref 96 i 000170 automatic fixed bin(17,0) dcl 17 set ref 67* 74 118* 120 120 122 122 122 122 122 138 138 138 138 138* initiate_file_ 000022 constant entry external dcl 39 ref 88 initiate_file_$create 000024 constant entry external dcl 41 ref 103 ioa_ 000040 constant entry external dcl 48 ref 110 laste based fixed bin(17,0) level 2 dcl 56 ref 118 lth 30 based fixed bin(17,0) array level 3 dcl 56 ref 122 122 138 138 name 10 based char(32) array level 3 dcl 56 set ref 120 122* 138 null builtin function dcl 29 ref 157 157 pathname_ 000026 constant entry external dcl 43 ref 110 110 160 160 requote_string_ 000032 constant entry external dcl 45 ref 138 138 segptr 000162 automatic pointer dcl 17 set ref 88* 118 120 120 122 122 122 122 122 138 138 138 138 138 147* set_first 000167 automatic bit(1) dcl 17 set ref 116* 126 132* substr builtin function dcl 29 ref 122 122 138 138 terminate_file_ 000030 constant entry external dcl 44 ref 147 149 valu 20 based char(32) array level 3 dcl 56 ref 122 122 138 138 value_$init_seg 000034 constant entry external dcl 46 ref 157 value_$set 000036 constant entry external dcl 47 ref 122 valueseg based structure level 1 dcl 56 vs_ptr 000164 automatic pointer dcl 17 set ref 103* 122* 149* 157* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial unaligned dcl 1-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 1-33 E_ACCESS internal static bit(3) initial unaligned dcl 1-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 M_ACCESS internal static bit(3) initial unaligned dcl 1-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 N_ACCESS internal static bit(3) initial unaligned dcl 1-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 REW_ACCESS internal static bit(3) initial unaligned dcl 1-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 RE_ACCESS internal static bit(3) initial unaligned dcl 1-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 SA_ACCESS internal static bit(3) initial unaligned dcl 1-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 1-30 SMA_ACCESS internal static bit(3) initial unaligned dcl 1-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 SM_ACCESS internal static bit(3) initial unaligned dcl 1-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 S_ACCESS internal static bit(3) initial unaligned dcl 1-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 TERM_FILE_BC internal static bit(2) initial unaligned dcl 2-12 TERM_FILE_DELETE internal static bit(5) initial unaligned dcl 2-17 TERM_FILE_FORCE_WRITE internal static bit(4) initial unaligned dcl 2-16 TERM_FILE_TRUNC internal static bit(1) initial unaligned dcl 2-11 TERM_FILE_TRUNC_BC internal static bit(2) initial unaligned dcl 2-13 TERM_FILE_TRUNC_BC_TERM internal static bit(3) initial unaligned dcl 2-15 W_ACCESS internal static bit(3) initial unaligned dcl 1-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 1-36 addr builtin function dcl 29 min builtin function dcl 29 terminate_file_switches based structure level 1 packed unaligned dcl 2-4 NAMES DECLARED BY EXPLICIT CONTEXT. CLEANUP_RETURN 001263 constant label dcl 147 ref 130 142 162 RETRY_CONVERSION 001002 constant label dcl 118 ref 134 convert_old_value_seg 000154 constant entry external dcl 14 initialize_value_segment 001342 constant entry internal dcl 154 ref 113 133 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1634 1700 1450 1644 Length 2134 1450 44 220 163 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME convert_old_value_seg 406 external procedure is an external procedure. initialize_value_segment internal procedure shares stack frame of external procedure convert_old_value_seg. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME convert_old_value_seg 000100 entry convert_old_value_seg 000110 dir convert_old_value_seg 000162 segptr convert_old_value_seg 000164 vs_ptr convert_old_value_seg 000166 created convert_old_value_seg 000167 set_first convert_old_value_seg 000170 i convert_old_value_seg 000172 ap convert_old_value_seg 000174 al convert_old_value_seg 000175 code convert_old_value_seg THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr expand_pathname_ expand_pathname_$add_suffix initiate_file_ initiate_file_$create ioa_ pathname_ requote_string_ terminate_file_ value_$init_seg value_$set THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$not_seg_type LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 14 000153 67 000161 68 000171 70 000173 71 000216 74 000217 76 000222 77 000255 80 000256 81 000276 82 000326 84 000330 85 000371 88 000372 89 000430 91 000432 92 000473 95 000474 96 000514 97 000552 99 000554 100 000620 103 000621 104 000663 106 000665 107 000731 110 000732 113 000775 116 001001 118 001002 120 001011 122 001024 124 001075 126 001102 128 001104 130 001135 132 001136 133 001140 134 001141 136 001142 138 001144 142 001257 145 001261 147 001263 149 001312 150 001341 154 001342 157 001343 158 001366 160 001370 162 001446 164 001447 ----------------------------------------------------------- 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