COMPILATION LISTING OF SEGMENT print_line_ids Compiled by: Multics PL/I Compiler, Release 31a, of October 12, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/28/88 1339.3 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 print_line_ids: prt: proc; 14 15 /* This command prints a list of line ids handled by the 16* IO daemon as determined by inspecting the "iod_working_tables" 17* segment. For each line id, the associated channel is printed. 18**/ 19 20 /* Written by J. C. Whitmore, 10/78, modeled after print_request_types.pl1 */ 21 /* Modified by E. N. Kittlitz, 6/81, to use version_4 iod_tables_hdr */ 22 23 24 25 /****^ HISTORY COMMENTS: 26* 1) change(88-06-03,Brunelle), approve(88-06-03,MCR7911), 27* audit(88-10-18,Wallman), install(88-10-28,MR12.2-1199): 28* Upgraded to handle version 5 I/O daemon tables. Also displays comments 29* store in the line table entry. Display columns are based on length of 30* longest entry for each column. 31* END HISTORY COMMENTS */ 32 33 34 dcl argp ptr; /* ptr to arg */ 35 dcl arglen fixed bin; /* length of arg */ 36 dcl arg char (arglen) based (argp); /* command argument */ 37 38 dcl bfsw bit (1) aligned; /* ON for brief option */ 39 dcl sysdir char (168) aligned;/* directory containing iod_working_tables */ 40 dcl ent_name char (32) aligned; 41 42 dcl i fixed bin; 43 dcl code fixed bin (35); /* error code */ 44 dcl nargs fixed bin; 45 dcl (max_chan_id, max_line_id) fixed bin; 46 47 dcl whoami char (19) aligned int static options (constant) init ("print_line_ids"); 48 49 dcl error_table_$badopt fixed bin (35) ext; 50 51 dcl (addr, null, length, ptr, rtrim, substr) builtin; 52 53 dcl cu_$arg_count entry (fixed bin); 54 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 55 dcl com_err_ entry options (variable); 56 dcl expand_pathname_ entry (char (*), char (*) aligned, char (*) aligned, fixed bin (35)); 57 dcl hcs_$initiate entry (char (*) aligned, char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 58 dcl ioa_ entry options (variable); 59 dcl hcs_$terminate_noname entry (ptr, fixed bin (35)); 60 61 62 /* initialize control argument defaults */ 63 64 bfsw = "0"b; 65 sysdir = ">daemon_dir_dir>io_daemon_dir"; 66 67 /* look for arguments */ 68 69 call cu_$arg_count (nargs); 70 71 do i = 1 to nargs; 72 call cu_$arg_ptr (i, argp, arglen, code); 73 if code ^= 0 then go to noarg; 74 if arg = "-bf" | arg = "-brief" then bfsw = "1"b; 75 else if arg = "-dir" | arg = "-directory" then do; 76 i = i + 1; 77 call cu_$arg_ptr (i, argp, arglen, code); 78 if code ^= 0 then do; 79 noarg: call com_err_ (code, whoami); 80 return; 81 end; 82 call expand_pathname_ (arg, sysdir, ent_name, code); /* take apart and put it back together */ 83 if code ^= 0 then do; 84 call com_err_ (code, whoami, arg); 85 return; 86 end; 87 if sysdir = ">" then sysdir = ">" || ent_name; 88 else sysdir = rtrim (sysdir) || ">" || ent_name; 89 end; 90 else do; 91 call com_err_ (error_table_$badopt, whoami, arg); 92 return; 93 end; 94 end; 95 96 /* get a pointer to the line table */ 97 98 call hcs_$initiate (sysdir, "iod_working_tables", "", 0, 1, ithp, code); 99 if ithp = null then do; 100 call com_err_ (code, whoami, "^a>iod_working_tables", sysdir); 101 return; 102 end; 103 104 if iod_tables_hdr.version ^= IODT_VERSION_5 then do; 105 call com_err_ (0, whoami, "Wrong version number for iod_working_tables."); 106 return; 107 end; 108 109 ltp = ptr (ithp, iod_tables_hdr.line_tab_offset); 110 text_strings_ptr = ptr (ithp, iod_tables_hdr.text_strings_offset); 111 112 /* first find the lengths for the longest line_id & chan_id */ 113 max_line_id = 7; 114 max_chan_id = 7; 115 do i = 1 to line_tab.n_lines; 116 ltep = addr (line_tab.entries (i)); 117 if length (rtrim (lte.line_id)) > max_line_id then 118 max_line_id = length (rtrim (lte.line_id)); 119 if length (rtrim (lte.chan_id)) > max_chan_id then 120 max_chan_id = length (rtrim (lte.chan_id)); 121 end; 122 123 /* now print the table */ 124 do i = 1 to line_tab.n_lines; 125 ltep = addr (line_tab.entries (i)); 126 127 if i = 1 then 128 if ^bfsw then call ioa_ ("^/Line ID^vxChannel^vxComment^/", 129 max_line_id - 7 + 2, max_chan_id - 7 + 2); 130 131 call ioa_ ("^va ^va ^a", max_line_id, lte.line_id, 132 max_chan_id, lte.chan_id, 133 substr (text_strings.chars, lte.comment.first_char, lte.comment.total_chars)); 134 end; 135 136 if line_tab.n_lines > 0 then call ioa_ (""); /* throw in an extra blank line */ 137 else call ioa_ ("No line ids specified in iod_working_tables."); 138 139 call hcs_$terminate_noname (ithp, code); 140 1 1 /* BEGIN INCLUDE FILE iod_line_tab.incl.pl1 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(88-01-27,Brunelle), approve(), audit(), install(): 1 7* Ancient History 1 8* Created by J. C. Whitmore Oct 1978 1 9* 2) change(88-02-18,Brunelle), approve(88-08-31,MCR7911), 1 10* audit(88-09-29,Wallman), install(88-10-28,MR12.2-1199): 1 11* Upgraded to version 5. Added comment field and changed att_desc from 1 12* string to text_offset. 1 13* END HISTORY COMMENTS */ 1 14 1 15 1 16 /* format: style4 */ 1 17 1 18 dcl ltp ptr; 1 19 dcl 1 line_tab aligned based (ltp), /* the line id table */ 1 20 2 n_lines fixed bin, /* number of line id entries */ 1 21 2 pad fixed bin, /* for the future */ 1 22 2 entries (1 refer (line_tab.n_lines)) like lte; 1 23 1 24 dcl ltep ptr; /* line table entry pointer */ 1 25 dcl 1 lte aligned based (ltep), /* line table entry */ 1 26 2 line_id char (24), /* logical id for a tty line */ 1 27 2 comment unaligned like text_offset, /* comment to apply to the line */ 1 28 2 chan_id char (32), /* the physical channel name for attachment */ 1 29 2 att_desc unaligned like text_offset, /* the attach description to use */ 1 30 2 maj_dev_list bit (360); /* bit i ON => major device i is valid for this line id */ 1 31 1 32 1 33 /* END INCLUDE FILE iod_line_tab.incl.pl1 */ 141 2 1 /* BEGIN INCLUDE FILE ... iod_tables_hdr.incl.pl1 */ 2 2 2 3 2 4 2 5 /****^ HISTORY COMMENTS: 2 6* 1) change(88-01-27,Brunelle), approve(), audit(), install(): 2 7* Ancient History 2 8* Created by J. Stern, 1/20/75 2 9* Modified by J. C. Whitmore April 1978 for enhancements 2 10* Modified by J. C. Whitmore, 10/78, for version 3 iod_tables format. 2 11* Modified by E. N. Kittlitz, 6/81, for version 4 iod_tables with expanded 2 12* q_group_tab 2 13* 2) change(88-02-18,Brunelle), approve(88-08-31,MCR7911), 2 14* audit(88-09-29,Wallman), install(88-10-28,MR12.2-1199): 2 15* Change version number to reflect changes in q_group_tab and 2 16* iod_device_tab for laser printer support. Added font tables. 2 17* END HISTORY COMMENTS */ 2 18 2 19 2 20 /* format: style4 */ 2 21 2 22 dcl ithp ptr; /* ptr to io daemon dables and it's header */ 2 23 dcl 1 iod_tables_hdr aligned based (ithp), /* header of data segment compiled by iod_table_compiler */ 2 24 2 version char (8), /* version of this structure */ 2 25 2 date_time_compiled fixed bin (71), 2 26 2 grace_time fixed bin (71), /* grace time before deleting finished segment */ 2 27 2 max_queues fixed bin (17), /* default number of priority queues per queue group */ 2 28 2 line_tab_offset fixed bin (18), /* offset of line id table */ 2 29 2 device_tab_offset fixed bin (18), /* offset of device table */ 2 30 2 minor_device_tab_offset fixed bin (18), /* offset of minor device table */ 2 31 2 dev_class_tab_offset fixed bin (18), /* offset of device class table */ 2 32 2 q_group_tab_offset fixed bin (18), /* offset of queue group table */ 2 33 2 forms_info_tab_offset fixed bin (18), /* offset of forms info tables */ 2 34 2 text_strings_offset fixed bin (18), 2 35 2 start_of_tables fixed bin; /* beginning of above tables, MUST start on even word boundry */ 2 36 2 37 /* Defines common text block to store virtually all text in the I/O daemon tables */ 2 38 dcl text_strings_ptr ptr; 2 39 dcl 1 text_strings aligned based (text_strings_ptr), 2 40 2 length fixed bin, 2 41 2 chars char (1 refer (text_strings.length)) unaligned; 2 42 2 43 /* this defines text offsets used to locate i/o daemon tables strings in 2 44* the text_strings structure */ 2 45 dcl 1 text_offset based, 2 46 2 first_char fixed bin (18) unsigned unaligned, 2 47 2 total_chars fixed bin (18) unsigned unaligned; 2 48 2 49 dcl IODT_VERSION_5 char (8) int static options (constant) init ("IODT0005"); /* current version number */ 2 50 2 51 2 52 /* END INCLUDE FILE ... iod_tables_hdr.incl.pl1 */ 142 143 144 end print_line_ids; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/28/88 1233.8 print_line_ids.pl1 >special_ldd>install>MR12.2-1199>print_line_ids.pl1 141 1 10/28/88 1227.0 iod_line_tab.incl.pl1 >special_ldd>install>MR12.2-1199>iod_line_tab.incl.pl1 142 2 10/28/88 1227.4 iod_tables_hdr.incl.pl1 >special_ldd>install>MR12.2-1199>iod_tables_hdr.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. IODT_VERSION_5 000000 constant char(8) initial packed unaligned dcl 2-49 ref 104 addr builtin function dcl 51 ref 116 125 arg based char packed unaligned dcl 36 set ref 74 74 75 75 82* 84* 91* arglen 000102 automatic fixed bin(17,0) dcl 35 set ref 72* 74 74 75 75 77* 82 82 84 84 91 91 argp 000100 automatic pointer dcl 34 set ref 72* 74 74 75 75 77* 82 84 91 bfsw 000103 automatic bit(1) dcl 38 set ref 64* 74* 127 chan_id 7 based char(32) level 2 dcl 1-25 set ref 119 119 131* chars 1 based char level 2 packed packed unaligned dcl 2-39 ref 131 131 code 000167 automatic fixed bin(35,0) dcl 43 set ref 72* 73 77* 78 79* 82* 83 84* 98* 100* 139* com_err_ 000016 constant entry external dcl 55 ref 79 84 91 100 105 comment 6 based structure level 2 packed packed unaligned dcl 1-25 cu_$arg_count 000012 constant entry external dcl 53 ref 69 cu_$arg_ptr 000014 constant entry external dcl 54 ref 72 77 ent_name 000156 automatic char(32) dcl 40 set ref 82* 87 88 entries 2 based structure array level 2 dcl 1-19 set ref 116 125 error_table_$badopt 000010 external static fixed bin(35,0) dcl 49 set ref 91* expand_pathname_ 000020 constant entry external dcl 56 ref 82 first_char 6 based fixed bin(18,0) level 3 packed packed unsigned unaligned dcl 1-25 ref 131 131 hcs_$initiate 000022 constant entry external dcl 57 ref 98 hcs_$terminate_noname 000026 constant entry external dcl 59 ref 139 i 000166 automatic fixed bin(17,0) dcl 42 set ref 71* 72* 76* 76 77* 115* 116* 124* 125 127* ioa_ 000024 constant entry external dcl 58 ref 127 131 136 137 iod_tables_hdr based structure level 1 dcl 2-23 ithp 000200 automatic pointer dcl 2-22 set ref 98* 99 104 109 109 110 110 139* length based fixed bin(17,0) level 2 in structure "text_strings" dcl 2-39 in procedure "prt" ref 131 131 length builtin function dcl 51 in procedure "prt" ref 117 117 119 119 line_id based char(24) level 2 dcl 1-25 set ref 117 117 131* line_tab based structure level 1 dcl 1-19 line_tab_offset 7 based fixed bin(18,0) level 2 dcl 2-23 ref 109 lte based structure level 1 dcl 1-25 ltep 000176 automatic pointer dcl 1-24 set ref 116* 117 117 119 119 125* 131 131 131 131 131 131 ltp 000174 automatic pointer dcl 1-18 set ref 109* 115 116 124 125 136 max_chan_id 000171 automatic fixed bin(17,0) dcl 45 set ref 114* 119 119* 127 131* max_line_id 000172 automatic fixed bin(17,0) dcl 45 set ref 113* 117 117* 127 131* n_lines based fixed bin(17,0) level 2 dcl 1-19 ref 115 124 136 nargs 000170 automatic fixed bin(17,0) dcl 44 set ref 69* 71 null builtin function dcl 51 ref 99 ptr builtin function dcl 51 ref 109 110 rtrim builtin function dcl 51 ref 88 117 117 119 119 substr builtin function dcl 51 ref 131 131 sysdir 000104 automatic char(168) dcl 39 set ref 65* 82* 87 87* 88* 88 98* 100* text_offset based structure level 1 packed packed unaligned dcl 2-45 text_strings based structure level 1 dcl 2-39 text_strings_offset 15 based fixed bin(18,0) level 2 dcl 2-23 ref 110 text_strings_ptr 000202 automatic pointer dcl 2-38 set ref 110* 131 131 total_chars 6(18) based fixed bin(18,0) level 3 packed packed unsigned unaligned dcl 1-25 ref 131 131 version based char(8) level 2 dcl 2-23 ref 104 whoami 000002 constant char(19) initial dcl 47 set ref 79* 84* 91* 100* 105* NAMES DECLARED BY EXPLICIT CONTEXT. noarg 000251 constant label dcl 79 ref 73 print_line_ids 000137 constant entry external dcl 13 prt 000130 constant entry external dcl 13 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1222 1252 1101 1232 Length 1506 1101 30 217 121 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME prt 202 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME prt 000100 argp prt 000102 arglen prt 000103 bfsw prt 000104 sysdir prt 000156 ent_name prt 000166 i prt 000167 code prt 000170 nargs prt 000171 max_chan_id prt 000172 max_line_id prt 000174 ltp prt 000176 ltep prt 000200 ithp prt 000202 text_strings_ptr prt THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr expand_pathname_ hcs_$initiate hcs_$terminate_noname ioa_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000127 64 000144 65 000145 69 000150 71 000156 72 000165 73 000202 74 000204 75 000221 76 000231 77 000232 78 000247 79 000251 80 000266 82 000267 83 000317 84 000321 85 000345 87 000346 88 000366 89 000426 91 000430 92 000454 94 000455 98 000457 99 000531 100 000535 101 000565 104 000566 105 000573 106 000620 109 000621 110 000625 113 000631 114 000633 115 000634 116 000643 117 000647 119 000665 121 000703 124 000705 125 000715 127 000721 131 000757 134 001033 136 001036 137 001052 139 001066 144 001077 ----------------------------------------------------------- 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