COMPILATION LISTING OF SEGMENT value_defined Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1715.0 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 value_defined: vdf: proc; 12 13 /* Written 11/17/80 by S. Herbst */ 14 15 dcl arg char (arg_len) based (arg_ptr); 16 dcl return_arg char (return_len) varying based (return_ptr); 17 18 dcl name char (name_len) based (name_ptr); 19 20 dcl (seg_dn, seg_path) char (168); 21 dcl seg_en char (32); 22 dcl ME char (32) int static options (constant) init ("value"); 23 24 dcl call_switches bit (36) aligned; 25 dcl (af_sw, defined_sw, got_name_sw, path_sw) bit (1); 26 27 dcl (arg_ptr, name_ptr, return_ptr, seg_ptr) ptr; 28 29 dcl (arg_len, name_len, return_len) fixed (21); 30 dcl (arg_count, i) fixed; 31 dcl (code, code1) fixed (35); 32 33 dcl error_table_$badopt fixed (35) ext; 34 dcl error_table_$not_act_fnc fixed (35) ext; 35 dcl error_table_$oldnamerr fixed (35) ext; 36 37 dcl complain entry variable options (variable); 38 39 dcl (active_fnc_err_, active_fnc_err_$suppress_name) entry options (variable); 40 dcl (com_err_, com_err_$suppress_name) entry options (variable); 41 dcl cu_$af_return_arg entry (fixed, ptr, fixed (21), fixed (35)); 42 dcl cu_$arg_ptr entry (fixed, ptr, fixed (21), fixed (35)); 43 dcl expand_pathname_$add_suffix entry (char (*), char (*), char (*), char (*), fixed (35)); 44 dcl hcs_$initiate entry (char (*), char (*), char (*), fixed (1), fixed (2), ptr, fixed (35)); 45 dcl ioa_ entry options (variable); 46 dcl value_$defined entry (ptr, bit (36) aligned, char (*), fixed (35)) returns (bit (1)); 47 dcl value_$get_path entry (char (*), fixed (35)); 48 49 dcl (index, null, substr) builtin; 50 51 call cu_$af_return_arg (arg_count, return_ptr, return_len, code); 52 if code = error_table_$not_act_fnc then do; 53 af_sw = "0"b; 54 complain = com_err_; 55 end; 56 else do; 57 af_sw = "1"b; 58 complain = active_fnc_err_; 59 end; 60 61 got_name_sw, path_sw = "0"b; 62 call_switches = "0"b; 63 64 do i = 1 to arg_count; 65 66 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 67 68 if index (arg, "-") = 1 then 69 70 if arg = "-name" | arg = "-nm" then do; 71 i = i + 1; 72 if i > arg_count then do; 73 call complain (0, ME, "No value specified for -name."); 74 return; 75 end; 76 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 77 got_name_sw = "1"b; 78 name_ptr = arg_ptr; 79 name_len = arg_len; 80 end; 81 82 else if arg = "-pathname" | arg = "-pn" then do; 83 i = i + 1; 84 if i > arg_count then do; 85 call complain (0, ME, "No value specified for -pathname."); 86 return; 87 end; 88 call cu_$arg_ptr (i, arg_ptr, arg_len, code); 89 call expand_pathname_$add_suffix (arg, "value", seg_dn, seg_en, code); 90 if code ^= 0 then do; 91 call complain (code, ME, "^a", arg); 92 return; 93 end; 94 path_sw = "1"b; 95 end; 96 97 else if arg = "-permanent" | arg = "-perm" then substr (call_switches, 2, 1) = "1"b; 98 99 else if arg = "-perprocess" | arg = "-pp" then substr (call_switches, 1, 1) = "1"b; 100 101 else do; 102 call complain (error_table_$badopt, ME, "^a", arg); 103 return; 104 end; 105 106 else if got_name_sw then do; 107 USAGE: if af_sw then call active_fnc_err_$suppress_name (0, ME, 108 "Usage: [value_defined name {-control_args}]"); 109 else call com_err_$suppress_name (0, ME, "Usage: value_defined name {-control_args}"); 110 return; 111 end; 112 113 else do; 114 got_name_sw = "1"b; 115 name_ptr = arg_ptr; 116 name_len = arg_len; 117 end; 118 end; 119 120 if ^got_name_sw then go to USAGE; 121 122 if substr (call_switches, 1, 2) = "00"b then substr (call_switches, 1, 2) = "11"b; /* default is both */ 123 124 if path_sw then do; 125 call hcs_$initiate (seg_dn, seg_en, "", 0, 0, seg_ptr, code); 126 if seg_ptr = null then do; 127 call complain (code, ME, "Value segment ^a^[>^]^a", seg_dn, seg_dn ^= ">", seg_en); 128 return; 129 end; 130 end; 131 else seg_ptr = null; /* default: user's default seg if -perm */ 132 133 /* Do the work */ 134 135 defined_sw = value_$defined (seg_ptr, call_switches, name, code); 136 137 if code ^= 0 then do; 138 if code = error_table_$oldnamerr then call complain (code, ME, "^a", name); 139 else if seg_ptr = null then do; 140 call value_$get_path (seg_path, code1); 141 if code1 ^= 0 then seg_path = ""; 142 call complain (code, ME, "Default value segment ^a", seg_path); 143 end; 144 else call complain (code, ME, "Value segment ^a^[>^]^a", seg_dn, seg_dn ^= ">", seg_en); 145 return; 146 end; 147 148 if af_sw then 149 if defined_sw then return_arg = "true"; 150 else return_arg = "false"; 151 152 else call ioa_ ("^[true^;false^]", defined_sw); 153 154 return; 155 156 end value_defined; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1618.1 value_defined.pl1 >dumps>old>recomp>value_defined.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. ME 000000 constant char(32) initial unaligned dcl 22 set ref 73* 85* 91* 102* 107* 109* 127* 138* 142* 144* active_fnc_err_ 000016 constant entry external dcl 39 ref 58 active_fnc_err_$suppress_name 000020 constant entry external dcl 39 ref 107 af_sw 000235 automatic bit(1) unaligned dcl 25 set ref 53* 57* 107 148 arg based char unaligned dcl 15 set ref 68 68 68 82 82 89* 91* 97 97 99 99 102* arg_count 000255 automatic fixed bin(17,0) dcl 30 set ref 51* 64 72 84 arg_len 000252 automatic fixed bin(21,0) dcl 29 set ref 66* 68 68 68 76* 79 82 82 88* 89 89 91 91 97 97 99 99 102 102 116 arg_ptr 000242 automatic pointer dcl 27 set ref 66* 68 68 68 76* 78 82 82 88* 89 91 97 97 99 99 102 115 call_switches 000234 automatic bit(36) dcl 24 set ref 62* 97* 99* 122 122* 135* code 000257 automatic fixed bin(35,0) dcl 31 set ref 51* 52 66* 76* 88* 89* 90 91* 125* 127* 135* 137 138 138* 142* 144* code1 000260 automatic fixed bin(35,0) dcl 31 set ref 140* 141 com_err_ 000022 constant entry external dcl 40 ref 54 com_err_$suppress_name 000024 constant entry external dcl 40 ref 109 complain 000262 automatic entry variable dcl 37 set ref 54* 58* 73 85 91 102 127 138 142 144 cu_$af_return_arg 000026 constant entry external dcl 41 ref 51 cu_$arg_ptr 000030 constant entry external dcl 42 ref 66 76 88 defined_sw 000236 automatic bit(1) unaligned dcl 25 set ref 135* 148 152* error_table_$badopt 000010 external static fixed bin(35,0) dcl 33 set ref 102* error_table_$not_act_fnc 000012 external static fixed bin(35,0) dcl 34 ref 52 error_table_$oldnamerr 000014 external static fixed bin(35,0) dcl 35 ref 138 expand_pathname_$add_suffix 000032 constant entry external dcl 43 ref 89 got_name_sw 000237 automatic bit(1) unaligned dcl 25 set ref 61* 77* 106 114* 120 hcs_$initiate 000034 constant entry external dcl 44 ref 125 i 000256 automatic fixed bin(17,0) dcl 30 set ref 64* 66* 71* 71 72 76* 83* 83 84 88* index builtin function dcl 49 ref 68 ioa_ 000036 constant entry external dcl 45 ref 152 name based char unaligned dcl 18 set ref 135* 138* name_len 000253 automatic fixed bin(21,0) dcl 29 set ref 79* 116* 135 135 138 138 name_ptr 000244 automatic pointer dcl 27 set ref 78* 115* 135 138 null builtin function dcl 49 ref 126 131 139 path_sw 000240 automatic bit(1) unaligned dcl 25 set ref 61* 94* 124 return_arg based varying char dcl 16 set ref 148* 150* return_len 000254 automatic fixed bin(21,0) dcl 29 set ref 51* 148 150 return_ptr 000246 automatic pointer dcl 27 set ref 51* 148 150 seg_dn 000100 automatic char(168) unaligned dcl 20 set ref 89* 125* 127* 127 144* 144 seg_en 000224 automatic char(32) unaligned dcl 21 set ref 89* 125* 127* 144* seg_path 000152 automatic char(168) unaligned dcl 20 set ref 140* 141* 142* seg_ptr 000250 automatic pointer dcl 27 set ref 125* 126 131* 135* 139 substr builtin function dcl 49 set ref 97* 99* 122 122* value_$defined 000040 constant entry external dcl 46 ref 135 value_$get_path 000042 constant entry external dcl 47 ref 140 NAMES DECLARED BY EXPLICIT CONTEXT. USAGE 000614 constant label dcl 107 ref 120 value_defined 000164 constant entry external dcl 11 vdf 000155 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 1514 1560 1325 1524 Length 1750 1325 44 154 167 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME vdf 266 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME vdf 000100 seg_dn vdf 000152 seg_path vdf 000224 seg_en vdf 000234 call_switches vdf 000235 af_sw vdf 000236 defined_sw vdf 000237 got_name_sw vdf 000240 path_sw vdf 000242 arg_ptr vdf 000244 name_ptr vdf 000246 return_ptr vdf 000250 seg_ptr vdf 000252 arg_len vdf 000253 name_len vdf 000254 return_len vdf 000255 arg_count vdf 000256 i vdf 000257 code vdf 000260 code1 vdf 000262 complain vdf THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_ne_as call_var_desc call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. active_fnc_err_ active_fnc_err_$suppress_name com_err_ com_err_$suppress_name cu_$af_return_arg cu_$arg_ptr expand_pathname_$add_suffix hcs_$initiate ioa_ value_$defined value_$get_path THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$not_act_fnc error_table_$oldnamerr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000154 51 000171 52 000205 53 000211 54 000212 55 000216 57 000217 58 000221 61 000225 62 000227 64 000230 66 000237 68 000254 71 000300 72 000301 73 000304 74 000330 76 000331 77 000346 78 000350 79 000352 80 000354 82 000355 83 000365 84 000366 85 000371 86 000415 88 000416 89 000433 90 000471 91 000473 92 000524 94 000525 95 000527 97 000530 99 000543 102 000556 103 000610 104 000611 106 000612 107 000614 109 000644 110 000671 114 000672 115 000674 116 000675 118 000677 120 000701 122 000703 124 000710 125 000712 126 000755 127 000761 128 001024 130 001025 131 001026 135 001030 137 001064 138 001066 139 001123 140 001127 141 001143 142 001150 143 001177 144 001200 145 001243 148 001244 150 001263 152 001275 154 001320 ----------------------------------------------------------- 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