COMPILATION LISTING OF SEGMENT memo_delete_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1646.9 mst Thu 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 memo_delete_: proc (P_msp, P_idx, P_force_sw); 12 13 dcl (P_msp pointer, /* memo segment pointer */ 14 P_idx fixed bin, /* which memo to delete */ 15 P_force_sw bit (1) aligned) parameter; /* whether to delete immature memos without asking */ 16 17 dcl success bit (1); 18 dcl n fixed bin (35); 19 dcl memo_idx fixed bin; /* which entry in memo_segment to be deleted */ 20 dcl based_bit36 bit (36) aligned based; 21 dcl (old_n, new_n) bit (36) aligned; 22 dcl maturity_time fixed bin (71); 23 dcl answer char (32) varying; 24 25 dcl command_query_ entry options (variable); 26 dcl memo_util_$end_of_memo_time entry () returns (fixed bin (35)); 27 dcl memo_util_$to_gmt entry (fixed bin (35)) returns (fixed bin (71)); 28 29 dcl whoami char (32) internal static options (constant) init ("memo"); 30 31 dcl (addr, clock, null, stacq, unspec) builtin; 32 33 /* */ 34 35 /* * If this is the last memo, decrement the high-water mark counter. The stacq 36* * builtin can do so uninterruptibly. (necessary because there is no lock 37* * on the counter itself). If it fails, it means that someone has changed the 38* * value in the meantime, so we do nothing. */ 39 40 memo_segment_ptr = P_msp; 41 memo_idx = P_idx; 42 43 n = memo_segment.max_number_used; 44 old_n = unspec (n); 45 n = n - 1; 46 new_n = unspec (n); 47 n = n + 1; 48 49 if memo_idx = n then 50 success = stacq (addr (memo_segment.max_number_used) -> based_bit36, old_n, new_n); 51 52 maturity_time = memo_util_$to_gmt (memo_entry (P_idx).time); 53 54 if (maturity_time > clock ()) & ^P_force_sw then do; /* don't delete immature memos without asking first */ 55 query_info.version = query_info_version_5; 56 query_info.yes_or_no_sw = "1"b; 57 query_info.suppress_spacing = "1"b; 58 call command_query_ (addr (query_info), answer, whoami, 59 "Memo ^d is ^[invisible^;not mature^]. Delete?^2x", 60 memo_idx, (memo_entry (memo_idx).time >= memo_util_$end_of_memo_time ())); 61 if answer ^= "yes" then return; /* just give up */ 62 end; 63 64 unspec (memo_entry (memo_idx)) = ""b; /* zero out entire memo for quota reasons */ 65 66 return; /* all done */ 67 /* BEGIN INCLUDE FILE ... memo_segment.incl.pl1 ... July, 1979 ... W. Olin Sibert */ 1 2 /* * This include file describes a memo segment. Presently, this structure is still 1 3* * compatible with "old" version 3 memo segments, although it uses more of the pad 1 4* * fields; hence, it is still identified as version 3. If the conversion to version 1 5* * 4 memo segments is ever done, this will have to be changed for version 4. 1 6* */ 1 7 1 8 dcl memo_segment_ptr pointer; 1 9 1 10 dcl MAX_NUMBER_MEMOS fixed bin internal static options (constant) init (5802); 1 11 /* max number of memos in a memo segment */ 1 12 1 13 dcl MEMO_SEGMENT_VERSION_3 fixed bin internal static options (constant) init (3); 1 14 1 15 dcl 1 memo_segment aligned based (memo_segment_ptr), /* current version of whole segment */ 1 16 2 header like memo_segment_header, 1 17 2 memo_entry (MAX_NUMBER_MEMOS) like memo_segment_entry; 1 18 1 19 dcl 1 memo_segment_header aligned based, /* header for memo segment */ 1 20 2 version fixed bin (35), /* presently 3 */ 1 21 2 max_number_used fixed bin (35); /* The highest entry known to be used */ 1 22 1 23 dcl 1 memo_segment_entry aligned based, /* the entry for a single memo */ 1 24 2 taken bit (36) aligned, /* Zero if this entry free */ 1 25 2 flags aligned, /* data about this memo */ 1 26 3 print bit (1) unaligned, /* normal type memo */ 1 27 3 alarm bit (1) unaligned, /* alarm type */ 1 28 3 execute bit (1) unaligned, /* execute type */ 1 29 3 repeatsw bit (1) unaligned, /* has repeat string */ 1 30 3 expires bit (1) unaligned, /* has expiration time */ 1 31 3 remains bit (1) unaligned, /* do not delete this memo when its alarm goes off */ 1 32 3 single bit (1) unaligned, /* delete this non-alarm memo after one printing or execution */ 1 33 3 per_process bit (1) unaligned, /* causes repeat to be done from time_now, not maturity */ 1 34 3 pad1 bit (28) unaligned, /* not used */ 1 35 2 exp_delta fixed bin (35), /* delta time before memo expires */ 1 36 2 time fixed bin (35), /* time this memo matures */ 1 37 2 data char (132) aligned, /* the memo message */ 1 38 2 repeat char (32) aligned; /* the repeat string */ 1 39 1 40 /* END INCLUDE FILE memo_segment.incl.pl1 */ 67 68 /* BEGIN INCLUDE FILE query_info.incl.pl1 TAC June 1, 1973 */ 2 2 /* Renamed to query_info.incl.pl1 and cp_escape_control added, 08/10/78 WOS */ 2 3 /* version number changed to 4, 08/10/78 WOS */ 2 4 /* Version 5 adds explanation_(ptr len) 05/08/81 S. Herbst */ 2 5 2 6 dcl 1 query_info aligned, /* argument structure for command_query_ call */ 2 7 2 version fixed bin, /* version of this structure - must be set, see below */ 2 8 2 switches aligned, /* various bit switch values */ 2 9 3 yes_or_no_sw bit (1) unaligned init ("0"b), /* not a yes-or-no question, by default */ 2 10 3 suppress_name_sw bit (1) unaligned init ("0"b), /* do not suppress command name */ 2 11 3 cp_escape_control bit (2) unaligned init ("00"b), /* obey static default value */ 2 12 /* "01" -> invalid, "10" -> don't allow, "11" -> allow */ 2 13 3 suppress_spacing bit (1) unaligned init ("0"b), /* whether to print extra spacing */ 2 14 3 padding bit (31) unaligned init (""b), /* pads it out to t word */ 2 15 2 status_code fixed bin (35) init (0), /* query not prompted by any error, by default */ 2 16 2 query_code fixed bin (35) init (0), /* currently has no meaning */ 2 17 2 18 /* Limit of data defined for version 2 */ 2 19 2 20 2 question_iocbp ptr init (null ()), /* IO switch to write question */ 2 21 2 answer_iocbp ptr init (null ()), /* IO switch to read answer */ 2 22 2 repeat_time fixed bin (71) init (0), /* repeat question every N seconds if no answer */ 2 23 /* minimum of 30 seconds required for repeat */ 2 24 /* otherwise, no repeat will occur */ 2 25 /* Limit of data defined for version 4 */ 2 26 2 27 2 explanation_ptr ptr init (null ()), /* explanation of question to be printed if */ 2 28 2 explanation_len fixed bin (21) init (0); /* user answers "?" (disabled if ptr=null or len=0) */ 2 29 2 30 dcl query_info_version_3 fixed bin int static options (constant) init (3); 2 31 dcl query_info_version_4 fixed bin int static options (constant) init (4); 2 32 dcl query_info_version_5 fixed bin int static options (constant) init (5); /* the current version number */ 2 33 2 34 /* END INCLUDE FILE query_info.incl.pl1 */ 68 69 70 end; /* external procedure memo_delete_ */ SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1614.8 memo_delete_.pl1 >dumps>old>recomp>memo_delete_.pl1 67 1 08/18/81 1510.4 memo_segment.incl.pl1 >ldd>include>memo_segment.incl.pl1 68 2 08/12/81 0911.2 query_info.incl.pl1 >ldd>include>query_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. P_force_sw parameter bit(1) dcl 13 ref 11 54 P_idx parameter fixed bin(17,0) dcl 13 ref 11 41 52 P_msp parameter pointer dcl 13 ref 11 40 addr builtin function dcl 31 ref 49 58 58 answer 000110 automatic varying char(32) dcl 23 set ref 58* 61 answer_iocbp 6 000124 automatic pointer initial level 2 dcl 2-6 set ref 2-6* based_bit36 based bit(36) dcl 20 ref 49 clock builtin function dcl 31 ref 54 command_query_ 000010 constant entry external dcl 25 ref 58 cp_escape_control 1(02) 000124 automatic bit(2) initial level 3 packed unaligned dcl 2-6 set ref 2-6* explanation_len 14 000124 automatic fixed bin(21,0) initial level 2 dcl 2-6 set ref 2-6* explanation_ptr 12 000124 automatic pointer initial level 2 dcl 2-6 set ref 2-6* header based structure level 2 dcl 1-15 maturity_time 000106 automatic fixed bin(71,0) dcl 22 set ref 52* 54 max_number_used 1 based fixed bin(35,0) level 3 dcl 1-15 set ref 43 49 memo_entry 2 based structure array level 2 dcl 1-15 set ref 64* memo_idx 000102 automatic fixed bin(17,0) dcl 19 set ref 41* 49 58* 58 64 memo_segment based structure level 1 dcl 1-15 memo_segment_entry based structure level 1 dcl 1-23 memo_segment_header based structure level 1 dcl 1-19 memo_segment_ptr 000122 automatic pointer dcl 1-8 set ref 40* 43 49 52 58 64 memo_util_$end_of_memo_time 000012 constant entry external dcl 26 ref 58 memo_util_$to_gmt 000014 constant entry external dcl 27 ref 52 n 000101 automatic fixed bin(35,0) dcl 18 set ref 43* 44 45* 45 46 47* 47 49 new_n 000104 automatic bit(36) dcl 21 set ref 46* 49 null builtin function dcl 31 ref 2-6 2-6 2-6 old_n 000103 automatic bit(36) dcl 21 set ref 44* 49 padding 1(05) 000124 automatic bit(31) initial level 3 packed unaligned dcl 2-6 set ref 2-6* query_code 3 000124 automatic fixed bin(35,0) initial level 2 dcl 2-6 set ref 2-6* query_info 000124 automatic structure level 1 dcl 2-6 set ref 58 58 query_info_version_5 constant fixed bin(17,0) initial dcl 2-32 ref 55 question_iocbp 4 000124 automatic pointer initial level 2 dcl 2-6 set ref 2-6* repeat_time 10 000124 automatic fixed bin(71,0) initial level 2 dcl 2-6 set ref 2-6* stacq builtin function dcl 31 ref 49 status_code 2 000124 automatic fixed bin(35,0) initial level 2 dcl 2-6 set ref 2-6* success 000100 automatic bit(1) unaligned dcl 17 set ref 49* suppress_name_sw 1(01) 000124 automatic bit(1) initial level 3 packed unaligned dcl 2-6 set ref 2-6* suppress_spacing 1(04) 000124 automatic bit(1) initial level 3 packed unaligned dcl 2-6 set ref 57* 2-6* switches 1 000124 automatic structure level 2 dcl 2-6 time 5 based fixed bin(35,0) array level 3 dcl 1-15 set ref 52* 58 unspec builtin function dcl 31 set ref 44 46 64* version 000124 automatic fixed bin(17,0) level 2 dcl 2-6 set ref 55* whoami 000000 constant char(32) initial unaligned dcl 29 set ref 58* yes_or_no_sw 1 000124 automatic bit(1) initial level 3 packed unaligned dcl 2-6 set ref 56* 2-6* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. MAX_NUMBER_MEMOS internal static fixed bin(17,0) initial dcl 1-10 MEMO_SEGMENT_VERSION_3 internal static fixed bin(17,0) initial dcl 1-13 query_info_version_3 internal static fixed bin(17,0) initial dcl 2-30 query_info_version_4 internal static fixed bin(17,0) initial dcl 2-31 NAME DECLARED BY EXPLICIT CONTEXT. memo_delete_ 000046 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 344 362 267 354 Length 560 267 16 162 54 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME memo_delete_ 144 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME memo_delete_ 000100 success memo_delete_ 000101 n memo_delete_ 000102 memo_idx memo_delete_ 000103 old_n memo_delete_ 000104 new_n memo_delete_ 000106 maturity_time memo_delete_ 000110 answer memo_delete_ 000122 memo_segment_ptr memo_delete_ 000124 query_info memo_delete_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_l_a r_ge_a call_ext_out_desc call_ext_out return ext_entry stacq clock THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. command_query_ memo_util_$end_of_memo_time memo_util_$to_gmt NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000042 2 6 000053 40 000077 41 000103 43 000105 44 000107 45 000111 46 000117 47 000121 49 000125 52 000134 54 000146 55 000160 56 000162 57 000164 58 000166 61 000246 64 000253 66 000262 ----------------------------------------------------------- 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