COMPILATION LISTING OF SEGMENT expand_symbols Compiled by: Multics PL/I Compiler, Release 26a, of September 3, 1980 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 01/06/81 1247.2 mst Tue Options: optimize map 1 /* ****************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems * 5* * Inc., 1980. * 6* * * 7* * * 8* ****************************************************** */ 9 10 expand_symbols: esb: procedure; 11 12 /* This procedure implements the expand_symbols command. 13* * Created on 10/15/75 by Bill Silver as run_notescript_. 14* * Changed on 06/07/77 by Bill Silver to expand_symbols_. 15* * 16* * The expand_symbols command will copy an input segment into 17* * an output segment and in so doing expand each symbol that 18* * is found in the input segment and is defined in the current 19* * Speedtype symbol dictionary. Its calling sequence is: 20* * 21* * expand_symbols, esb input_path (output_path) 22**/ 23 24 /* AUTOMATIC DATA */ 25 dcl dir_name char (168); /* Used to expand pathnames. */ 26 dcl ent_name char (32); /* Used to expand pathnames. */ 27 28 dcl arg_len fixed bin; /* Length of control argument. */ 29 dcl arg_ptr ptr; /* Pointer to control argument. */ 30 dcl argx fixed bin; /* Index of control argument. */ 31 dcl ecode fixed bin (35); /* Error table code. */ 32 dcl in_len fixed bin (21); /* Length of unused part of input segment. */ 33 dcl in_ptr ptr; /* Pointer to input segment. */ 34 dcl num_args fixed bin; /* Number of command arguments. */ 35 dcl out_ptr ptr; /* Pointer to output segment. */ 36 dcl out_len fixed bin (21); /* Max length of output segment. */ 37 dcl out_used fixed bin (21); /* Length of used part of output segment. */ 38 dcl temp_flag bit (1) aligned; /* ON -> using temporary output segment. */ 39 40 /* BASED DATA */ 41 42 dcl argument char (arg_len) based (arg_ptr); /* Control argument string. */ 43 44 /* EXTERNAL ENTRIES */ 45 46 dcl (addr) builtin; 47 48 dcl error_table_$wrong_no_of_args fixed bin (35) external; 49 50 dcl com_err_ entry options (variable); 51 dcl cu_$arg_count entry (fixed bin); 52 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 53 dcl expand_path_ entry (ptr, fixed bin, ptr, ptr, fixed bin (35)); 54 dcl speedtype_expand_ entry (ptr, fixed bin (21), ptr, fixed bin (21), fixed bin (21), fixed bin (35)); 55 dcl speedtype_util_$fix_output_seg entry (bit (1) aligned, ptr, ptr, fixed bin (21), fixed bin (35)); 56 dcl speedtype_util_$init_input_seg entry (char (*), char (*), ptr, fixed bin (21), fixed bin (35)); 57 dcl speedtype_util_$init_output_seg entry (char (*), char (*), ptr, fixed bin (21), fixed bin (35)); 58 /* */ 59 call cu_$arg_count (num_args); /* Test for correct number of arguments. */ 60 if (num_args < 1) | /* Must have either 1 or 2 arguments. */ 61 (num_args > 2) 62 then do; 63 ecode = error_table_$wrong_no_of_args; 64 call com_err_ (ecode, "Speedtype", "Usage is: esb input_path (output_path)"); 65 return; 66 end; 67 68 temp_flag = "1"b; /* Assume that we need a temporary output segment. */ 69 70 do argx = 1 to num_args; /* Process each argument. */ 71 call cu_$arg_ptr (argx, arg_ptr, arg_len, ecode); 72 if ecode ^= 0 73 then do; 74 call com_err_ (ecode, "Speedtype", "Error getting argument ^d", argx); 75 return; 76 end; 77 call PROCESS_ARG; /* Process this argument. */ 78 if ecode ^= 0 then return; /* Give up if argument error. */ 79 end; 80 81 if temp_flag /* Do we need a temporary output segment? */ 82 then do; /* Yes, use temporary segment in process directory. */ 83 call speedtype_util_$init_output_seg ("", "speedtype_temp", out_ptr, out_len, ecode); 84 if ecode ^= 0 85 then do; 86 call com_err_ (ecode, "Speedtype", "Error creating temporary output segment"); 87 return; 88 end; 89 end; 90 91 /* Now expand input segment. */ 92 call speedtype_expand_ (in_ptr, in_len, out_ptr, out_len, out_used, ecode); 93 if ecode ^= 0 94 then do; 95 call com_err_ (ecode, "Speedtype", "Error expanding input"); 96 return; 97 end; 98 99 /* Fix up output segment. */ 100 call speedtype_util_$fix_output_seg (temp_flag, in_ptr, out_ptr, out_used, ecode); 101 if ecode ^= 0 102 then call com_err_ (ecode, "Speedtype", "Error fixing output segment"); 103 104 return; 105 /* */ 106 PROCESS_ARG: procedure; 107 108 /* This procedure is called to process one input argument. 109* * The first argument must be the pathname of the input segment. 110* * The second, optional argument, must be the pathanme of the output segment. 111**/ 112 /* Expand the pathname argument. */ 113 call expand_path_ (arg_ptr, arg_len, addr (dir_name), addr (ent_name), ecode); 114 if ecode ^= 0 115 then do; 116 call com_err_ (ecode, "Speedtype", "Error expanding pathanme: ^a", argument); 117 return; 118 end; 119 120 goto ARGUMENT (argx); /* Go process correct argument. */ 121 122 ARGUMENT (1): /* Pathname of input segment. */ 123 call speedtype_util_$init_input_seg (dir_name, ent_name, in_ptr, in_len, ecode); 124 if ecode ^= 0 125 then call com_err_ (ecode, "Speedtype", "Error initializing input segment"); 126 return; 127 128 ARGUMENT (2): /* Pathname of output segment. */ 129 call speedtype_util_$init_output_seg (dir_name, ent_name, out_ptr, out_len, ecode); 130 if ecode ^= 0 131 then do; 132 call com_err_ (ecode, "Speedtype", "Error initializing output segment"); 133 return; 134 end; 135 if out_ptr ^= in_ptr /* If output segment different from input segment. */ 136 then temp_flag = "0"b; /* Then no need for temporary output segment. */ 137 end PROCESS_ARG; 138 139 end expand_symbols; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/06/81 1247.2 expand_symbols.pl1 >spec>on>speed>expand_symbols.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. addr builtin function dcl 46 ref 113 113 113 113 arg_len 000162 automatic fixed bin(17,0) dcl 28 set ref 71* 113* 116 116 arg_ptr 000164 automatic pointer dcl 29 set ref 71* 113* 116 argument based char unaligned dcl 42 set ref 116* argx 000166 automatic fixed bin(17,0) dcl 30 set ref 70* 71* 74* 120 com_err_ 000012 constant entry external dcl 50 ref 64 74 86 95 101 116 124 132 cu_$arg_count 000014 constant entry external dcl 51 ref 59 cu_$arg_ptr 000016 constant entry external dcl 52 ref 71 dir_name 000100 automatic char(168) unaligned dcl 25 set ref 113 113 122* 128* ecode 000167 automatic fixed bin(35,0) dcl 31 set ref 63* 64* 71* 72 74* 78 83* 84 86* 92* 93 95* 100* 101 101* 113* 114 116* 122* 124 124* 128* 130 132* ent_name 000152 automatic char(32) unaligned dcl 26 set ref 113 113 122* 128* error_table_$wrong_no_of_args 000010 external static fixed bin(35,0) dcl 48 ref 63 expand_path_ 000020 constant entry external dcl 53 ref 113 in_len 000170 automatic fixed bin(21,0) dcl 32 set ref 92* 122* in_ptr 000172 automatic pointer dcl 33 set ref 92* 100* 122* 135 num_args 000174 automatic fixed bin(17,0) dcl 34 set ref 59* 60 60 70 out_len 000200 automatic fixed bin(21,0) dcl 36 set ref 83* 92* 128* out_ptr 000176 automatic pointer dcl 35 set ref 83* 92* 100* 128* 135 out_used 000201 automatic fixed bin(21,0) dcl 37 set ref 92* 100* speedtype_expand_ 000022 constant entry external dcl 54 ref 92 speedtype_util_$fix_output_seg 000024 constant entry external dcl 55 ref 100 speedtype_util_$init_input_seg 000026 constant entry external dcl 56 ref 122 speedtype_util_$init_output_seg 000030 constant entry external dcl 57 ref 83 128 temp_flag 000202 automatic bit(1) dcl 38 set ref 68* 81 100* 135* NAMES DECLARED BY EXPLICIT CONTEXT. ARGUMENT 000000 constant label array(2) dcl 122 set ref 120 PROCESS_ARG 000532 constant entry internal dcl 106 ref 77 esb 000134 constant entry external dcl 10 expand_symbols 000143 constant entry external dcl 10 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1140 1172 1000 1150 Length 1360 1000 32 151 137 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME esb 274 external procedure is an external procedure. PROCESS_ARG internal procedure shares stack frame of external procedure esb. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME esb 000100 dir_name esb 000152 ent_name esb 000162 arg_len esb 000164 arg_ptr esb 000166 argx esb 000167 ecode esb 000170 in_len esb 000172 in_ptr esb 000174 num_args esb 000176 out_ptr esb 000200 out_len esb 000201 out_used esb 000202 temp_flag esb THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr expand_path_ speedtype_expand_ speedtype_util_$fix_output_seg speedtype_util_$init_input_seg speedtype_util_$init_output_seg THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$wrong_no_of_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000133 59 000150 60 000156 63 000163 64 000166 65 000215 68 000216 70 000220 71 000226 72 000243 74 000245 75 000301 77 000302 78 000303 79 000305 81 000307 83 000312 84 000351 86 000353 87 000403 92 000404 93 000425 95 000427 96 000457 100 000460 101 000477 104 000531 106 000532 113 000533 114 000556 116 000560 117 000617 120 000620 122 000622 124 000653 126 000705 128 000706 130 000737 132 000741 133 000771 135 000772 137 000777 ----------------------------------------------------------- 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