COMPILATION LISTING OF SEGMENT display_entry_point_dcl Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 05/01/86 0808.2 mst Thu 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 12 13 14 /****^ HISTORY COMMENTS: 15* 1) change(84-12-30,Ranzenbach), approve(86-03-12,MCR7144), 16* audit(86-03-12,GWMay), install(86-05-01,MR12.0-1051): 17* Added support for archive pathnames and ability to requote declaration 18* for active functions (phx11853, phx12764). 19* END HISTORY COMMENTS */ 20 21 22 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 23 /* */ 24 /* Name: display_entry_point_dcl */ 25 /* */ 26 /* This command/af displays the calling sequence of a PL/I procedure entry point as a */ 27 /* PL/I declare statement. It also displays the PL/I declare statement for error_table_ */ 28 /* code (but not for codes in non-system error tables). */ 29 /* */ 30 /* Status */ 31 /* */ 32 /* 0) Created in May, 1979 by G. C. Dixon */ 33 /* 1) Modified in January, 1981 by G. C. Dixon - (1) remove dir part of pathname from */ 34 /* entry point name display in declaration; (2) for command output, if */ 35 /* get_line_length_ returns nonzero code, don't break declaration at all */ 36 /* (probably file_output). */ 37 /* */ 38 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 39 40 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/ 41 42 43 display_entry_point_dcl: 44 depd: procedure options(variable); 45 46 dcl Larg fixed bin, 47 Parg ptr, 48 arg char(Larg) based(Parg); 49 50 dcl Lret fixed bin(21), 51 Pret ptr, 52 ret char (Lret) varying based(Pret); 53 54 dcl Nargs fixed bin, 55 Saf bit(1), 56 cleanup condition, 57 code fixed bin(35), 58 (dcl_style, line_length) fixed bin, 59 ent char(289) varying, /* 32 char ref_name + 256 char ep_name + $ */ 60 type char(32) varying; 61 62 dcl (active_fnc_err_, 63 com_err_, 64 err variable) 65 entry options(variable), 66 (arg_ptr variable, 67 cu_$af_arg_ptr, 68 cu_$arg_ptr) entry (fixed bin, ptr, fixed bin, fixed bin(35)), 69 cu_$af_return_arg entry (fixed bin, ptr, fixed bin(21), fixed bin(35)), 70 get_entry_point_dcl_ entry (char(*), fixed bin, fixed bin, char(*) var, char(32) var, 71 fixed bin(35)), 72 get_line_length_$switch entry (ptr, fixed bin(35)) returns(fixed bin), 73 (get_temp_segment_, 74 release_temp_segment_) entry (char(*), ptr, fixed bin(35)), 75 requote_string_ entry (char(*)) returns(char(*)), 76 iox_$put_chars entry (ptr, ptr, fixed bin(21), fixed bin(35)), 77 iox_$user_output ptr external static; 78 79 dcl (addr, before, length, null, reverse, substr) 80 builtin; 81 82 dcl (FALSE init("0"b), 83 TRUE init("1"b)) bit(1) int static options(constant), 84 NL char(1) int static options(constant) init(" 85 "), 86 error_table_$wrong_no_of_args fixed bin(35) ext static, 87 sys_info$max_seg_size fixed bin(35) ext static; 88 89 90 call cu_$af_return_arg (Nargs, Pret, Lret, code); 91 if code = 0 then do; 92 ret = ""; 93 err = active_fnc_err_; 94 arg_ptr = cu_$af_arg_ptr; 95 dcl_style = 0; 96 line_length = 0; 97 Saf = TRUE; 98 end; 99 else do; 100 err = com_err_; 101 arg_ptr = cu_$arg_ptr; 102 Pret = null; 103 on cleanup begin; 104 if Pret ^= null then 105 call release_temp_segment_ ("display_entry_point_dcl", Pret, code); 106 end; 107 call get_temp_segment_ ("display_entry_point_dcl", Pret, code); 108 if code ^= 0 then go to bad_temp_seg; 109 Lret = (sys_info$max_seg_size-1) * 4; 110 ret = ""; 111 Saf = FALSE; 112 dcl_style = 1; 113 line_length = get_line_length_$switch (iox_$user_output, code); 114 if code ^= 0 then do; /* If no line length given in current mode string,*/ 115 line_length = 0; /* probably file_output, so don't break dcl. */ 116 dcl_style = 0; 117 end; 118 end; 119 120 if Nargs ^= 1 then go to WNOA; 121 call arg_ptr (1, Parg, Larg, code); 122 123 call get_entry_point_dcl_ (arg, dcl_style, line_length, ret, type, code); 124 if code ^= 0 then go to BAD_ARG; 125 126 ent = before (reverse(arg), ">"); /* Remove any dir part of pathname from arg. */ 127 ent = before (ent, "::"); /* and archive name... */ 128 ent = reverse(ent); 129 if dcl_style = 0 then 130 ret = "dcl " || ent || " " || ret || ";"; 131 else ret = "dcl " || ent || ret || ";"; 132 133 if ^Saf then do; 134 ret = ret || NL; 135 call iox_$put_chars (iox_$user_output, addr(substr(ret,1)), length(ret), code); 136 end; 137 else ret = requote_string_ ((ret)); /* requote for active functions... */ 138 139 RETURN: if ^Saf then 140 if Pret ^= null then 141 call release_temp_segment_ ("display_entry_point_dcl", Pret, code); 142 return; 143 144 145 WNOA: call err (error_table_$wrong_no_of_args, "display_entry_point_dcl", " 146 Usage: ^[[^]display_entry_point_dcl entryname^[]^]", Saf, Saf); 147 go to RETURN; 148 149 BAD_ARG: call err (code, "display_entry_point_dcl", arg); 150 go to RETURN; 151 152 bad_temp_seg: 153 call err (code, "display_entry_point_dcl", "^/While obtaining temp segment."); 154 return; 155 156 end display_entry_point_dcl; 157 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/01/86 0808.2 display_entry_point_dcl.pl1 >spec>install>1051>display_entry_point_dcl.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. FALSE constant bit(1) initial unaligned dcl 82 ref 111 Larg 000100 automatic fixed bin(17,0) dcl 46 set ref 121* 123 123 126 149 149 Lret 000104 automatic fixed bin(21,0) dcl 50 set ref 90* 92 109* 110 123 129 131 134 137 NL 001056 constant char(1) initial unaligned dcl 82 ref 134 Nargs 000110 automatic fixed bin(17,0) dcl 54 set ref 90* 120 Parg 000102 automatic pointer dcl 46 set ref 121* 123 126 149 Pret 000106 automatic pointer dcl 50 set ref 90* 92 102* 104 104* 107* 110 123 129 129 131 131 134 134 135 135 135 135 137 137 139 139* Saf 000111 automatic bit(1) unaligned dcl 54 set ref 97* 111* 133 139 145* 145* TRUE constant bit(1) initial unaligned dcl 82 ref 97 active_fnc_err_ 000010 constant entry external dcl 62 ref 93 addr builtin function dcl 79 ref 135 135 arg based char unaligned dcl 46 set ref 123* 126 149* arg_ptr 000252 automatic entry variable dcl 62 set ref 94* 101* 121 before builtin function dcl 79 ref 126 127 cleanup 000112 stack reference condition dcl 54 ref 103 code 000120 automatic fixed bin(35,0) dcl 54 set ref 90* 91 104* 107* 108 113* 114 121* 123* 124 135* 139* 149* 152* com_err_ 000012 constant entry external dcl 62 ref 100 cu_$af_arg_ptr 000014 constant entry external dcl 62 ref 94 cu_$af_return_arg 000020 constant entry external dcl 62 ref 90 cu_$arg_ptr 000016 constant entry external dcl 62 ref 101 dcl_style 000121 automatic fixed bin(17,0) dcl 54 set ref 95* 112* 116* 123* 129 ent 000123 automatic varying char(289) dcl 54 set ref 126* 127* 127 128* 128 129 131 err 000246 automatic entry variable dcl 62 set ref 93* 100* 145 149 152 error_table_$wrong_no_of_args 000040 external static fixed bin(35,0) dcl 82 set ref 145* get_entry_point_dcl_ 000022 constant entry external dcl 62 ref 123 get_line_length_$switch 000024 constant entry external dcl 62 ref 113 get_temp_segment_ 000026 constant entry external dcl 62 ref 107 iox_$put_chars 000034 constant entry external dcl 62 ref 135 iox_$user_output 000036 external static pointer dcl 62 set ref 113* 135* length builtin function dcl 79 ref 135 135 line_length 000122 automatic fixed bin(17,0) dcl 54 set ref 96* 113* 115* 123* null builtin function dcl 79 ref 102 104 139 release_temp_segment_ 000030 constant entry external dcl 62 ref 104 139 requote_string_ 000032 constant entry external dcl 62 ref 137 ret based varying char dcl 50 set ref 92* 110* 123* 129* 129 131* 131 134* 134 135 135 135 135 137* 137 reverse builtin function dcl 79 ref 126 128 substr builtin function dcl 79 ref 135 135 sys_info$max_seg_size 000042 external static fixed bin(35,0) dcl 82 ref 109 type 000235 automatic varying char(32) dcl 54 set ref 123* NAMES DECLARED BY EXPLICIT CONTEXT. BAD_ARG 000766 constant label dcl 149 ref 124 RETURN 000665 constant label dcl 139 ref 147 150 WNOA 000725 constant label dcl 145 set ref 120 bad_temp_seg 001020 constant label dcl 152 ref 108 depd 000057 constant entry external dcl 43 display_entry_point_dcl 000066 constant entry external dcl 43 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1302 1346 1061 1312 Length 1546 1061 44 164 221 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME depd 230 external procedure is an external procedure. on unit on line 103 84 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME depd 000100 Larg depd 000102 Parg depd 000104 Lret depd 000106 Pret depd 000110 Nargs depd 000111 Saf depd 000120 code depd 000121 dcl_style depd 000122 line_length depd 000123 ent depd 000235 type depd 000246 err depd 000252 arg_ptr depd THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_var_desc call_var call_ext_out_desc call_ext_out return mpfx2 enable shorten_stack ext_entry int_entry reverse_cs set_cs_eis THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. active_fnc_err_ com_err_ cu_$af_arg_ptr cu_$af_return_arg cu_$arg_ptr get_entry_point_dcl_ get_line_length_$switch get_temp_segment_ iox_$put_chars release_temp_segment_ requote_string_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$wrong_no_of_args iox_$user_output sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 43 000056 90 000073 91 000107 92 000111 93 000112 94 000117 95 000122 96 000123 97 000124 98 000126 100 000127 101 000134 102 000137 103 000141 104 000155 106 000210 107 000211 108 000240 109 000242 110 000255 111 000256 112 000260 113 000262 114 000274 115 000276 116 000277 120 000300 121 000303 123 000321 124 000364 126 000366 127 000410 128 000425 129 000441 131 000521 133 000566 134 000572 135 000601 136 000622 137 000623 139 000665 142 000724 145 000725 147 000765 149 000766 150 001017 152 001020 154 001051 ----------------------------------------------------------- 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