COMPILATION LISTING OF SEGMENT xmail_undelete_msgs_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-18_1131.45_Tue_mdt 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 12 13 /****^ HISTORY COMMENTS: 14* 1) change(86-02-26,Blair), approve(86-02-26,MCR7358), 15* audit(86-04-18,RBarstad), install(86-05-28,MR12.0-1062): 16* On a cleanup exit ( user hits break when in Multics mode) we come here to 17* undelete any messages marked for deletion, but we don't want to put out 18* the message to the user. 19* END HISTORY COMMENTS */ 20 21 22 xmail_undelete_msgs_: proc (P_mailbox_ptr, P_curr_msgsp, P_pos_line, P_flavor); 23 24 /* Author unknown 25* 26* 83-07-27 DJ Schimke: Modified to use new mail_system calls and version 2 27* mailboxes. 28**/ 29 30 /* Parameter */ 31 32 dcl P_mailbox_ptr ptr; 33 dcl P_curr_msgsp ptr; 34 dcl P_pos_line char (*); 35 dcl P_flavor char (*); 36 37 /* Automatic */ 38 39 dcl add_more_msg bit (1) aligned; 40 dcl code fixed bin (35); 41 dcl deleted_msgsp ptr; 42 dcl i fixed bin; 43 dcl message_num fixed bin; 44 dcl message_ptr ptr; 45 46 /* Builtin */ 47 48 dcl (length, maxlength, null, rtrim) builtin; 49 50 /* Entries */ 51 52 dcl ioa_ entry () options (variable); 53 dcl mail_system_$read_message entry (ptr, fixed bin, fixed bin (35)); 54 dcl mail_system_$unmark_message_for_deletion entry (ptr, fixed bin (35)); 55 dcl xmail_error_$no_code entry () options (variable); 56 dcl xmail_select_msgs_$deleted entry (ptr, ptr, char (*)); 57 dcl xmail_select_msgs_$replace_curr entry (ptr, ptr, char (*)); 58 59 /* Constant */ 60 61 dcl ME_CHAR char (20) init ("xmail_undelete_msgs_") int static options (constant); 62 dcl MORE_MSG char (9) init (" MORE ...") int static options (constant); 63 64 mailbox_ptr = P_mailbox_ptr; 65 66 67 call xmail_select_msgs_$deleted (mailbox_ptr, deleted_msgsp, P_flavor); 68 69 if deleted_msgsp = null then goto EXIT; 70 do i = 1 to deleted_msgsp -> curr_msgs.count; 71 message_num = deleted_msgsp -> curr_msgs.numbers (i); 72 if mailbox.messages (message_num).message_ptr = null 73 then do; 74 call mail_system_$read_message (mailbox_ptr, message_num, code); 75 if code ^= 0 76 then call xmail_error_$no_code (code, ME_CHAR, "l", "Unable to read message ^d. This is an internal programming error.", message_num); 77 end; 78 message_ptr = mailbox.messages (message_num).message_ptr; 79 call mail_system_$unmark_message_for_deletion (message_ptr, code); 80 if code ^= 0 then call xmail_error_$no_code (code, ME_CHAR, "l", "Unable to retrieve message ^d. This is an internal programming error.", message_num); 81 end; 82 83 call xmail_select_msgs_$replace_curr (P_curr_msgsp, deleted_msgsp, P_pos_line); 84 85 86 87 if length (rtrim (P_pos_line)) > maxlength (P_pos_line) - length (MORE_MSG) then add_more_msg = "1"b; 88 else add_more_msg = "0"b; 89 if ^xmail_data.cleanup_signalled 90 then call ioa_ ("Message^[s^;^] ^a ^[^a^] retrieved.", (deleted_msgsp -> curr_msgs.count > 1), rtrim (P_pos_line), add_more_msg, MORE_MSG); 91 92 EXIT: 93 94 return; 95 96 1 1 /* Created 06/17/81 by Suzanne Krupp */ 1 2 1 3 dcl n_messages fixed bin; 1 4 dcl MSG_STRUCT_VERSION_1 fixed bin int static options(constant) init(1); 1 5 1 6 dcl curr_msgsp ptr; 1 7 1 8 dcl 1 curr_msgs based(curr_msgsp), 1 9 2 version fixed bin, 1 10 2 count fixed bin, 1 11 2 numbers (n_messages refer(curr_msgs.count)) fixed bin; 1 12 1 13 dcl nonexist_msgsp ptr; 1 14 1 15 dcl 1 nonexist_msgs based(nonexist_msgsp), 1 16 2 version fixed bin, 1 17 2 count fixed bin, 1 18 2 numbers (n_messages refer(nonexist_msgs.count)) fixed bin; 1 19 1 20 dcl msg_structp ptr; 1 21 1 22 dcl 1 msg_struct based(msg_structp), 1 23 2 version fixed bin, 1 24 2 count fixed bin, 1 25 2 numbers(n_messages refer(msg_struct.count)) fixed bin; 98 2 1 /* BEGIN INCLUDE FILE ... mlsys_mailbox.incl.pl1 */ 2 2 /* Created: April 1983 by G. Palter */ 2 3 2 4 /* Definition of a mailbox as used by the Multics Mail System */ 2 5 2 6 dcl 1 mailbox aligned based (mailbox_ptr), 2 7 2 version character (8) unaligned, 2 8 2 reserved bit (144), /* for exclusive use of the mail system */ 2 9 2 mailbox_address pointer, /* mail system address of this mailbox */ 2 10 2 mailbox_dirname character (168) unaligned, /* directory containing this mailbox */ 2 11 2 mailbox_ename character (32) unaligned, /* entry name of this mailbox (includes ".mbx") */ 2 12 2 mailbox_type fixed binary, /* type of mailbox (see below) */ 2 13 2 mode bit (36), /* user's effective extended access to this mailbox */ 2 14 2 flags, 2 15 3 salvaged bit (1) unaligned, /* ON => this mailbox has been salvaged since last open */ 2 16 3 reserved bit (35) unaligned, /* for exclusive use of the mail system */ 2 17 2 message_selection_mode fixed binary, /* types of messages read: all/ordinary/interactive */ 2 18 2 sender_selection_mode fixed binary, /* whose messages were read: all/own/not-own */ 2 19 2 message_reading_level fixed binary, /* how much of each message read: keys/messages */ 2 20 2 n_messages fixed binary, /* total # of messages in this mailbox structure */ 2 21 2 n_ordinary_messages fixed binary, /* ... # of ordinary messages here */ 2 22 2 n_interactive_messages fixed binary, /* ... # of interactive messages here */ 2 23 2 n_deleted_messages fixed binary, /* ... # of messages here marked for later deletion */ 2 24 2 messages (mailbox_n_messages refer (mailbox.n_messages)), 2 25 3 key bit (72), /* unique key to read this message if not already read */ 2 26 3 message_ptr pointer; /* -> the message structure */ 2 27 2 28 dcl MAILBOX_VERSION_2 character (8) static options (constant) initial ("mlsmbx02"); 2 29 2 30 dcl mailbox_ptr pointer; 2 31 2 32 dcl mailbox_n_messages fixed binary; /* for exclusive use of the mail system */ 2 33 2 34 2 35 /* Types of mailboxes distinguished by the mail system */ 2 36 2 37 dcl (USER_DEFAULT_MAILBOX initial (1), /* the user's default mailbox for receiving mail */ 2 38 USER_LOGBOX initial (2), /* the user's logbox */ 2 39 SAVEBOX initial (3), /* a savebox */ 2 40 OTHER_MAILBOX initial (4)) /* any other type of mailbox */ 2 41 fixed binary static options (constant); 2 42 2 43 /* END INCLUDE FILE ... mlsys_mailbox.incl.pl1 */ 99 100 3 1 /* BEGIN INCLUDE FILE ... xmail_prompts.incl.pl1 */ 3 2 3 3 /****^ HISTORY COMMENTS: 3 4* 1) change(85-03-06,Backs), approve(86-03-06,MCR7358), 3 5* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 3 6* Modified to add prompts for date selection. 3 7* END HISTORY COMMENTS */ 3 8 3 9 /* Created 06/17/81 by Suzanne Krupp */ 3 10 3 11 3 12 dcl (MSG_SELECT_PROMPT char(40) init("Which message(s) do you wish to select? "), 3 13 DEL_MSG_SELECT_PROMPT char(63) init ("Which message(s) do you wish to retrieve? (for list, enter ??) "), 3 14 NONEXIST_MSG char(66) init("The following messages either do not exist or have been discarded:"), 3 15 DEL_NONEXIST_MSG char(70) init("The following messages either do not exist or have NOT been discarded:"), 3 16 CURR_SET_MSG char(70) init("This means that the set of current messages consists of the following:"), 3 17 CURR_DEL_SET_MSG char(58) init("This means that the following messages will be retrieved:"), 3 18 USE_SPEC_SET_PROMPT char(45) init("Do you wish to use these as current messages?"), 3 19 SEARCH_STR_PROMPT char(11) init("Search for:"), 3 20 UNDELETE_FINISHED_MSG char(24) init("Message^a ^a retrieved."), 3 21 MSG_LIST_MSG char(17) init("List of messages:"), 3 22 DATE_1_PROMPT char(23) init("Earliest date in range:"), 3 23 DATE_2_PROMPT char(21) init("Latest date in range:"), 3 24 DEL_MSG_LIST_MSG char(27) init("List of discarded messages:")) 3 25 int static options(constant); 3 26 3 27 /* END INCLUDE FILE ... xmail_prompts.incl.pl1 */ 101 102 4 1 /* BEGIN INCLUDE FILE: xmail_data.incl.pl1 */ 4 2 4 3 4 4 /****^ HISTORY COMMENTS: 4 5* 1) change(85-12-20,Blair), approve(86-03-06,MCR7358), 4 6* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 4 7* Modified 03/15/85 by Joanne Backs adding confirm_print flag. 4 8* 2) change(85-12-20,LJAdams), approve(86-03-06,MCR7358), 4 9* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 4 10* Adding switch to indicate request for menu display came from general help. 4 11* This is so general help menu will be displayed in top screen. 4 12* 3) change(86-01-10,Blair), approve(86-03-06,MCR7358), 4 13* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 4 14* Add switch to indicate whether or not it is permissible to process mail 4 15* in other users' mailboxes (foreign_mailbox). 4 16* 4) change(86-01-13,Blair), approve(86-03-06,MCR7358), 4 17* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 4 18* Add bit to indicate whether or not this is a true cleanup condition. 4 19* 5) change(86-02-06,Blair), approve(86-03-06,MCR7358), 4 20* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 4 21* Rearrange to group all the bit flags together in one word with a pad. 4 22* 6) change(86-03-05,Blair), approve(86-03-05,MCR7358), 4 23* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 4 24* Change value_seg ptr to value_seg_pathname to avoid the situation where 4 25* you keep around a pointer to a structure which no longer exists. 4 26* 7) change(87-01-16,Blair), approve(87-02-05,MCR7618), 4 27* audit(87-04-15,RBarstad), install(87-04-26,MR12.1-1025): 4 28* Add a field to indicate whether or not we should process interactive msgs. 4 29* Increment version to 4.1 so default value will get set. 4 30* 8) change(87-02-13,Blair), approve(87-02-13,MCR7618), 4 31* audit(87-04-15,RBarstad), install(87-04-26,MR12.1-1025): 4 32* Add a field to indicate whether or not we're processing a reply so that we 4 33* will be able to rebuild the screens properly after a disconnect occurs. 4 34* Error_list #114. 4 35* 9) change(88-07-26,Blair), approve(88-07-26,MCR7959), 4 36* audit(88-08-25,RBarstad), install(88-09-02,MR12.2-1098): 4 37* Add a bit to indicate whether or not the error segment had to be created 4 38* in the pdir (because we didn't have sma access to the mlsys_dir). 4 39* END HISTORY COMMENTS */ 4 40 4 41 4 42 /* Written 5/13/81 by Paul H. Kyzivat */ 4 43 /* Modified 12/16/81 by S. Krupp to delete unused parts of structure 4 44* and to add n_fkeys_used */ 4 45 /* Modified 12/14/82 by Dave Schimke to make the xmail version a 10 character 4 46* varying string. */ 4 47 /* Modified 09/12/83 by Dave Schimke adding interactive_msgs flag */ 4 48 /* Modified 09/14/83 by Dave Schimke adding moved_user_io */ 4 49 /* Modified 09/06/84 by Joanne Backs adding lists_as_menus flag */ 4 50 /* Modified 09/21/84 by Joanne Backs adding remove_menus flag */ 4 51 4 52 dcl xmail_data_ptr external static ptr init (null); 4 53 4 54 dcl 1 xmail_data aligned based (xmail_data_ptr), 4 55 2 mail_dir char (168) varying, 4 56 2 first_label label, 4 57 2 quit_label label, 4 58 2 value_seg_pathname char (168) varying, 4 59 2 moved_user_io ptr, 4 60 2 normal_usage char (80) unal, 4 61 2 function_key_info, 4 62 3 function_key_data_ptr ptr, 4 63 3 n_fkeys_used fixed bin, 4 64 2 actee, 4 65 3 person char(32) varying, 4 66 3 project char(32) varying, 4 67 2 flags aligned, 4 68 3 mail_in_incoming bit (1) unal, 4 69 3 lists_as_menus bit (1) unal, /* personalization */ 4 70 3 remove_menus bit (1) unal, /* personalization */ 4 71 3 confirm_print bit (1) unal, /* personalization */ 4 72 3 multics_mode bit (1) unal, /* personalization */ 4 73 3 interactive_msgs bit (1) unal, /* personalization */ 4 74 3 foreign_mailbox bit (1) unal, /* read others' mailboxes */ 4 75 3 general_help bit (1) unal, /* indicated requesting gen help*/ 4 76 3 cleanup_signalled bit (1) unal, /* on when true cleanup condition */ 4 77 3 msgs_as_mail bit (1) unal, /* on for include_msgs */ 4 78 3 reply_request bit (1) unal, /* on if we're doing a reply */ 4 79 3 error_seg_in_pdir bit (1) unal, /* on if the error_seg is in the pdir */ 4 80 3 pad bit (24) unal; 4 81 4 82 4 83 4 84 dcl xmail_version char(10) var static options(constant) init("4.1"); 4 85 4 86 /* END INCLUDE FILE: xmail_data.incl.pl1 */ 103 104 105 end xmail_undelete_msgs_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/00 1131.4 xmail_undelete_msgs_.pl1 >udd>sm>ds>w>ml>xmail_undelete_msgs_.pl1 97 1 06/08/82 1429.4 xmail_curr_msg_info.incl.pl1 >ldd>incl>xmail_curr_msg_info.incl.pl1 99 2 10/27/83 2204.2 mlsys_mailbox.incl.pl1 >ldd>incl>mlsys_mailbox.incl.pl1 101 3 05/28/86 1217.7 xmail_prompts.incl.pl1 >ldd>incl>xmail_prompts.incl.pl1 103 4 09/08/88 2110.9 xmail_data.incl.pl1 >ldd>incl>xmail_data.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. ME_CHAR 000003 constant char(20) initial packed unaligned dcl 61 set ref 75* 80* MORE_MSG 000000 constant char(9) initial packed unaligned dcl 62 set ref 87 89* P_curr_msgsp parameter pointer dcl 33 set ref 22 83* P_flavor parameter char packed unaligned dcl 35 set ref 22 67* P_mailbox_ptr parameter pointer dcl 32 ref 22 64 P_pos_line parameter char packed unaligned dcl 34 set ref 22 83* 87 87 89 89 add_more_msg 000100 automatic bit(1) dcl 39 set ref 87* 88* 89* cleanup_signalled 213(08) based bit(1) level 3 packed packed unaligned dcl 4-54 ref 89 code 000101 automatic fixed bin(35,0) dcl 40 set ref 74* 75 75* 79* 80 80* count 1 based fixed bin(17,0) level 2 dcl 1-8 ref 70 89 curr_msgs based structure level 1 unaligned dcl 1-8 deleted_msgsp 000102 automatic pointer dcl 41 set ref 67* 69 70 71 83* 89 flags 213 based structure level 2 dcl 4-54 i 000104 automatic fixed bin(17,0) dcl 42 set ref 70* 71* ioa_ 000010 constant entry external dcl 52 ref 89 length builtin function dcl 48 ref 87 87 mail_system_$read_message 000012 constant entry external dcl 53 ref 74 mail_system_$unmark_message_for_deletion 000014 constant entry external dcl 54 ref 79 mailbox based structure level 1 dcl 2-6 mailbox_ptr 000110 automatic pointer dcl 2-30 set ref 64* 67* 72 74* 78 maxlength builtin function dcl 48 ref 87 message_num 000105 automatic fixed bin(17,0) dcl 43 set ref 71* 72 74* 75* 78 80* message_ptr 106 based pointer array level 3 in structure "mailbox" dcl 2-6 in procedure "xmail_undelete_msgs_" ref 72 78 message_ptr 000106 automatic pointer dcl 44 in procedure "xmail_undelete_msgs_" set ref 78* 79* messages 104 based structure array level 2 dcl 2-6 null builtin function dcl 48 ref 69 72 numbers 2 based fixed bin(17,0) array level 2 dcl 1-8 ref 71 rtrim builtin function dcl 48 ref 87 89 89 xmail_data based structure level 1 dcl 4-54 xmail_data_ptr 000024 external static pointer initial dcl 4-52 ref 89 xmail_error_$no_code 000016 constant entry external dcl 55 ref 75 80 xmail_select_msgs_$deleted 000020 constant entry external dcl 56 ref 67 xmail_select_msgs_$replace_curr 000022 constant entry external dcl 57 ref 83 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. CURR_DEL_SET_MSG internal static char(58) initial packed unaligned dcl 3-12 CURR_SET_MSG internal static char(70) initial packed unaligned dcl 3-12 DATE_1_PROMPT internal static char(23) initial packed unaligned dcl 3-12 DATE_2_PROMPT internal static char(21) initial packed unaligned dcl 3-12 DEL_MSG_LIST_MSG internal static char(27) initial packed unaligned dcl 3-12 DEL_MSG_SELECT_PROMPT internal static char(63) initial packed unaligned dcl 3-12 DEL_NONEXIST_MSG internal static char(70) initial packed unaligned dcl 3-12 MAILBOX_VERSION_2 internal static char(8) initial packed unaligned dcl 2-28 MSG_LIST_MSG internal static char(17) initial packed unaligned dcl 3-12 MSG_SELECT_PROMPT internal static char(40) initial packed unaligned dcl 3-12 MSG_STRUCT_VERSION_1 internal static fixed bin(17,0) initial dcl 1-4 NONEXIST_MSG internal static char(66) initial packed unaligned dcl 3-12 OTHER_MAILBOX internal static fixed bin(17,0) initial dcl 2-37 SAVEBOX internal static fixed bin(17,0) initial dcl 2-37 SEARCH_STR_PROMPT internal static char(11) initial packed unaligned dcl 3-12 UNDELETE_FINISHED_MSG internal static char(24) initial packed unaligned dcl 3-12 USER_DEFAULT_MAILBOX internal static fixed bin(17,0) initial dcl 2-37 USER_LOGBOX internal static fixed bin(17,0) initial dcl 2-37 USE_SPEC_SET_PROMPT internal static char(45) initial packed unaligned dcl 3-12 curr_msgsp automatic pointer dcl 1-6 mailbox_n_messages automatic fixed bin(17,0) dcl 2-32 msg_struct based structure level 1 unaligned dcl 1-22 msg_structp automatic pointer dcl 1-20 n_messages automatic fixed bin(17,0) dcl 1-3 nonexist_msgs based structure level 1 unaligned dcl 1-15 nonexist_msgsp automatic pointer dcl 1-13 xmail_version internal static varying char(10) initial dcl 4-84 NAMES DECLARED BY EXPLICIT CONTEXT. EXIT 000456 constant label dcl 92 set ref 69 xmail_undelete_msgs_ 000107 constant entry external dcl 22 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 610 636 460 620 Length 1076 460 26 224 127 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME xmail_undelete_msgs_ 158 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME xmail_undelete_msgs_ 000100 add_more_msg xmail_undelete_msgs_ 000101 code xmail_undelete_msgs_ 000102 deleted_msgsp xmail_undelete_msgs_ 000104 i xmail_undelete_msgs_ 000105 message_num xmail_undelete_msgs_ 000106 message_ptr xmail_undelete_msgs_ 000110 mailbox_ptr xmail_undelete_msgs_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_g_a alloc_char_temp call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. ioa_ mail_system_$read_message mail_system_$unmark_message_for_deletion xmail_error_$no_code xmail_select_msgs_$deleted xmail_select_msgs_$replace_curr THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. xmail_data_ptr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000102 64 000127 67 000133 69 000152 70 000156 71 000167 72 000172 74 000200 75 000213 78 000253 79 000260 80 000271 81 000331 83 000333 87 000355 88 000402 89 000403 92 000456 ----------------------------------------------------------- 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