COMPILATION LISTING OF SEGMENT expand Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1541.7 mst Mon 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 11 expand:proc; 12 13 /* This program implements the expand command and maintains the old entry point for expand 14* (pct_ex_ is the entry point used by pl1d, pl1,and eplbsa). The expand command implements 15* % include statements in pl1 and eplbsa syntax */ 16 dcl pct_entry bit(1) aligned; 17 dcl (com_err_,hcs_$initiate_count) ext entry options (variable); 18 dcl path char(168) aligned,ent char(32) aligned; 19 dcl code1 fixed bin(17),(segp,segp2) ptr, (bit_count,bit_count2) fixed bin(24); 20 dcl expand_path_ ext entry(ptr,fixed bin(17),ptr,ptr,fixed bin(17)); 21 dcl hcs_$fs_search_get_wdir ext entry(ptr,fixed bin(17)); 22 dcl hcs_$terminate_noname ext entry(ptr,fixed bin (17)); 23 dcl expand_ ext entry(char(168) aligned,char(32) aligned,ptr,fixed bin(24),ptr,fixed bin(24),fixed bin(17)); 24 dcl(code,arglen,nargs) fixed bin(17),argptr ptr,name char(arglen) based(argptr); 25 dcl cu_$arg_ptr ext entry(fixed bin(17),ptr,fixed bin(17),fixed bin(17)); 26 dcl null builtin; 27 28 pct_entry = "0"b; /* this is to keep track of whether I am a command or a subroutine */ 29 30 /* as a command , there can be more than one file to be expanded */ 31 do nargs=1 by 1; 32 33 call cu_$arg_ptr(nargs,argptr,arglen,code); 34 if code^=0 then return; /* this can only mean that there are no more arguments */ 35 36 prepare: call expand_path_(addr(name),arglen,addr(path),addr(ent),code); 37 if code^=0 38 then do; 39 ent=name; /* if there was an error in expand_path_ then I must use the oldname*/ 40 go to error; 41 end; 42 43 call hcs_$initiate_count(path,ent,"",bit_count,1,segp,code); 44 if segp = null then go to error; 45 46 call hcs_$fs_search_get_wdir(addr(path),code); 47 48 call expand_(path,ent,segp,bit_count,segp2,bit_count2,code1); 49 50 if segp2^=null /* this is the only way a fatal error by expand_ shows up */ 51 then do; /* since a pointer is passed, file is not terminated */ 52 53 call hcs_$terminate_noname(segp2,code); 54 if code ^= 0 then go to error; 55 56 end; 57 58 cont: if pct_entry then go to old_call_return; /* we cannot terminate the original file if this is a 59* subroutine call */ 60 call hcs_$terminate_noname(segp,code); 61 if code ^= 0 then go to error; 62 63 cont1: end; 64 65 pct_ex_:entry(nm,mode,val); 66 /* This entry point is used by pl1d, pl1, eplbsa(or at least it used to be) 67* nm is a relative pathname to the file to be expanded, mode is an obsolete parameter 68* that is ignored, val is the error code - it can be either 0, or 2 69* depending upon whether there has been an error or not. */ 70 dcl (nm,mode) char(*),val fixed bin(17); 71 72 /* try to make it look as if we had called cu_$arg_ptr */ 73 74 val=0; 75 argptr = addr(nm); 76 arglen = length(nm); 77 pct_entry = "1"b; /* this will keep us out of the loop for multiple arguments, above */ 78 79 go to prepare; /* enter the code for processing the command */ 80 81 old_call_return: 82 if code1 ^= 0 then val = 2; 83 84 return; 85 86 error: call com_err_(code,"expand","^a^/",ent); 87 88 if pct_entry = "1"b then do; 89 90 val = 2; 91 92 go to old_call_return; 93 94 end; 95 96 go to cont1; 97 end expand; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1455.8 expand.pl1 >dumps>old>recomp>expand.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. arglen 000173 automatic fixed bin(17,0) dcl 24 set ref 33* 36 36 36* 39 76* argptr 000176 automatic pointer dcl 24 set ref 33* 36 36 39 75* bit_count 000170 automatic fixed bin(24,0) dcl 19 set ref 43* 48* bit_count2 000171 automatic fixed bin(24,0) dcl 19 set ref 48* code 000172 automatic fixed bin(17,0) dcl 24 set ref 33* 34 36* 37 43* 46* 53* 54 60* 61 86* code1 000163 automatic fixed bin(17,0) dcl 19 set ref 48* 81 com_err_ 000010 constant entry external dcl 17 ref 86 cu_$arg_ptr 000024 constant entry external dcl 25 ref 33 ent 000153 automatic char(32) dcl 18 set ref 36 36 39* 43* 48* 86* expand_ 000022 constant entry external dcl 23 ref 48 expand_path_ 000014 constant entry external dcl 20 ref 36 hcs_$fs_search_get_wdir 000016 constant entry external dcl 21 ref 46 hcs_$initiate_count 000012 constant entry external dcl 17 ref 43 hcs_$terminate_noname 000020 constant entry external dcl 22 ref 53 60 mode parameter char unaligned dcl 70 ref 65 name based char unaligned dcl 24 set ref 36 36 39 nargs 000174 automatic fixed bin(17,0) dcl 24 set ref 31* 33* nm parameter char unaligned dcl 70 set ref 65 75 76 null builtin function dcl 26 ref 44 50 path 000101 automatic char(168) dcl 18 set ref 36 36 43* 46 46 48* pct_entry 000100 automatic bit(1) dcl 16 set ref 28* 58 77* 88 segp 000164 automatic pointer dcl 19 set ref 43* 44 48* 60* segp2 000166 automatic pointer dcl 19 set ref 48* 50 53* val parameter fixed bin(17,0) dcl 70 set ref 65 74* 81* 90* NAMES DECLARED BY EXPLICIT CONTEXT. cont 000231 constant label dcl 58 cont1 000246 constant label dcl 63 ref 96 error 000314 constant label dcl 86 ref 40 44 54 61 expand 000021 constant entry external dcl 11 old_call_return 000306 constant label dcl 81 ref 58 92 pct_ex_ 000255 constant entry external dcl 65 prepare 000050 constant label dcl 36 ref 79 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 36 36 36 36 36 36 46 46 75 length builtin function ref 76 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 466 514 354 476 Length 666 354 26 135 111 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME expand 190 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME expand 000100 pct_entry expand 000101 path expand 000153 ent expand 000163 code1 expand 000164 segp expand 000166 segp2 expand 000170 bit_count expand 000171 bit_count2 expand 000172 code expand 000173 arglen expand 000174 nargs expand 000176 argptr expand THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_ptr expand_ expand_path_ hcs_$fs_search_get_wdir hcs_$initiate_count hcs_$terminate_noname NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000020 28 000026 31 000027 33 000031 34 000046 36 000050 37 000075 39 000077 40 000104 43 000105 44 000150 46 000154 48 000167 50 000212 53 000216 54 000227 58 000231 60 000233 61 000244 63 000246 65 000250 74 000275 75 000277 76 000301 77 000303 79 000305 81 000306 84 000313 86 000314 88 000344 90 000347 92 000352 96 000353 ----------------------------------------------------------- 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