COMPILATION LISTING OF SEGMENT underline Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1716.9 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 underline: procedure; /* active function which returns its input args, */ 12 /* separated by blanks and underlined, as a */ 13 /* quoted string. */ 14 15 dcl /* automatic variables */ 16 Larg fixed bin, /* length of an input arg. */ 17 Lcom fixed bin, /* length of command's output string. */ 18 Lret fixed bin, /* maximum length of our return value. */ 19 Nargs fixed bin, /* number of arguments we were passed. */ 20 Parg ptr, /* ptr to an input argument. */ 21 Parg_list ptr, /* ptr to caller's argument list. */ 22 Pret ptr, /* ptr to our return value. */ 23 code fixed bin (35), /* an error code value. */ 24 i fixed bin; /* a do-group index. */ 25 26 27 dcl /* based variables */ 28 arg_array (Larg) char(1) based (Parg), 29 /* an input argument. */ 30 arg_char char(1) based (Parg), 31 /* next char of our input argument. */ 32 ret char(Lret) varying based (Pret); 33 /* overlay for portions of our return value. */ 34 35 36 dcl (addr, length, substr) builtin; 37 38 39 dcl /* entries */ 40 cu_$af_return_arg entry (fixed bin, ptr, fixed bin, fixed bin(35)), 41 cu_$arg_count entry returns (fixed bin), 42 cu_$arg_list_ptr entry returns (ptr), 43 cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin(35)), 44 cu_$arg_ptr_rel entry (fixed bin, ptr, fixed bin, fixed bin(35), ptr), 45 iox_$put_chars entry (ptr, ptr, fixed bin, fixed bin(35)); 46 47 48 dcl /* static variables */ 49 BS_UNDERSCORE char(2) aligned int static options(constant) init ("_"), 50 NL char(1) aligned int static options(constant) init (" 51 "), 52 QUOTE char(1) aligned int static options(constant) init (""""), 53 QUOTE_QUOTE char(2) aligned int static options(constant) init (""""""), 54 SPACE char(1) aligned int static options(constant) init (" "), 55 UNDERSCORE_BS char(2) aligned int static options(constant) init ("_"), 56 iox_$user_output ptr ext static; 57 58 /* * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * */ 59 60 61 call cu_$af_return_arg (Nargs, Pret, Lret, code); /* see how we were called. */ 62 if code = 0 then do; /* as an active function. */ 63 if Nargs = 0 then do; /* no input args. Return a null string. */ 64 ret = QUOTE_QUOTE; 65 return; 66 end; 67 ret = QUOTE; 68 do i = 1 to Nargs; /* add args to return string one by one. */ 69 call cu_$arg_ptr (i, Parg, Larg, code); 70 do while (Larg > 0); /* double any quotes while copying arg. */ 71 if arg_char < SPACE then 72 ret = ret || arg_char; 73 else if arg_char = SPACE then 74 ret = ret || "_"; /* convert spaces to _s. */ 75 else if arg_char = QUOTE then do; /* double quotes as we go. (""_) */ 76 ret = ret || QUOTE_QUOTE; 77 ret = ret || BS_UNDERSCORE; 78 end; 79 else if arg_char < "_" then do; 80 ret = ret || arg_char; /* canonicalize the string as we go. */ 81 ret = ret || BS_UNDERSCORE; 82 end; 83 else if arg_char > "_" then do; 84 ret = ret || UNDERSCORE_BS; 85 ret = ret || arg_char; 86 end; 87 else 88 ret = ret || "_"; 89 if Larg > 1 then Parg = addr(arg_array(2)); 90 Larg = Larg - 1; 91 end; 92 ret = ret || SPACE; /* separate args by a space in output string. */ 93 end; 94 if substr(ret,length(ret)) = SPACE then /* remove space after last argument. */ 95 ret = substr(ret,1,length(ret)-1); 96 ret = ret || QUOTE; 97 end; 98 else do; /* command merely output's its args, separated by */ 99 Nargs = cu_$arg_count(); /* blanks. */ 100 Lcom = 0; /* compute max length of output string. */ 101 do i = 1 to Nargs; 102 call cu_$arg_ptr(i, Parg, Larg, code); 103 Lcom = Lcom + Larg*3 + 1; 104 end; 105 if Nargs > 0 then do; 106 Parg_list = cu_$arg_list_ptr(); 107 begin; 108 dcl com char(Lcom) varying aligned init (""); 109 do i = 1 to Nargs; 110 call cu_$arg_ptr_rel (i, Parg, Larg, code, Parg_list); 111 do while (Larg > 0); /* no doubling of quotes needed here. */ 112 if arg_char < SPACE then 113 com = com || arg_char; 114 else if arg_char = SPACE then 115 com = com || "_"; /* convert spaces to _s. */ 116 else if arg_char < "_" then do; 117 com = com || arg_char; /* canonicalize the string as we go. */ 118 com = com || BS_UNDERSCORE; 119 end; 120 else if arg_char > "_" then do; 121 com = com || UNDERSCORE_BS; 122 com = com || arg_char; 123 end; 124 else 125 com = com || "_"; 126 if Larg > 1 then Parg = addr(arg_array(2)); 127 Larg = Larg - 1; 128 end; 129 com = com || " "; 130 end; 131 if substr(com,length(com)) = SPACE then /* remove space after last argument. */ 132 com = substr(com,1,length(com)-1); 133 call iox_$put_chars (iox_$user_output, addr(substr(com,1)), length(com), code); 134 end; 135 end; 136 call iox_$put_chars (iox_$user_output, addr(NL), 1, code); 137 end; 138 139 end underline; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1618.6 underline.pl1 >dumps>old>recomp>underline.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. BS_UNDERSCORE 000675 constant char(2) initial dcl 48 ref 77 81 118 Larg 000100 automatic fixed bin(17,0) dcl 15 set ref 69* 70 89 90* 90 102* 103 110* 111 126 127* 127 Lcom 000101 automatic fixed bin(17,0) dcl 15 set ref 100* 103* 103 108 Lret 000102 automatic fixed bin(17,0) dcl 15 set ref 61* 64 67 71 73 76 77 80 81 84 85 87 92 94 96 NL 000000 constant char(1) initial dcl 48 set ref 136 136 Nargs 000103 automatic fixed bin(17,0) dcl 15 set ref 61* 63 68 99* 101 105 109 Parg 000104 automatic pointer dcl 15 set ref 69* 71 71 73 75 79 80 83 85 89* 89 102* 110* 112 112 114 116 117 120 122 126* 126 Parg_list 000106 automatic pointer dcl 15 set ref 106* 110* Pret 000110 automatic pointer dcl 15 set ref 61* 64 67 71 71 73 73 76 76 77 77 80 80 81 81 84 84 85 85 87 87 92 92 94 94 94 94 94 96 96 QUOTE 000674 constant char(1) initial dcl 48 ref 67 75 96 QUOTE_QUOTE 000673 constant char(2) initial dcl 48 ref 64 76 SPACE 000672 constant char(1) initial dcl 48 ref 71 73 92 94 112 114 131 UNDERSCORE_BS 000671 constant char(2) initial dcl 48 ref 84 121 addr builtin function dcl 36 ref 89 126 133 133 136 136 arg_array based char(1) array unaligned dcl 27 set ref 89 126 arg_char based char(1) unaligned dcl 27 ref 71 71 73 75 79 80 83 85 112 112 114 116 117 120 122 code 000112 automatic fixed bin(35,0) dcl 15 set ref 61* 62 69* 102* 110* 133* 136* com 000100 automatic varying char initial dcl 108 set ref 108* 112* 112 114* 114 117* 117 118* 118 121* 121 122* 122 124* 124 129* 129 131 131 131* 131 131 133 133 133 133 cu_$af_return_arg 000010 constant entry external dcl 39 ref 61 cu_$arg_count 000012 constant entry external dcl 39 ref 99 cu_$arg_list_ptr 000014 constant entry external dcl 39 ref 106 cu_$arg_ptr 000016 constant entry external dcl 39 ref 69 102 cu_$arg_ptr_rel 000020 constant entry external dcl 39 ref 110 i 000113 automatic fixed bin(17,0) dcl 15 set ref 68* 69* 101* 102* 109* 110* iox_$put_chars 000022 constant entry external dcl 39 ref 133 136 iox_$user_output 000024 external static pointer dcl 48 set ref 133* 136* length builtin function dcl 36 ref 94 94 131 131 133 133 ret based varying char dcl 27 set ref 64* 67* 71* 71 73* 73 76* 76 77* 77 80* 80 81* 81 84* 84 85* 85 87* 87 92* 92 94 94 94* 94 94 96* 96 substr builtin function dcl 36 ref 94 94 131 131 133 133 NAME DECLARED BY EXPLICIT CONTEXT. underline 000004 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1002 1030 677 1012 Length 1202 677 26 136 102 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME underline 92 external procedure is an external procedure. begin block on line 107 84 begin block uses auto adjustable storage. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME begin block on line 107 000100 com begin block on line 107 underline 000100 Larg underline 000101 Lcom underline 000102 Lret underline 000103 Nargs underline 000104 Parg underline 000106 Parg_list underline 000110 Pret underline 000112 code underline 000113 i underline THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. enter_begin leave_begin call_ext_out return alloc_auto_adj ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$af_return_arg cu_$arg_count cu_$arg_list_ptr cu_$arg_ptr cu_$arg_ptr_rel iox_$put_chars THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. iox_$user_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000003 61 000011 62 000025 63 000027 64 000031 65 000042 67 000043 68 000054 69 000063 70 000100 71 000102 73 000122 75 000134 76 000136 77 000151 78 000163 79 000164 80 000166 81 000176 82 000210 83 000211 84 000213 85 000226 86 000235 87 000236 89 000246 90 000255 91 000257 92 000260 93 000270 94 000272 96 000312 97 000321 99 000322 100 000331 101 000332 102 000341 103 000356 104 000363 105 000365 106 000367 107 000376 108 000401 109 000413 110 000423 111 000442 112 000445 114 000465 116 000477 117 000501 118 000511 119 000523 120 000524 121 000526 122 000541 123 000550 124 000551 126 000561 127 000570 128 000572 129 000573 130 000603 131 000605 133 000625 134 000646 136 000647 139 000670 ----------------------------------------------------------- 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