COMPILATION LISTING OF SEGMENT fc_menu_value_seg_man Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-17_1932.89_Mon_mdt Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* 7* FORTRAN/COBOL menu interface value segment manipulation routines 8**/ 9 /* Written April 1982 by Chris Jones */ 10 /* format: style4,delnl,insnl,indattr,ifthen,declareind10,dclind10 */ 11 fc_menu_value_seg_man: 12 proc; 13 14 signal condition (bad_call_); /* not a true entrypoint */ 15 return; 16 17 /* Parameters */ 18 19 dcl p_code fixed bin (35) parameter; /* (Output) status code */ 20 dcl p_count fixed bin (35) parameter; /* (Output) number of names matching p_match_string */ 21 dcl p_create_seg fixed bin parameter; /* (Input) whether or not to create the value seg */ 22 dcl p_dir_name char (*) parameter; /* (Input) directory in which the value segment lives */ 23 dcl p_entry_name char (*) parameter; /* (Input) entry name of the value segment */ 24 dcl p_match_string char (*) parameter; /* (Input) star name used to match menu names */ 25 dcl p_menu_id fixed bin (35) parameter; /* (Output) how a menu is identified */ 26 dcl p_menu_name char (*) parameter; /* (Input) name of the menu being stored or retrieved */ 27 dcl p_names (*) char (*) parameter; /* (Output) names which match p_match_string */ 28 29 /* Automatic storage */ 30 31 dcl menu_id_ptr ptr; /* used to redefine p_menu_id */ 32 dcl menu_ptr ptr; /* used in calls to the menu_ subroutines */ 33 34 /* Based variables */ 35 36 dcl packed_menu_ptr ptr unal based (menu_id_ptr); 37 /* overlays the fixed bin (35) which is the menu_id */ 38 39 /* External entries and variables */ 40 41 dcl error_table_$bad_arg fixed bin (35) ext static; 42 dcl error_table_$out_of_sequence 43 fixed bin (35) ext static; 44 dcl error_table_$smallarg fixed bin (35) ext static; 45 46 dcl fc_menu_data_$initialized 47 bit (1) aligned external static; 48 49 dcl fc_menu_create$add_to_menu_array 50 entry (ptr); 51 52 /* Conditions and builtins */ 53 54 dcl (bad_call_) condition; 55 56 dcl (addr, dim, lbound, min, null, substr) 57 builtin; 58 59 /* Entry to store a menu object in a value segment. */ 60 61 store: 62 entry (p_dir_name, p_entry_name, p_menu_name, p_create_seg, p_menu_id, p_code); 63 64 call must_have_initialized; 65 if (p_create_seg ^= 0) & (p_create_seg ^= 1) then do; 66 p_code = error_table_$bad_arg; 67 return; 68 end; 69 menu_id_ptr = addr (p_menu_id); 70 menu_ptr = packed_menu_ptr; /* unpack the pointer */ 71 call menu_$store (p_dir_name, p_entry_name, p_menu_name, (p_create_seg = 1), menu_ptr, p_code); 72 return; 73 74 /* Entry to retrieve a menu from a value segment. */ 75 76 retrieve: 77 entry (p_dir_name, p_entry_name, p_menu_name, p_menu_id, p_code); 78 79 call must_have_initialized; 80 menu_id_ptr = addr (p_menu_id); 81 call menu_$retrieve (p_dir_name, p_entry_name, p_menu_name, null (), menu_ptr, p_code); 82 if p_code = 0 then do; 83 call fc_menu_create$add_to_menu_array (menu_ptr); 84 packed_menu_ptr = menu_ptr; 85 end; 86 return; 87 88 /* Entry to delete a stored menu object from a value segment. This is simply a pass-through to the menu_ subr. */ 89 90 delete: 91 entry (p_dir_name, p_entry_name, p_menu_name, p_code); 92 93 call must_have_initialized; 94 call menu_$delete (p_dir_name, p_entry_name, p_menu_name, p_code); 95 return; 96 97 /* Entry to return a list of menu names stored in a value segment. */ 98 99 list: 100 entry (p_dir_name, p_entry_name, p_match_string, p_count, p_names, p_code); 101 102 dcl names_idx fixed bin; 103 104 call must_have_initialized; 105 call menu_$list (p_dir_name, p_entry_name, p_match_string, null (), menu_list_info_version_1, 106 menu_list_info_ptr, p_code); 107 108 /* Copy the names into the provided array */ 109 110 if p_code = 0 then do; 111 p_count = menu_list_info.n_names; 112 do names_idx = 1 to min (menu_list_info.n_names, dim (p_names, 1)); 113 p_names (lbound (p_names, 1) + names_idx - 1) = 114 substr (menu_list_info.name_string, menu_list_info.position (names_idx), 115 menu_list_info.length (names_idx)); 116 end; 117 if menu_list_info.n_names > dim (p_names, 1) then 118 p_code = error_table_$smallarg; 119 free menu_list_info; 120 end; 121 return; 122 123 must_have_initialized: 124 proc; 125 126 if ^fc_menu_data_$initialized then 127 goto HAVE_NOT_INITIALIZED; 128 129 end must_have_initialized; 130 131 HAVE_NOT_INITIALIZED: 132 p_code = error_table_$out_of_sequence; 133 return; 134 1 1 /* BEGIN INCLUDE FILE menu_dcls.incl.pl1 1 2* declarations for the menu_ subroutines MTB 493 1 3* James R. Davis 26 Jan 81 to 20 Februrary 81 1 4**/ 1 5 1 6 /* format: off */ 1 7 1 8 dcl menu_$create entry ( 1 9 (*) char (*) varying, /* input: choices */ 1 10 (*) char (*) varying, /* input: headers */ 1 11 (*) char (*) varying, /* input: trailers */ 1 12 pointer, /* input: to format info */ 1 13 (*) char (1) unal, /* input: keys to use */ 1 14 pointer, /* input: to area */ 1 15 pointer, /* input: to needs str. */ 1 16 pointer, /* to menu: output */ 1 17 fixed bin (35) /* code */ 1 18 ); 1 19 1 20 dcl menu_$display entry ( 1 21 pointer, /* window */ 1 22 pointer, /* menu */ 1 23 fixed bin (35) /* code */ 1 24 ); 1 25 1 26 dcl menu_$get_choice entry ( 1 27 pointer, /* window */ 1 28 pointer, /* menu */ 1 29 pointer, /* to function key info */ 1 30 bit (1) aligned, /* function key hi: output */ 1 31 fixed bin, /* output: selection number */ 1 32 fixed bin (35) /* output: code */ 1 33 ); 1 34 1 35 dcl menu_$describe entry ( 1 36 pointer, /* menu */ 1 37 pointer, /* needs */ 1 38 fixed bin (35) /* code */ 1 39 ); 1 40 1 41 dcl menu_$destroy entry ( 1 42 pointer, /* menu */ 1 43 fixed bin (35) /* code */ 1 44 ); 1 45 1 46 dcl menu_$store entry ( 1 47 character (*), 1 48 character (*), 1 49 character (*), 1 50 bit (1) aligned, 1 51 pointer, 1 52 fixed bin (35)); 1 53 1 54 dcl menu_$retrieve entry ( 1 55 character (*), 1 56 character (*), 1 57 character (*), 1 58 pointer, 1 59 pointer, 1 60 fixed bin (35)); 1 61 dcl menu_$delete entry ( 1 62 character (*), 1 63 character (*), 1 64 character (*), 1 65 fixed binary (35)); 1 66 1 67 dcl menu_$list entry ( 1 68 character (*), 1 69 character (*), 1 70 character (*), 1 71 pointer, 1 72 fixed bin, 1 73 pointer, 1 74 fixed bin (35)); 1 75 1 76 dcl 1 menu_format aligned based (menu_format_ptr), 1 77 2 version fixed bin, 1 78 2 constraints, 1 79 3 max_width fixed bin, 1 80 3 max_height fixed bin, 1 81 2 n_columns fixed bin, 1 82 2 flags, 1 83 3 center_headers bit (1) unal, 1 84 3 center_trailers bit (1) unal, 1 85 3 pad bit (34) unal, 1 86 2 pad_char char (1); 1 87 1 88 dcl 1 menu_requirements aligned based (menu_requirements_ptr), 1 89 2 version fixed bin, 1 90 2 lines_needed fixed bin, 1 91 2 width_needed fixed bin, 1 92 2 n_options fixed bin; 1 93 1 94 dcl menu_format_ptr pointer; 1 95 dcl menu_requirements_ptr pointer; 1 96 1 97 dcl (menu_format_version_1, menu_requirements_version_1) 1 98 fixed bin internal static init (1) options (constant); 1 99 1 100 dcl MENU_OPTION_KEYS (35) char (1) unal internal static 1 101 options (constant) init 1 102 ("1", "2", "3", "4", "5", "6", "7", "8", "9", 1 103 "A", "B", "C", "D", "E", "F", "G", "H", "I", 1 104 "J", "K", "L", "M", "N", "O", "P", "Q", "R", 1 105 "S", "T", "U", "V", "W", "X", "Y", "Z"); 1 106 1 107 /* END INCLUDE FILE ... menu_dcls.incl.pl1 */ 135 136 2 1 /* Begin include file menu_list_info.incl.pl1 BIM July 1981 */ 2 2 /* format: style3 */ 2 3 2 4 declare menu_list_info_ptr pointer; 2 5 declare 1 menu_list_info aligned based (menu_list_info_ptr), 2 6 2 version fixed bin, 2 7 2 n_names fixed bin, 2 8 2 name_string_length 2 9 fixed bin (21), 2 10 2 names (menu_list_n_names refer (menu_list_info.n_names)) aligned, 2 11 3 position fixed bin (21), 2 12 3 length fixed bin (21), 2 13 2 name_string character (menu_list_name_string_length refer (menu_list_info.name_string_length)) 2 14 unaligned; 2 15 2 16 2 17 declare menu_list_n_names fixed bin; 2 18 declare menu_list_name_string_length 2 19 fixed bin (21); 2 20 2 21 declare menu_list_info_version_1 2 22 fixed bin init (1) internal static options (constant); 2 23 2 24 /* End include file menu_list_info.incl.pl1 */ 137 138 139 end fc_menu_value_seg_man; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/17/00 1932.8 fc_menu_value_seg_man.pl1 >udd>sm>ds>w>ml>fc_menu_value_seg_man.pl1 135 1 03/27/82 0529.3 menu_dcls.incl.pl1 >ldd>incl>menu_dcls.incl.pl1 137 2 03/27/82 0524.8 menu_list_info.incl.pl1 >ldd>incl>menu_list_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. addr builtin function dcl 56 ref 69 80 bad_call_ 000104 stack reference condition dcl 54 ref 14 dim builtin function dcl 56 ref 112 117 error_table_$bad_arg 000010 external static fixed bin(35,0) dcl 41 ref 66 error_table_$out_of_sequence 000012 external static fixed bin(35,0) dcl 42 ref 131 error_table_$smallarg 000014 external static fixed bin(35,0) dcl 44 ref 117 fc_menu_create$add_to_menu_array 000020 constant entry external dcl 49 ref 83 fc_menu_data_$initialized 000016 external static bit(1) dcl 46 ref 126 lbound builtin function dcl 56 ref 113 length 4 based fixed bin(21,0) array level 3 dcl 2-5 ref 113 menu_$delete 000026 constant entry external dcl 1-61 ref 94 menu_$list 000030 constant entry external dcl 1-67 ref 105 menu_$retrieve 000024 constant entry external dcl 1-54 ref 81 menu_$store 000022 constant entry external dcl 1-46 ref 71 menu_id_ptr 000100 automatic pointer dcl 31 set ref 69* 70 80* 84 menu_list_info based structure level 1 dcl 2-5 ref 119 menu_list_info_ptr 000114 automatic pointer dcl 2-4 set ref 105* 111 112 113 113 113 117 119 menu_list_info_version_1 000005 constant fixed bin(17,0) initial dcl 2-21 set ref 105* menu_ptr 000102 automatic pointer dcl 32 set ref 70* 71* 81* 83* 84 min builtin function dcl 56 ref 112 n_names 1 based fixed bin(17,0) level 2 dcl 2-5 ref 111 112 113 117 119 name_string based char level 2 packed packed unaligned dcl 2-5 ref 113 name_string_length 2 based fixed bin(21,0) level 2 dcl 2-5 ref 113 119 names 3 based structure array level 2 dcl 2-5 names_idx 000112 automatic fixed bin(17,0) dcl 102 set ref 112* 113 113 113* null builtin function dcl 56 ref 81 81 105 105 p_code parameter fixed bin(35,0) dcl 19 set ref 61 66* 71* 76 81* 82 90 94* 99 105* 110 117* 131* p_count parameter fixed bin(35,0) dcl 20 set ref 99 111* p_create_seg parameter fixed bin(17,0) dcl 21 ref 61 65 65 71 p_dir_name parameter char packed unaligned dcl 22 set ref 61 71* 76 81* 90 94* 99 105* p_entry_name parameter char packed unaligned dcl 23 set ref 61 71* 76 81* 90 94* 99 105* p_match_string parameter char packed unaligned dcl 24 set ref 99 105* p_menu_id parameter fixed bin(35,0) dcl 25 set ref 61 69 76 80 p_menu_name parameter char packed unaligned dcl 26 set ref 61 71* 76 81* 90 94* p_names parameter char array packed unaligned dcl 27 set ref 99 112 113* 113 117 packed_menu_ptr based pointer packed unaligned dcl 36 set ref 70 84* position 3 based fixed bin(21,0) array level 3 dcl 2-5 ref 113 substr builtin function dcl 56 ref 113 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. MENU_OPTION_KEYS internal static char(1) initial array packed unaligned dcl 1-100 menu_$create 000000 constant entry external dcl 1-8 menu_$describe 000000 constant entry external dcl 1-35 menu_$destroy 000000 constant entry external dcl 1-41 menu_$display 000000 constant entry external dcl 1-20 menu_$get_choice 000000 constant entry external dcl 1-26 menu_format based structure level 1 dcl 1-76 menu_format_ptr automatic pointer dcl 1-94 menu_format_version_1 internal static fixed bin(17,0) initial dcl 1-97 menu_list_n_names automatic fixed bin(17,0) dcl 2-17 menu_list_name_string_length automatic fixed bin(21,0) dcl 2-18 menu_requirements based structure level 1 dcl 1-88 menu_requirements_ptr automatic pointer dcl 1-95 menu_requirements_version_1 internal static fixed bin(17,0) initial dcl 1-97 NAMES DECLARED BY EXPLICIT CONTEXT. HAVE_NOT_INITIALIZED 000617 constant label dcl 131 ref 126 delete 000303 constant entry external dcl 90 fc_menu_value_seg_man 000020 constant entry external dcl 11 list 000372 constant entry external dcl 99 must_have_initialized 000623 constant entry internal dcl 123 ref 64 79 93 104 retrieve 000161 constant entry external dcl 76 store 000037 constant entry external dcl 61 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 776 1030 630 1006 Length 1252 630 32 206 146 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME fc_menu_value_seg_man 155 external procedure is an external procedure. must_have_initialized internal procedure shares stack frame of external procedure fc_menu_value_seg_man. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME fc_menu_value_seg_man 000100 menu_id_ptr fc_menu_value_seg_man 000102 menu_ptr fc_menu_value_seg_man 000112 names_idx fc_menu_value_seg_man 000114 menu_list_info_ptr fc_menu_value_seg_man THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as call_ext_out_desc call_ext_out return_mac signal_op ext_entry ext_entry_desc op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. fc_menu_create$add_to_menu_array menu_$delete menu_$list menu_$retrieve menu_$store THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$out_of_sequence error_table_$smallarg fc_menu_data_$initialized LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000017 14 000025 15 000030 61 000031 64 000071 65 000072 66 000077 67 000102 69 000103 70 000105 71 000112 72 000153 76 000154 79 000213 80 000214 81 000216 82 000256 83 000260 84 000267 86 000275 90 000276 93 000333 94 000334 95 000363 99 000364 104 000427 105 000430 110 000474 111 000476 112 000502 113 000523 116 000566 117 000570 119 000605 121 000616 131 000617 133 000622 123 000623 126 000624 129 000627 ----------------------------------------------------------- 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