COMPILATION LISTING OF SEGMENT expand_log_message_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 02/14/85 1117.1 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 expand_log_message_: 7 procedure (P_log_message_format_ptr, P_log_message_ptr, P_expand_mode_ptr, P_expansion, P_code); 8 9 /* * EXPAND_LOG_MESSAGE_ 10* * 11* * This is the procedure used to generate the text expansions of binary 12* * data in sys log messages. Basically, it is just a wrapper for the 13* * per-message formatting routines. For efficiency's sake, it knows the 14* * names of some of them, and references them through links, but it can 15* * find all the others by calling hcs_$make_entry. It must be given a 16* * log_message_format_ptr, created by calling format_log_message_$init, which 17* * it just passes on to the per-message routines. 18* * 19* * Modification history: 20* * 84-07-04, W. Olin Sibert: Initial coding 21* * 84-12-05, WOS: Added "syserr", corrected data class declaration to 16 chars 22* * 1985-01-15, BIM: added $append_(process_id, data_class) 23* * 1985-01-21, EJ Sharpe: removed "syserr", call $unknown when make_entry fails 24* */ 25 26 declare P_log_message_format_ptr pointer parameter; 27 declare P_log_message_ptr pointer parameter; 28 declare P_expand_mode_ptr pointer parameter; 29 declare P_expansion char (*) varying parameter; 30 declare P_code fixed bin (35) parameter; 31 32 declare expand_class char (16) varying; 33 declare expand_proc_name char (32); 34 declare expand_proc variable entry (pointer, pointer, pointer, char (*) varying, fixed bin (35)); 35 36 37 declare expand_log_message_$unknown entry (pointer, pointer, pointer, char (*) varying, fixed bin (35)); 38 39 declare hcs_$make_entry entry (pointer, char (*), char (*), entry, fixed bin (35)); 40 declare ioa_$rsnnl entry options (variable); 41 42 declare (codeptr, rtrim) builtin; 43 44 /* */ 45 46 log_message_ptr = P_log_message_ptr; 47 P_code = 0; 48 P_expansion = ""; 49 50 if (log_message.data_lth = 0) then return; /* Nothing to expand */ 51 52 expand_class = rtrim (log_message.data_class); 53 54 if (expand_class = "") then expand_proc = expand_log_message_$unknown; 55 else do; 56 expand_proc_name = "expand_" || expand_class || "_msg_"; 57 call hcs_$make_entry (codeptr (expand_log_message_), expand_proc_name, "format", expand_proc, P_code); 58 if (P_code ^= 0) then expand_proc = expand_log_message_$unknown; 59 end; 60 61 62 call expand_proc (P_log_message_format_ptr, log_message_ptr, P_expand_mode_ptr, P_expansion, P_code); 63 64 return; 65 66 /* */ 67 68 /* Some utility entrypoints for adding standard-format data to an expanded message. */ 69 70 expand_log_message_$append_octal: 71 entry (P_log_message_format_ptr, P_data_ptr, P_data_size, P_expansion); 72 73 declare P_data_ptr pointer parameter; 74 declare P_data_size fixed bin parameter; 75 76 declare words_per_line fixed bin; 77 declare available_chars fixed bin; 78 declare words_ptr pointer; 79 declare words_left fixed bin; 80 declare words (min (words_left, words_per_line)) bit (36) aligned based (words_ptr); 81 declare temp char (150) varying; 82 83 84 log_message_format_ptr = P_log_message_format_ptr; 85 86 available_chars = log_message_format.line_lth - log_message_format.continuation_indent; 87 do words_per_line = 8, 4, 2, 1; 88 if (available_chars > (words_per_line * (12 + 1))) then 89 goto HAVE_CORRECT_SIZE; 90 end; 91 92 HAVE_CORRECT_SIZE: 93 words_left = P_data_size; 94 words_ptr = P_data_ptr; 95 96 do while (words_left > 0); 97 call ioa_$rsnnl ("^(^w ^)^/", temp, (0), words); 98 P_expansion = P_expansion || temp; 99 words_left = words_left - words_per_line; 100 words_ptr = addrel (words_ptr, words_per_line); 101 end; 102 103 return; 104 105 expand_log_message_$append_process_id: 106 entry (P_log_message_format_ptr, P_log_message_ptr, P_expansion); 107 108 log_message_format_ptr = P_log_message_format_ptr; 109 110 log_message_ptr = P_log_message_ptr; 111 112 available_chars = log_message_format.line_lth - log_message_format.continuation_indent; 113 114 /**** Process ID: NNNNNNNNNNNN */ 115 116 if available_chars < 24 then 117 call ioa_$rsnnl ("PID: ^w^/", temp, (0), log_message.process_id); 118 else call ioa_$rsnnl ("Process ID: ^w^/", temp, (0), log_message.process_id); 119 P_expansion = P_expansion || temp; 120 return; 121 122 expand_log_message_$append_data_class: 123 entry (P_log_message_format_ptr, P_log_message_ptr, P_expansion); 124 125 log_message_format_ptr = P_log_message_format_ptr; 126 127 log_message_ptr = P_log_message_ptr; 128 if log_message.data_class = "" then return; /* Nothing to add */ 129 130 call ioa_$rsnnl ("Data class: ^a^/", temp, (0), log_message.data_class); 131 P_expansion = P_expansion || temp; 132 return; 133 134 135 /* */ 136 137 expand_log_message_$unknown: 138 entry (P_log_message_format_ptr, P_log_message_ptr, P_expand_mode_ptr, P_expansion, P_code); 139 140 log_message_ptr = P_log_message_ptr; 141 142 call ioa_$rsnnl ("Unknown log message class ""^a"":^/", temp, (0), log_message.data_class); 143 P_expansion = P_expansion || temp; 144 145 call expand_log_message_$append_octal (P_log_message_format_ptr, 146 addr (log_message.data (1)), dimension (log_message.data, 1), P_expansion); 147 148 return; 149 150 151 152 /* This is a compatibility entrypoint-- it is used to process unknown messages 153* in old-style "syserr" format. */ 154 155 expand_log_message_$unknown_syserr: 156 entry (P_log_message_format_ptr, P_log_message_ptr, P_expand_mode_ptr, P_expansion, P_code); 157 158 log_message_ptr = P_log_message_ptr; 159 160 call ioa_$rsnnl ("Unknown syserr message type ^d:^/", temp, (0), 161 binary (log_message.data (1))); 162 P_expansion = P_expansion || temp; 163 164 call expand_log_message_$append_octal (P_log_message_format_ptr, 165 addr (log_message.data (2)), (dimension (log_message.data, 1) - 1), P_expansion); 166 167 return; 168 169 /* BEGIN INCLUDE FILE ... log_message.incl.pl1 ... 84-04-25 ... W. Olin Sibert */ 1 2 1 3 declare 1 log_message_header aligned based, /* Items marked "(SET)" are set by $create_message */ 1 4 2 sentinel bit (36) aligned, /* Proper value declared in log_segment.incl.pl1 */ 1 5 2 sequence fixed bin (35), /* Sequence number for this message (SET) */ 1 6 2 severity fixed bin (8) unaligned, /* Severity of message */ 1 7 2 data_class_lth fixed bin (9) unaligned unsigned, /* Length of data class-- 0 to 16 (SET) */ 1 8 2 time fixed bin (53) unaligned, /* Time message originated */ 1 9 2 text_lth fixed bin (17) unaligned, /* Length of message text. Must be nonzero (SET) */ 1 10 2 data_lth fixed bin (17) unaligned, /* Length of binary data. May be zero (SET) */ 1 11 2 process_id bit (36) aligned; /* Process id of process writing message */ 1 12 1 13 declare 1 log_message aligned based (log_message_ptr), 1 14 2 header aligned like log_message_header, 1 15 2 text char (log_message_text_lth refer (log_message.text_lth)) unaligned, 1 16 2 data_class char (log_message_data_class_lth refer (log_message.data_class_lth)) unaligned, 1 17 2 data dim (log_message_data_lth refer (log_message.data_lth)) bit (36) aligned; 1 18 1 19 declare log_message_ptr pointer; 1 20 declare log_message_text_lth fixed bin; 1 21 declare log_message_data_class_lth fixed bin; 1 22 declare log_message_data_lth fixed bin; 1 23 1 24 /* END INCLUDE FILE ... log_message.incl.pl1 */ 169 170 /* BEGIN INCLUDE FILE ... log_message_format.incl.pl1 ... 84-07-03 ... W. Olin Sibert */ 2 2 2 3 declare 1 log_message_format aligned based (log_message_format_ptr), 2 4 2 caller char (32) unaligned, /* Caller name to use when printing error messages */ 2 5 2 line_lth fixed bin, /* Max length of output lines; longer messages are folded */ 2 6 2 indentation fixed bin, /* Number of spaces at beginning of each output line */ 2 7 2 equal_sw bit (1) aligned, /* Whether to suppress messages with identical text */ 2 8 2 error_sw bit (1) aligned, /* Whether to print error messages via com_err_ */ 2 9 2 prefix char (40) varying, /* Prefix for printing messages */ 2 10 2 number_format char (20) varying, /* ioa_ format for printing message numbers */ 2 11 2 time_format char (40) varying, /* date_time_$format string for message times */ 2 12 2 date_format char (40) varying, /* date_time_$format string for when date changes */ 2 13 2 continuation_indent fixed bin, /* If >= zero, value for continuation lines */ 2 14 /* Otherwise, lined up under the text by default */ 2 15 2 16 2 pad (59) bit (36) aligned, 2 17 2 18 /* ONLY format_log_message_$adjust ever changes the values below */ 2 19 2 20 2 internal_info aligned, /* Internal info, set by $adjust-- DO NOT CHANGE */ 2 21 3 area_ptr pointer, /* Where this structure is allocated */ 2 22 3 date_ioa_string char (100) varying, /* Format for date breaks,if any */ 2 23 3 message_ioa_string char (100) varying, /* Format for first lines of messages */ 2 24 3 real_continuation_indent fixed bin, /* Indentation for continuation lines */ 2 25 3 prefix_lth fixed bin, /* Length of indent + prefix + time + sequence + severity */ 2 26 3 date_modulus fixed bin (36), /* Modulus for checking whether dates are equal */ 2 27 2 28 2 end fixed bin; 2 29 2 30 declare log_message_format_ptr pointer; 2 31 2 32 /* END INCLUDE FILE ... log_message_format.incl.pl1 */ 170 171 172 end expand_log_message_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 02/14/85 0746.0 expand_log_message_.pl1 >special_ldd>online>41-8>expand_log_message_.pl1 169 1 01/21/85 0912.2 log_message.incl.pl1 >ldd>include>log_message.incl.pl1 170 2 01/21/85 0912.2 log_message_format.incl.pl1 >ldd>include>log_message_format.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. P_code parameter fixed bin(35,0) dcl 30 set ref 6 47* 57* 58 62* 137 155 P_data_ptr parameter pointer dcl 73 ref 70 94 P_data_size parameter fixed bin(17,0) dcl 74 ref 70 92 P_expand_mode_ptr parameter pointer dcl 28 set ref 6 62* 137 155 P_expansion parameter varying char dcl 29 set ref 6 48* 62* 70 98* 98 105 119* 119 122 131* 131 137 143* 143 145* 155 162* 162 164* P_log_message_format_ptr parameter pointer dcl 26 set ref 6 62* 70 84 105 108 122 125 137 145* 155 164* P_log_message_ptr parameter pointer dcl 27 ref 6 46 105 110 122 127 137 140 155 158 available_chars 000123 automatic fixed bin(17,0) dcl 77 set ref 86* 88 112* 116 codeptr builtin function dcl 42 ref 57 57 continuation_indent 63 based fixed bin(17,0) level 2 dcl 2-3 ref 86 112 data based bit(36) array level 2 dcl 1-13 set ref 145 145 145 145 160 160 164 164 164 data_class based char level 2 packed unaligned dcl 1-13 set ref 52 128 130* 142* data_class_lth 2(09) based fixed bin(9,0) level 3 packed unsigned unaligned dcl 1-13 ref 52 128 130 130 142 142 145 145 145 145 160 160 164 164 164 data_lth 4(18) based fixed bin(17,0) level 3 packed unaligned dcl 1-13 ref 50 145 145 164 expand_class 000100 automatic varying char(16) dcl 32 set ref 52* 54 56 expand_log_message_$unknown 000010 constant entry external dcl 37 ref 54 58 expand_proc 000116 automatic entry variable dcl 34 set ref 54* 57* 58* 62 expand_proc_name 000105 automatic char(32) unaligned dcl 33 set ref 56* 57* hcs_$make_entry 000012 constant entry external dcl 39 ref 57 header based structure level 2 dcl 1-13 ioa_$rsnnl 000014 constant entry external dcl 40 ref 97 116 118 130 142 160 line_lth 10 based fixed bin(17,0) level 2 dcl 2-3 ref 86 112 log_message based structure level 1 dcl 1-13 log_message_format based structure level 1 dcl 2-3 log_message_format_ptr 000200 automatic pointer dcl 2-30 set ref 84* 86 86 108* 112 112 125* log_message_header based structure level 1 dcl 1-3 log_message_ptr 000176 automatic pointer dcl 1-19 set ref 46* 50 52 62* 110* 116 118 127* 128 130 140* 142 145 145 145 145 158* 160 160 164 164 164 process_id 5 based bit(36) level 3 dcl 1-13 set ref 116* 118* rtrim builtin function dcl 42 ref 52 temp 000127 automatic varying char(150) dcl 81 set ref 97* 98 116* 118* 119 130* 131 142* 143 160* 162 text_lth 4 based fixed bin(17,0) level 3 packed unaligned dcl 1-13 ref 52 128 130 142 145 145 145 145 160 160 164 164 164 words based bit(36) array dcl 80 set ref 97* words_left 000126 automatic fixed bin(17,0) dcl 79 set ref 92* 96 97 99* 99 words_per_line 000122 automatic fixed bin(17,0) dcl 76 set ref 87* 88* 97 99 100 words_ptr 000124 automatic pointer dcl 78 set ref 94* 97 100* 100 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. log_message_data_class_lth automatic fixed bin(17,0) dcl 1-21 log_message_data_lth automatic fixed bin(17,0) dcl 1-22 log_message_text_lth automatic fixed bin(17,0) dcl 1-20 NAMES DECLARED BY EXPLICIT CONTEXT. HAVE_CORRECT_SIZE 000370 constant label dcl 92 ref 88 expand_log_message_ 000073 constant entry external dcl 6 ref 57 57 expand_log_message_$append_data_class 000641 constant entry external dcl 122 expand_log_message_$append_octal 000316 constant entry external dcl 70 ref 145 164 expand_log_message_$append_process_id 000502 constant entry external dcl 105 expand_log_message_$unknown 000761 constant entry external dcl 137 expand_log_message_$unknown_syserr 001132 constant entry external dcl 155 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 145 145 164 164 addrel builtin function ref 100 binary builtin function ref 160 160 dimension builtin function ref 145 145 164 min builtin function ref 97 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1520 1536 1310 1530 Length 1766 1310 16 213 207 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME expand_log_message_ 208 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME expand_log_message_ 000100 expand_class expand_log_message_ 000105 expand_proc_name expand_log_message_ 000116 expand_proc expand_log_message_ 000122 words_per_line expand_log_message_ 000123 available_chars expand_log_message_ 000124 words_ptr expand_log_message_ 000126 words_left expand_log_message_ 000127 temp expand_log_message_ 000176 log_message_ptr expand_log_message_ 000200 log_message_format_ptr expand_log_message_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_var_desc call_ext_in_desc call_ext_out_desc return shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. expand_log_message_$unknown hcs_$make_entry ioa_$rsnnl NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000066 46 000106 47 000111 48 000112 50 000120 52 000124 54 000155 56 000167 57 000215 58 000252 62 000262 64 000310 70 000311 84 000331 86 000335 87 000340 88 000344 90 000350 92 000370 94 000373 96 000376 97 000400 98 000446 99 000466 100 000470 101 000474 103 000475 105 000476 108 000515 110 000521 112 000524 116 000527 118 000564 119 000616 120 000636 122 000637 125 000654 127 000660 128 000663 130 000675 131 000736 132 000756 137 000757 140 000774 142 001000 143 001042 145 001062 148 001127 155 001130 158 001145 160 001151 162 001217 164 001237 167 001305 ----------------------------------------------------------- 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