COMPILATION LISTING OF SEGMENT equal_name Compiled by: Multics PL/I Compiler, Release 33a, of May 30, 1990 Compiled at: ACTC Technologies Inc. Compiled on: 09/04/90 1202.7 mdt Tue Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1990 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(90-01-25,Vu), approve(90-01-25,MCR8153), audit(90-06-21,Huen), 17* install(90-09-04,MR12.4-1032): 18* The active function for equal_name will now return quoted string. 19* END HISTORY COMMENTS */ 20 21 22 equal_name: enm: proc; 23 /* Command level interface to equal name generation. 24* Updated to understand archive component equal names. 2/18/82 B. Margolin. 25**/ 26 27 dcl (Lequal, /* length of equal name. */ 28 Lret, /* length of af return string. */ 29 Lsource, /* length of source name. */ 30 Nargs) fixed bin, /* number of input arguments. */ 31 (Pequal, /* ptr to equal name. */ 32 Pret, /* ptr to af return string. */ 33 Psource) ptr, /* ptr to source name. */ 34 Scommand bit (1) aligned, /* on if invoked as a command. */ 35 Spath bit (1) aligned, /* equal name is a pathname not entryname */ 36 code fixed bin (35), /* error code. */ 37 equal_dir char (168), /* dir part of input equal name. */ 38 equal_ent char (32), /* ent part of input equal name. */ 39 equal_comp char (32), /* comp part of input equal name. */ 40 error entry variable options (variable), 41 get_arg entry (fixed bin, ptr, fixed bin, fixed bin (35)) variable, 42 result_name char (32), /* resulting name. */ 43 result_comp char (32), /* resulting component. */ 44 output_name char (168), /* name to output */ 45 source_dir char (168), /* dir part of input source name. */ 46 source_comp char (32), /* comp part of input source name. */ 47 source_ent char (32); /* ent part of input source name. */ 48 49 50 51 dcl equal char (Lequal) based (Pequal), 52 ret char (Lret) varying based (Pret), 53 source char (Lsource) based (Psource); 54 55 56 dcl (length, rtrim, search, substr) 57 builtin; 58 59 60 dcl (active_fnc_err_, active_fnc_err_$suppress_name, 61 com_err_, com_err_$suppress_name) 62 entry options (variable), 63 cu_$af_return_arg entry (fixed bin, ptr, fixed bin, fixed bin (35)), 64 (cu_$af_arg_ptr, 65 cu_$arg_ptr) entry (fixed bin, ptr, fixed bin, fixed bin (35)), 66 cu_$arg_count entry returns (fixed bin), 67 expand_pathname_$component entry (char(*), char(*), char(*), char(*), fixed bin(35)), 68 pathname_$component_check entry (char(*), char(*), char(*), char(*), fixed bin(35)), 69 get_equal_name_$component entry (char(*), char(*), char(*), char(*), char(32), char(32), fixed bin(35)), 70 (ioa_, ioa_$rsnnl) entry options (variable), 71 requote_string_ entry (char (*)) returns (char (*)); 72 73 /* */ 74 75 call cu_$af_return_arg (Nargs, Pret, Lret, code); 76 if code = 0 then do; 77 Scommand = "0"b; 78 error = active_fnc_err_; 79 end; 80 else do; 81 Scommand = "1"b; 82 error = com_err_; 83 Nargs = cu_$arg_count (); 84 end; 85 86 if Nargs ^= 2 then do; 87 if Scommand then call com_err_$suppress_name (0, "equal_name", "Usage: equal_name path =name"); 88 else call active_fnc_err_ (0, "equal_name", "Usage: [equal_name path =name]"); 89 return; 90 end; 91 call cu_$arg_ptr (1, Psource, Lsource, 0); 92 call cu_$arg_ptr (2, Pequal, Lequal, 0); 93 call expand_pathname_$component (source, source_dir, source_ent, source_comp, code); 94 if code ^= 0 then do; 95 call error (code, "equal_name", "^a", source); 96 return; 97 end; 98 Spath = (search (equal, "<>") ^= 0); /* Is it a full pathname? */ 99 call expand_pathname_$component (equal, equal_dir, equal_ent, equal_comp, code); 100 if code ^= 0 then do; 101 call error (code, "equal_name", "^a", equal); 102 return; 103 end; 104 call get_equal_name_$component (source_ent, source_comp, equal_ent, equal_comp, result_name, result_comp, code); 105 if code ^= 0 then do; 106 call error (code, "equal_name", "^a^[::^a^;^s^] applied to ^a^[::^a^;^s^]", 107 equal_ent, (equal_comp ^= ""), equal_comp, 108 source_ent, (source_comp ^= ""), source_comp); 109 return; 110 end; 111 if Spath then do; /* Gave pathname, wants pathname */ 112 call pathname_$component_check (equal_dir, result_name, result_comp, output_name, code); 113 if code ^= 0 then do; 114 call error (code, "equal_name", "Creating the output pathname."); 115 return; 116 end; 117 end; 118 /* Gave just an entryname */ 119 else do; 120 if result_comp = "" then output_name = result_name; /* Not an archive */ 121 else output_name = substr (result_name, 1, length (rtrim (result_name)) - 8) || "::" || result_comp; /* remove ".archive" */ 122 end; 123 124 if Scommand then 125 call ioa_ ("^a", output_name); 126 else ret = requote_string_ (rtrim (output_name)); 127 return; 128 129 end equal_name; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/04/90 1202.7 equal_name.pl1 >spec>install>1032>equal_name.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. Lequal 000100 automatic fixed bin(17,0) dcl 27 set ref 92* 98 99 99 101 101 Lret 000101 automatic fixed bin(17,0) dcl 27 set ref 75* 126 Lsource 000102 automatic fixed bin(17,0) dcl 27 set ref 91* 93 93 95 95 Nargs 000103 automatic fixed bin(17,0) dcl 27 set ref 75* 83* 86 Pequal 000104 automatic pointer dcl 27 set ref 92* 98 99 101 Pret 000106 automatic pointer dcl 27 set ref 75* 126 Psource 000110 automatic pointer dcl 27 set ref 91* 93 95 Scommand 000112 automatic bit(1) dcl 27 set ref 77* 81* 87 124 Spath 000113 automatic bit(1) dcl 27 set ref 98* 111 active_fnc_err_ 000010 constant entry external dcl 60 ref 78 88 code 000114 automatic fixed bin(35,0) dcl 27 set ref 75* 76 93* 94 95* 99* 100 101* 104* 105 106* 112* 113 114* com_err_ 000012 constant entry external dcl 60 ref 82 com_err_$suppress_name 000014 constant entry external dcl 60 ref 87 cu_$af_return_arg 000016 constant entry external dcl 60 ref 75 cu_$arg_count 000022 constant entry external dcl 60 ref 83 cu_$arg_ptr 000020 constant entry external dcl 60 ref 91 92 equal based char packed unaligned dcl 51 set ref 98 99* 101* equal_comp 000177 automatic char(32) packed unaligned dcl 27 set ref 99* 104* 106 106* equal_dir 000115 automatic char(168) packed unaligned dcl 27 set ref 99* 112* equal_ent 000167 automatic char(32) packed unaligned dcl 27 set ref 99* 104* 106* error 000210 automatic entry variable dcl 27 set ref 78* 82* 95 101 106 114 expand_pathname_$component 000024 constant entry external dcl 60 ref 93 99 get_equal_name_$component 000030 constant entry external dcl 60 ref 104 ioa_ 000032 constant entry external dcl 60 ref 124 length builtin function dcl 56 ref 121 output_name 000234 automatic char(168) packed unaligned dcl 27 set ref 112* 120* 121* 124* 126 126 pathname_$component_check 000026 constant entry external dcl 60 ref 112 requote_string_ 000034 constant entry external dcl 60 ref 126 result_comp 000224 automatic char(32) packed unaligned dcl 27 set ref 104* 112* 120 121 result_name 000214 automatic char(32) packed unaligned dcl 27 set ref 104* 112* 120 121 121 ret based varying char dcl 51 set ref 126* rtrim builtin function dcl 56 ref 121 126 126 search builtin function dcl 56 ref 98 source based char packed unaligned dcl 51 set ref 93* 95* source_comp 000360 automatic char(32) packed unaligned dcl 27 set ref 93* 104* 106 106* source_dir 000306 automatic char(168) packed unaligned dcl 27 set ref 93* source_ent 000370 automatic char(32) packed unaligned dcl 27 set ref 93* 104* 106* substr builtin function dcl 56 ref 121 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. active_fnc_err_$suppress_name 000000 constant entry external dcl 60 cu_$af_arg_ptr 000000 constant entry external dcl 60 get_arg automatic entry variable dcl 27 ioa_$rsnnl 000000 constant entry external dcl 60 NAMES DECLARED BY EXPLICIT CONTEXT. enm 000063 constant entry external dcl 22 equal_name 000072 constant entry external dcl 22 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1434 1472 1265 1444 Length 1654 1265 36 146 147 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME enm 387 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME enm 000100 Lequal enm 000101 Lret enm 000102 Lsource enm 000103 Nargs enm 000104 Pequal enm 000106 Pret enm 000110 Psource enm 000112 Scommand enm 000113 Spath enm 000114 code enm 000115 equal_dir enm 000167 equal_ent enm 000177 equal_comp enm 000210 error enm 000214 result_name enm 000224 result_comp enm 000234 output_name enm 000306 source_dir enm 000360 source_comp enm 000370 source_ent enm THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_ne_as alloc_char_temp cat_realloc_chars call_ent_var_desc call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. active_fnc_err_ com_err_ com_err_$suppress_name cu_$af_return_arg cu_$arg_count cu_$arg_ptr expand_pathname_$component get_equal_name_$component ioa_ pathname_$component_check requote_string_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000062 75 000077 76 000113 77 000115 78 000116 79 000123 81 000124 82 000126 83 000133 86 000141 87 000144 88 000201 89 000233 91 000234 92 000254 93 000274 94 000327 95 000331 96 000367 98 000370 99 000405 100 000440 101 000442 102 000500 104 000501 105 000535 106 000537 109 000625 111 000626 112 000630 113 000657 114 000661 115 000711 117 000712 120 000713 121 000723 122 000762 124 000763 126 001005 127 001057 ----------------------------------------------------------- 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