COMPILATION LISTING OF SEGMENT set_log_history_dir Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/09/85 1322.9 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* *********************************************************** */ 6 /* format: style2,indcomtxt */ 7 set_log_history_dir: 8 procedure () options (variable); 9 10 /**** Modification History: 11* Created 1985-01-16, BIM */ 12 13 14 declare arg char (arg_lth) based (arg_ptr); 15 declare arg_lth fixed bin (21); 16 declare arg_ptr pointer; 17 declare arg_count fixed bin; 18 declare code fixed bin (35); 19 declare log_dname char (168); 20 declare log_ename char (32); 21 declare log_history_dir char (168); 22 declare sci_ptr pointer; 23 declare type fixed bin (2); 24 declare yes bit (1) aligned; 25 26 declare absolute_pathname_ entry (character (*), character (*), fixed binary (35)); 27 declare com_err_ entry options (variable); 28 declare command_query_$yes_no entry () options (variable); 29 30 declare cu_$arg_list_ptr entry returns (pointer); 31 declare expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 32 declare hcs_$status_minf entry (char (*), char (*), fixed bin (1), fixed bin (2), fixed bin (24), 33 fixed bin (35)); 34 declare initiate_file_ entry (character (*), character (*), bit (*), pointer, fixed binary (24), 35 fixed binary (35)); 36 declare pathname_ entry (char (*), char (*)) returns (char (168)); 37 38 declare ssu_$arg_count entry (ptr, fixed bin); 39 declare ssu_$standalone_invocation 40 entry (ptr, char (*), char (*), ptr, entry, fixed bin (35)); 41 declare ssu_$destroy_invocation 42 entry (ptr); 43 declare ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin (21)); 44 declare ssu_$abort_line entry () options (variable); 45 declare terminate_file_ entry (pointer, fixed binary (24), bit (*), fixed binary (35)); 46 47 declare error_table_$notadir fixed bin (35) ext static; 48 declare error_table_$noentry fixed bin (35) ext static; 49 50 declare cleanup condition; 51 52 53 declare COMMAND_NAME char (32) internal static options (constant) init ("set_log_history_dir"); 54 55 56 sci_ptr, log_segment_ptr = null (); 57 58 on condition (cleanup) call clean_up (); 59 60 call ssu_$standalone_invocation (sci_ptr, COMMAND_NAME, "1.0", cu_$arg_list_ptr (), SSU_ABORT, code); 61 if code ^= 0 62 then do; 63 call com_err_ (code, COMMAND_NAME, "Unable to create ssu invocation."); 64 return; 65 end; 66 67 68 call ssu_$arg_count (sci_ptr, arg_count); 69 if arg_count ^= 2 70 then call ssu_$abort_line (sci_ptr, 0, "Usage: ^a LOG_PATH LOG_HISTORY_DIR_PATH", COMMAND_NAME); 71 call ssu_$arg_ptr (sci_ptr, 1, arg_ptr, arg_lth); 72 call expand_pathname_ (arg, log_dname, log_ename, code); 73 if code ^= 0 74 then call ssu_$abort_line (sci_ptr, code, "^a", arg); 75 call initiate_file_ (log_dname, log_ename, RW_ACCESS, log_segment_ptr, (0), code); 76 if code ^= 0 77 then call ssu_$abort_line (sci_ptr, code, "^a", pathname_ (log_dname, log_ename)); 78 if log_segment.version ^= LOG_SEGMENT_VERSION_1 79 then call ssu_$abort_line (sci_ptr, 0, 80 "The segment ^a is not a current version log segment or is seriously damaged.", 81 pathname_ (log_dname, log_ename)); 82 call ssu_$arg_ptr (sci_ptr, 2, arg_ptr, arg_lth); 83 call absolute_pathname_ (arg, log_history_dir, code); 84 if code ^= 0 85 then call ssu_$abort_line (sci_ptr, code, "^a", code); 86 call hcs_$status_minf (log_history_dir, "", (1), type, (0), code); 87 if code = 0 & type ^= 2 88 then code = error_table_$notadir; 89 if code = 0 90 then yes = "1"b; 91 else if code = error_table_$noentry 92 then call command_query_$yes_no (yes, 0, COMMAND_NAME, "", 93 "The directory ^a does not exist. Are you sure that you want to set it as the history dir?", 94 log_history_dir); 95 else if code ^= 0 96 then call command_query_$yes_no (yes, code, COMMAND_NAME, "", 97 "^a. Are you sure that you want to set it as the history directory?", 98 log_history_dir); 99 if ^yes 100 then call ssu_$abort_line (sci_ptr, 0, "History dir not changed."); 101 log_segment.previous_log_dir = log_history_dir; 102 call clean_up; 103 return; 104 105 SSU_ABORT: 106 procedure; 107 go to ABORT_LABEL; 108 end SSU_ABORT; 109 110 ABORT_LABEL: 111 call clean_up; 112 return; 113 114 clean_up: 115 procedure; 116 117 if log_segment_ptr ^= null () 118 then call terminate_file_ (log_segment_ptr, (0), TERM_FILE_TERM, (0)); 119 if sci_ptr ^= null () 120 then call ssu_$destroy_invocation (sci_ptr); 121 return; 122 end clean_up; 123 124 /* format: off */ 125 /* BEGIN INCLUDE FILE ... log_segment.incl.pl1 ... 84-05-03 ... W. Olin Sibert */ 1 2 1 3 declare log_segment_ptr pointer; 1 4 declare log_segment_max_size fixed bin (18); 1 5 declare LOG_SEGMENT_VERSION_1 char (8) internal static options (constant) init ("SysLog01"); 1 6 1 7 1 8 declare 1 log_segment aligned based (log_segment_ptr), 1 9 2 header aligned like log_segment_header, 1 10 2 data dim (log_segment_max_size refer (log_segment.max_size)) bit (36) aligned; 1 11 1 12 1 13 declare 1 log_segment_header aligned based, 1 14 2 version char (8) unaligned, /* LOG_SEGMENT_VERSION_1 */ 1 15 2 time_created fixed bin (71), /* When the segment header was initialized */ 1 16 2 previous_log_dir char (168) unaligned, /* Directory containing previous log segment */ 1 17 1 18 2 limits, 1 19 3 first_sequence fixed bin (35), /* First and last sequence numbers / time stamps */ 1 20 3 last_sequence fixed bin (35), /* of messages in the log. These may be slightly */ 1 21 3 first_time fixed bin (71), /* incorrect due to lockless updating strategy */ 1 22 3 last_time fixed bin (71), 1 23 1 24 2 alloc_info, /* Complex STACQ hack for allocating and assigning */ 1 25 3 word_1 fixed bin (18), /* sequence numbers locklessly. See log_segment_ */ 1 26 3 word_2 bit (36) aligned, /* for details of strategy */ 1 27 2 max_size fixed bin (18), /* Total words in data area */ 1 28 1 29 2 listeners_registered bit (1) aligned, /* Set if ANY processes were ever registered-- it's only */ 1 30 2 listener_bootload_time fixed bin (71), /* kept here for efficiency. The bootload time is used to */ 1 31 /* detect all the dead listeners after a reboot */ 1 32 2 listener (25), /* Processes waiting for messages in the log */ 1 33 3 process_id bit (36) aligned, 1 34 3 event_channel fixed bin (71) unaligned, /* Saves space-- allows 3-word entries */ 1 35 1 36 2 last_wakeup_time fixed bin (71), /* When last wakeup was sent */ 1 37 2 wakeup_delta fixed bin (71), /* Wakeups sent no more than once per this interval */ 1 38 1 39 2 pad (6) fixed bin (71); /* Pad header to 150 words */ 1 40 1 41 1 42 declare LOG_SEGMENT_NEW_MESSAGE init ("777111555333"b3) bit (36) aligned internal static options (constant); 1 43 declare LOG_SEGMENT_COMPLETE_MESSAGE init ("666000444222"b3) bit (36) aligned internal static options (constant); 1 44 1 45 /* END INCLUDE FILE ... log_segment.incl.pl1 */ 125 126 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 2 2* 2 3* Values for the "access mode" argument so often used in hardcore 2 4* James R. Davis 26 Jan 81 MCR 4844 2 5* Added constants for SM access 4/28/82 Jay Pattin 2 6* Added text strings 03/19/85 Chris Jones 2 7**/ 2 8 2 9 2 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 2 11 dcl ( 2 12 N_ACCESS init ("000"b), 2 13 R_ACCESS init ("100"b), 2 14 E_ACCESS init ("010"b), 2 15 W_ACCESS init ("001"b), 2 16 RE_ACCESS init ("110"b), 2 17 REW_ACCESS init ("111"b), 2 18 RW_ACCESS init ("101"b), 2 19 S_ACCESS init ("100"b), 2 20 M_ACCESS init ("010"b), 2 21 A_ACCESS init ("001"b), 2 22 SA_ACCESS init ("101"b), 2 23 SM_ACCESS init ("110"b), 2 24 SMA_ACCESS init ("111"b) 2 25 ) bit (3) internal static options (constant); 2 26 2 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 2 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 2 29 2 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 2 31 static options (constant); 2 32 2 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 2 34 static options (constant); 2 35 2 36 dcl ( 2 37 N_ACCESS_BIN init (00000b), 2 38 R_ACCESS_BIN init (01000b), 2 39 E_ACCESS_BIN init (00100b), 2 40 W_ACCESS_BIN init (00010b), 2 41 RW_ACCESS_BIN init (01010b), 2 42 RE_ACCESS_BIN init (01100b), 2 43 REW_ACCESS_BIN init (01110b), 2 44 S_ACCESS_BIN init (01000b), 2 45 M_ACCESS_BIN init (00010b), 2 46 A_ACCESS_BIN init (00001b), 2 47 SA_ACCESS_BIN init (01001b), 2 48 SM_ACCESS_BIN init (01010b), 2 49 SMA_ACCESS_BIN init (01011b) 2 50 ) fixed bin (5) internal static options (constant); 2 51 2 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 126 3 1 /* BEGIN INCLUDE FILE ... terminate_file.incl.pl1 */ 3 2 /* format: style2,^inddcls,idind32 */ 3 3 3 4 declare 1 terminate_file_switches based, 3 5 2 truncate bit (1) unaligned, 3 6 2 set_bc bit (1) unaligned, 3 7 2 terminate bit (1) unaligned, 3 8 2 force_write bit (1) unaligned, 3 9 2 delete bit (1) unaligned; 3 10 3 11 declare TERM_FILE_TRUNC bit (1) internal static options (constant) initial ("1"b); 3 12 declare TERM_FILE_BC bit (2) internal static options (constant) initial ("01"b); 3 13 declare TERM_FILE_TRUNC_BC bit (2) internal static options (constant) initial ("11"b); 3 14 declare TERM_FILE_TERM bit (3) internal static options (constant) initial ("001"b); 3 15 declare TERM_FILE_TRUNC_BC_TERM bit (3) internal static options (constant) initial ("111"b); 3 16 declare TERM_FILE_FORCE_WRITE bit (4) internal static options (constant) initial ("0001"b); 3 17 declare TERM_FILE_DELETE bit (5) internal static options (constant) initial ("00001"b); 3 18 3 19 /* END INCLUDE FILE ... terminate_file.incl.pl1 */ 127 128 129 end set_log_history_dir; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/08/85 1133.0 set_log_history_dir.pl1 >special_ldd>online>41-15-04/10/85>set_log_history_dir.pl1 125 1 12/04/84 2124.9 log_segment.incl.pl1 >ldd>include>log_segment.incl.pl1 126 2 04/09/85 1109.7 access_mode_values.incl.pl1 >special_ldd>online>41-15-04/10/85>access_mode_values.incl.pl1 127 3 04/06/83 1239.4 terminate_file.incl.pl1 >ldd>include>terminate_file.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. COMMAND_NAME 000004 constant char(32) initial unaligned dcl 53 set ref 60* 63* 69* 91* 95* LOG_SEGMENT_VERSION_1 000002 constant char(8) initial unaligned dcl 1-5 ref 78 RW_ACCESS 000035 constant bit(3) initial unaligned dcl 2-11 set ref 75* TERM_FILE_TERM 000000 constant bit(3) initial unaligned dcl 3-14 set ref 117* absolute_pathname_ 000010 constant entry external dcl 26 ref 83 arg based char unaligned dcl 14 set ref 72* 73* 83* arg_count 000104 automatic fixed bin(17,0) dcl 17 set ref 68* 69 arg_lth 000100 automatic fixed bin(21,0) dcl 15 set ref 71* 72 72 73 73 82* 83 83 arg_ptr 000102 automatic pointer dcl 16 set ref 71* 72 73 82* 83 cleanup 000246 stack reference condition dcl 50 ref 58 code 000105 automatic fixed bin(35,0) dcl 18 set ref 60* 61 63* 72* 73 73* 75* 76 76* 83* 84 84* 84* 86* 87 87* 89 91 95 95* com_err_ 000012 constant entry external dcl 27 ref 63 command_query_$yes_no 000014 constant entry external dcl 28 ref 91 95 cu_$arg_list_ptr 000016 constant entry external dcl 30 ref 60 60 error_table_$noentry 000046 external static fixed bin(35,0) dcl 48 ref 91 error_table_$notadir 000044 external static fixed bin(35,0) dcl 47 ref 87 expand_pathname_ 000020 constant entry external dcl 31 ref 72 hcs_$status_minf 000022 constant entry external dcl 32 ref 86 header based structure level 2 dcl 1-8 initiate_file_ 000024 constant entry external dcl 34 ref 75 log_dname 000106 automatic char(168) unaligned dcl 19 set ref 72* 75* 76* 76* 78* 78* log_ename 000160 automatic char(32) unaligned dcl 20 set ref 72* 75* 76* 76* 78* 78* log_history_dir 000170 automatic char(168) unaligned dcl 21 set ref 83* 86* 91* 95* 101 log_segment based structure level 1 dcl 1-8 log_segment_header based structure level 1 dcl 1-13 log_segment_ptr 000254 automatic pointer dcl 1-3 set ref 56* 75* 78 101 117 117* pathname_ 000026 constant entry external dcl 36 ref 76 76 78 78 previous_log_dir 4 based char(168) level 3 packed unaligned dcl 1-8 set ref 101* sci_ptr 000242 automatic pointer dcl 22 set ref 56* 60* 68* 69* 71* 73* 76* 78* 82* 84* 99* 119 119* ssu_$abort_line 000040 constant entry external dcl 44 ref 69 73 76 78 84 99 ssu_$arg_count 000030 constant entry external dcl 38 ref 68 ssu_$arg_ptr 000036 constant entry external dcl 43 ref 71 82 ssu_$destroy_invocation 000034 constant entry external dcl 41 ref 119 ssu_$standalone_invocation 000032 constant entry external dcl 39 ref 60 terminate_file_ 000042 constant entry external dcl 45 ref 117 type 000244 automatic fixed bin(2,0) dcl 23 set ref 86* 87 version based char(8) level 3 packed unaligned dcl 1-8 ref 78 yes 000245 automatic bit(1) dcl 24 set ref 89* 91* 95* 99 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial unaligned dcl 2-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 2-33 E_ACCESS internal static bit(3) initial unaligned dcl 2-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 LOG_SEGMENT_COMPLETE_MESSAGE internal static bit(36) initial dcl 1-43 LOG_SEGMENT_NEW_MESSAGE internal static bit(36) initial dcl 1-42 M_ACCESS internal static bit(3) initial unaligned dcl 2-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 N_ACCESS internal static bit(3) initial unaligned dcl 2-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 REW_ACCESS internal static bit(3) initial unaligned dcl 2-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 RE_ACCESS internal static bit(3) initial unaligned dcl 2-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 R_ACCESS internal static bit(3) initial unaligned dcl 2-11 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SA_ACCESS internal static bit(3) initial unaligned dcl 2-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 2-30 SMA_ACCESS internal static bit(3) initial unaligned dcl 2-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 SM_ACCESS internal static bit(3) initial unaligned dcl 2-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 S_ACCESS internal static bit(3) initial unaligned dcl 2-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 TERM_FILE_BC internal static bit(2) initial unaligned dcl 3-12 TERM_FILE_DELETE internal static bit(5) initial unaligned dcl 3-17 TERM_FILE_FORCE_WRITE internal static bit(4) initial unaligned dcl 3-16 TERM_FILE_TRUNC internal static bit(1) initial unaligned dcl 3-11 TERM_FILE_TRUNC_BC internal static bit(2) initial unaligned dcl 3-13 TERM_FILE_TRUNC_BC_TERM internal static bit(3) initial unaligned dcl 3-15 W_ACCESS internal static bit(3) initial unaligned dcl 2-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 2-36 log_segment_max_size automatic fixed bin(18,0) dcl 1-4 terminate_file_switches based structure level 1 packed unaligned dcl 3-4 NAMES DECLARED BY EXPLICIT CONTEXT. ABORT_LABEL 001203 constant label dcl 110 ref 107 SSU_ABORT 001211 constant entry internal dcl 105 ref 60 60 clean_up 001222 constant entry internal dcl 114 ref 58 102 110 set_log_history_dir 000174 constant entry external dcl 7 NAME DECLARED BY CONTEXT OR IMPLICATION. null builtin function ref 56 117 119 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1534 1604 1277 1544 Length 2074 1277 50 253 235 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME set_log_history_dir 283 external procedure is an external procedure. on unit on line 58 64 on unit SSU_ABORT 64 internal procedure is assigned to an entry variable. clean_up 84 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME set_log_history_dir 000100 arg_lth set_log_history_dir 000102 arg_ptr set_log_history_dir 000104 arg_count set_log_history_dir 000105 code set_log_history_dir 000106 log_dname set_log_history_dir 000160 log_ename set_log_history_dir 000170 log_history_dir set_log_history_dir 000242 sci_ptr set_log_history_dir 000244 type set_log_history_dir 000245 yes set_log_history_dir 000254 log_segment_ptr set_log_history_dir THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return tra_ext enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. absolute_pathname_ com_err_ command_query_$yes_no cu_$arg_list_ptr expand_pathname_ hcs_$status_minf initiate_file_ pathname_ ssu_$abort_line ssu_$arg_count ssu_$arg_ptr ssu_$destroy_invocation ssu_$standalone_invocation terminate_file_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noentry error_table_$notadir LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 7 000173 56 000201 58 000204 60 000226 61 000276 63 000300 64 000324 68 000325 69 000336 71 000372 72 000411 73 000441 75 000475 76 000533 78 000604 82 000662 83 000701 84 000725 86 000755 87 001015 89 001025 91 001032 95 001076 99 001137 101 001172 102 001176 103 001202 110 001203 112 001207 105 001210 107 001216 114 001221 117 001227 119 001262 121 001276 ----------------------------------------------------------- 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