COMPILATION LISTING OF SEGMENT xmail_Consult_Files_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 09/02/88 0751.7 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 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 14 15 /****^ HISTORY COMMENTS: 16* 1) change(86-01-07,Blair), approve(86-01-07,MCR7358), 17* audit(86-05-19,RBarstad), install(86-05-28,MR12.0-1062): 18* 85-04-22 JG Backs: Modified SELECT_FILE proc, adding call to ioa_ to 19* display a message to user that the file is being worked on. If the file 20* is large, opening will take some time and the user should know something 21* is happening. 22* 2) change(86-01-07,Blair), approve(86-01-07,MCR7358), 23* audit(86-05-19,RBarstad), install(86-05-28,MR12.0-1062): 24* Modify SELECT_FILE to call a new entrypoint in xmail_select_files for 25* the 'select new file' option to allow selecting other users' mailboxes. 26* 3) change(86-02-25,Blair), approve(86-02-25,MCR7358), 27* audit(86-05-19,RBarstad), install(86-05-28,MR12.0-1062): 28* Change call to xmail_select_msgs_ in OPT (6) so that this option can be 29* used to set the seen switch for messages as well as select them. Now there 30* is a ptr to a structure of seen_msgs, and a switch_on_off flag. 31* 4) change(87-01-19,Blair), approve(87-02-05,MCR7618), 32* audit(87-04-10,RBarstad), install(87-04-26,MR12.1-1025): 33* Set the bit xmail_data.msgs_as_mail to reflect whether or not we're 34* processing interactive msgs. 35* 5) change(87-02-10,Blair), approve(87-02-10,MCR7618), 36* audit(87-04-10,RBarstad), install(87-04-26,MR12.1-1025): 37* Test for whether or not we're processing a reply request when the 38* redisplay menu condition has been signalled. This prevents the screen 39* being messed up after a reconnect. Error_list #114. 40* 6) change(87-09-16,Blair), approve(87-09-16,MECR0007), 41* audit(87-09-16,LJAdams), install(87-09-16,MR12.1-1108): 42* Initialize the xmail_data.reply_request bit to "0"b so that the Filed Mail 43* menu will be built correctly (otherwise it gets supressed). 44* 7) change(87-10-05,Blair), approve(87-10-05,MCR7771), 45* audit(87-11-02,LJAdams), install(87-11-02,MR12.2-1002): 46* This installation resolves MECR0007. 47* END HISTORY COMMENTS */ 48 49 50 xmail_Consult_Files_: proc (); 51 52 /* BEGIN DESCRIPTION 53* 54*function: This module produces th "Process Filed Mail" menu and allows 55* selection of the options displayed. Other xmail modules are 56* called as a result of options selected. 57* 58*history: Author unknown 59* 60* 83-06-21 DJ Schimke: Modified to use new mail_system calls and version 2 61* mailboxes. 62* 63* 83-09-22 DJ Schimke: Added calls to mail_system_$read_new_messages in the 64* main option loop to keep the mailbox structure current. This is especially 65* for the case where mail is filed into the current mailbox from the current 66* mailbox. phx14804 67* 68* 83-10-06 DJ Schimke: Changed both calls to xmail_file_msgs_ to calls to 69* xmail_file_msgs_$current_msgs. The default file is now returned rather than 70* kept as internal static in xmail_file_msgs_. These changes are a result of 71* making xmail_file_msgs_ more robust. 72* 73* 83-11-01 DJ Schimke: Changed the calling sequence of xmail_select_file_. 74* 75* 84-02-07 DJ Schimke: Modified the code executed under xmail_err_$exit_now 76* (PREV MENU key struck) to first revert the quit condition before calling 77* done_with_file. This prevents a null pointer fault when the quit condition 78* handler redirects execution back to the main loop (possibly after the 79* mailbox has been closed). phx16853 80* 81* 84-04-10 DJ Schimke: Modified the code which checks the message count 82* before opening a new mail file to allow opening of a mailbox without status 83* permission to the mailbox. It now assumes there is at least 1 message so 84* that an attempt will be made to open the mailbox even if the message count 85* cannot be determined (Normally we don't allow opening an empty mailbox.) 86* The opening mode was also changed to ACCESSIBLE_MESSAGES rather than 87* ALL_MESSAGES. This allows reading of any mailbox that you have at least 88* "o" or "r" access to. 89* 90* 84-07-03 DJ Schimke: Modified to use a three-column menu format and to add 91* the "Write" option which calls xmail_write_msgs_. Replaced the "Message(s)" 92* in many menu options with "Messages" to reduce the width for three-column 93* menu format. 94* 95* 84-08-09 JG Backs: Added a call to xmail_list_msgs_$selected after the 96* call to xmail_select_msgs_ when option (6) Select Messages is chosen, and 97* after the call to xmail_select_msgs_$next when option (5) Next Message is 98* chosen. This will automatically list the summary of newly selected messages. 99* 100* 84-08-27 JG Backs: Created an internal procedure SELECT_FILE to replace the 101* duplicate coding for selecting a new file within both PERFORM_OPTION and 102* main proc. This will insure a better message if there is incorrect access 103* to a save mailbox. phx18059. 104* 105* 84-11-09 JG Backs: Modified to allow the updating and redisplay of the 106* current message line after messages are selected (option 6), but before 107* they are listed. This allows for the status line to be current if the 108* listing stops at a more prompt when there are many current messages. 109* 110* 85-01-25 JG Backs: Added code to initialize file name at beginning of 111* module. The variable was tested in SELECT_FILE before being initialized. 112* 113* 114*END DESCRIPTION 115**/ 116 117 /* AUTOMATIC */ 118 119 dcl choice fixed bin; 120 dcl code fixed bin (35); 121 dcl default_file char (32) var; 122 dcl deletes_ptr ptr; 123 dcl dir char (168); 124 dcl display_needed bit (1) aligned; 125 dcl file char (32) varying; 126 dcl file_info char (256) var; 127 dcl multiple_msgs bit (1) aligned; 128 dcl new_dir char (168); 129 dcl new_file char (32) varying; 130 dcl old_no_of_entries fixed bin; 131 dcl ordinary_message_count, total_message_count fixed bin; 132 dcl pos_line char (256); 133 dcl position char (256) var; 134 dcl response char (3) varying; /* yes no or ask */ 135 dcl selecting_new_file bit (1) aligned; 136 dcl select_file_bad bit (1) aligned; 137 dcl status fixed bin (35); 138 dcl treat_msgs_as_mail bit (1) aligned; 139 dcl unused_bit bit (1) aligned; 140 dcl unused_bit2 bit (1) aligned; 141 dcl yes_sw bit (1) aligned; 142 dcl another_mailbox bit (1) aligned; 143 144 dcl 1 auto_open_options like open_options; 145 dcl 1 auto_close_options like close_options; 146 147 /* BASED */ 148 149 dcl 1 deletes based (deletes_ptr), 150 2 no_of_entries fixed bin, 151 2 deletes_array (xn refer (no_of_entries)) char (25); 152 153 /* CONDITIONS */ 154 155 dcl (cleanup, program_interrupt, xmail_redisplay_menu, quit) condition; 156 157 /* CONSTANTS */ 158 159 dcl ALLOW_OLD bit (1) aligned init ("1"b) int static options (constant); 160 dcl ALLOW_SELECTION bit (1) aligned init ("1"b) int static options (constant); 161 dcl DONT_ALLOW_NEW bit (1) aligned init ("0"b) int static options (constant); 162 dcl EMPTY_FILE_MSG char (46) int static options (constant) 163 init ("There are no messages in the ""^a"" mail file."); 164 dcl MSGS_AS_MAIL char (15) int static options (constant) init ("msgs_as_mail_yn"); 165 dcl NAME init ("xmail_Consult_Files_") char (20) int static options (constant); 166 dcl N_COLUMNS fixed bin int static options (constant) init (3); 167 dcl OPTION_NAMES int static options (constant) init ( 168 "Display", 169 "Reply", 170 "File Original", 171 "Discard Messages", 172 "Next Message", 173 "Select Messages", 174 "List Current Messages", 175 "List All Messages", 176 "Forward", 177 "Retrieve Messages", 178 "File Copy", 179 "Print", 180 "Write", 181 "Select New File" 182 ) dim (14) char (30) var; 183 dcl TITLE init ("Process Filed Mail") char (18) 184 int static options (constant); 185 186 /* BUILTINS */ 187 188 dcl (addr, null, rtrim, translate) builtin; 189 190 /* ENTRIES */ 191 192 dcl hcs_$status_minf entry (char (*), char (*), fixed bin (1), fixed bin (2), fixed bin (24), fixed bin (35)); 193 dcl hcs_$make_seg entry (char (*), char (*), char (*), fixed bin (5), ptr, fixed bin (35)); 194 dcl ioa_ entry options (variable); 195 196 dcl ioa_$rsnnl entry options (variable); 197 dcl mail_system_$get_message_counts entry (char (*), char (*), bit (1) aligned, fixed bin, fixed bin, fixed bin, fixed bin (35)); 198 dcl mail_system_$open_mailbox entry (char (*), char (*), ptr, char (8), ptr, fixed bin (35)); 199 dcl mail_system_$close_mailbox entry (ptr, ptr, fixed bin (35)); 200 dcl mail_system_$read_new_messages entry (ptr, fixed bin, fixed bin, fixed bin, fixed bin (35)); 201 dcl mail_system_$read_message entry (ptr, fixed bin, fixed bin (35)); 202 dcl xmail_create_menu_ entry (char (*), (*) char (*) var, fixed bin, ptr, fixed bin (35)); 203 dcl xmail_error_$code_first entry() options(variable); 204 dcl xmail_error_$no_code entry () options (variable); 205 dcl xmail_error_$no_print entry () options (variable); 206 dcl xmail_get_choice_ entry (ptr, char (*), char (*), char (*), char (*), bit (1) aligned, char (*), fixed bin, fixed bin (35)); 207 dcl xmail_get_str_$yes_no entry (char(*) var, bit(1) aligned); 208 dcl xmail_select_file_$caller_msg entry (char (*), char (*), char (*), bit (1) aligned, bit (1) aligned, 209 char (168), char (32) var, char (*), bit (1) aligned, bit (1) aligned, fixed bin (35)); 210 dcl xmail_select_file_$foreign_mailboxes entry (char (*), char (*), char (*), bit (1) aligned, bit (1) aligned, 211 char (168), char (32) var, char (*), bit (1) aligned, bit (1) aligned, fixed bin (35)); 212 dcl hcs_$set_bc_seg entry (ptr, fixed bin (24), fixed bin (35)); 213 dcl xmail_select_msgs_$first entry (ptr, ptr, char (*)); 214 dcl xmail_delete_dreply_ entry (ptr); 215 dcl xmail_sw_$redisplay entry (); 216 dcl xmail_sw_$update_position entry (char (*)); 217 dcl xmail_undelete_msgs_ entry (ptr, ptr, char (*), char (*)); 218 dcl xmail_value_$get_with_default entry (char(*), char(*) var, char(*) var, fixed bin(35)); 219 220 221 /* EXTERNAL STATIC */ 222 223 dcl error_table_$moderr fixed bin (35) ext static; 224 dcl iox_$user_output ptr ext static; 225 dcl mlsys_et_$no_more_messages fixed bin (35) ext static; 226 dcl mlsys_et_$no_r_permission fixed bin (35) ext static; 227 dcl xmail_err_$help_requested fixed bin (35) ext static; 228 dcl xmail_err_$exit_now fixed bin (35) ext static; 229 230 /* INTERNAL STATIC */ 231 232 dcl menup int static ptr init (null); 233 234 /* INCLUDE FILES */ 235 1 1 /* Begin include file: xmail_windows.incl.pl1 */ 1 2 /* Created 6/24/81 by Paul Kyzivat */ 1 3 /* Mofified 6/20/84 by DJ Schimke to add the mm_status window */ 1 4 1 5 dcl 1 xmail_windows aligned external static, 1 6 2 initial_position fixed bin, 1 7 2 min_lines_needed fixed bin, 1 8 2 (status, mm_status, menu, bottom) aligned like xmail_window_info_format; 1 9 1 10 dcl 1 xmail_window_info_format aligned based, 1 11 2 iocb ptr, 1 12 2 position aligned like window_position_info; 1 13 2 1 /* BEGIN INCLUDE FILE ... window_control_info.incl.pl1 JRD */ 2 2 /* format: style3 */ 2 3 2 4 /* Modified 26 January 1982 by William York to add the set_more_handler 2 5* and reset_more_handler control orders. */ 2 6 /* Modified October 1982 by WMY to add set and get_token_characters, 2 7* set and get_more_prompt. */ 2 8 /* Modified February 1983 by WMY to add the line_editor_key_binding_info 2 9* structure. */ 2 10 /* Modified 30 September 1983 by Jon A. Rochlis to add the origin.column for 2 11* partial screen width windows. */ 2 12 /* Modified 9 October 1983 by JR to add version 1 window_edit_line_info. 2 13* This should be removed when window_info.incl.pl1 is created. */ 2 14 /* Modified 29 February 1984 by Barmar to add version 1 2 15* get_editor_key_bindings_info. */ 2 16 /* Modified 1 March 1984 by Barmar to add version 1 2 17* set_editor_key_bindings_info. */ 2 18 /* Modified 2 March 1984 by Barmar to upgrade to version 3 2 19* line_editor_key_bindings_info, which includes the name, description, and 2 20* info path */ 2 21 2 22 /* structure for the set_window_info and get_window_info 2 23* control orders. */ 2 24 2 25 dcl 1 window_position_info 2 26 based (window_position_info_ptr), 2 27 2 version fixed bin, 2 28 2 origin, 2 29 3 column fixed bin, 2 30 3 line fixed bin, 2 31 2 extent, 2 32 3 width fixed bin, 2 33 3 height fixed bin; 2 34 2 35 dcl (window_position_info_version, window_position_info_version_1) 2 36 fixed bin internal static init (1) options (constant); 2 37 dcl window_position_info_ptr 2 38 pointer; 2 39 2 40 /* structure for the set_window_status and get_window_status 2 41* control orders */ 2 42 2 43 declare window_status_info_ptr 2 44 pointer; 2 45 declare 1 window_status_info 2 46 aligned based (window_status_info_ptr), 2 47 2 version fixed bin, 2 48 2 status_string bit (36) aligned; /* string (window_status) */ 2 49 /* see window_status.incl.pl1 for the contents of this string */ 2 50 2 51 2 52 declare (window_status_version, window_status_version_1) 2 53 fixed bin internal static init (1) options (constant); 2 54 2 55 /* info structure for the set_more_responses and get_more_responses control 2 56* orders */ 2 57 2 58 2 59 dcl 1 more_responses_info 2 60 aligned based (more_responses_info_ptr), 2 61 2 version fixed bin, 2 62 2 n_yeses fixed bin, /* how many valid characters in the strings below */ 2 63 2 n_noes fixed bin, 2 64 2 yeses char (32) unaligned, 2 65 2 noes char (32) unaligned; 2 66 2 67 dcl (more_responses_info_version_1, more_responses_version) 2 68 fixed bin internal static init (1) options (constant); 2 69 dcl more_responses_info_ptr 2 70 pointer; 2 71 2 72 /* structure for the set_break_table and get_break_table 2 73* control orders */ 2 74 2 75 declare break_table_ptr pointer; 2 76 declare 1 break_table_info aligned based (break_table_ptr), 2 77 2 version fixed bin, 2 78 2 breaks (0:127) bit (1) unaligned; 2 79 2 80 declare (break_table_info_version, break_table_info_version_1) 2 81 fixed bin init (1) internal static options (constant); 2 82 2 83 declare 1 more_handler_info aligned based (more_handler_info_ptr), 2 84 2 version fixed bin, 2 85 2 flags unaligned, 2 86 3 old_handler_valid 2 87 bit(1), 2 88 3 pad bit(35), 2 89 2 more_handler entry (pointer, bit(1) aligned), 2 90 2 old_more_handler entry (pointer, bit(1) aligned); 2 91 2 92 declare more_handler_info_ptr pointer; 2 93 2 94 declare (more_handler_info_version, more_handler_info_version_3) 2 95 fixed bin internal static options (constant) init (3); 2 96 2 97 declare 1 token_characters_info aligned based (token_characters_info_ptr), 2 98 2 version char(8), 2 99 2 token_character_count 2 100 fixed bin, 2 101 2 token_characters 2 102 char (128) unaligned; 2 103 2 104 declare token_characters_info_ptr pointer; 2 105 2 106 declare token_characters_info_version_1 char(8) internal static options (constant) init ("wtci0001"); 2 107 2 108 declare 1 more_prompt_info aligned based (more_prompt_info_ptr), 2 109 2 version char(8), 2 110 2 more_prompt char(80); 2 111 2 112 declare more_prompt_info_ptr pointer; 2 113 2 114 declare more_prompt_info_version_1 char(8) static options (constant) init ("wsmp0001"); 2 115 2 116 /* Line editor stuff ... */ 2 117 2 118 dcl line_editor_key_binding_info_ptr 2 119 pointer; 2 120 2 121 dcl line_editor_binding_count 2 122 fixed bin; 2 123 dcl line_editor_longest_sequence 2 124 fixed bin; 2 125 /* For each binding, action defines what to do for that sequence. Constants 2 126* are defined in window_editor_values.incl.pl1. Only if action is set to 2 127* EXTERNAL_ROUTINE does the editor_routine entry variable get examined. */ 2 128 2 129 dcl 1 line_editor_key_binding_info 2 130 aligned based (line_editor_key_binding_info_ptr), 2 131 2 version char(8), 2 132 2 binding_count fixed bin, 2 133 2 longest_sequence fixed bin, 2 134 2 bindings (line_editor_binding_count refer 2 135 (line_editor_key_binding_info.binding_count)), 2 136 3 sequence char(line_editor_longest_sequence refer 2 137 (line_editor_key_binding_info.longest_sequence)) varying, 2 138 3 action fixed bin, 2 139 3 numarg_action fixed binary, 2 140 3 editor_routine entry (pointer, fixed bin(35)), 2 141 3 name char (64) varying unaligned, 2 142 3 description char (256) varying unaligned, 2 143 3 info_path unaligned, 2 144 4 info_dir char (168), 2 145 4 info_entry char (32); 2 146 2 147 2 148 dcl line_editor_key_binding_info_version_3 2 149 char(8) static options (constant) init ("lekbi003"); 2 150 2 151 dcl 1 get_editor_key_bindings_info aligned based (get_editor_key_bindings_info_ptr), 2 152 2 version char (8), 2 153 2 flags, 2 154 3 entire_state bit (1) unaligned, 2 155 3 mbz bit (35) unaligned, 2 156 2 key_binding_info_ptr ptr, 2 157 2 entire_state_ptr ptr; 2 158 2 159 dcl get_editor_key_bindings_info_ptr ptr; 2 160 dcl get_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("gekbi_01"); 2 161 2 162 dcl 1 set_editor_key_bindings_info aligned 2 163 based (set_editor_key_bindings_info_ptr), 2 164 2 version char (8), 2 165 2 flags, 2 166 3 replace bit (1) unaligned, 2 167 3 update bit (1) unaligned, 2 168 3 mbz bit (34) unaligned, 2 169 2 key_binding_info_ptr ptr; 2 170 2 171 dcl set_editor_key_bindings_info_ptr ptr; 2 172 dcl set_editor_key_bindings_info_version_1 char (8) int static options (constant) init ("sekbi_01"); 2 173 2 174 /* This should be moved to window_info.incl.pl1 when that include file is 2 175* created. JR 2/1/84 */ 2 176 2 177 dcl 1 window_edit_line_info 2 178 based (window_edit_line_info_ptr), 2 179 2 version char (8), 2 180 2 line_ptr ptr, 2 181 2 line_length fixed bin (21); /* later we will hack initial cursor position, key bindings, etc. */ 2 182 2 183 dcl window_edit_line_info_version_1 2 184 char (8) static options (constant) init ("wedl0001"); 2 185 2 186 dcl window_edit_line_info_ptr 2 187 ptr; 2 188 2 189 /* END INCLUDE FILE window_control_info.incl.pl1 */ 1 14 1 15 1 16 /* End include file: xmail_windows.incl.pl1 */ 236 237 3 1 /* BEGIN INCLUDE FILE menu_dcls.incl.pl1 3 2* declarations for the menu_ subroutines MTB 493 3 3* James R. Davis 26 Jan 81 to 20 Februrary 81 3 4**/ 3 5 3 6 /* format: off */ 3 7 3 8 dcl menu_$create entry ( 3 9 (*) char (*) varying, /* input: choices */ 3 10 (*) char (*) varying, /* input: headers */ 3 11 (*) char (*) varying, /* input: trailers */ 3 12 pointer, /* input: to format info */ 3 13 (*) char (1) unal, /* input: keys to use */ 3 14 pointer, /* input: to area */ 3 15 pointer, /* input: to needs str. */ 3 16 pointer, /* to menu: output */ 3 17 fixed bin (35) /* code */ 3 18 ); 3 19 3 20 dcl menu_$display entry ( 3 21 pointer, /* window */ 3 22 pointer, /* menu */ 3 23 fixed bin (35) /* code */ 3 24 ); 3 25 3 26 dcl menu_$get_choice entry ( 3 27 pointer, /* window */ 3 28 pointer, /* menu */ 3 29 pointer, /* to function key info */ 3 30 bit (1) aligned, /* function key hi: output */ 3 31 fixed bin, /* output: selection number */ 3 32 fixed bin (35) /* output: code */ 3 33 ); 3 34 3 35 dcl menu_$describe entry ( 3 36 pointer, /* menu */ 3 37 pointer, /* needs */ 3 38 fixed bin (35) /* code */ 3 39 ); 3 40 3 41 dcl menu_$destroy entry ( 3 42 pointer, /* menu */ 3 43 fixed bin (35) /* code */ 3 44 ); 3 45 3 46 dcl menu_$store entry ( 3 47 character (*), 3 48 character (*), 3 49 character (*), 3 50 bit (1) aligned, 3 51 pointer, 3 52 fixed bin (35)); 3 53 3 54 dcl menu_$retrieve entry ( 3 55 character (*), 3 56 character (*), 3 57 character (*), 3 58 pointer, 3 59 pointer, 3 60 fixed bin (35)); 3 61 dcl menu_$delete entry ( 3 62 character (*), 3 63 character (*), 3 64 character (*), 3 65 fixed binary (35)); 3 66 3 67 dcl menu_$list entry ( 3 68 character (*), 3 69 character (*), 3 70 character (*), 3 71 pointer, 3 72 fixed bin, 3 73 pointer, 3 74 fixed bin (35)); 3 75 3 76 dcl 1 menu_format aligned based (menu_format_ptr), 3 77 2 version fixed bin, 3 78 2 constraints, 3 79 3 max_width fixed bin, 3 80 3 max_height fixed bin, 3 81 2 n_columns fixed bin, 3 82 2 flags, 3 83 3 center_headers bit (1) unal, 3 84 3 center_trailers bit (1) unal, 3 85 3 pad bit (34) unal, 3 86 2 pad_char char (1); 3 87 3 88 dcl 1 menu_requirements aligned based (menu_requirements_ptr), 3 89 2 version fixed bin, 3 90 2 lines_needed fixed bin, 3 91 2 width_needed fixed bin, 3 92 2 n_options fixed bin; 3 93 3 94 dcl menu_format_ptr pointer; 3 95 dcl menu_requirements_ptr pointer; 3 96 3 97 dcl (menu_format_version_1, menu_requirements_version_1) 3 98 fixed bin internal static init (1) options (constant); 3 99 3 100 dcl MENU_OPTION_KEYS (35) char (1) unal internal static 3 101 options (constant) init 3 102 ("1", "2", "3", "4", "5", "6", "7", "8", "9", 3 103 "A", "B", "C", "D", "E", "F", "G", "H", "I", 3 104 "J", "K", "L", "M", "N", "O", "P", "Q", "R", 3 105 "S", "T", "U", "V", "W", "X", "Y", "Z"); 3 106 3 107 /* END INCLUDE FILE ... menu_dcls.incl.pl1 */ 238 239 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 */ 240 241 5 1 /* begin include fine window_dcls.incl.pl1 BIM June 1981 */ 5 2 /* Modified 9 October 1983 by Jon A. Rochlis to add window_$edit_line. */ 5 3 5 4 /* format: style3 */ 5 5 5 6 declare window_$bell entry (pointer, fixed binary (35)); 5 7 declare window_$clear_region 5 8 entry (pointer, fixed binary, fixed binary, fixed binary, fixed binary, fixed binary (35)); 5 9 declare window_$clear_to_end_of_line 5 10 entry (pointer, fixed binary (35)); 5 11 declare window_$clear_to_end_of_window 5 12 entry (pointer, fixed binary (35)); 5 13 declare window_$clear_window 5 14 entry (pointer, fixed binary (35)); 5 15 declare window_$delete_chars 5 16 entry (pointer, fixed binary, fixed binary (35)); 5 17 declare window_$get_cursor_position 5 18 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 5 19 5 20 /* Call window_$get_echoed_chars (iocb_ptr, n_to_read, read_buffer, n_read, read_break, code); */ 5 21 5 22 declare window_$get_echoed_chars 5 23 entry (pointer, fixed binary (21), character (*), fixed binary (21), character (1) var, 5 24 fixed binary (35)); 5 25 declare window_$get_unechoed_chars 5 26 entry (pointer, fixed binary (21), character (*), fixed binary (21), character (1) var, 5 27 fixed binary (35)); 5 28 declare window_$insert_text entry (pointer, character (*), fixed binary (35)); 5 29 declare window_$overwrite_text 5 30 entry (pointer, character (*), fixed binary (35)); 5 31 declare window_$position_cursor 5 32 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 5 33 5 34 /* Call window_$position_cursor_rel (iocb_ptr, delta_line, delta_column, code); */ 5 35 5 36 declare window_$position_cursor_rel 5 37 entry (pointer, fixed binary, fixed binary, fixed binary (35)); 5 38 5 39 /* Call window_$scroll_region (iocb_ptr, first_line_of_region, n_lines_of_region, distance_to_scroll_region_negative_is_up, 5 40* code); */ 5 41 5 42 declare window_$scroll_region 5 43 entry (pointer, fixed binary, fixed binary, fixed binary, fixed binary (35)); 5 44 declare window_$sync entry (pointer, fixed binary (35)); 5 45 5 46 /* Call window_$write_raw_text (iocb_ptr, text_string, code); */ 5 47 5 48 declare window_$write_raw_text 5 49 entry (pointer, character (*), fixed binary (35)); 5 50 5 51 /* Call window_$write_sync_read (iocb_ptr, prompt_string, n_to_read, read_buffer, n_read, break_char, code); */ 5 52 5 53 declare window_$write_sync_read 5 54 entry (pointer, character (*), fixed bin (21), character (*), fixed binary (21), 5 55 character (1) var, fixed binary (35)); 5 56 5 57 /* Call window_$change_line (iocb_ptr, new_line, code); */ 5 58 5 59 declare window_$change_line entry (pointer, fixed binary, fixed binary (35)); 5 60 5 61 /* Call window_$change_column (iocb_ptr, new_column, code); */ 5 62 5 63 declare window_$change_column 5 64 entry (pointer, fixed binary, fixed binary (35)); 5 65 5 66 /* Call window_$get_one_unechoed (iocb_ptr, char_or_len_0, block_flag, code); */ 5 67 declare ( 5 68 window_$get_one_unechoed, 5 69 window_$get_one_unechoed_char 5 70 ) entry (pointer, character (1) var, bit (1) aligned, fixed binary (35)); 5 71 5 72 declare window_$create entry (pointer, pointer, pointer, fixed binary (35)); 5 73 5 74 declare window_$destroy entry (pointer, fixed binary (35)); 5 75 5 76 declare window_$edit_line entry (pointer, pointer, pointer, fixed bin(21), fixed bin(21), fixed bin(35)); 5 77 5 78 /* call window_$edit_line (iocb_ptr, window_edit_line_info_ptr, buffer_ptr, 5 79* buffer_len, n_returned, code); */ 5 80 5 81 5 82 /* end include file window_dcls.incl.pl1 */ 242 243 6 1 /* BEGIN INCLUDE FILE ... mlsys_open_options.incl.pl1 */ 6 2 /* Created: June 1983 by G. Palter */ 6 3 6 4 /* Options for the mail_system_$open_mailbox entrypoint */ 6 5 6 6 dcl 1 open_options aligned based (open_options_ptr), 6 7 2 version character (8), 6 8 2 message_selection_mode fixed binary, /* what types are to be read (all/ordinary/interactive) */ 6 9 2 sender_selection_mode fixed binary, /* selects messages by who sent them */ 6 10 2 message_reading_level fixed binary; /* specifies whether all or only part of a message is read */ 6 11 6 12 dcl OPEN_OPTIONS_VERSION_2 character (8) static options (constant) initial ("mlsopn02"); 6 13 6 14 dcl open_options_ptr pointer; 6 15 6 16 6 17 dcl ALL_MESSAGES fixed binary static options (constant) initial (0); 6 18 /* read all messages in the mailbox ... 6 19* ... used as both a message and sender selection mode */ 6 20 6 21 /* Defined message selection modes */ 6 22 6 23 dcl (ORDINARY_MESSAGES initial (1), /* read only ordinary messages */ 6 24 INTERACTIVE_MESSAGES initial (2)) /* read only interactive messages */ 6 25 fixed binary static options (constant); 6 26 6 27 6 28 /* Defined sender selection modes */ 6 29 6 30 dcl (ACCESSIBLE_MESSAGES initial (-1), /* reads whatever messages are accessible */ 6 31 OWN_MESSAGES initial (1), /* reads only those messages sent by this user */ 6 32 NOT_OWN_MESSAGES initial (2)) /* reads only those messages not sent by this user */ 6 33 fixed binary static options (constant); 6 34 6 35 6 36 /* Defined message reading levels */ 6 37 6 38 dcl (READ_KEYS initial (1), /* reads only the unique key of each message */ 6 39 READ_MESSAGES initial (2)) /* reads the entire content of each message */ 6 40 fixed binary static options (constant); 6 41 6 42 /* END INCLUDE FILE ... mlsys_open_options.incl.pl1 */ 244 245 7 1 /* BEGIN INCLUDE FILE ... mlsys_close_options.incl.pl1 */ 7 2 /* Created: June 1983 by G. Palter */ 7 3 7 4 /* Options for the mail_system_$close_mailbox entrypoint */ 7 5 7 6 dcl 1 close_options aligned based (close_options_ptr), 7 7 2 version character (8) unaligned, 7 8 2 flags, 7 9 3 perform_deletions bit (1) unaligned, /* ON => perform deletions requested earlier */ 7 10 3 report_deletion_errors bit (1) unaligned, /* ON => report problems deleting via sub_err_ */ 7 11 3 mbz bit (34) unaligned; /* must be set to ""b by the caller */ 7 12 7 13 dcl CLOSE_OPTIONS_VERSION_2 character (8) static options (constant) initial ("mlsclo02"); 7 14 7 15 dcl close_options_ptr pointer; 7 16 7 17 /* END INCLUDE FILE ... mlsys_close_options.incl.pl1 */ 246 247 8 1 /* BEGIN INCLUDE FILE ... mlsys_mailbox.incl.pl1 */ 8 2 /* Created: April 1983 by G. Palter */ 8 3 8 4 /* Definition of a mailbox as used by the Multics Mail System */ 8 5 8 6 dcl 1 mailbox aligned based (mailbox_ptr), 8 7 2 version character (8) unaligned, 8 8 2 reserved bit (144), /* for exclusive use of the mail system */ 8 9 2 mailbox_address pointer, /* mail system address of this mailbox */ 8 10 2 mailbox_dirname character (168) unaligned, /* directory containing this mailbox */ 8 11 2 mailbox_ename character (32) unaligned, /* entry name of this mailbox (includes ".mbx") */ 8 12 2 mailbox_type fixed binary, /* type of mailbox (see below) */ 8 13 2 mode bit (36), /* user's effective extended access to this mailbox */ 8 14 2 flags, 8 15 3 salvaged bit (1) unaligned, /* ON => this mailbox has been salvaged since last open */ 8 16 3 reserved bit (35) unaligned, /* for exclusive use of the mail system */ 8 17 2 message_selection_mode fixed binary, /* types of messages read: all/ordinary/interactive */ 8 18 2 sender_selection_mode fixed binary, /* whose messages were read: all/own/not-own */ 8 19 2 message_reading_level fixed binary, /* how much of each message read: keys/messages */ 8 20 2 n_messages fixed binary, /* total # of messages in this mailbox structure */ 8 21 2 n_ordinary_messages fixed binary, /* ... # of ordinary messages here */ 8 22 2 n_interactive_messages fixed binary, /* ... # of interactive messages here */ 8 23 2 n_deleted_messages fixed binary, /* ... # of messages here marked for later deletion */ 8 24 2 messages (mailbox_n_messages refer (mailbox.n_messages)), 8 25 3 key bit (72), /* unique key to read this message if not already read */ 8 26 3 message_ptr pointer; /* -> the message structure */ 8 27 8 28 dcl MAILBOX_VERSION_2 character (8) static options (constant) initial ("mlsmbx02"); 8 29 8 30 dcl mailbox_ptr pointer; 8 31 8 32 dcl mailbox_n_messages fixed binary; /* for exclusive use of the mail system */ 8 33 8 34 8 35 /* Types of mailboxes distinguished by the mail system */ 8 36 8 37 dcl (USER_DEFAULT_MAILBOX initial (1), /* the user's default mailbox for receiving mail */ 8 38 USER_LOGBOX initial (2), /* the user's logbox */ 8 39 SAVEBOX initial (3), /* a savebox */ 8 40 OTHER_MAILBOX initial (4)) /* any other type of mailbox */ 8 41 fixed binary static options (constant); 8 42 8 43 /* END INCLUDE FILE ... mlsys_mailbox.incl.pl1 */ 248 249 9 1 /* BEGIN INCLUDE FILE ... mlsys_message.incl.pl1 */ 9 2 9 3 9 4 /****^ HISTORY COMMENTS: 9 5* 1) change(85-12-19,Herbst), approve(86-03-25,MCR7367), 9 6* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 9 7* Added seen switch to message. 9 8* END HISTORY COMMENTS */ 9 9 9 10 9 11 /* Created: June 1983 by G. Palter */ 9 12 9 13 /* Definition of a message as used by the Multics Mail System */ 9 14 9 15 dcl 1 message aligned based (message_ptr), 9 16 2 version character (8) unaligned, 9 17 2 reserved bit (144), /* for exclusive use of the mail system */ 9 18 2 n_reply_references fixed binary, /* # of messages for which this is a reply */ 9 19 2 n_user_fields fixed binary, /* # of non-standard header fields in this message */ 9 20 2 n_redistributions fixed binary, /* # of times this message has been forwarded */ 9 21 2 n_body_sections fixed binary, /* # of sections in the body */ 9 22 2 flags, 9 23 3 interactive bit (1) unaligned, /* ON => this is an interactive message */ 9 24 3 can_be_deleted bit (1) unaligned, /* ON => the user can delete this message if desired */ 9 25 3 marked_for_deletion bit (1) unaligned, /* ON => message will be deleted when mailbox is closed */ 9 26 3 must_be_acknowledged bit (1) unaligned, /* ON => an ACK should be generated when message is read */ 9 27 3 seen bit (1) unaligned, /* ON => user has printed message at least once */ 9 28 3 reserved bit (31) unaligned, /* for use by the mail system */ 9 29 2 pad bit (36), 9 30 2 envelope like message_envelope, /* who/when/how the message was mailed & delivered */ 9 31 2 header, 9 32 3 message_id bit (72), /* ID of this message (same value for all copies) */ 9 33 3 access_class bit (72), /* AIM access class of this message */ 9 34 3 date_time_created fixed binary (71), /* date/time this message was composed */ 9 35 3 from pointer, /* -> address list of author(s) of the message */ 9 36 3 reply_to pointer, /* -> address list of recipients for reply (if not authors) */ 9 37 3 to pointer, /* -> address list of primary recipients */ 9 38 3 cc pointer, /* -> address list of secondary recipients */ 9 39 3 bcc pointer, /* -> address list of blind recipients */ 9 40 3 subject like message_text_field, /* subject of the message */ 9 41 3 reply_references pointer, /* -> list of messages for which this message is a reply */ 9 42 3 user_fields_list pointer, /* -> list of user-defined fields in this message */ 9 43 2 redistributions_list pointer, /* -> redistributions list for this message */ 9 44 2 body, 9 45 3 total_lines fixed binary (21), /* total # of lines in the body or -1 if indeterminate */ 9 46 3 pad bit (36), 9 47 3 body_sections (message_n_body_sections refer (message.n_body_sections)) like message_body_section; 9 48 9 49 dcl MESSAGE_VERSION_2 character (8) static options (constant) initial ("mlsmsg02"); 9 50 9 51 dcl message_subject character (message.header.subject.text_lth) unaligned based (message.header.subject.text_ptr); 9 52 9 53 dcl message_ptr pointer; 9 54 9 55 dcl (message_n_body_sections, message_trace_n_relays, message_n_redistributions, message_n_user_fields, 9 56 message_references_list_n_references) 9 57 fixed binary; /* for exclusive use of the mail system */ 9 58 9 59 /* Definition of a message envelope: describes when, by whom, and by what route the message was mailed */ 9 60 9 61 dcl 1 message_envelope aligned based (message_envelope_ptr), 9 62 2 date_time_mailed fixed binary (71), /* date/time this message was entered into the mail system */ 9 63 2 sender pointer, /* -> address of entity that mailed the message */ 9 64 2 trace pointer, /* -> message_trace describing how it got here */ 9 65 2 date_time_delivered fixed binary (71), /* date/time this message was delivered */ 9 66 2 delivered_by pointer, /* -> address of entity that delivered the message */ 9 67 2 acknowledge_to pointer; /* -> address of entity to receive ACK when message is read */ 9 68 9 69 dcl message_envelope_ptr pointer; 9 70 9 71 9 72 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate the message envelope */ 9 73 9 74 dcl 1 message_envelope_parameter aligned based (message_envelope_parameter_ptr), 9 75 2 pad pointer, /* forces even word alignment */ 9 76 2 version character (8) unaligned, 9 77 2 envelope like message_envelope; 9 78 9 79 dcl MESSAGE_ENVELOPE_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsenv02"); 9 80 9 81 dcl message_envelope_parameter_ptr pointer; 9 82 9 83 9 84 /* Definition of a message trace: describes the route and each relay operation by which a message was passed through the 9 85* networks to reach this recipient */ 9 86 9 87 dcl 1 message_trace aligned based (message_trace_ptr), 9 88 2 version character (8) unaligned, 9 89 2 reserved bit (144), /* ... exclusively for use by the mail system */ 9 90 2 implicit_route pointer, /* -> an address_route which defines the route it took */ 9 91 2 pad bit (36), 9 92 2 n_relays fixed binary, /* # of relay operations required to reach this site */ 9 93 2 relays (message_trace_n_relays refer (message_trace.n_relays)), 9 94 3 date_time_relayed fixed binary (71), /* ... when this relay operation took place */ 9 95 3 sending_host character (256) varying, /* ... the host which relayed the message */ 9 96 3 receiving_host character (256) varying, /* ... the host which received it */ 9 97 3 communications_media character (32) unaligned, /* ... medium over which relay took place (ARPA, Tymnet) */ 9 98 3 communications_protocol character (32) unaligned,/* ... low-level protocol used (TCP, X.25) */ 9 99 3 mail_protocol character (32) unaligned, /* ... mailer protocol used (SMTP, NBS) */ 9 100 3 relay_id bit (72), /* ... unique ID assigned by receiving system or ""b */ 9 101 3 relay_recipient pointer; /* ... -> address of recipient as given by sending system */ 9 102 9 103 dcl MESSAGE_TRACE_VERSION_2 character (8) static options (constant) initial ("mlstrc02"); 9 104 9 105 dcl message_trace_ptr pointer; 9 106 9 107 /* Definition of a message's redistributions list */ 9 108 9 109 dcl 1 message_redistributions_list aligned based (message.redistributions_list), 9 110 2 version character (8) unaligned, 9 111 2 reserved bit (144), /* ... exclusively for use by the mail system */ 9 112 2 pad bit (36), 9 113 2 n_redistributions fixed binary, /* # of redistributions */ 9 114 2 redistributions (message_n_redistributions refer (message_redistributions_list.n_redistributions)) 9 115 like message_redistribution; /* the redistributions: oldest first */ 9 116 9 117 dcl MESSAGE_REDISTRIBUTIONS_LIST_VERSION_2 character (8) static options (constant) initial ("mlsrl002"); 9 118 9 119 9 120 /* Definition of a single redistribution (forwarding) of a message */ 9 121 9 122 dcl 1 message_redistribution aligned based (message_redistribution_ptr), 9 123 2 envelope like message_envelope, 9 124 2 header, 9 125 3 message_id bit (72), /* ID of this redistribution (same for all copies) */ 9 126 3 date_time_created fixed binary (71), /* date/time when this redistribution was made */ 9 127 3 from pointer, /* -> address list of authors of this redistribution */ 9 128 3 to pointer, /* -> address list of recipients of the redistribution */ 9 129 3 comment like message_text_field; /* optional comment associated with the redistribution */ 9 130 9 131 dcl message_redistribution_comment character (message_redistribution.comment.text_lth) unaligned 9 132 based (message_redistribution.comment.text_ptr); 9 133 9 134 dcl message_redistribution_ptr pointer; 9 135 9 136 9 137 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate the redistributions of a message */ 9 138 9 139 dcl 1 message_redistribution_parameter aligned based (message_redistribution_parameter_ptr), 9 140 2 pad pointer, /* forces even word alignment */ 9 141 2 version character (8) unaligned, 9 142 2 redistribution like message_redistribution; 9 143 9 144 dcl MESSAGE_REDISTRIBUTION_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsdist2"); 9 145 9 146 dcl message_redistribution_parameter_ptr pointer; 9 147 9 148 /* Definition of the list of user-defined fields in a message */ 9 149 9 150 dcl 1 message_user_fields_list aligned based (message.user_fields_list), 9 151 2 version character (8) unaligned, 9 152 2 reserved bit (144), /* ... exclusively for use by the mail system */ 9 153 2 pad bit (36), 9 154 2 n_user_fields fixed binary, /* # of user-defined fields in the message */ 9 155 2 user_fields (message_n_user_fields refer (message_user_fields_list.n_user_fields)) 9 156 like message_user_field; /* the actual user-defined fields */ 9 157 9 158 dcl MESSAGE_USER_FIELDS_LIST_VERSION_2 character (8) static options (constant) initial ("mlsufl02"); 9 159 9 160 9 161 /* Definition of a user defined message header field */ 9 162 9 163 dcl 1 message_user_field aligned based (message_user_field_ptr), 9 164 2 header, 9 165 3 field_id bit (36) aligned, /* identifies the purpose of this field */ 9 166 3 field_type fixed binary, /* type of data contained in this field */ 9 167 2 field_type_variable bit (144); /* the actual data (see below) */ 9 168 9 169 dcl message_user_field_ptr pointer; 9 170 9 171 9 172 /* Defined types of user defined fields */ 9 173 9 174 dcl (MESSAGE_TEXT_USER_FIELD initial (1), /* content of the field is a text string */ 9 175 MESSAGE_ADDRESS_LIST_USER_FIELD initial (2), /* content of the field is an address list */ 9 176 MESSAGE_DATE_USER_FIELD initial (3), /* content of the field is a date/time */ 9 177 MESSAGE_INTEGER_USER_FIELD initial (4)) /* content of the filed is a fixed binary value */ 9 178 fixed binary static options (constant); 9 179 9 180 9 181 /* Structures used to access the data for the different types of user defined fields */ 9 182 9 183 dcl 1 message_text_user_field aligned based (message_user_field_ptr), 9 184 2 header like message_user_field.header, 9 185 2 text like message_text_field; /* the message text */ 9 186 9 187 dcl message_text_user_field_text character (message_text_user_field.text.text_lth) unaligned 9 188 based (message_text_user_field.text.text_ptr); 9 189 9 190 dcl 1 message_address_list_user_field aligned based (message_user_field_ptr), 9 191 2 header like message_user_field.header, 9 192 2 address_list_ptr pointer, /* -> the address list */ 9 193 2 pad bit (72); 9 194 9 195 dcl 1 message_date_user_field aligned based (message_user_field_ptr), 9 196 2 header like message_user_field.header, 9 197 2 date_time fixed binary (71), /* the clock reading */ 9 198 2 pad bit (72); 9 199 9 200 dcl 1 message_integer_user_field aligned based (message_user_field_ptr), 9 201 2 header like message_user_field.header, 9 202 2 value fixed binary (35), /* the integer value */ 9 203 2 pad bit (108); 9 204 9 205 9 206 /* Structure used in calls to mail_system_ entrypoints which manipulate the user-defined fields of a message */ 9 207 9 208 dcl 1 message_user_field_parameter aligned based (message_user_field_parameter_ptr), 9 209 2 pad pointer, /* forces even word alignment */ 9 210 2 version character (8) unaligned, 9 211 2 user_field like message_user_field; 9 212 9 213 dcl MESSAGE_USER_FIELD_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsudf02"); 9 214 9 215 dcl message_user_field_parameter_ptr pointer; 9 216 9 217 /* Definition of a list of message references used as the value of message header fields (eg: In-Reply-To) */ 9 218 9 219 dcl 1 message_references_list aligned based (message_references_list_ptr), 9 220 2 version character (8) unaligned, 9 221 2 reserved bit (144), /* ... exclusively for use by the mail system */ 9 222 2 pad bit (36), 9 223 2 n_references fixed binary, /* # of references in this list */ 9 224 2 references (message_references_list_n_references refer (message_references_list.n_references)) 9 225 like message_reference; /* the references themselves */ 9 226 9 227 dcl MESSAGE_REFERENCES_LIST_VERSION_2 character (8) static options (constant) initial ("mlsref02"); 9 228 9 229 dcl message_references_list_ptr pointer; 9 230 9 231 9 232 /* Definition of a reference to another message */ 9 233 9 234 dcl 1 message_reference aligned based (message_reference_ptr), 9 235 2 message_id bit (72), /* ID of the other message */ 9 236 2 date_time_created fixed binary (71), /* date/time the other message was created */ 9 237 2 from pointer, /* -> address list of authors of the other message */ 9 238 2 subject like message_text_field; /* subject of the other message */ 9 239 9 240 dcl message_reference_subject character (message_reference.subject.text_lth) unaligned 9 241 based (message_reference.subject.text_ptr); 9 242 9 243 dcl message_reference_ptr pointer; 9 244 9 245 9 246 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate message references */ 9 247 9 248 dcl 1 message_reference_parameter aligned based (message_reference_parameter_ptr), 9 249 2 pad pointer, /* forces even word alignment */ 9 250 2 version character (8) unaligned, 9 251 2 reference like message_reference; 9 252 9 253 dcl MESSAGE_REFERENCE_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsref02"); 9 254 9 255 dcl message_reference_parameter_ptr pointer; 9 256 9 257 9 258 /* Definition of a text field in a message (Subject, Comment, or a user defined field) */ 9 259 9 260 dcl 1 message_text_field aligned based (message_text_field_ptr), 9 261 2 text_ptr pointer, /* -> the actual text */ 9 262 2 text_lth fixed binary (21), /* length of said text */ 9 263 2 flags, 9 264 3 multiline_text bit (1) unaligned, /* ON => the text of this field may span multiple lines; 9 265* OFF => the text will always be a single line */ 9 266 3 reserved bit (35) unaligned; /* for exclusive use of the mail system */ 9 267 9 268 dcl message_text_field_text character (message_text_field.text_lth) unaligned based (message_text_field.text_ptr); 9 269 9 270 dcl message_text_field_ptr pointer; 9 271 9 272 /* Definition of a section of the body of a message */ 9 273 9 274 dcl 1 message_body_section aligned based (message_body_section_ptr), 9 275 2 header, 9 276 3 section_type fixed binary, /* type of "text" stored in this section */ 9 277 3 section_n_lines fixed binary (21), /* # of lines in this section or -1 if indeterminate */ 9 278 2 section_type_variable bit (144); /* the actual data (see below) */ 9 279 9 280 dcl message_body_section_ptr pointer; 9 281 9 282 9 283 /* Defined types of message body sections */ 9 284 9 285 dcl (MESSAGE_PREFORMATTED_BODY_SECTION initial (1), /* text formatted by the authors/sender */ 9 286 MESSAGE_BIT_STRING_BODY_SECTION initial (2)) /* arbitrary bit string */ 9 287 fixed binary static options (constant); 9 288 9 289 9 290 /* Structures used to access the data for the different types of message body sections */ 9 291 9 292 dcl 1 message_preformatted_body_section aligned based (message_body_section_ptr), 9 293 2 header like message_body_section.header, 9 294 2 text_ptr pointer, /* -> the text */ 9 295 2 text_lth fixed binary (21), /* length of said text in characters */ 9 296 2 reserved bit (36); /* for exclusive use of the mail system */ 9 297 9 298 dcl message_preformatted_body_section_text character (message_preformatted_body_section.text_lth) unaligned 9 299 based (message_preformatted_body_section.text_ptr); 9 300 9 301 dcl 1 message_bit_string_body_section aligned based (message_body_section_ptr), 9 302 2 header like message_body_section.header, 9 303 2 bit_string_ptr pointer, /* -> the bit string */ 9 304 2 bit_string_lth fixed binary (24), /* length of said bit string in bits (obviously) */ 9 305 2 reserved bit (36); /* for exclusive use of the mail system */ 9 306 9 307 dcl message_bit_string_body_section_bit_string bit (message_bit_string_body_section.bit_string_lth) unaligned 9 308 based (message_bit_string_body_section.bit_string_ptr); 9 309 9 310 9 311 /* Structure used in calls to mail_system_ entrypoints which manipulate the sections of a message's body */ 9 312 9 313 dcl 1 message_body_section_parameter aligned based (message_body_section_parameter_ptr), 9 314 2 pad pointer, /* forces even word alignment */ 9 315 2 version character (8) unaligned, 9 316 2 section like message_body_section; 9 317 9 318 dcl MESSAGE_BODY_SECTION_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsmbs02"); 9 319 9 320 dcl message_body_section_parameter_ptr pointer; 9 321 9 322 /* END INCLUDE FILE ... mlsys_message.incl.pl1 */ 250 251 10 1 /* Created 06/17/81 by Suzanne Krupp */ 10 2 10 3 dcl n_messages fixed bin; 10 4 dcl MSG_STRUCT_VERSION_1 fixed bin int static options(constant) init(1); 10 5 10 6 dcl curr_msgsp ptr; 10 7 10 8 dcl 1 curr_msgs based(curr_msgsp), 10 9 2 version fixed bin, 10 10 2 count fixed bin, 10 11 2 numbers (n_messages refer(curr_msgs.count)) fixed bin; 10 12 10 13 dcl nonexist_msgsp ptr; 10 14 10 15 dcl 1 nonexist_msgs based(nonexist_msgsp), 10 16 2 version fixed bin, 10 17 2 count fixed bin, 10 18 2 numbers (n_messages refer(nonexist_msgs.count)) fixed bin; 10 19 10 20 dcl msg_structp ptr; 10 21 10 22 dcl 1 msg_struct based(msg_structp), 10 23 2 version fixed bin, 10 24 2 count fixed bin, 10 25 2 numbers(n_messages refer(msg_struct.count)) fixed bin; 253 11 1 /* BEGIN INCLUDE FILE xmail_responses.incl.pl1 */ 11 2 11 3 /****^ HISTORY COMMENTS: 11 4* 1) change(86-02-07,Blair), approve(86-03-06,MCR7358), 11 5* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 11 6* 85-03-05 JG Backs: Modified to add a response of date. 11 7* 85-03-11 JG Backs: Modified to add short forms of keywords (a,l,p,f). 11 8* 85-03-14 JG Backs: Modified to add ASK, SET, and S. 11 9* 2) change(86-02-07,Blair), approve(86-03-06,MCR7358), 11 10* audit(86-04-21,RBarstad), install(86-05-28,MR12.0-1062): 11 11* Modify to add SEEN and UNSEEN. 11 12* END HISTORY COMMENTS */ 11 13 11 14 /* Created 06/17/81 by Suzanne Krupp */ 11 15 11 16 dcl (QUESTION char(1) init("?"), 11 17 LIST char(2) init("??"), 11 18 A char(1) init("a"), 11 19 ALL char(3) init("all"), 11 20 ASK char(3) init("ask"), 11 21 DATE char(4) init("date"), 11 22 F char(1) init("f"), 11 23 FIRST char(5) init("first"), 11 24 L char(1) init("l"), 11 25 LAST char(4) init("last"), 11 26 N char (1) init ("n"), 11 27 NO char(2) init("no"), 11 28 NEXT char(4) init("next"), 11 29 NEW char(3) init("new"), 11 30 P char(1) init("p"), 11 31 PREV char(4) init("prev"), 11 32 S char(1) init("s"), 11 33 SEEN char (4) init("seen"), 11 34 SET char(3) init("set"), 11 35 SEARCH char(6) init("search"), 11 36 UNSEEN char (6) init("unseen"), 11 37 Y char (1) init ("y"), 11 38 YES char(3) init("yes")) 11 39 int static options(constant); 11 40 11 41 /* END INCLUDE FILE ... xmail_responses.incl.pl1 */ 254 255 256 /* BEGIN */ 257 on condition (xmail_redisplay_menu) begin; 258 if menup ^= null then do; 259 if ^xmail_data.reply_request 260 then call menu_$display (xmail_windows.menu.iocb, menup, code); 261 if code ^= 0 262 then call xmail_error_$no_code (code, NAME, "l", 263 "Unable to display menu. This is an internal programming error."); 264 end; 265 end; 266 267 deletes_ptr = null (); 268 call hcs_$make_seg ("", "seg_of_deletes2", "", 01010b, deletes_ptr, (0)); 269 no_of_entries, old_no_of_entries = 0; 270 271 file = ""; /* initialize file name */ 272 mailbox_ptr = null; 273 curr_msgsp = null; 274 xmail_data.cleanup_signalled, xmail_data.reply_request = "0"b; 275 276 on condition (cleanup) begin; 277 call done_with_file (); 278 end; 279 280 selecting_new_file = "0"b; 281 282 if menup = null 283 then do; 284 call xmail_create_menu_ (TITLE, OPTION_NAMES, N_COLUMNS, menup, code); 285 if code ^= 0 286 then call xmail_error_$no_code (code, NAME, "q", 287 "Unable to get menu. This is an internal programming error."); 288 end; 289 290 call SELECT_FILE; 291 if select_file_bad 292 then go to EXIT; 293 294 on condition (program_interrupt) go to START; 295 on condition (quit) 296 begin; 297 dcl xmail_window_manager_$reconnect entry (); 298 call xmail_window_manager_$reconnect (); 299 go to START; 300 end; 301 302 START: display_needed = "1"b; 303 304 do while ("1"b); 305 306 if mailbox_ptr = null 307 then do; 308 file = " "; 309 file_info = " "; 310 position = "Current message: "; 311 go to skipit; 312 end; 313 314 call ioa_$rsnnl ("Total messages: ^d", file_info, (0), mailbox.n_messages - mailbox.n_deleted_messages); 315 if curr_msgsp ^= null 316 then if curr_msgs.count > 1 317 then multiple_msgs = "1"b; 318 else multiple_msgs = "0"b; 319 320 call ioa_$rsnnl ("Current message^[^ss^;^[s^]^]: ^a", position, (0), curr_msgsp = null, multiple_msgs, pos_line); 321 322 skipit: call xmail_get_choice_ (menup, 323 "File: " || file, 324 (file_info), 325 (position), 326 xmail_data.normal_usage, 327 display_needed, 328 "", 329 choice, 330 code); 331 display_needed = "0"b; 332 if code = 0 333 then do; 334 call PERFORM_OPTION (choice, display_needed); 335 call mail_system_$read_new_messages (mailbox_ptr, (0), (0), (0), status); 336 if status ^= 0 & status ^= mlsys_et_$no_more_messages 337 then call xmail_error_$no_code (status, NAME, "q", "Unable to read mail file. This is an internal programming error."); 338 end; 339 else if code = xmail_err_$help_requested 340 then call EXPLAIN_OPTION (choice); 341 else if code = xmail_err_$exit_now 342 then do; /* PREV MENU */ 343 revert quit; /* close null pointer window */ 344 call done_with_file (); 345 go to EXIT; 346 end; 347 else do; 348 call window_$bell (iox_$user_output, code); 349 if code ^= 0 350 then call xmail_error_$no_print (code, NAME, "l", "Cannot ring terminal bell. This is an internal programming error."); 351 end; 352 end; 353 354 EXIT: return; 355 356 /* INTERNAL PROCEDURES */ 357 358 PERFORM_OPTION: proc (opt, redisplay); 359 360 /* PARAMETERS */ 361 362 dcl opt fixed bin; 363 dcl redisplay bit (1) aligned; 364 365 /* AUTOMATIC */ 366 367 dcl deleted_msg_string char (25); 368 dcl message_num fixed bin; 369 dcl idx fixed bin; 370 dcl idx1 fixed bin; 371 dcl dreply_msg_ptr ptr; 372 dcl counter fixed bin; 373 dcl seen_msgsp ptr; 374 dcl switch_on_off bit (2) aligned; 375 dcl switch bit (1) aligned; 376 377 /* CONSTANTS */ 378 379 dcl mailbox_empty_msg char (19) static options (constant) init 380 ("Mail file is empty."); 381 dcl SWITCH_ON bit (2) aligned init ("10"b) int static options (constant); 382 383 /* ENTRIES */ 384 385 dcl unique_chars_ entry (bit (*)) returns (char (15)); 386 dcl xmail_delete_msgs_ entry (ptr, ptr, char (*), char (*)); 387 dcl xmail_display_msgs_ entry (ptr, ptr, ptr); 388 dcl xmail_dprint_msgs_ entry (ptr, ptr); 389 dcl xmail_file_msgs_$current_msgs entry (ptr, ptr, char (32) var, bit (1) aligned); 390 dcl xmail_forward_msg_ entry (ptr, ptr); 391 dcl xmail_list_msgs_ entry (ptr, ptr, ptr); 392 dcl xmail_list_msgs_$selected entry (ptr, ptr, ptr); 393 dcl xmail_list_msgs_$set_seen_switch entry (ptr, ptr, bit (1) aligned); 394 dcl xmail_reply_msg_ entry (ptr, ptr); 395 dcl xmail_select_msgs_ entry (ptr, ptr, ptr, bit (2) aligned, char (*)); 396 dcl xmail_select_msgs_$next entry (ptr, ptr, char (*)); 397 dcl xmail_write_msgs_ entry (ptr, ptr); 398 399 /* BEGIN PERFORM_OPTION */ 400 401 call window_$clear_window (iox_$user_output, code); 402 if code ^= 0 403 then call xmail_error_$no_print (code, NAME, "l", "Cannot clear user_io window. This is an internal programming error."); 404 405 go to OPT (opt); 406 407 408 OPT (1): /* Display Option */ 409 if curr_msgsp ^= null () 410 then call xmail_display_msgs_ (mailbox_ptr, curr_msgsp, iox_$user_output); 411 else call ioa_ (mailbox_empty_msg); 412 go to PERFORM_EXIT; 413 414 OPT (2): /* Reply option */ 415 if curr_msgsp ^= null () 416 then call xmail_reply_msg_ (mailbox_ptr, curr_msgsp); 417 else call ioa_ (mailbox_empty_msg); 418 go to PERFORM_EXIT; 419 420 OPT (3): /* File Original Option */ 421 if curr_msgsp ^= null () then do; 422 call xmail_file_msgs_$current_msgs (mailbox_ptr, curr_msgsp, default_file, ALLOW_SELECTION); 423 call mail_system_$read_new_messages (mailbox_ptr, (0), (0), (0), status); 424 if status ^= 0 & status ^= mlsys_et_$no_more_messages 425 then call xmail_error_$no_code (status, NAME, "q", "Unable to read mail file. This is an internal programming error."); 426 if default_file ^= "" 427 then call delete_msgs; 428 end; 429 else call ioa_ (mailbox_empty_msg); 430 go to PERFORM_EXIT; 431 432 OPT (4): /* Delete Option */ 433 if curr_msgsp ^= null () 434 then call delete_msgs; 435 else call ioa_ (mailbox_empty_msg); 436 go to PERFORM_EXIT; 437 438 OPT (5): /* Next Message Option */ 439 if curr_msgsp ^= null () 440 then do; 441 call xmail_select_msgs_$next (mailbox_ptr, curr_msgsp, pos_line); 442 call xmail_list_msgs_$selected (mailbox_ptr, curr_msgsp, iox_$user_output); 443 end; 444 else call ioa_ (mailbox_empty_msg); 445 go to PERFORM_EXIT; 446 447 OPT (6): /* Select Messages Option */ 448 if curr_msgsp ^= null () 449 then do; 450 call xmail_select_msgs_ (mailbox_ptr, curr_msgsp, seen_msgsp, switch_on_off, pos_line); 451 call window_$clear_window (iox_$user_output, code); 452 if code ^= 0 453 then call xmail_error_$no_print (code, NAME, "l", "Cannot clear user_io window. This is an internal programming error."); 454 455 /* update and redisplay the new message line before list */ 456 457 if seen_msgsp ^= null 458 then do; 459 if switch_on_off = SWITCH_ON then switch = "1"b; 460 else switch = "0"b; 461 call xmail_list_msgs_$set_seen_switch (mailbox_ptr, seen_msgsp, switch); 462 free seen_msgsp -> curr_msgs; 463 end; 464 else if curr_msgsp ^= null then do; 465 if curr_msgs.count > 1 466 then multiple_msgs = "1"b; 467 else multiple_msgs = "0"b; 468 call ioa_$rsnnl ("Current message^[^ss^;^[s^]^]: ^a", position, (0), curr_msgsp = null, multiple_msgs, pos_line); 469 call xmail_sw_$update_position ((position)); 470 call xmail_sw_$redisplay (); 471 call xmail_list_msgs_$selected (mailbox_ptr, curr_msgsp, iox_$user_output); 472 end; 473 end; 474 else call ioa_ (mailbox_empty_msg); 475 go to PERFORM_EXIT; 476 477 OPT (7): /* Display Summary of Current Messages Option */ 478 479 if curr_msgsp ^= null () 480 then call xmail_list_msgs_$selected (mailbox_ptr, curr_msgsp, iox_$user_output); 481 else call ioa_ (mailbox_empty_msg); 482 go to PERFORM_EXIT; 483 484 OPT (8): /* Display Summary of Messages Option */ 485 if curr_msgsp ^= null () 486 then call xmail_list_msgs_ (mailbox_ptr, curr_msgsp, iox_$user_output); 487 else call ioa_ (mailbox_empty_msg); 488 go to PERFORM_EXIT; 489 490 OPT (9): /* Forward option */ 491 if curr_msgsp ^= null () 492 then call xmail_forward_msg_ (mailbox_ptr, curr_msgsp); 493 else call ioa_ (mailbox_empty_msg); 494 go to PERFORM_EXIT; 495 496 OPT (10): /* Undelete Messages Option */ 497 if mailbox_ptr ^= null () 498 then do; 499 call xmail_undelete_msgs_ (mailbox_ptr, curr_msgsp, pos_line, ""); 500 if curr_msgsp = null () 501 then go to PERFORM_EXIT; 502 503 do idx = 1 to curr_msgs.count; 504 message_num = curr_msgs.numbers (idx); 505 if mailbox.messages (message_num).message_ptr = null 506 then do; 507 call mail_system_$read_message (mailbox_ptr, message_num, code); 508 if code ^= 0 509 then call xmail_error_$no_code (code, NAME, "l", "Unable to read message ^d. This is an internal programming error.", message_num); 510 end; 511 dreply_msg_ptr = mailbox.messages (message_num).message_ptr; 512 deleted_msg_string = unique_chars_ ((dreply_msg_ptr -> message.header.message_id)) || ".reply"; 513 do idx1 = 1 to no_of_entries; 514 if deletes_array (idx1) = deleted_msg_string 515 then deletes_array (idx1) = ""; 516 end; /* end do */ 517 end; /*end do */ 518 end; 519 520 else call ioa_ (mailbox_empty_msg); 521 go to PERFORM_EXIT; 522 523 OPT (11): /* File Copy Option */ 524 if curr_msgsp ^= null () 525 then call xmail_file_msgs_$current_msgs (mailbox_ptr, curr_msgsp, default_file, ALLOW_SELECTION); 526 else call ioa_ (mailbox_empty_msg); 527 go to PERFORM_EXIT; 528 529 OPT (12): /* Print Option */ 530 if curr_msgsp ^= null () 531 then call xmail_dprint_msgs_ (mailbox_ptr, curr_msgsp); 532 else call ioa_ (mailbox_empty_msg); 533 go to PERFORM_EXIT; 534 535 OPT (13): /* Write Option */ 536 if curr_msgsp ^= null () 537 then call xmail_write_msgs_ (mailbox_ptr, curr_msgsp); 538 else call ioa_ (mailbox_empty_msg); 539 go to PERFORM_EXIT; 540 541 OPT (14): /* Select New File Option */ 542 selecting_new_file = "1"b; 543 xmail_data.foreign_mailbox = "1"b; 544 545 call SELECT_FILE; 546 xmail_data.foreign_mailbox = "0"b; 547 if select_file_bad 548 then go to PERFORM_EXIT; 549 else go to START; 550 551 552 delete_msgs: proc; /* Internal to PERFORM_OPTION proc */ 553 554 no_of_entries = old_no_of_entries + curr_msgs.count; 555 call hcs_$set_bc_seg (deletes_ptr, no_of_entries * 225 + 36, code); 556 counter = 0; 557 do idx = (old_no_of_entries + 1) to no_of_entries; 558 counter = counter + 1; 559 message_num = curr_msgs.numbers (counter); 560 if mailbox.messages (message_num).message_ptr = null 561 then do; 562 call mail_system_$read_message (mailbox_ptr, message_num, code); 563 if code ^= 0 564 then call xmail_error_$no_code (code, NAME, "l", "Unable to read message ^d. This is an internal programming error.", message_num); 565 end; 566 dreply_msg_ptr = mailbox.messages (message_num).message_ptr; 567 deletes_array (idx) = unique_chars_ ((dreply_msg_ptr -> message.header.message_id)) || ".reply"; 568 call hcs_$status_minf ((mail_dir), (deletes_array (idx)), (0), (0), (0), code); 569 if code = 0 570 then call ioa_ ("^/ The deferred reply for message no.^d was discarded.^/ To retrieve it, select the ""Retrieve Messages"" option.^/", message_num); 571 end; 572 573 old_no_of_entries = no_of_entries; 574 call xmail_delete_msgs_ (mailbox_ptr, curr_msgsp, pos_line, (file)); 575 return; 576 end delete_msgs; 577 578 PERFORM_EXIT: 579 if mailbox_ptr = null /* test for null file */ 580 then go to START; 581 return; 582 583 end PERFORM_OPTION; 584 585 SELECT_FILE: proc; 586 587 /* function: a new internal procedure to select a new mail file to process. 588* Called from both main and PERFORM_OPTION procedures. The 589* variable, select_file_bad, is set upon entry and will only be 590* cleared if everything is OK. 591**/ 592 dcl file_name char (32); 593 594 /* BEGIN SELECT_FILE */ 595 596 select_file_bad = "1"b; 597 598 if xmail_data.foreign_mailbox then do; 599 call xmail_select_file_$foreign_mailboxes ("mail file", "sv.mbx", "", ALLOW_OLD, DONT_ALLOW_NEW, new_dir, new_file, "Enter name of mail file you wish to process (or ?? for list)",another_mailbox, unused_bit, code); 600 if code ^= 0 | file = new_file 601 then goto SELECT_EXIT; 602 end; 603 else do; 604 call xmail_select_file_$caller_msg ("mail file", "sv.mbx", "", ALLOW_OLD, DONT_ALLOW_NEW, new_dir, new_file, "Enter name of mail file you wish to process (or ?? for list)", unused_bit, unused_bit2, code); 605 if code ^= 0 | file = new_file 606 then go to SELECT_EXIT; 607 /* msg to user */ 608 call ioa_ ("The ""^a"" file has been selected...", new_file); 609 610 /* Allow no_s_permission for reading of mailboxes other than user's. */ 611 612 call mail_system_$get_message_counts (new_dir, new_file || ".sv", "1"b, total_message_count, ordinary_message_count, (0), code); 613 if code = mlsys_et_$no_r_permission 614 then call xmail_error_$no_code (code, NAME, "i", " You do not have access to read the ""^a"" mail file.", new_file); 615 else if code = 0 & total_message_count = 0 616 then do; 617 call ioa_ (EMPTY_FILE_MSG, new_file); 618 go to SELECT_EXIT; 619 end; 620 end; 621 622 /* Option "Select New File" */ 623 624 if selecting_new_file 625 then do; 626 call done_with_file (); 627 selecting_new_file = "0"b; 628 end; 629 630 /* Set up to open mailbox */ 631 632 default_file = ""; 633 dir = new_dir; 634 file = new_file; 635 636 /* Determine if we want all msgs or just ordinary ones */ 637 call xmail_value_$get_with_default (MSGS_AS_MAIL, (NO), response, code); 638 if code ^= 0 then call xmail_error_$code_first (code, NAME, "q", 639 "^/Unable to get a value for ""^a"" in the xmail value segment.", MSGS_AS_MAIL); 640 641 treat_msgs_as_mail = "0"b; 642 if response = YES 643 then do; 644 treat_msgs_as_mail = "1"b; 645 xmail_data.msgs_as_mail = "1"b; 646 end; 647 else if response = ASK 648 then do; 649 call xmail_get_str_$yes_no ("Do you wish to treat interactive msgs as mail? ", yes_sw); 650 if yes_sw then do; 651 treat_msgs_as_mail = "1"b; 652 xmail_data.msgs_as_mail = "1"b; 653 end; 654 end; 655 else xmail_data.msgs_as_mail = "0"b; 656 657 /* Open the mailbox and set the first current message to one */ 658 659 auto_open_options.version = OPEN_OPTIONS_VERSION_2; 660 if treat_msgs_as_mail then 661 auto_open_options.message_selection_mode = ALL_MESSAGES; 662 else auto_open_options.message_selection_mode = ORDINARY_MESSAGES; 663 /* if xmail_data.foreign_mailbox 664* then auto_open_options.message_selection_mode = OWN_MESSAGES; 665* else 666* auto_open_options.message_selection_mode = ORDINARY_MESSAGES; */ 667 auto_open_options.sender_selection_mode = ACCESSIBLE_MESSAGES; 668 auto_open_options.message_reading_level = READ_KEYS; 669 670 if ^another_mailbox 671 then file_name = rtrim(file) || ".sv"; 672 else 673 file_name = file; 674 675 call mail_system_$open_mailbox (dir, rtrim(file_name), addr (auto_open_options), MAILBOX_VERSION_2, mailbox_ptr, code); 676 if code = error_table_$moderr 677 then call xmail_error_$no_code (code, NAME, "i", " You do not have access to read the ""^a"" mail file.", file); 678 else if code ^= 0 679 then call xmail_error_$no_code (code, NAME, "q", "Unable to open mail file, ""^a"".", file); 680 681 /* clear msg */ 682 call window_$clear_window (iox_$user_output, code); 683 if code ^= 0 then call xmail_error_$no_print (code, NAME, "l", "Cannot clear user_io window. This is an internal programming error."); 684 685 /* test for no accessible messages in mail file */ 686 687 if mailbox.n_messages = 0 688 then do; 689 call done_with_file; 690 call ioa_ (EMPTY_FILE_MSG, new_file); 691 go to SELECT_EXIT; 692 end; 693 694 call xmail_select_msgs_$first (mailbox_ptr, curr_msgsp, pos_line); 695 if curr_msgsp = null 696 then do; 697 call done_with_file (); 698 go to SELECT_EXIT; 699 end; 700 701 702 /* Clear to indicate file OK */ 703 704 select_file_bad = "0"b; 705 706 SELECT_EXIT: 707 return; 708 709 end SELECT_FILE; 710 711 EXPLAIN_OPTION: proc (opt); 712 713 /* PARAMETERS */ 714 715 dcl opt fixed bin; 716 717 /* ENTRIES */ 718 719 dcl xmail_display_help_ entry (char (*), char (*), fixed bin (35)); 720 721 /* BEGIN EXPLAIN_OPTION */ 722 723 call window_$clear_window (iox_$user_output, code); 724 if code ^= 0 725 then call xmail_error_$no_print (code, NAME, "l", "Cannot clear user_io window. This is an internal programming error."); 726 call xmail_display_help_ (NAME || ".gi.info", 727 translate (OPTION_NAMES (opt), "_", " "), code); 728 if code ^= 0 729 then call xmail_error_$no_print (code, NAME, "l", "Unable to display help. This is an internal programming error."); 730 731 end EXPLAIN_OPTION; 732 733 done_with_file: proc (); 734 735 if mailbox_ptr ^= null 736 then do; 737 if xmail_data.cleanup_signalled 738 then call xmail_undelete_msgs_ (mailbox_ptr, curr_msgsp, pos_line, ""); 739 xmail_data.cleanup_signalled = "0"b; 740 auto_close_options.version = CLOSE_OPTIONS_VERSION_2; 741 auto_close_options.flags.perform_deletions = "1"b; 742 auto_close_options.flags.report_deletion_errors = "0"b; 743 auto_close_options.flags.mbz = "0"b; 744 call mail_system_$close_mailbox (mailbox_ptr, addr (auto_close_options), code); 745 if code ^= 0 then call xmail_error_$no_code (code, NAME, "l", "Unable to close user mailbox. This is an internal programming error."); 746 end; 747 748 xmail_data.foreign_mailbox = "0"b; 749 if curr_msgsp ^= null () 750 then do; 751 free curr_msgs; 752 curr_msgsp = null (); 753 end; 754 if (deletes_ptr ^= null () & no_of_entries ^= 0) then call xmail_delete_dreply_ (deletes_ptr); 755 old_no_of_entries = 0; 756 757 end done_with_file; 758 759 760 end xmail_Consult_Files_; 761 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/02/88 0745.0 xmail_Consult_Files_.pl1 >spec>install>MR12.2-1098>xmail_Consult_Files_.pl1 236 1 12/02/84 1132.9 xmail_windows.incl.pl1 >ldd>include>xmail_windows.incl.pl1 1-14 2 09/12/84 0916.7 window_control_info.incl.pl1 >ldd>include>window_control_info.incl.pl1 238 3 03/27/82 0429.3 menu_dcls.incl.pl1 >ldd>include>menu_dcls.incl.pl1 240 4 09/02/88 0743.4 xmail_data.incl.pl1 >spec>install>MR12.2-1098>xmail_data.incl.pl1 242 5 09/12/84 0916.7 window_dcls.incl.pl1 >ldd>include>window_dcls.incl.pl1 244 6 10/27/83 2104.2 mlsys_open_options.incl.pl1 >ldd>include>mlsys_open_options.incl.pl1 246 7 10/27/83 2104.2 mlsys_close_options.incl.pl1 >ldd>include>mlsys_close_options.incl.pl1 248 8 10/27/83 2104.2 mlsys_mailbox.incl.pl1 >ldd>include>mlsys_mailbox.incl.pl1 250 9 05/22/86 1225.8 mlsys_message.incl.pl1 >ldd>include>mlsys_message.incl.pl1 252 10 06/08/82 1329.4 xmail_curr_msg_info.incl.pl1 >ldd>include>xmail_curr_msg_info.incl.pl1 254 11 05/28/86 1117.7 xmail_responses.incl.pl1 >ldd>include>xmail_responses.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. ACCESSIBLE_MESSAGES constant fixed bin(17,0) initial dcl 6-30 ref 667 ALLOW_OLD 000331 constant bit(1) initial dcl 159 set ref 599* 604* ALLOW_SELECTION 000331 constant bit(1) initial dcl 160 set ref 422* 523* ALL_MESSAGES constant fixed bin(17,0) initial dcl 6-17 ref 660 ASK 000024 constant char(3) initial packed unaligned dcl 11-16 ref 647 CLOSE_OPTIONS_VERSION_2 000030 constant char(8) initial packed unaligned dcl 7-13 ref 740 DONT_ALLOW_NEW 000340 constant bit(1) initial dcl 161 set ref 599* 604* EMPTY_FILE_MSG 000250 constant char(46) initial packed unaligned dcl 162 set ref 617* 690* MAILBOX_VERSION_2 000026 constant char(8) initial packed unaligned dcl 8-28 set ref 675* MSGS_AS_MAIL 000244 constant char(15) initial packed unaligned dcl 164 set ref 637* 638* NAME 000237 constant char(20) initial packed unaligned dcl 165 set ref 261* 285* 336* 349* 402* 424* 452* 508* 563* 613* 638* 676* 678* 683* 724* 726 728* 745* NO constant char(2) initial packed unaligned dcl 11-16 ref 637 N_COLUMNS 000275 constant fixed bin(17,0) initial dcl 166 set ref 284* OPEN_OPTIONS_VERSION_2 000032 constant char(8) initial packed unaligned dcl 6-12 ref 659 OPTION_NAMES 000041 constant varying char(30) initial array dcl 167 set ref 284* 726 726 ORDINARY_MESSAGES constant fixed bin(17,0) initial dcl 6-23 ref 662 READ_KEYS constant fixed bin(17,0) initial dcl 6-38 ref 668 SWITCH_ON constant bit(2) initial dcl 381 ref 459 TITLE 000034 constant char(18) initial packed unaligned dcl 183 set ref 284* YES 000023 constant char(3) initial packed unaligned dcl 11-16 ref 642 addr builtin function dcl 188 ref 675 675 744 744 another_mailbox 000605 automatic bit(1) dcl 142 set ref 599* 670 auto_close_options 000613 automatic structure level 1 packed packed unaligned dcl 145 set ref 744 744 auto_open_options 000606 automatic structure level 1 unaligned dcl 144 set ref 675 675 choice 000100 automatic fixed bin(17,0) dcl 119 set ref 322* 334* 339* cleanup 000616 stack reference condition dcl 155 ref 276 cleanup_signalled 213(08) based bit(1) level 3 packed packed unaligned dcl 4-54 set ref 274* 737 739* close_options based structure level 1 dcl 7-6 code 000101 automatic fixed bin(35,0) dcl 120 set ref 259* 261 261* 284* 285 285* 322* 332 339 341 348* 349 349* 401* 402 402* 451* 452 452* 507* 508 508* 555* 562* 563 563* 568* 569 599* 600 604* 605 612* 613 613* 615 637* 638 638* 675* 676 676* 678 678* 682* 683 683* 723* 724 724* 726* 728 728* 744* 745 745* count 1 based fixed bin(17,0) level 2 dcl 10-8 ref 315 462 465 503 554 751 counter 000674 automatic fixed bin(17,0) dcl 372 set ref 556* 558* 558 559 curr_msgs based structure level 1 unaligned dcl 10-8 ref 462 751 curr_msgsp 000650 automatic pointer dcl 10-6 set ref 273* 315 315 320 408 408* 414 414* 420 422* 432 438 441* 442* 447 450* 464 465 468 471* 477 477* 484 484* 490 490* 499* 500 503 504 523 523* 529 529* 535 535* 554 559 574* 694* 695 737* 749 751 752* default_file 000102 automatic varying char(32) dcl 121 set ref 422* 426 523* 632* deleted_msg_string 000660 automatic char(25) packed unaligned dcl 367 set ref 512* 514 deletes based structure level 1 unaligned dcl 149 deletes_array 1 based char(25) array level 2 packed packed unaligned dcl 149 set ref 514 514* 567* 568 deletes_ptr 000114 automatic pointer dcl 122 set ref 267* 268* 269 513 514 514 554 555* 555 557 567 568 573 754 754 754* dir 000116 automatic char(168) packed unaligned dcl 123 set ref 633* 675* display_needed 000170 automatic bit(1) dcl 124 set ref 302* 322* 331* 334* dreply_msg_ptr 000672 automatic pointer dcl 371 set ref 511* 512 566* 567 error_table_$moderr 000072 external static fixed bin(35,0) dcl 223 ref 676 file 000171 automatic varying char(32) dcl 125 set ref 271* 308* 322 574 600 605 634* 670 672 676* 678* file_info 000202 automatic varying char(256) dcl 126 set ref 309* 314* 322 file_name 000722 automatic char(32) packed unaligned dcl 592 set ref 670* 672* 675 675 flags 213 based structure level 2 in structure "xmail_data" dcl 4-54 in procedure "xmail_Consult_Files_" flags 2 000613 automatic structure level 2 in structure "auto_close_options" packed packed unaligned dcl 145 in procedure "xmail_Consult_Files_" foreign_mailbox 213(06) based bit(1) level 3 packed packed unaligned dcl 4-54 set ref 543* 546* 598 748* hcs_$make_seg 000014 constant entry external dcl 193 ref 268 hcs_$set_bc_seg 000054 constant entry external dcl 212 ref 555 hcs_$status_minf 000012 constant entry external dcl 192 ref 568 header 4 based structure level 3 in structure "message_body_section_parameter" dcl 9-313 in procedure "xmail_Consult_Files_" header based structure level 2 in structure "message_body_section" dcl 9-274 in procedure "xmail_Consult_Files_" header 30 based structure level 2 in structure "message" dcl 9-15 in procedure "xmail_Consult_Files_" header 64 based structure array level 4 in structure "message" dcl 9-15 in procedure "xmail_Consult_Files_" header 4 based structure level 3 in structure "message_user_field_parameter" dcl 9-208 in procedure "xmail_Consult_Files_" header based structure level 2 in structure "message_user_field" dcl 9-163 in procedure "xmail_Consult_Files_" header 10 based structure array level 3 in structure "message_user_fields_list" dcl 9-150 in procedure "xmail_Consult_Files_" idx 000670 automatic fixed bin(17,0) dcl 369 set ref 503* 504* 557* 567 568* idx1 000671 automatic fixed bin(17,0) dcl 370 set ref 513* 514 514* ioa_ 000016 constant entry external dcl 194 ref 411 417 429 435 444 474 481 487 493 520 526 532 538 569 608 617 690 ioa_$rsnnl 000020 constant entry external dcl 196 ref 314 320 468 iocb 22 000106 external static pointer level 3 dcl 1-5 set ref 259* iox_$user_output 000074 external static pointer dcl 224 set ref 348* 401* 408* 442* 451* 471* 477* 484* 682* 723* mail_dir based varying char(168) level 2 dcl 4-54 ref 568 mail_system_$close_mailbox 000026 constant entry external dcl 199 ref 744 mail_system_$get_message_counts 000022 constant entry external dcl 197 ref 612 mail_system_$open_mailbox 000024 constant entry external dcl 198 ref 675 mail_system_$read_message 000032 constant entry external dcl 201 ref 507 562 mail_system_$read_new_messages 000030 constant entry external dcl 200 ref 335 423 mailbox based structure level 1 dcl 8-6 mailbox_empty_msg 000016 constant char(19) initial packed unaligned dcl 379 set ref 411* 417* 429* 435* 444* 474* 481* 487* 493* 520* 526* 532* 538* mailbox_ptr 000646 automatic pointer dcl 8-30 set ref 272* 306 314 314 335* 408* 414* 422* 423* 441* 442* 450* 461* 471* 477* 484* 490* 496 499* 505 507* 511 523* 529* 535* 560 562* 566 574* 578 675* 687 694* 735 737* 744* mbz 2(02) 000613 automatic bit(34) level 3 packed packed unaligned dcl 145 set ref 743* menu 22 000106 external static structure level 2 dcl 1-5 menu_$display 000110 constant entry external dcl 3-20 ref 259 menup 000010 internal static pointer initial dcl 232 set ref 258 259* 282 284* 322* message based structure level 1 dcl 9-15 message_body_section based structure level 1 dcl 9-274 message_envelope based structure level 1 dcl 9-61 message_id 30 based bit(72) level 3 dcl 9-15 ref 512 567 message_num 000667 automatic fixed bin(17,0) dcl 368 set ref 504* 505 507* 508* 511 559* 560 562* 563* 566 569* message_ptr 106 based pointer array level 3 dcl 8-6 ref 505 511 560 566 message_reading_level 4 000606 automatic fixed bin(17,0) level 2 dcl 144 set ref 668* message_redistribution based structure level 1 dcl 9-122 message_reference based structure level 1 dcl 9-234 message_selection_mode 2 000606 automatic fixed bin(17,0) level 2 dcl 144 set ref 660* 662* message_text_field based structure level 1 dcl 9-260 message_user_field based structure level 1 dcl 9-163 messages 104 based structure array level 2 dcl 8-6 mlsys_et_$no_more_messages 000076 external static fixed bin(35,0) dcl 225 ref 336 424 mlsys_et_$no_r_permission 000100 external static fixed bin(35,0) dcl 226 ref 613 msgs_as_mail 213(09) based bit(1) level 3 packed packed unaligned dcl 4-54 set ref 645* 652* 655* multiple_msgs 000303 automatic bit(1) dcl 127 set ref 315* 318* 320* 465* 467* 468* n_deleted_messages 103 based fixed bin(17,0) level 2 dcl 8-6 ref 314 n_messages 100 based fixed bin(17,0) level 2 dcl 8-6 ref 314 687 new_dir 000304 automatic char(168) packed unaligned dcl 128 set ref 599* 604* 612* 633 new_file 000356 automatic varying char(32) dcl 129 set ref 599* 600 604* 605 608* 612 613* 617* 634 690* no_of_entries based fixed bin(17,0) level 2 dcl 149 set ref 269* 513 554* 555 557 573 754 normal_usage 142 based char(80) level 2 packed packed unaligned dcl 4-54 set ref 322* null builtin function dcl 188 ref 258 267 272 273 282 306 315 320 408 414 420 432 438 447 457 464 468 477 484 490 496 500 505 523 529 535 560 578 695 735 749 752 754 numbers 2 based fixed bin(17,0) array level 2 dcl 10-8 ref 504 559 old_no_of_entries 000367 automatic fixed bin(17,0) dcl 130 set ref 269* 554 557 573* 755* open_options based structure level 1 dcl 6-6 opt parameter fixed bin(17,0) dcl 715 in procedure "EXPLAIN_OPTION" ref 711 726 726 opt parameter fixed bin(17,0) dcl 362 in procedure "PERFORM_OPTION" ref 358 405 ordinary_message_count 000370 automatic fixed bin(17,0) dcl 131 set ref 612* perform_deletions 2 000613 automatic bit(1) level 3 packed packed unaligned dcl 145 set ref 741* pos_line 000372 automatic char(256) packed unaligned dcl 132 set ref 320* 441* 450* 468* 499* 574* 694* 737* position 000472 automatic varying char(256) dcl 133 set ref 310* 320* 322 468* 469 program_interrupt 000624 stack reference condition dcl 155 ref 294 quit 000640 stack reference condition dcl 155 ref 295 343 redisplay parameter bit(1) dcl 363 ref 358 reply_request 213(10) based bit(1) level 3 packed packed unaligned dcl 4-54 set ref 259 274* report_deletion_errors 2(01) 000613 automatic bit(1) level 3 packed packed unaligned dcl 145 set ref 742* response 000574 automatic varying char(3) dcl 134 set ref 637* 642 647 rtrim builtin function dcl 188 ref 670 675 675 seen_msgsp 000676 automatic pointer dcl 373 set ref 450* 457 461* 462 select_file_bad 000577 automatic bit(1) dcl 136 set ref 291 547 596* 704* selecting_new_file 000576 automatic bit(1) dcl 135 set ref 280* 541* 624 627* sender_selection_mode 3 000606 automatic fixed bin(17,0) level 2 dcl 144 set ref 667* status 000600 automatic fixed bin(35,0) dcl 137 set ref 335* 336 336 336* 423* 424 424 424* switch 000701 automatic bit(1) dcl 375 set ref 459* 460* 461* switch_on_off 000700 automatic bit(2) dcl 374 set ref 450* 459 total_message_count 000371 automatic fixed bin(17,0) dcl 131 set ref 612* 615 translate builtin function dcl 188 ref 726 726 treat_msgs_as_mail 000601 automatic bit(1) dcl 138 set ref 641* 644* 651* 660 unique_chars_ 000122 constant entry external dcl 385 ref 512 567 unused_bit 000602 automatic bit(1) dcl 139 set ref 599* 604* unused_bit2 000603 automatic bit(1) dcl 140 set ref 604* version 000606 automatic char(8) level 2 in structure "auto_open_options" packed packed unaligned dcl 144 in procedure "xmail_Consult_Files_" set ref 659* version 000613 automatic char(8) level 2 in structure "auto_close_options" packed packed unaligned dcl 145 in procedure "xmail_Consult_Files_" set ref 740* window_$bell 000114 constant entry external dcl 5-6 ref 348 window_$clear_window 000116 constant entry external dcl 5-13 ref 401 451 682 723 window_position_info based structure level 1 unaligned dcl 2-25 xmail_create_menu_ 000034 constant entry external dcl 202 ref 284 xmail_data based structure level 1 dcl 4-54 xmail_data_ptr 000112 external static pointer initial dcl 4-52 ref 259 274 274 322 543 546 568 598 645 652 655 737 739 748 xmail_delete_dreply_ 000060 constant entry external dcl 214 ref 754 xmail_delete_msgs_ 000124 constant entry external dcl 386 ref 574 xmail_display_help_ 000154 constant entry external dcl 719 ref 726 xmail_display_msgs_ 000126 constant entry external dcl 387 ref 408 xmail_dprint_msgs_ 000130 constant entry external dcl 388 ref 529 xmail_err_$exit_now 000104 external static fixed bin(35,0) dcl 228 ref 341 xmail_err_$help_requested 000102 external static fixed bin(35,0) dcl 227 ref 339 xmail_error_$code_first 000036 constant entry external dcl 203 ref 638 xmail_error_$no_code 000040 constant entry external dcl 204 ref 261 285 336 424 508 563 613 676 678 745 xmail_error_$no_print 000042 constant entry external dcl 205 ref 349 402 452 683 724 728 xmail_file_msgs_$current_msgs 000132 constant entry external dcl 389 ref 422 523 xmail_forward_msg_ 000134 constant entry external dcl 390 ref 490 xmail_get_choice_ 000044 constant entry external dcl 206 ref 322 xmail_get_str_$yes_no 000046 constant entry external dcl 207 ref 649 xmail_list_msgs_ 000136 constant entry external dcl 391 ref 484 xmail_list_msgs_$selected 000140 constant entry external dcl 392 ref 442 471 477 xmail_list_msgs_$set_seen_switch 000142 constant entry external dcl 393 ref 461 xmail_redisplay_menu 000632 stack reference condition dcl 155 ref 257 xmail_reply_msg_ 000144 constant entry external dcl 394 ref 414 xmail_select_file_$caller_msg 000050 constant entry external dcl 208 ref 604 xmail_select_file_$foreign_mailboxes 000052 constant entry external dcl 210 ref 599 xmail_select_msgs_ 000146 constant entry external dcl 395 ref 450 xmail_select_msgs_$first 000056 constant entry external dcl 213 ref 694 xmail_select_msgs_$next 000150 constant entry external dcl 396 ref 441 xmail_sw_$redisplay 000062 constant entry external dcl 215 ref 470 xmail_sw_$update_position 000064 constant entry external dcl 216 ref 469 xmail_undelete_msgs_ 000066 constant entry external dcl 217 ref 499 737 xmail_value_$get_with_default 000070 constant entry external dcl 218 ref 637 xmail_window_info_format based structure level 1 dcl 1-10 xmail_window_manager_$reconnect 000120 constant entry external dcl 297 ref 298 xmail_windows 000106 external static structure level 1 dcl 1-5 xmail_write_msgs_ 000152 constant entry external dcl 397 ref 535 yes_sw 000604 automatic bit(1) dcl 141 set ref 649* 650 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A internal static char(1) initial packed unaligned dcl 11-16 ALL internal static char(3) initial packed unaligned dcl 11-16 DATE internal static char(4) initial packed unaligned dcl 11-16 F internal static char(1) initial packed unaligned dcl 11-16 FIRST internal static char(5) initial packed unaligned dcl 11-16 INTERACTIVE_MESSAGES internal static fixed bin(17,0) initial dcl 6-23 L internal static char(1) initial packed unaligned dcl 11-16 LAST internal static char(4) initial packed unaligned dcl 11-16 LIST internal static char(2) initial packed unaligned dcl 11-16 MENU_OPTION_KEYS internal static char(1) initial array packed unaligned dcl 3-100 MESSAGE_ADDRESS_LIST_USER_FIELD internal static fixed bin(17,0) initial dcl 9-174 MESSAGE_BIT_STRING_BODY_SECTION internal static fixed bin(17,0) initial dcl 9-285 MESSAGE_BODY_SECTION_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 9-318 MESSAGE_DATE_USER_FIELD internal static fixed bin(17,0) initial dcl 9-174 MESSAGE_ENVELOPE_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 9-79 MESSAGE_INTEGER_USER_FIELD internal static fixed bin(17,0) initial dcl 9-174 MESSAGE_PREFORMATTED_BODY_SECTION internal static fixed bin(17,0) initial dcl 9-285 MESSAGE_REDISTRIBUTIONS_LIST_VERSION_2 internal static char(8) initial packed unaligned dcl 9-117 MESSAGE_REDISTRIBUTION_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 9-144 MESSAGE_REFERENCES_LIST_VERSION_2 internal static char(8) initial packed unaligned dcl 9-227 MESSAGE_REFERENCE_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 9-253 MESSAGE_TEXT_USER_FIELD internal static fixed bin(17,0) initial dcl 9-174 MESSAGE_TRACE_VERSION_2 internal static char(8) initial packed unaligned dcl 9-103 MESSAGE_USER_FIELDS_LIST_VERSION_2 internal static char(8) initial packed unaligned dcl 9-158 MESSAGE_USER_FIELD_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 9-213 MESSAGE_VERSION_2 internal static char(8) initial packed unaligned dcl 9-49 MSG_STRUCT_VERSION_1 internal static fixed bin(17,0) initial dcl 10-4 N internal static char(1) initial packed unaligned dcl 11-16 NEW internal static char(3) initial packed unaligned dcl 11-16 NEXT internal static char(4) initial packed unaligned dcl 11-16 NOT_OWN_MESSAGES internal static fixed bin(17,0) initial dcl 6-30 OTHER_MAILBOX internal static fixed bin(17,0) initial dcl 8-37 OWN_MESSAGES internal static fixed bin(17,0) initial dcl 6-30 P internal static char(1) initial packed unaligned dcl 11-16 PREV internal static char(4) initial packed unaligned dcl 11-16 QUESTION internal static char(1) initial packed unaligned dcl 11-16 READ_MESSAGES internal static fixed bin(17,0) initial dcl 6-38 S internal static char(1) initial packed unaligned dcl 11-16 SAVEBOX internal static fixed bin(17,0) initial dcl 8-37 SEARCH internal static char(6) initial packed unaligned dcl 11-16 SEEN internal static char(4) initial packed unaligned dcl 11-16 SET internal static char(3) initial packed unaligned dcl 11-16 UNSEEN internal static char(6) initial packed unaligned dcl 11-16 USER_DEFAULT_MAILBOX internal static fixed bin(17,0) initial dcl 8-37 USER_LOGBOX internal static fixed bin(17,0) initial dcl 8-37 Y internal static char(1) initial packed unaligned dcl 11-16 break_table_info based structure level 1 dcl 2-76 break_table_info_version internal static fixed bin(17,0) initial dcl 2-80 break_table_info_version_1 internal static fixed bin(17,0) initial dcl 2-80 break_table_ptr automatic pointer dcl 2-75 close_options_ptr automatic pointer dcl 7-15 get_editor_key_bindings_info based structure level 1 dcl 2-151 get_editor_key_bindings_info_ptr automatic pointer dcl 2-159 get_editor_key_bindings_info_version_1 internal static char(8) initial packed unaligned dcl 2-160 line_editor_binding_count automatic fixed bin(17,0) dcl 2-121 line_editor_key_binding_info based structure level 1 dcl 2-129 line_editor_key_binding_info_ptr automatic pointer dcl 2-118 line_editor_key_binding_info_version_3 internal static char(8) initial packed unaligned dcl 2-148 line_editor_longest_sequence automatic fixed bin(17,0) dcl 2-123 mailbox_n_messages automatic fixed bin(17,0) dcl 8-32 menu_$create 000000 constant entry external dcl 3-8 menu_$delete 000000 constant entry external dcl 3-61 menu_$describe 000000 constant entry external dcl 3-35 menu_$destroy 000000 constant entry external dcl 3-41 menu_$get_choice 000000 constant entry external dcl 3-26 menu_$list 000000 constant entry external dcl 3-67 menu_$retrieve 000000 constant entry external dcl 3-54 menu_$store 000000 constant entry external dcl 3-46 menu_format based structure level 1 dcl 3-76 menu_format_ptr automatic pointer dcl 3-94 menu_format_version_1 internal static fixed bin(17,0) initial dcl 3-97 menu_requirements based structure level 1 dcl 3-88 menu_requirements_ptr automatic pointer dcl 3-95 menu_requirements_version_1 internal static fixed bin(17,0) initial dcl 3-97 message_address_list_user_field based structure level 1 dcl 9-190 message_bit_string_body_section based structure level 1 dcl 9-301 message_bit_string_body_section_bit_string based bit packed unaligned dcl 9-307 message_body_section_parameter based structure level 1 dcl 9-313 message_body_section_parameter_ptr automatic pointer dcl 9-320 message_body_section_ptr automatic pointer dcl 9-280 message_date_user_field based structure level 1 dcl 9-195 message_envelope_parameter based structure level 1 dcl 9-74 message_envelope_parameter_ptr automatic pointer dcl 9-81 message_envelope_ptr automatic pointer dcl 9-69 message_integer_user_field based structure level 1 dcl 9-200 message_n_body_sections automatic fixed bin(17,0) dcl 9-55 message_n_redistributions automatic fixed bin(17,0) dcl 9-55 message_n_user_fields automatic fixed bin(17,0) dcl 9-55 message_preformatted_body_section based structure level 1 dcl 9-292 message_preformatted_body_section_text based char packed unaligned dcl 9-298 message_ptr automatic pointer dcl 9-53 message_redistribution_comment based char packed unaligned dcl 9-131 message_redistribution_parameter based structure level 1 dcl 9-139 message_redistribution_parameter_ptr automatic pointer dcl 9-146 message_redistribution_ptr automatic pointer dcl 9-134 message_redistributions_list based structure level 1 dcl 9-109 message_reference_parameter based structure level 1 dcl 9-248 message_reference_parameter_ptr automatic pointer dcl 9-255 message_reference_ptr automatic pointer dcl 9-243 message_reference_subject based char packed unaligned dcl 9-240 message_references_list based structure level 1 dcl 9-219 message_references_list_n_references automatic fixed bin(17,0) dcl 9-55 message_references_list_ptr automatic pointer dcl 9-229 message_subject based char packed unaligned dcl 9-51 message_text_field_ptr automatic pointer dcl 9-270 message_text_field_text based char packed unaligned dcl 9-268 message_text_user_field based structure level 1 dcl 9-183 message_text_user_field_text based char packed unaligned dcl 9-187 message_trace based structure level 1 dcl 9-87 message_trace_n_relays automatic fixed bin(17,0) dcl 9-55 message_trace_ptr automatic pointer dcl 9-105 message_user_field_parameter based structure level 1 dcl 9-208 message_user_field_parameter_ptr automatic pointer dcl 9-215 message_user_field_ptr automatic pointer dcl 9-169 message_user_fields_list based structure level 1 dcl 9-150 more_handler_info based structure level 1 dcl 2-83 more_handler_info_ptr automatic pointer dcl 2-92 more_handler_info_version internal static fixed bin(17,0) initial dcl 2-94 more_handler_info_version_3 internal static fixed bin(17,0) initial dcl 2-94 more_prompt_info based structure level 1 dcl 2-108 more_prompt_info_ptr automatic pointer dcl 2-112 more_prompt_info_version_1 internal static char(8) initial packed unaligned dcl 2-114 more_responses_info based structure level 1 dcl 2-59 more_responses_info_ptr automatic pointer dcl 2-69 more_responses_info_version_1 internal static fixed bin(17,0) initial dcl 2-67 more_responses_version internal static fixed bin(17,0) initial dcl 2-67 msg_struct based structure level 1 unaligned dcl 10-22 msg_structp automatic pointer dcl 10-20 n_messages automatic fixed bin(17,0) dcl 10-3 nonexist_msgs based structure level 1 unaligned dcl 10-15 nonexist_msgsp automatic pointer dcl 10-13 open_options_ptr automatic pointer dcl 6-14 set_editor_key_bindings_info based structure level 1 dcl 2-162 set_editor_key_bindings_info_ptr automatic pointer dcl 2-171 set_editor_key_bindings_info_version_1 internal static char(8) initial packed unaligned dcl 2-172 token_characters_info based structure level 1 dcl 2-97 token_characters_info_ptr automatic pointer dcl 2-104 token_characters_info_version_1 internal static char(8) initial packed unaligned dcl 2-106 window_$change_column 000000 constant entry external dcl 5-63 window_$change_line 000000 constant entry external dcl 5-59 window_$clear_region 000000 constant entry external dcl 5-7 window_$clear_to_end_of_line 000000 constant entry external dcl 5-9 window_$clear_to_end_of_window 000000 constant entry external dcl 5-11 window_$create 000000 constant entry external dcl 5-72 window_$delete_chars 000000 constant entry external dcl 5-15 window_$destroy 000000 constant entry external dcl 5-74 window_$edit_line 000000 constant entry external dcl 5-76 window_$get_cursor_position 000000 constant entry external dcl 5-17 window_$get_echoed_chars 000000 constant entry external dcl 5-22 window_$get_one_unechoed 000000 constant entry external dcl 5-67 window_$get_one_unechoed_char 000000 constant entry external dcl 5-67 window_$get_unechoed_chars 000000 constant entry external dcl 5-25 window_$insert_text 000000 constant entry external dcl 5-28 window_$overwrite_text 000000 constant entry external dcl 5-29 window_$position_cursor 000000 constant entry external dcl 5-31 window_$position_cursor_rel 000000 constant entry external dcl 5-36 window_$scroll_region 000000 constant entry external dcl 5-42 window_$sync 000000 constant entry external dcl 5-44 window_$write_raw_text 000000 constant entry external dcl 5-48 window_$write_sync_read 000000 constant entry external dcl 5-53 window_edit_line_info based structure level 1 unaligned dcl 2-177 window_edit_line_info_ptr automatic pointer dcl 2-186 window_edit_line_info_version_1 internal static char(8) initial packed unaligned dcl 2-183 window_position_info_ptr automatic pointer dcl 2-37 window_position_info_version internal static fixed bin(17,0) initial dcl 2-35 window_position_info_version_1 internal static fixed bin(17,0) initial dcl 2-35 window_status_info based structure level 1 dcl 2-45 window_status_info_ptr automatic pointer dcl 2-43 window_status_version internal static fixed bin(17,0) initial dcl 2-52 window_status_version_1 internal static fixed bin(17,0) initial dcl 2-52 xmail_version internal static varying char(10) initial dcl 4-84 NAMES DECLARED BY EXPLICIT CONTEXT. EXIT 002000 constant label dcl 354 ref 291 345 EXPLAIN_OPTION 005060 constant entry internal dcl 711 ref 339 OPT 000000 constant label array(14) dcl 408 ref 405 PERFORM_EXIT 003346 constant label dcl 578 ref 412 418 430 436 445 475 482 488 494 500 521 527 533 539 547 PERFORM_OPTION 002001 constant entry internal dcl 358 ref 334 SELECT_EXIT 005057 constant label dcl 706 ref 600 605 618 691 698 SELECT_FILE 003706 constant entry internal dcl 585 ref 290 545 START 001355 constant label dcl 302 ref 294 299 549 578 delete_msgs 003353 constant entry internal dcl 552 ref 426 432 done_with_file 005233 constant entry internal dcl 733 ref 277 344 626 689 697 skipit 001516 constant label dcl 322 ref 311 xmail_Consult_Files_ 001004 constant entry external dcl 50 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 6562 6740 5650 6572 Length 7534 5650 156 557 712 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME xmail_Consult_Files_ 918 external procedure is an external procedure. on unit on line 257 108 on unit on unit on line 276 64 on unit on unit on line 294 64 on unit on unit on line 295 64 on unit PERFORM_OPTION internal procedure shares stack frame of external procedure xmail_Consult_Files_. delete_msgs internal procedure shares stack frame of external procedure xmail_Consult_Files_. SELECT_FILE internal procedure shares stack frame of external procedure xmail_Consult_Files_. EXPLAIN_OPTION internal procedure shares stack frame of external procedure xmail_Consult_Files_. done_with_file 104 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 menup xmail_Consult_Files_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME xmail_Consult_Files_ 000100 choice xmail_Consult_Files_ 000101 code xmail_Consult_Files_ 000102 default_file xmail_Consult_Files_ 000114 deletes_ptr xmail_Consult_Files_ 000116 dir xmail_Consult_Files_ 000170 display_needed xmail_Consult_Files_ 000171 file xmail_Consult_Files_ 000202 file_info xmail_Consult_Files_ 000303 multiple_msgs xmail_Consult_Files_ 000304 new_dir xmail_Consult_Files_ 000356 new_file xmail_Consult_Files_ 000367 old_no_of_entries xmail_Consult_Files_ 000370 ordinary_message_count xmail_Consult_Files_ 000371 total_message_count xmail_Consult_Files_ 000372 pos_line xmail_Consult_Files_ 000472 position xmail_Consult_Files_ 000574 response xmail_Consult_Files_ 000576 selecting_new_file xmail_Consult_Files_ 000577 select_file_bad xmail_Consult_Files_ 000600 status xmail_Consult_Files_ 000601 treat_msgs_as_mail xmail_Consult_Files_ 000602 unused_bit xmail_Consult_Files_ 000603 unused_bit2 xmail_Consult_Files_ 000604 yes_sw xmail_Consult_Files_ 000605 another_mailbox xmail_Consult_Files_ 000606 auto_open_options xmail_Consult_Files_ 000613 auto_close_options xmail_Consult_Files_ 000646 mailbox_ptr xmail_Consult_Files_ 000650 curr_msgsp xmail_Consult_Files_ 000660 deleted_msg_string PERFORM_OPTION 000667 message_num PERFORM_OPTION 000670 idx PERFORM_OPTION 000671 idx1 PERFORM_OPTION 000672 dreply_msg_ptr PERFORM_OPTION 000674 counter PERFORM_OPTION 000676 seen_msgsp PERFORM_OPTION 000700 switch_on_off PERFORM_OPTION 000701 switch PERFORM_OPTION 000722 file_name SELECT_FILE THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_char_temp call_ext_out_desc call_ext_out call_int_this call_int_other return_mac tra_ext_1 enable_op shorten_stack ext_entry int_entry op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. hcs_$make_seg hcs_$set_bc_seg hcs_$status_minf ioa_ ioa_$rsnnl mail_system_$close_mailbox mail_system_$get_message_counts mail_system_$open_mailbox mail_system_$read_message mail_system_$read_new_messages menu_$display unique_chars_ window_$bell window_$clear_window xmail_create_menu_ xmail_delete_dreply_ xmail_delete_msgs_ xmail_display_help_ xmail_display_msgs_ xmail_dprint_msgs_ xmail_error_$code_first xmail_error_$no_code xmail_error_$no_print xmail_file_msgs_$current_msgs xmail_forward_msg_ xmail_get_choice_ xmail_get_str_$yes_no xmail_list_msgs_ xmail_list_msgs_$selected xmail_list_msgs_$set_seen_switch xmail_reply_msg_ xmail_select_file_$caller_msg xmail_select_file_$foreign_mailboxes xmail_select_msgs_ xmail_select_msgs_$first xmail_select_msgs_$next xmail_sw_$redisplay xmail_sw_$update_position xmail_undelete_msgs_ xmail_value_$get_with_default xmail_window_manager_$reconnect xmail_write_msgs_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$moderr iox_$user_output mlsys_et_$no_more_messages mlsys_et_$no_r_permission xmail_data_ptr xmail_err_$exit_now xmail_err_$help_requested xmail_windows LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 50 001003 257 001011 258 001025 259 001031 261 001052 265 001107 267 001110 268 001112 269 001157 271 001161 272 001162 273 001164 274 001165 276 001174 277 001210 278 001215 280 001216 282 001217 284 001224 285 001254 290 001310 291 001311 294 001313 295 001332 298 001346 299 001352 302 001355 304 001357 306 001360 308 001364 309 001370 310 001372 311 001377 314 001400 315 001435 318 001450 320 001451 322 001516 331 001626 332 001630 334 001632 335 001634 336 001656 338 001714 339 001715 341 001723 343 001725 344 001726 345 001732 348 001733 349 001743 352 001777 354 002000 358 002001 401 002003 402 002014 405 002050 408 002053 411 002073 412 002104 414 002105 417 002123 418 002134 420 002135 422 002141 423 002156 424 002200 426 002236 428 002244 429 002245 430 002256 432 002257 435 002265 436 002276 438 002277 441 002303 442 002323 443 002336 444 002337 445 002350 447 002351 450 002355 451 002404 452 002415 457 002451 459 002455 460 002464 461 002465 462 002500 463 002505 464 002506 465 002512 467 002521 468 002522 469 002567 470 002610 471 002616 473 002631 474 002632 475 002643 477 002644 481 002664 482 002675 484 002676 487 002716 488 002727 490 002730 493 002746 494 002757 496 002760 499 002764 500 003010 503 003014 504 003025 505 003030 507 003036 508 003051 511 003111 512 003116 513 003151 514 003161 516 003173 517 003175 518 003177 520 003200 521 003211 523 003212 526 003234 527 003245 529 003246 532 003264 533 003275 535 003276 538 003314 539 003325 541 003326 543 003330 545 003335 546 003336 547 003343 549 003345 578 003346 581 003352 552 003353 554 003354 555 003360 556 003376 557 003377 558 003407 559 003410 560 003414 562 003422 563 003435 566 003475 567 003502 568 003542 569 003621 571 003644 573 003646 574 003650 575 003704 585 003706 596 003707 598 003711 599 003717 600 004005 602 004015 604 004016 605 004104 608 004114 612 004134 613 004214 615 004257 617 004263 618 004277 624 004300 626 004302 627 004306 632 004307 633 004310 634 004313 637 004320 638 004351 641 004411 642 004412 644 004417 645 004421 646 004426 647 004427 649 004434 650 004456 651 004461 652 004463 654 004470 655 004471 659 004476 660 004500 662 004505 667 004507 668 004511 670 004513 672 004546 675 004553 676 004631 678 004674 682 004733 683 004744 687 005000 689 005003 690 005007 691 005024 694 005025 695 005045 697 005051 698 005055 704 005056 706 005057 711 005060 723 005062 724 005073 726 005127 728 005174 731 005231 733 005232 735 005240 737 005245 739 005275 740 005302 741 005306 742 005310 743 005312 744 005314 745 005330 748 005365 749 005372 751 005377 752 005404 754 005407 755 005425 757 005427 ----------------------------------------------------------- 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