COMPILATION LISTING OF SEGMENT get_mode Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-05-05_1830.95_Fri_mdt 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 get_mode: procedure options (variable); /* COMMAND AF */ 12 13 /* A Command/AF to extract a mode value from a mode string 14* James R. Davis Oct 80 MCR 4712 15**/ 16 /* Sept 1983 C Spitzer. Change to arg processing such that if 2nd arg is 17* missing, the AF return arg is not used.*/ 18 19 dcl mode_str char (mode_str_len) based (mode_str_ptr); 20 dcl mode_str_len fixed bin (21); 21 dcl mode_str_ptr ptr; 22 23 dcl mode_name char (mode_name_len) based (mode_name_ptr); 24 dcl mode_name_len fixed bin (21); 25 dcl mode_name_ptr ptr; 26 27 dcl af_result char (afl) varying based (afp); 28 dcl afl fixed bin (21); 29 dcl afp ptr; 30 31 dcl 1 mv aligned like mode_value; 32 33 dcl nargs fixed bin, 34 code fixed bin (35), 35 active bit (1) aligned, 36 result char (66); 37 38 dcl complainer entry variable options (variable); 39 40 dcl myname char (32) internal static init ("get_mode") options (constant); 41 42 dcl mode_string_$get_mode entry (char (*), char (*), ptr, fixed bin (35)); 43 44 dcl requote_string_ entry (char (*)) returns (char (*)); 45 46 dcl active_fnc_err_ entry () options (variable); 47 dcl com_err_ entry () options (variable); 48 dcl ioa_ entry () options (variable); 49 50 dcl cu_$af_return_arg entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 51 52 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 53 54 dcl error_table_$not_act_fnc fixed bin (35) external static; 55 dcl error_table_$too_many_args fixed bin (35) external static; 56 dcl error_table_$noarg fixed bin(35) ext static; 57 58 dcl addr builtin; 59 60 complainer = com_err_; /* default */ 61 active = "0"b; 62 call cu_$af_return_arg (nargs, afp, afl, code); 63 if code = 0 then do; 64 active = "1"b; 65 af_result = ""; 66 complainer = active_fnc_err_; 67 end; 68 else if code = error_table_$not_act_fnc then 69 code = 0; 70 else goto USAGE; 71 72 if nargs > 2 then do; 73 code = error_table_$too_many_args; 74 goto USAGE; 75 end; 76 else if active & nargs < 2 then do; 77 code = error_table_$noarg; 78 goto USAGE; 79 end; 80 81 call cu_$arg_ptr (1, mode_str_ptr, mode_str_len, code); 82 if code ^= 0 then goto USAGE; 83 call cu_$arg_ptr (2, mode_name_ptr, mode_name_len, code); 84 if code ^= 0 then goto USAGE; 85 86 mv.version = mode_value_version_3; 87 88 call mode_string_$get_mode (mode_str, mode_name, addr (mv), code); 89 if code ^= 0 then do; 90 call complainer (code, myname, "^a in ^a", mode_name, mode_str); 91 return; 92 end; 93 94 if mv.boolean_valuep 95 then if mv.boolean_value 96 then result = "true"; 97 else result = "false"; 98 else if mv.numeric_valuep 99 then result = mv.char_value; 100 else result = requote_string_ ((mv.char_value)); 101 102 if active then af_result = result; 103 else call ioa_ ("^a", result); 104 return; 105 106 USAGE: call complainer (code, myname, 107 "Usage: ^[[^]^a MODE-STR MODE-NAME^[]^]", 108 active, myname, active); 109 return; 110 1 1 /* BEGIN INCLUDE FILE mode_string_info.incl.pl1 */ 1 2 1 3 /* Structure for parse_mode_string_ JRDavis 20 October 1980 1 4* Last modified 12 January 1981 by J. Spencer Love for version 2, make char_value varying string */ 1 5 1 6 declare mode_value_ptr ptr, 1 7 number_of_modes fixed bin; 1 8 1 9 declare 1 mode_string_info aligned based (mode_string_info_ptr), 1 10 2 version fixed bin, 1 11 2 number fixed bin, 1 12 2 modes (number_of_modes refer (mode_string_info.number)) like mode_value; 1 13 1 14 declare mode_string_info_ptr ptr; 1 15 1 16 declare 1 mode_value aligned based (mode_value_ptr), 1 17 2 version fixed bin, 1 18 2 mode_name char (32) unaligned, 1 19 2 flags, 1 20 3 boolean_valuep bit (1) unaligned, 1 21 3 numeric_valuep bit (1) unaligned, 1 22 3 char_valuep bit (1) unaligned, 1 23 3 boolean_value bit (1) unaligned, 1 24 3 pad1 bit (32) unaligned, 1 25 2 numeric_value fixed bin (35), 1 26 2 char_value char (32) varying, 1 27 2 code fixed bin (35), 1 28 2 pad2 bit (36); 1 29 1 30 declare mode_string_info_version_2 fixed bin static options (constant) initial (2), 1 31 mode_value_version_3 fixed bin static options (constant) initial (3); 1 32 1 33 /* END INCLUDE FILE mode_string_info.incl.pl1 */ 111 112 end get_mode; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/05/00 1830.9 get_mode.pl1 >udd>sm>ds>w>ml>get_mode.pl1 111 1 03/19/81 1306.8 mode_string_info.incl.pl1 >ldd>incl>mode_string_info.incl.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. active 000144 automatic bit(1) dcl 33 set ref 61* 64* 76 102 106* 106* active_fnc_err_ 000014 constant entry external dcl 46 ref 66 addr builtin function dcl 58 ref 88 88 af_result based varying char dcl 27 set ref 65* 102* afl 000110 automatic fixed bin(21,0) dcl 28 set ref 62* 65 102 afp 000112 automatic pointer dcl 29 set ref 62* 65 102 boolean_value 11(03) 000114 automatic bit(1) level 3 packed packed unaligned dcl 31 set ref 94 boolean_valuep 11 000114 automatic bit(1) level 3 packed packed unaligned dcl 31 set ref 94 char_value 13 000114 automatic varying char(32) level 2 dcl 31 set ref 98 100 code 000143 automatic fixed bin(35,0) dcl 33 set ref 62* 63 68 68* 73* 77* 81* 82 83* 84 88* 89 90* 106* com_err_ 000016 constant entry external dcl 47 ref 60 complainer 000166 automatic entry variable dcl 38 set ref 60* 66* 90 106 cu_$af_return_arg 000022 constant entry external dcl 50 ref 62 cu_$arg_ptr 000024 constant entry external dcl 52 ref 81 83 error_table_$noarg 000032 external static fixed bin(35,0) dcl 56 ref 77 error_table_$not_act_fnc 000026 external static fixed bin(35,0) dcl 54 ref 68 error_table_$too_many_args 000030 external static fixed bin(35,0) dcl 55 ref 73 flags 11 000114 automatic structure level 2 dcl 31 ioa_ 000020 constant entry external dcl 48 ref 103 mode_name based char packed unaligned dcl 23 set ref 88* 90* mode_name_len 000104 automatic fixed bin(21,0) dcl 24 set ref 83* 88 88 90 90 mode_name_ptr 000106 automatic pointer dcl 25 set ref 83* 88 90 mode_str based char packed unaligned dcl 19 set ref 88* 90* mode_str_len 000100 automatic fixed bin(21,0) dcl 20 set ref 81* 88 88 90 90 mode_str_ptr 000102 automatic pointer dcl 21 set ref 81* 88 90 mode_string_$get_mode 000010 constant entry external dcl 42 ref 88 mode_value based structure level 1 dcl 1-16 mode_value_version_3 constant fixed bin(17,0) initial dcl 1-30 ref 86 mv 000114 automatic structure level 1 dcl 31 set ref 88 88 myname 000000 constant char(32) initial packed unaligned dcl 40 set ref 90* 106* 106* nargs 000142 automatic fixed bin(17,0) dcl 33 set ref 62* 72 76 numeric_valuep 11(01) 000114 automatic bit(1) level 3 packed packed unaligned dcl 31 set ref 98 requote_string_ 000012 constant entry external dcl 44 ref 100 result 000145 automatic char(66) packed unaligned dcl 33 set ref 94* 97* 98* 100* 102 103* version 000114 automatic fixed bin(17,0) level 2 dcl 31 set ref 86* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. mode_string_info based structure level 1 dcl 1-9 mode_string_info_ptr automatic pointer dcl 1-14 mode_string_info_version_2 internal static fixed bin(17,0) initial dcl 1-30 mode_value_ptr automatic pointer dcl 1-6 number_of_modes automatic fixed bin(17,0) dcl 1-6 NAMES DECLARED BY EXPLICIT CONTEXT. USAGE 000412 constant label dcl 106 ref 68 74 78 82 84 get_mode 000043 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 602 636 452 612 Length 1026 452 34 154 127 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_mode 208 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_mode 000100 mode_str_len get_mode 000102 mode_str_ptr get_mode 000104 mode_name_len get_mode 000106 mode_name_ptr get_mode 000110 afl get_mode 000112 afp get_mode 000114 mv get_mode 000142 nargs get_mode 000143 code get_mode 000144 active get_mode 000145 result get_mode 000166 complainer get_mode THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp 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_ cu_$af_return_arg cu_$arg_ptr ioa_ mode_string_$get_mode requote_string_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noarg error_table_$not_act_fnc error_table_$too_many_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000042 60 000050 61 000054 62 000055 63 000071 64 000073 65 000075 66 000076 67 000103 68 000104 72 000110 73 000113 74 000115 76 000116 77 000123 78 000125 81 000126 82 000144 83 000146 84 000165 86 000167 88 000171 89 000226 90 000230 91 000270 94 000271 97 000303 98 000307 100 000317 102 000354 103 000372 104 000411 106 000412 109 000447 ----------------------------------------------------------- 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