COMPILATION LISTING OF SEGMENT mlsys_mailbox_mgr_ Compiled by: Multics PL/I Compiler, Release 32e, of September 22, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 10/02/89 0824.5 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 6* * * 7* *********************************************************** */ 8 9 10 11 /****^ HISTORY COMMENTS: 12* 1) change(86-01-09,Herbst), approve(86-03-25,MCR7367), 13* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 14* Added $set_message_switch. 15* 2) change(86-02-27,Herbst), approve(86-03-25,MCR7367), 16* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 17* Changed $set_message_switch to work only if the caller has "d" extended 18* access to the mailbox. 19* 3) change(86-03-25,Herbst), approve(86-03-25,MCR7367), 20* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 21* Changed P_switch_type from fixed bin to char (4) aligned. 22* 4) change(86-03-25,Herbst), approve(86-03-25,MCR7367), 23* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 24* Changed $set_message_switch to return error code from 25* mailbox_$update_message without conversion; fixed to copy input args. 26* 5) change(86-04-28,Herbst), approve(86-04-28,MCR7367), 27* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 28* Fixed $set_message_switch to return error code if no access to set switch. 29* 6) change(86-06-03,Herbst), approve(86-06-03,MCR7432), audit(86-06-30,Wong), 30* install(86-06-30,MR12.0-1080): 31* Fixed to zero unused portions of mail_format. 32* 7) change(87-03-09,Lippard), approve(87-03-18,MECR0001), 33* audit(87-03-12,Fawcett), install(87-03-19,MR12.1-1002): 34* Modified to strip control characters from message comment field. 35* 8) change(87-05-08,Lippard), approve(87-04-20,MCR7669), 36* audit(87-05-11,Fawcett), install(87-05-20,MR12.1-1032): 37* Formal installation to close out MECR0001. 38* 9) change(89-09-12,Lee), approve(89-09-12,MCR8131), 39* audit(89-09-25,LZimmerman), install(89-10-02,MR12.3-1079): 40* phx20316, phx19688 (Mail 491) - modified the entry deliver_acknowledgement 41* to try using the sender_id (delivery_by id) instead of giving up if the 42* acknowledge_to field refers to a mail table entry which does not expand to 43* a local mailbox; reformatting. 44* END HISTORY COMMENTS */ 45 46 47 /* format: off */ 48 49 /* Mailbox management for the Multics Mail System */ 50 51 /* Created: June 1983 by G. Palter from parts of mlsys_user_interface_ */ 52 /* Modified: 12 April 1984 by G. Palter to fix error #0441 -- when mail_system_$read_new_messages must grow the mailbox 53* structure to accomodate the new messages, it properly frees the old structure but does not update its internal 54* records to reflect this fact. Subsequently, when mail_system_$close_mailbox is called, it will attempt to free the 55* storage occupied by the old mailbox structure again resulting in damage to the mail system's area */ 56 57 /* format: on,style4,delnl,insnl,ifthenstmt,ifthen */ 58 59 60 mlsys_mailbox_mgr_: 61 procedure () options (rename ((alloc_, mlsys_storage_mgr_$allocate))); 62 63 return; /* not an entrypoint */ 64 65 66 /* Common Parameters */ 67 68 dcl P_code fixed binary (35) parameter; 69 70 dcl P_mailbox_dirname character (*) parameter; /* pathname of directory containing the mailbox */ 71 dcl P_mailbox_ename character (*) parameter; /* entryname of the mailbox: suffix is optional */ 72 dcl P_mailbox_ptr pointer parameter; /* -> user-visible mailbox structure (input/output) */ 73 dcl P_message_ptr pointer parameter; /* -> user-visible message structure */ 74 75 76 /* get_message_counts Parameters */ 77 78 dcl P_include_by_type bit (1) aligned parameter; /* ON => include breakdown by type (ordinary/interactive) */ 79 dcl P_n_messages fixed binary parameter; /* set to # of messages in the mailbox */ 80 dcl P_n_ordinary_messages fixed binary parameter; /* ... ordinary messages in the mailbox */ 81 dcl P_n_interactive_messages fixed binary parameter; /* ... interactive messages in the mailbox */ 82 83 84 /* open_mailbox Parameters */ 85 86 dcl P_open_options_ptr pointer parameter; /* -> options describing how to open the mailbox */ 87 dcl P_mailbox_version character (8) parameter; /* identifies the version of the mailbox structure expected to 88* be returned to the caller */ 89 90 91 /* read_new_messages Parameters */ 92 93 dcl P_n_new_messages fixed binary parameter; /* set to # of newly arrived messages in the mailbox */ 94 dcl P_n_new_ordinary_messages fixed binary parameter; /* ... etc. ... */ 95 dcl P_n_new_interactive_messages fixed binary parameter; /* ... */ 96 97 98 /* read_message and read_message_canonical_form Parameters */ 99 100 dcl P_message_idx fixed binary parameter; /* identifies which message is to be read */ 101 102 103 /* read_message_canonical_form and read_message_canonical_form_p Parameters */ 104 105 dcl P_message_canonical_form_ptr pointer parameter; /* set -> the canonical representation of the message */ 106 dcl P_message_canonical_form_lth fixed binary (21) parameter; 107 108 109 /* get_message_mf_if_canonical Parameters */ 110 111 dcl P_message_mf_ptr pointer parameter; /* set -> the mail_format containing the canonical message */ 112 dcl P_message_mf_extension_ptr pointer parameter; /* set -> the mf_extension for the above mail_format */ 113 114 /* close_mailbox Parameters */ 115 116 dcl P_close_options_ptr pointer parameter; /* defines options for closing the mailbox */ 117 118 /* set_message_switch Parameters */ 119 120 dcl P_switch_type char (4) aligned; /* seen switch, etc.; in rdm_switch_types.incl.pl1 */ 121 dcl P_switch_value bit (1) aligned; /* value to set it to */ 122 123 124 /* Local copies of parameters */ 125 126 dcl code fixed binary (35); 127 128 dcl mailbox_dirname character (168); 129 dcl mailbox_ename character (32); 130 131 dcl (n_messages, n_new_messages) fixed binary; 132 dcl (n_messages_by_type, n_new_messages_by_type) fixed binary dimension (ORDINARY_MESSAGES:INTERACTIVE_MESSAGES); 133 134 dcl message_idx fixed binary; 135 dcl switch_type char (4) aligned; 136 dcl switch_value bit (1) aligned; 137 138 /* Internal description of a mailbox opened by the Multics mail system */ 139 140 dcl 1 mailbox_info aligned based (mailbox_info_ptr), 141 2 dirname character (168) unaligned, /* pathname of directory containing the mailbox */ 142 2 ename character (32) unaligned, /* entryname of mailbox */ 143 2 address_ptr pointer, /* -> address of this mailbox */ 144 2 mailbox_ptr pointer, /* -> user-visible mailbox description */ 145 2 delete_error_info_ptr pointer, /* -> delete_error_info currently signalled to the user */ 146 2 type fixed binary, /* type of mailbox: default, logbox, savebox, etc. */ 147 2 index fixed binary, /* ring-1 mailbox index */ 148 2 mode_flags, /* current effective access */ 149 3 add bit (1) unaligned, 150 3 delete bit (1) unaligned, 151 3 read bit (1) unaligned, 152 3 own bit (1) unaligned, 153 3 status bit (1) unaligned, /* provides access to message count, salvaged bit */ 154 3 wakeup bit (1) unaligned, /* permits sending of interactive and mail notifications */ 155 3 urgent bit (1) unaligned, /* not used by present mail system ... */ 156 3 pad bit (29) unaligned, 157 2 message_selection_mode fixed binary, /* types of messages returned (ordinary, interactive) */ 158 2 sender_selection_mode fixed binary, /* sender of messages returned (all, own, not-own) */ 159 2 message_reading_level fixed binary, /* how much of message to read from mailbox */ 160 2 n_messages fixed binary, /* total # of messages read from the mailbox */ 161 2 n_messages_by_type (ORDINARY_MESSAGES:INTERACTIVE_MESSAGES) fixed binary, 162 /* ... and by message type */ 163 2 n_deleted_messages fixed binary, /* # of messages marked for deletion on closing */ 164 2 flags, 165 3 salvaged bit (1) unaligned, /* ON => mailbox has been salvaged */ 166 3 use_own_mode bit (1) unaligned, /* ON => mailbox_$own* entries needed to read from mailbox */ 167 3 pending_deletion bit (1) unaligned, /* ON => there is an interrupted deletion in progress */ 168 3 ring1_privilege bit (1) unaligned, /* ON => user had ring-1 privilege when computing 169* the can_be_deleted flags of the messages in the mailbox */ 170 3 pad bit (32) unaligned, 171 2 last_message_key bit (72) aligned, /* identifies last message read from the mailbox (if any) */ 172 2 last_message_area_ptr pointer, /* -> last segment (least full) used to hold the messages */ 173 2 message_blocks, /* chain of messages which are read in blocks (see below) */ 174 3 first pointer, 175 3 last pointer; 176 177 dcl mailbox_info_ptr pointer; 178 179 180 /* Message area temporary segment definition: Due to a mis-feature of the area package, the area passed to the ring-1 181* primitives can not be an extensible area. Thus, to read a mailbox, the mail system uses a set of non-extensible areas 182* each of which resides in a separate temporary segment */ 183 184 dcl 1 mailbox_message_area aligned based (mailbox_message_area_ptr), 185 2 previous pointer, /* -> previous temporary segment in the list */ 186 2 flags, 187 3 virgin_area bit (1) unaligned, /* ON => nothing has been allocated in this segment yet */ 188 3 pad bit (71) unaligned, /* force even-word boundary */ 189 2 area area; /* the actual area */ 190 191 dcl mailbox_message_area_ptr pointer; 192 193 194 /* Message block definition: contains the description of up to 32 messages in the mailbox and is used to minimize 195* allocations */ 196 197 dcl 1 message_block aligned based (message_block_ptr), 198 2 chain, /* chain of message blocks for this mailbox */ 199 3 previous pointer, 200 3 next pointer, 201 2 n_used fixed binary, /* # of slots used in this block */ 202 2 pad bit (36), 203 2 messages (32) like im_message_info; /* the messages in this block */ 204 205 dcl (message_block_ptr, next_message_block_ptr) pointer; 206 207 208 /* Definition of the reserved data in the user-visible description of a mailbox */ 209 210 dcl 1 mailbox_reserved_data aligned based (addr (mailbox.reserved)), 211 2 info_ptr pointer, /* -> the corresponding mailbox_info structure */ 212 2 n_messages_allocated fixed binary, /* actual size of the messages array */ 213 2 pad bit (36); 214 215 216 /* Internal description of an in-mailbox message maintained by the Multics mail system */ 217 218 dcl 1 im_message_info aligned based (im_message_info_ptr), 219 2 mailbox_info_ptr pointer, /* -> the description of mailbox where this message resides */ 220 2 area_ptr pointer, /* -> area into which the message was read from ring-1 */ 221 2 key bit (72) aligned, /* ring-1 key for this message */ 222 2 format fixed binary, /* format of the message as stored in ring-1 */ 223 2 type fixed binary, /* type of message: ordinary or interactive */ 224 2 flags, 225 3 mra_valid bit (1) unaligned, /* ON => message has been read from ring-1 */ 226 3 can_be_deleted bit (1) unaligned, /* ON => user has sufficient access to delete this message */ 227 3 to_be_deleted bit (1) unaligned, /* ON => user has requested that this message be deleted */ 228 3 already_deleted bit (1) unaligned, /* ON => this message is deleted: this is an empty slot now */ 229 3 requests_acknowledgement bit (1) unaligned, /* ON => acknowledgement requested and user has access */ 230 3 pad bit (31) unaligned, 231 2 message_ptr pointer, /* -> user-visible description of the message */ 232 2 mra like mseg_return_args; /* ring-1 information about this message */ 233 234 dcl im_message_info_ptr pointer; 235 236 237 /* Possible formats of a message when it is stored in a ring-1 mailbox */ 238 239 /* format: off */ 240 dcl (FIPS98_FORMAT_MESSAGE initial (1), /* FIPS-98 encoded message (binary format) */ 241 MAIL_FORMAT_MESSAGE initial (2), /* mail_format (old ASCII format) */ 242 UNKNOWN_FORMAT_MESSAGE initial (3)) /* unrecognized format (neither of the above) */ 243 fixed binary static options (constant); 244 /* format: on */ 245 246 247 /* Remaining declarations */ 248 249 dcl 1 local_mra aligned like mseg_return_args; 250 251 dcl 1 mra aligned based (mra_ptr) like mseg_return_args; 252 dcl mra_ptr pointer; 253 254 dcl message_bits bit (mra.ms_len) aligned based (mra.ms_ptr); 255 256 dcl system_area area based (system_area_ptr); 257 dcl system_area_ptr pointer; 258 259 dcl 1 user_privileges aligned, 260 2 privileges unaligned like aim_template.privileges, 261 2 pad bit (18) unaligned; 262 263 dcl mailbox_idx fixed binary; 264 dcl mailbox_mode bit (36) aligned; 265 dcl mailbox_salvaged_bit bit (1) aligned; 266 267 dcl (new_mailbox_ptr, saved_message_block_ptr) pointer; 268 dcl saved_message_block_n_used fixed binary; 269 270 dcl (message_format, message_type) fixed binary; 271 272 dcl (first_idx, idx) fixed binary; 273 274 dcl deletion_failed bit (1) aligned; 275 276 dcl (author_is_ack_recipient, multiple_authors, is_redistributed) bit (1) aligned; 277 278 dcl MAIL_SYSTEM_ character (32) static options (constant) initial ("mail_system_"); 279 280 dcl NUL character (1) static options (constant) initial (""); 281 dcl NL character (1) static options (constant) initial (" 282 "); 283 284 dcl MAIL_FORMAT_VERSION_2 fixed binary static options (constant) initial (2); 285 dcl MAIL_FORMAT_VERSION_3 fixed binary static options (constant) initial (3); 286 287 /* format: off */ 288 dcl (error_table_$bad_index, 289 error_table_$bad_segment, error_table_$bad_subr_arg, error_table_$entlong, 290 error_table_$messages_deferred, error_table_$messages_off, error_table_$moderr, error_table_$noalloc, 291 error_table_$no_info, error_table_$no_message, error_table_$seg_unknown, error_table_$unimplemented_version, 292 error_table_$wakeup_denied, mlsys_et_$all_messages_deleted, mlsys_et_$already_marked_for_deletion, 293 mlsys_et_$bad_acknowledge_to, mlsys_et_$cant_be_deleted, mlsys_et_$cant_send_acknowledgement, 294 mlsys_et_$cant_update_message, mlsys_et_$deletion_pending, mlsys_et_$message_already_read, 295 mlsys_et_$missing_acknowledge_to, mlsys_et_$no_ack_needed, mlsys_et_$no_message_canonical_form, 296 mlsys_et_$no_more_messages, mlsys_et_$no_o_permission, mlsys_et_$no_pending_deletion, mlsys_et_$no_r_permission, 297 mlsys_et_$no_s_permission, mlsys_et_$not_mailbox, mlsys_et_$not_marked_for_deletion, 298 mlsys_et_$some_messages_not_deleted) 299 fixed binary (35) external; 300 /* format: on */ 301 302 dcl sys_info$max_seg_size fixed binary (19) external; 303 304 dcl aim_check_$equal entry (bit (72) aligned, bit (72) aligned) returns (bit (1) aligned); 305 dcl define_area_ entry (pointer, fixed binary (35)); 306 dcl get_authorization_ entry () returns (bit (72) aligned); 307 dcl get_privileges_ entry () returns (bit (36) aligned); 308 dcl get_system_free_area_ entry () returns (pointer); 309 dcl mailbox_$check_salv_bit_index entry (fixed binary, bit (1) aligned, bit (1) aligned, fixed binary (35)); 310 dcl mailbox_$close entry (fixed binary, fixed binary (35)); 311 dcl mailbox_$compact_index entry (fixed binary, float binary, fixed binary (35)); 312 dcl mailbox_$delete_index entry (fixed binary, bit (72) aligned, fixed binary (35)); 313 dcl mailbox_$get_mode_index entry (fixed binary, bit (36) aligned, fixed binary (35)); 314 dcl mailbox_$incremental_read_index entry (fixed binary, pointer, bit (2), bit (72) aligned, pointer, fixed binary (35)); 315 dcl mailbox_$open entry (character (*), character (*), fixed binary, fixed binary (35)); 316 dcl mailbox_$open_if_full 317 entry (character (*), character (*), bit (1) aligned, fixed binary, fixed binary, fixed binary (35)); 318 dcl mailbox_$own_incremental_read_index 319 entry (fixed binary, pointer, bit (2), bit (72) aligned, pointer, fixed binary (35)); 320 dcl mailbox_$own_read_index entry (fixed binary, pointer, bit (1), pointer, fixed binary (35)); 321 dcl mailbox_$read_index entry (fixed binary, pointer, bit (1), pointer, fixed binary (35)); 322 dcl mailbox_$update_message_index entry (fixed binary, fixed binary (24), bit (72) aligned, pointer, fixed binary (35)); 323 dcl mailbox_$wakeup_add_index 324 entry (fixed binary, pointer, fixed binary (24), bit (36) aligned, bit (72) aligned, fixed binary (35)); 325 dcl mlsys_address_list_mgr_$add_address entry (pointer, pointer, character (8), fixed binary (35)); 326 dcl mlsys_address_mgr_$compare_addresses entry (pointer, pointer, fixed binary (35)) returns (bit (1) aligned); 327 dcl mlsys_address_mgr_$create_mailbox_address 328 entry (character (*), character (*), character (*) varying, character (*) varying, pointer, fixed binary (35)); 329 dcl mlsys_address_mgr_$create_user_mailbox_address 330 entry (character (*) varying, character (*) varying, character (*) varying, pointer, fixed binary (35)); 331 dcl mlsys_address_mgr_$decrement_reference_count entry (pointer); 332 dcl mlsys_address_mgr_$free_address entry (pointer, fixed binary (35)); 333 dcl mlsys_address_mgr_$get_address_pathname 334 entry (pointer, character (*), character (*), character (*), fixed binary (35)); 335 dcl mlsys_address_mgr_$get_address_type entry (pointer, fixed binary, fixed binary (35)); 336 dcl mlsys_address_mgr_$get_mail_table_address entry (pointer, pointer, fixed binary (35)); 337 dcl mlsys_address_mgr_$increment_reference_count entry (pointer); 338 dcl mlsys_fips98_$decode_message 339 entry ((*) bit (9) unaligned, character (8), pointer, pointer, fixed binary (71), bit (1) aligned, pointer, 340 fixed binary (35)); 341 dcl mlsys_format_$format_date_time_field 342 entry (character (*) varying, fixed binary (71), bit (1) aligned, fixed binary, pointer, fixed binary (21), 343 fixed binary (21), fixed binary (35)); 344 dcl mlsys_mailbox_utils_$classify_mailbox_address entry (pointer, fixed binary, fixed binary (35)); 345 dcl mlsys_message_id_mgr_$encode_local_id entry (fixed binary (71), bit (72) aligned); 346 dcl mlsys_message_mgr_$add_body_section_no_copy entry (pointer, pointer, fixed binary, fixed binary (35)); 347 dcl mlsys_message_mgr_$create_im_message entry (character (8), pointer, pointer, fixed binary (35)); 348 dcl mlsys_message_mgr_$free_message entry (pointer, fixed binary (35)); 349 dcl mlsys_message_mgr_$verify_im_message entry (pointer, pointer, fixed binary (35)) returns (bit (1) aligned); 350 dcl mlsys_misc_utils_$get_best_address_name entry (pointer, character (*) varying, fixed binary (35)); 351 dcl mlsys_parse_text_$parse_im_message_text 352 entry (character (*) aligned, character (8), pointer, pointer, fixed binary (71), bit (1) aligned, 353 bit (1) aligned, pointer, fixed binary (35)); 354 dcl mlsys_storage_mgr_$get_temp_segment entry (pointer, fixed binary (35)); 355 dcl mlsys_storage_mgr_$release_temp_segment entry (pointer, fixed binary (35)); 356 dcl sub_err_ entry () options (variable); 357 358 dcl (area, cleanup, record_quota_overflow) condition; 359 360 dcl (addr, addwordno, baseno, binary, before, copy, currentsize, divide, hbound, index, length, maxlength, mod, null, 361 rel, reverse, rtrim, string, substr, unspec) builtin; 362 363 /* Determine the number of messages in a mailbox including a breakdown by type if requested */ 364 365 get_message_counts: 366 entry (P_mailbox_dirname, P_mailbox_ename, P_include_by_type, P_n_messages, P_n_ordinary_messages, 367 P_n_interactive_messages, P_code); 368 369 mailbox_dirname = P_mailbox_dirname; /* copy inputs */ 370 call add_suffix (P_mailbox_ename, "mbx", mailbox_ename, P_code); 371 if P_code ^= 0 then return; /* won't fit */ 372 373 system_area_ptr = get_system_free_area_ (); 374 375 mra_ptr = addr (local_mra); /* to make references to message_bits valid */ 376 377 mailbox_idx = 0; /* for cleanup handler */ 378 local_mra.ms_ptr = null (); 379 380 on condition (cleanup) 381 begin; 382 if mailbox_idx ^= 0 then do; 383 call mailbox_$close (mailbox_idx, (0)); 384 mailbox_idx = 0; 385 end; 386 if local_mra.ms_ptr ^= null () then do; 387 free message_bits in (system_area); 388 local_mra.ms_ptr = null (); 389 end; 390 end; 391 392 393 call mailbox_$open_if_full (mailbox_dirname, mailbox_ename, ("0"b), n_messages, mailbox_idx, code); 394 if code ^= 0 then do; /* couldn't open the mailbox */ 395 if code = error_table_$moderr then /* translate to more specific explanation */ 396 code = mlsys_et_$no_s_permission; 397 go to RETURN_FROM_GET_MESSAGE_COUNTS; 398 end; 399 400 P_n_messages = n_messages; /* always return this value */ 401 402 if ^P_include_by_type then go to RETURN_FROM_GET_MESSAGE_COUNTS; 403 /* only wanted the total */ 404 405 if n_messages = 0 then do; /* mailbox is empty */ 406 P_n_ordinary_messages, P_n_interactive_messages = 0; 407 go to RETURN_FROM_GET_MESSAGE_COUNTS; 408 end; 409 410 411 /* Count by message type is requested: verify that the caller has read access to the mailbox and, if they do, read each 412* message in the mailbox, determine its type, and increment the appropriate counter */ 413 414 call mailbox_$get_mode_index (mailbox_idx, mailbox_mode, code); 415 if code ^= 0 then go to RETURN_FROM_GET_MESSAGE_COUNTS; 416 417 if (mailbox_mode & R_MBX_ACCESS) ^= R_MBX_ACCESS then do; 418 code = mlsys_et_$no_r_permission; 419 go to RETURN_FROM_GET_MESSAGE_COUNTS; 420 end; 421 422 n_messages_by_type (*) = 0; /* an array is easier to use */ 423 424 call mailbox_$read_index (mailbox_idx, system_area_ptr, "0"b, addr (local_mra), code); 425 if code ^= 0 then go to RETURN_FROM_GET_MESSAGE_COUNTS; 426 /* must be at least one from above */ 427 428 do while (code ^= error_table_$no_message); /* read all the messages */ 429 call classify_message (local_mra.ms_ptr, local_mra.ms_len, message_format, message_type); 430 n_messages_by_type (message_type) = n_messages_by_type (message_type) + 1; 431 free message_bits in (system_area); /* done with this one: now get next message (if any) */ 432 call mailbox_$incremental_read_index (mailbox_idx, system_area_ptr, "01"b, local_mra.ms_id, 433 addr (local_mra), code); 434 if (code ^= 0) & (code ^= error_table_$no_message) then go to RETURN_FROM_GET_MESSAGE_COUNTS; 435 end; 436 437 P_n_ordinary_messages = n_messages_by_type (ORDINARY_MESSAGES); 438 P_n_interactive_messages = n_messages_by_type (INTERACTIVE_MESSAGES); 439 440 code = 0; /* entire operation was successfull */ 441 442 443 /* Cleanup */ 444 445 RETURN_FROM_GET_MESSAGE_COUNTS: 446 if mailbox_idx ^= 0 then call mailbox_$close (mailbox_idx, (0)); 447 448 if local_mra.ms_ptr ^= null () then free message_bits in (system_area); 449 450 P_code = code; /* other output parameters have already been set */ 451 452 return; 453 454 /* Open a mailbox */ 455 456 open_mailbox: 457 entry (P_mailbox_dirname, P_mailbox_ename, P_open_options_ptr, P_mailbox_version, P_mailbox_ptr, P_code); 458 459 if P_mailbox_version ^= MAILBOX_VERSION_2 then do; 460 P_code = error_table_$unimplemented_version; 461 return; 462 end; 463 464 open_options_ptr = P_open_options_ptr; 465 466 if open_options.version ^= OPEN_OPTIONS_VERSION_2 then do; 467 P_code = error_table_$unimplemented_version; 468 return; 469 end; 470 471 if ((open_options.message_selection_mode < ALL_MESSAGES) 472 | (open_options.message_selection_mode > INTERACTIVE_MESSAGES)) 473 | ((open_options.sender_selection_mode < ACCESSIBLE_MESSAGES) 474 | (open_options.sender_selection_mode > NOT_OWN_MESSAGES)) 475 | ((open_options.message_reading_level < READ_KEYS) | (open_options.message_reading_level > READ_MESSAGES)) 476 then do; /* incorrectly specified option */ 477 P_code = error_table_$bad_subr_arg; 478 return; 479 end; 480 481 mailbox_dirname = P_mailbox_dirname; 482 call add_suffix (P_mailbox_ename, "mbx", mailbox_ename, P_code); 483 if P_code ^= 0 then return; /* entryname is too long */ 484 485 mailbox_info_ptr = null (); /* for cleanup handler */ 486 487 on condition (cleanup) 488 begin; 489 if mailbox_info_ptr ^= null () then call release_mailbox_info (); 490 end; 491 492 493 /* Setup the internal data structure describing the mailbox, open the mailbox, and verify that the caller has the 494* appropriate access to the mailbox to read the requested messages */ 495 496 allocate mailbox_info in (mlsys_area) set (mailbox_info_ptr); 497 498 mailbox_info.dirname = mailbox_dirname; /* fill in minimal information about the mailbox */ 499 mailbox_info.ename = mailbox_ename; 500 501 mailbox_info.index = 0; /* the following assignments keep the cleanup handler happy */ 502 mailbox_info.mailbox_ptr, /* ... */ 503 mailbox_info.address_ptr, mailbox_info.last_message_area_ptr, mailbox_info.delete_error_info_ptr, 504 mailbox_info.message_blocks = null (); 505 506 call mailbox_$open (mailbox_info.dirname, mailbox_info.ename, mailbox_info.index, code); 507 if code ^= 0 then go to ERROR_RETURN_FROM_OPEN_MAILBOX; 508 /* couldn't open the mailbox (sigh) */ 509 510 call mailbox_$get_mode_index (mailbox_info.index, mailbox_mode, code); 511 if code ^= 0 then go to ERROR_RETURN_FROM_OPEN_MAILBOX; 512 513 string (mailbox_info.mode_flags) = mailbox_mode; /* simpler to reference this way */ 514 515 string (user_privileges) = get_privileges_ (); /* determine if the user has ring-1 privilege */ 516 mailbox_info.ring1_privilege = user_privileges.ring1; 517 518 if (open_options.sender_selection_mode = ACCESSIBLE_MESSAGES) then 519 if mailbox_info.mode_flags.read then do; /* can get all messages */ 520 mailbox_info.sender_selection_mode = ALL_MESSAGES; 521 mailbox_info.use_own_mode = "0"b; 522 end; 523 else if mailbox_info.mode_flags.own then do; /* can only get our messages */ 524 mailbox_info.sender_selection_mode = OWN_MESSAGES; 525 mailbox_info.use_own_mode = "1"b; 526 end; 527 else do; /* can't get at anything */ 528 code = error_table_$moderr; 529 go to ERROR_RETURN_FROM_OPEN_MAILBOX; 530 end; 531 532 else do; /* specific type of mode requested */ 533 mailbox_info.sender_selection_mode = open_options.sender_selection_mode; 534 if (open_options.sender_selection_mode = ALL_MESSAGES) 535 | (open_options.sender_selection_mode = NOT_OWN_MESSAGES) then 536 if mailbox_info.mode_flags.read then /* have appropriate access */ 537 mailbox_info.use_own_mode = "0"b; 538 else do; 539 code = mlsys_et_$no_r_permission; 540 go to ERROR_RETURN_FROM_OPEN_MAILBOX; 541 end; 542 else if (open_options.sender_selection_mode = OWN_MESSAGES) then 543 if mailbox_info.mode_flags.own then /* have appropriate access */ 544 mailbox_info.use_own_mode = "1"b; 545 else do; 546 code = mlsys_et_$no_o_permission; 547 go to ERROR_RETURN_FROM_OPEN_MAILBOX; 548 end; 549 end; 550 551 mailbox_info.message_selection_mode = open_options.message_selection_mode; 552 mailbox_info.message_reading_level = open_options.message_reading_level; 553 554 on condition (area) 555 begin; 556 code = error_table_$noalloc; /* ran out of room (shouldn't happen, but...) */ 557 go to ERROR_RETURN_FROM_OPEN_MAILBOX; 558 end; 559 560 call mlsys_address_mgr_$create_mailbox_address (mailbox_dirname, mailbox_ename, "", "", 561 mailbox_info.address_ptr, (0)); 562 call mlsys_address_mgr_$increment_reference_count (mailbox_info.address_ptr); 563 /* prevent user accidently freeing it */ 564 call mlsys_mailbox_utils_$classify_mailbox_address (mailbox_info.address_ptr, mailbox_info.type, (0)); 565 566 if mailbox_info.mode_flags.status then do; /* have proper permission to get salvaged bit ... */ 567 call mailbox_$check_salv_bit_index (mailbox_info.index, (mailbox_info.mode_flags.delete), 568 mailbox_salvaged_bit, code); /* ... turn it off if user "owns" mbx */ 569 if code ^= 0 then go to ERROR_RETURN_FROM_OPEN_MAILBOX; 570 /* ... shouldn't happen, but ... */ 571 mailbox_info.salvaged = mailbox_salvaged_bit; 572 end; 573 else mailbox_info.salvaged = "0"b; /* don't have access to get this bit: non-fatal error */ 574 575 576 /* Read the messages from the mailbox: classify each message by type and determine if it meets the caller's selection 577* criteria */ 578 579 mailbox_info.n_messages, /* haven't read any messages yet */ 580 mailbox_info.n_messages_by_type (*), mailbox_info.n_deleted_messages = 0; 581 mailbox_info.last_message_key = ""b; 582 mailbox_info.message_blocks = null (); 583 584 do while ("1"b); /* loop is exited by other means ... */ 585 586 call read_next_message (); /* sets im_message_info_ptr for us ... */ 587 if code ^= 0 then /* message wasn't read because ... */ 588 if code = error_table_$no_message then 589 go to ALL_MESSAGES_HAVE_BEEN_READ; /* ... reached the end of the mailbox OK */ 590 else go to ERROR_RETURN_FROM_OPEN_MAILBOX; 591 /* ... unexpected problem */ 592 593 if mailbox_info.message_selection_mode ^= ALL_MESSAGES then 594 if im_message_info.type ^= mailbox_info.message_selection_mode then do; 595 EXCLUDE_CURRENT_MESSAGE: /* this message is the wrong type */ 596 free message_bits in (mailbox_message_area.area); 597 message_block.n_used = message_block.n_used - 1; 598 go to READ_NEXT_MESSAGE; /* zap! this slot is no longer in use */ 599 end; 600 601 if mailbox_info.sender_selection_mode = NOT_OWN_MESSAGES then 602 if message_from_self (im_message_info.mra.sender_id) then go to EXCLUDE_CURRENT_MESSAGE; 603 /* "own" messages ignore project distinctions */ 604 605 mailbox_info.n_messages = mailbox_info.n_messages + 1; 606 /* this message is OK */ 607 mailbox_info.n_messages_by_type (im_message_info.type) = 608 mailbox_info.n_messages_by_type (im_message_info.type) + 1; 609 610 READ_NEXT_MESSAGE: 611 end; 612 613 614 /* All messages have been read: create the mailbox structure to be returned to the caller */ 615 616 ALL_MESSAGES_HAVE_BEEN_READ: 617 mailbox_n_messages = /* allow for late arrivals */ 618 mlsys_data_$mailbox_allocation 619 * 620 divide ((mailbox_info.n_messages + mlsys_data_$mailbox_allocation), mlsys_data_$mailbox_allocation, 17, 0); 621 622 allocate mailbox in (mlsys_area) set (mailbox_ptr); 623 mailbox_info.mailbox_ptr = mailbox_ptr; /* need to remember where it is */ 624 625 mailbox.version = MAILBOX_VERSION_2; /* fill it in ... */ 626 627 mailbox_reserved_data.info_ptr = mailbox_info_ptr;/* given caller's mailbox_ptr need to find our data */ 628 mailbox_reserved_data.n_messages_allocated = mailbox_n_messages; 629 630 mailbox.mailbox_type = mailbox_info.type; /* just copy data from internal structure ... */ 631 mailbox.mailbox_address = mailbox_info.address_ptr; 632 mailbox.mailbox_dirname = mailbox_info.dirname; 633 mailbox.mailbox_ename = mailbox_info.ename; 634 mailbox.message_selection_mode = mailbox_info.message_selection_mode; 635 mailbox.sender_selection_mode = mailbox_info.sender_selection_mode; 636 mailbox.message_reading_level = mailbox_info.message_reading_level; 637 mailbox.mode = string (mailbox_info.mode_flags); 638 639 string (mailbox.flags) = ""b; 640 mailbox.salvaged = mailbox_info.salvaged; 641 642 mailbox.n_messages = mailbox_info.n_messages; /* user visible message count */ 643 mailbox.n_ordinary_messages = mailbox_info.n_messages_by_type (ORDINARY_MESSAGES); 644 mailbox.n_interactive_messages = mailbox_info.n_messages_by_type (INTERACTIVE_MESSAGES); 645 mailbox.n_deleted_messages = mailbox_info.n_deleted_messages; 646 /* even though it's zero, be safe */ 647 648 649 /* And now fill in the data for the messages ... */ 650 651 message_idx = 0; 652 653 do message_block_ptr = mailbox_info.message_blocks.first repeat (next_message_block_ptr) 654 while (message_block_ptr ^= null ()); 655 next_message_block_ptr = message_block.next; 656 657 do idx = 1 to message_block.n_used; 658 im_message_info_ptr = addr (message_block.messages (idx)); 659 message_idx = message_idx + 1; /* next slot in the user's structure */ 660 661 mailbox.messages (message_idx).key = im_message_info.key; 662 663 if mailbox_info.message_reading_level = READ_KEYS then 664 mailbox.messages (message_idx).message_ptr = null (); 665 666 else /*** if mailbox_info.message_reading_level = READ_MESSAGES then */ 667 do; 668 call construct_user_message (); /* construct the user-visible message structure */ 669 mailbox.messages (message_idx).message_ptr = im_message_info.message_ptr; 670 end; 671 end; 672 end; 673 674 675 /* Success: return the mailbox structure to the caller */ 676 677 P_mailbox_ptr = mailbox_ptr; 678 679 P_code = 0; 680 681 return; 682 683 684 /* Control transfers here if an error is detected while opening the mailbox */ 685 686 ERROR_RETURN_FROM_OPEN_MAILBOX: 687 if mailbox_info_ptr ^= null () then call release_mailbox_info (); 688 689 P_code = code; 690 691 return; 692 693 /* Check an open mailbox to see if any new messages have arrived and, if so, read them from the mailbox and return them to 694* the caller in the (possibly reallocated) user-visible mailbox structure */ 695 696 read_new_messages: 697 entry (P_mailbox_ptr, P_n_new_messages, P_n_new_ordinary_messages, P_n_new_interactive_messages, P_code); 698 699 mailbox_ptr = copy_ptr (P_mailbox_ptr); 700 701 if ^verify_mailbox () then do; /* caller didn't supply a mailbox structure */ 702 P_code = mlsys_et_$not_mailbox; 703 return; 704 end; 705 706 mailbox_info_ptr = mailbox_reserved_data.info_ptr;/* need our internal description */ 707 708 if mailbox_info.pending_deletion then do; /* caller must complete the previous operation */ 709 P_code = mlsys_et_$deletion_pending; 710 return; 711 end; 712 713 im_message_info_ptr = null (); /* for the internal procedure ... */ 714 call recompute_mailbox_access (code); /* revalidate our access to the mailbox */ 715 if code ^= 0 then do; /* ... failed (mailbox deleted?) */ 716 P_code = code; 717 return; 718 end; 719 720 if mailbox_info.use_own_mode then /* check if the user still has proper access */ 721 if ^mailbox_info.mode_flags.own then do; /* no longer have permission to read our messages */ 722 P_code = mlsys_et_$no_o_permission; 723 return; 724 end; 725 else ; /* still has the access */ 726 else if ^mailbox_info.mode_flags.read then do; /* no longer have permission to read messages */ 727 P_code = mlsys_et_$no_r_permission; 728 return; 729 end; 730 731 732 /* Read and classify the new messages in the mailbox: discard any new messages that are not of the proper type */ 733 734 new_mailbox_ptr = null (); /* for cleanup handler */ 735 n_new_messages = 0; 736 737 on condition (cleanup) call release_new_mailbox_info (); 738 739 on condition (area) 740 begin; /* in case there isn't enough room */ 741 code = error_table_$noalloc; 742 go to ERROR_RETURN_FROM_READ_NEW_MESSAGES; 743 end; 744 745 n_new_messages = 0; /* haven't found any new messages yet */ 746 n_new_messages_by_type (*) = 0; 747 748 saved_message_block_ptr = mailbox_info.message_blocks.last; 749 saved_message_block_n_used = saved_message_block_ptr -> message_block.n_used; 750 /* record where last old message lives */ 751 752 do while ("1"b); /* loop is exited by other means ... */ 753 754 call read_next_message (); /* sets im_message_info_ptr for us ... */ 755 if code ^= 0 then /* message wasn't read because ... */ 756 if code = error_table_$no_message then 757 go to READ_ALL_NEW_MESSAGES; /* ... reached the end of the mailbox OK */ 758 else go to ERROR_RETURN_FROM_READ_NEW_MESSAGES; 759 760 if mailbox_info.message_selection_mode ^= ALL_MESSAGES then 761 if im_message_info.type ^= mailbox_info.message_selection_mode then do; 762 EXCLUDE_NEW_MESSAGE: /* this message is the wrong type */ 763 free message_bits in (mailbox_message_area.area); 764 message_block.n_used = message_block.n_used - 1; 765 go to READ_NEXT_NEW_MESSAGE; /* zap! this slot is no longer in use */ 766 end; 767 768 if mailbox_info.sender_selection_mode = NOT_OWN_MESSAGES then 769 if message_from_self (im_message_info.mra.sender_id) then go to EXCLUDE_NEW_MESSAGE; 770 /* "own" messages ignore project distinctions */ 771 772 n_new_messages = n_new_messages + 1; /* another new message */ 773 n_new_messages_by_type (im_message_info.type) = n_new_messages_by_type (im_message_info.type) + 1; 774 775 READ_NEXT_NEW_MESSAGE: 776 end; 777 778 779 /* All new messages have been read: reallocate the user-visible mailbox structure if necessary */ 780 781 READ_ALL_NEW_MESSAGES: 782 message_idx = 0; /* for cleanup handler */ 783 784 if (mailbox_info.n_messages + n_new_messages) <= mailbox_reserved_data.n_messages_allocated then 785 new_mailbox_ptr = mailbox_ptr; /* old structure has enough room */ 786 787 else do; /* need a new structure */ 788 mailbox_n_messages = mailbox_info.n_messages + n_new_messages; 789 mailbox_n_messages = /* ... allow room for later growth */ 790 mailbox_n_messages + mlsys_data_$mailbox_allocation 791 - mod (mailbox_n_messages, mlsys_data_$mailbox_allocation); 792 793 allocate mailbox in (mlsys_area) set (new_mailbox_ptr); 794 795 new_mailbox_ptr -> mailbox.version = MAILBOX_VERSION_2; 796 /* fill it in ... */ 797 798 addr (new_mailbox_ptr -> mailbox.reserved) -> mailbox_reserved_data.info_ptr = mailbox_info_ptr; 799 addr (new_mailbox_ptr -> mailbox.reserved) -> mailbox_reserved_data.n_messages_allocated = 800 mailbox_n_messages; 801 802 new_mailbox_ptr -> mailbox.mailbox_type = mailbox_info.type; 803 new_mailbox_ptr -> mailbox.mailbox_address = mailbox_info.address_ptr; 804 new_mailbox_ptr -> mailbox.mailbox_dirname = mailbox_info.dirname; 805 new_mailbox_ptr -> mailbox.mailbox_ename = mailbox_info.ename; 806 new_mailbox_ptr -> mailbox.message_selection_mode = mailbox_info.message_selection_mode; 807 new_mailbox_ptr -> mailbox.sender_selection_mode = mailbox_info.sender_selection_mode; 808 new_mailbox_ptr -> mailbox.message_reading_level = mailbox_info.message_reading_level; 809 new_mailbox_ptr -> mailbox.mode = string (mailbox_info.mode_flags); 810 811 string (new_mailbox_ptr -> mailbox.flags) = ""b; 812 new_mailbox_ptr -> mailbox.salvaged = mailbox_info.salvaged; 813 814 new_mailbox_ptr -> mailbox.n_deleted_messages = mailbox_info.n_deleted_messages; 815 /* only this one isn't going to be changed here */ 816 817 do message_idx = 1 to mailbox.n_messages; 818 new_mailbox_ptr -> mailbox.messages (message_idx) = mailbox.messages (message_idx); 819 end; /* copy old messages' data */ 820 end; 821 822 823 /* And now fill in the data for the new messages ... */ 824 825 message_idx = mailbox_info.n_messages; /* # of messages already present in user's structure */ 826 827 do message_block_ptr = saved_message_block_ptr repeat (next_message_block_ptr) 828 while (message_block_ptr ^= null ()); 829 next_message_block_ptr = message_block.next; 830 831 if message_block_ptr = saved_message_block_ptr then 832 first_idx = saved_message_block_n_used + 1; 833 /* first block starts in the middle */ 834 else first_idx = 1; 835 836 do idx = first_idx to message_block.n_used; 837 im_message_info_ptr = addr (message_block.messages (idx)); 838 message_idx = message_idx + 1; /* get appropriate slot in user's structure */ 839 840 new_mailbox_ptr -> mailbox.messages (message_idx).key = im_message_info.key; 841 842 if mailbox_info.message_reading_level = READ_KEYS then 843 new_mailbox_ptr -> mailbox.messages (message_idx).message_ptr = null (); 844 845 else /*** if mailbox_info.message_reading_level = READ_MESSAGES then */ 846 do; 847 call construct_user_message (); /* create the user-visible message structure */ 848 mailbox.messages (message_idx).message_ptr = im_message_info.message_ptr; 849 end; 850 end; 851 end; 852 853 854 /* Success: update message counts, release old mailbox structure (if needed) and return */ 855 856 mailbox_info.n_messages = mailbox_info.n_messages + n_new_messages; 857 mailbox_info.n_messages_by_type (*) = mailbox_info.n_messages_by_type (*) + n_new_messages_by_type (*); 858 859 if mailbox_ptr ^= new_mailbox_ptr then do; 860 free mailbox_ptr -> mailbox in (mlsys_area); 861 mailbox_info.mailbox_ptr, mailbox_ptr = new_mailbox_ptr; 862 end; 863 864 mailbox.n_messages = mailbox_info.n_messages; 865 mailbox.n_ordinary_messages = mailbox_info.n_messages_by_type (ORDINARY_MESSAGES); 866 mailbox.n_interactive_messages = mailbox_info.n_messages_by_type (INTERACTIVE_MESSAGES); 867 868 P_n_new_messages = n_new_messages; /* let caller know how much is new */ 869 P_n_new_ordinary_messages = n_new_messages_by_type (ORDINARY_MESSAGES); 870 P_n_new_interactive_messages = n_new_messages_by_type (INTERACTIVE_MESSAGES); 871 872 P_mailbox_ptr = mailbox_ptr; /* reflect changes */ 873 874 if n_new_messages > 0 then 875 P_code = 0; /* something new alright */ 876 else P_code = mlsys_et_$no_more_messages; 877 878 return; 879 880 881 /* Control transfers here if an error is detected while checking for new messages */ 882 883 ERROR_RETURN_FROM_READ_NEW_MESSAGES: 884 call release_new_mailbox_info (); /* cleanup */ 885 886 P_code = code; 887 888 return; 889 890 /* "Read" the requested message: Actually all appropriate messages in the mailbox are read by open_mailbox or 891* read_new_messages due to the lack of appropriate ring-1 mailbox primitives. However, an application program should 892* specify a message_reading_level of READ_KEYS to avoid the overhead of converting all messages in the mailbox when it 893* may actually only examine a few messages in the mailbox. To this end, this entrypoint simply converts the data read 894* from ring-1 into the corresponding message structure */ 895 896 read_message: 897 entry (P_mailbox_ptr, P_message_idx, P_code); 898 899 mailbox_ptr = copy_ptr (P_mailbox_ptr); 900 901 if ^verify_mailbox () then do; 902 P_code = mlsys_et_$not_mailbox; 903 return; 904 end; 905 906 mailbox_info_ptr = mailbox_reserved_data.info_ptr;/* need our internal description */ 907 908 if mailbox_info.pending_deletion then do; /* data structures are inconsistent */ 909 P_code = mlsys_et_$deletion_pending; 910 return; 911 end; 912 913 message_idx = 0; /* find the requested message */ 914 915 do message_block_ptr = mailbox_info.message_blocks.first repeat (next_message_block_ptr) 916 while (message_block_ptr ^= null ()); 917 next_message_block_ptr = message_block.next; 918 do idx = 1 to message_block.n_used; 919 im_message_info_ptr = addr (message_block.messages (idx)); 920 if ^im_message_info.already_deleted then do; 921 message_idx = message_idx + 1; /* ... a message that still counts */ 922 if message_idx = P_message_idx then go to FOUND_REQUESTED_MESSAGE; 923 end; 924 end; 925 end; 926 927 P_code = error_table_$bad_index; /* no such message */ 928 return; 929 930 FOUND_REQUESTED_MESSAGE: 931 if im_message_info.message_ptr ^= null () then do;/* already been "read" */ 932 P_code = mlsys_et_$message_already_read; 933 return; 934 end; 935 936 call construct_user_message (); /* create the user-visible message structure */ 937 938 mailbox.messages (message_idx).message_ptr = im_message_info.message_ptr; 939 940 P_code = 0; /* success */ 941 942 return; 943 944 /* "Read" the canonical form of the requested message: The canonical form of a message is the text used by the mail 945* system when it stores the message in a mailbox using the mail_format structure */ 946 947 read_message_canonical_form_p: /* ...given the message itself: target of user-ring gate */ 948 entry (P_message_ptr, P_message_canonical_form_ptr, P_message_canonical_form_lth, P_code); 949 950 if ^mlsys_message_mgr_$verify_im_message (P_message_ptr, im_message_info_ptr, P_code) then return; 951 952 mailbox_info_ptr = im_message_info.mailbox_info_ptr; 953 if mailbox_info.pending_deletion then do; /* data structures are inconsistent */ 954 P_code = mlsys_et_$deletion_pending; 955 return; 956 end; 957 958 go to CHECK_FOR_CANONICAL_FORM; 959 960 961 read_message_canonical_form: /* ... given the mailbox and message number */ 962 entry (P_mailbox_ptr, P_message_idx, P_message_canonical_form_ptr, P_message_canonical_form_lth, P_code); 963 964 mailbox_ptr = copy_ptr (P_mailbox_ptr); 965 if ^verify_mailbox () then do; 966 P_code = mlsys_et_$not_mailbox; 967 return; 968 end; 969 970 mailbox_info_ptr = mailbox_reserved_data.info_ptr;/* need our internal description */ 971 972 if mailbox_info.pending_deletion then do; /* data structures are inconsistent */ 973 P_code = mlsys_et_$deletion_pending; 974 return; 975 end; 976 977 message_idx = 0; /* find the requested message */ 978 979 do message_block_ptr = mailbox_info.message_blocks.first repeat (next_message_block_ptr) 980 while (message_block_ptr ^= null ()); 981 next_message_block_ptr = message_block.next; 982 do idx = 1 to message_block.n_used; 983 im_message_info_ptr = addr (message_block.messages (idx)); 984 if ^im_message_info.already_deleted then do; 985 message_idx = message_idx + 1; /* ... a message that still counts */ 986 if message_idx = P_message_idx then go to CHECK_FOR_CANONICAL_FORM; 987 end; 988 end; 989 end; 990 991 P_code = error_table_$bad_index; /* no such message */ 992 return; 993 994 995 /* Found the message: check that it has a canonical form. Ie: it must be a mail_format message and the 996* mail_format.canonical flag must be ON */ 997 998 CHECK_FOR_CANONICAL_FORM: 999 if im_message_info.format = MAIL_FORMAT_MESSAGE then do; 1000 mail_format_ptr = im_message_info.mra.ms_ptr; 1001 if mail_format.canonical then do; /* it's the right type of message */ 1002 P_message_canonical_form_ptr = addr (mail_format.text); 1003 P_message_canonical_form_lth = mail_format.text_len; 1004 code = 0; /* ... success */ 1005 end; 1006 else code = mlsys_et_$no_message_canonical_form; 1007 end; 1008 1009 else code = mlsys_et_$no_message_canonical_form; /* not a mail_format */ 1010 1011 P_code = code; /* let caller know how he did */ 1012 1013 return; 1014 1015 /* Return the actual mail_format and mf_extension structures stored in ring-1 for the given message if and only if said 1016* message was stored in canonical form */ 1017 1018 get_message_mf_if_canonical: 1019 entry (P_message_ptr, P_message_mf_ptr, P_message_mf_extension_ptr, P_code); 1020 1021 if ^mlsys_message_mgr_$verify_im_message (P_message_ptr, im_message_info_ptr, P_code) then return; 1022 1023 if im_message_info.format = MAIL_FORMAT_MESSAGE then 1024 if im_message_info.mra.ms_ptr -> mail_format.canonical then do; 1025 P_message_mf_ptr, mail_format_ptr = im_message_info.mra.ms_ptr; 1026 P_message_mf_extension_ptr = addwordno (mail_format_ptr, currentsize (mail_format)); 1027 code = 0; /* success */ 1028 end; 1029 1030 else code = mlsys_et_$no_message_canonical_form; 1031 /* not canonical */ 1032 1033 else code = mlsys_et_$no_message_canonical_form; /* not a mail_format */ 1034 1035 P_code = code; 1036 1037 return; 1038 1039 /* Close a mailbox: If caller requests, all messages previously marked for deletion will actually be deleted; see the 1040* notes for the mail_system_$expunge_messages entrypoint for further information */ 1041 1042 close_mailbox: 1043 entry (P_mailbox_ptr, P_close_options_ptr, P_code); 1044 1045 mailbox_ptr = copy_ptr (P_mailbox_ptr); 1046 close_options_ptr = P_close_options_ptr; 1047 1048 if ^verify_mailbox () then do; /* make sure caller passed us a mailbox */ 1049 P_code = mlsys_et_$not_mailbox; 1050 return; 1051 end; 1052 1053 if close_options.version ^= CLOSE_OPTIONS_VERSION_2 then do; 1054 P_code = error_table_$unimplemented_version; 1055 return; 1056 end; 1057 1058 if close_options.mbz ^= ""b then do; /* it's supposed to be zeroes */ 1059 P_code = error_table_$bad_subr_arg; 1060 return; 1061 end; 1062 1063 mailbox_info_ptr = mailbox_reserved_data.info_ptr;/* get pointer to our internal data */ 1064 1065 im_message_info_ptr = null (); /* avoid problems in the internal procedure */ 1066 call recompute_mailbox_access (code); /* revalidate access to this mailbox */ 1067 if code ^= 0 then do; /* ... failed (mailbox deleted?) */ 1068 P_code = code; 1069 return; 1070 end; 1071 1072 if close_options.perform_deletions then /* delete messages awaiting deletion */ 1073 call perform_deletions ((close_options.report_deletion_errors), deletion_failed); 1074 else deletion_failed = "0"b; 1075 1076 call release_mailbox_info (); /* cleanup storage and close the mailbox */ 1077 1078 P_mailbox_ptr = null (); /* make sure the caller can't reference it anymore */ 1079 1080 if deletion_failed then 1081 P_code = mlsys_et_$some_messages_not_deleted;/* warn caller all is not perfect */ 1082 else P_code = 0; /* everything went perfectly */ 1083 1084 return; 1085 1086 /* Expunge the messages in a mailbox which are scheduled for deletion: If a message being deleted is waiting for 1087* acknowledgement, a special acknowledgement will be delivered to inform the author that this user never read the 1088* message. If any marked message can not be deleted, a sub_error_ condition will be signalled and the operation aborted; 1089* the caller will then be required either to complete the operation by calling this entrypoint again or to abort the 1090* operation by calling mail_system_$abort_delete_operation */ 1091 1092 expunge_messages: 1093 entry (P_mailbox_ptr, P_code); 1094 1095 mailbox_ptr = copy_ptr (P_mailbox_ptr); 1096 1097 if ^verify_mailbox () then do; /* make sure caller passed us a mailbox */ 1098 P_code = mlsys_et_$not_mailbox; 1099 return; 1100 end; 1101 1102 mailbox_info_ptr = mailbox_reserved_data.info_ptr;/* need our internal description */ 1103 1104 call perform_deletions ("1"b, deletion_failed); /* do the deletions */ 1105 call reconstruct_mailbox (); /* make the mailbox structure reflect what is left */ 1106 1107 if deletion_failed then /* couldn't get rid of some messages for whatever reason */ 1108 P_code = mlsys_et_$some_messages_not_deleted; 1109 else if mailbox_info.n_messages = 0 then /* nothing left in the mailbox */ 1110 P_code = mlsys_et_$all_messages_deleted; 1111 else P_code = 0; 1112 1113 return; 1114 1115 1116 /* This procedure removes control characters (except backspace, tab, 1117* red ribbon shift, and black ribbon shift) and canonicalizes strings 1118* to prevent backspacing past the front of the string. */ 1119 canon: 1120 procedure (P_string, P_string_len) returns (char (*)); 1121 dcl P_string char (*) parm; 1122 dcl P_string_len fixed bin (21) parm; 1123 dcl output_string char (P_string_len); 1124 1125 dcl canonicalize_ entry (ptr, fixed bin (21), ptr, fixed bin (21), fixed bin (35)); 1126 1127 dcl (collate, translate) builtin; 1128 1129 dcl ALPHABET char (256) init ((8)" " || " " || (4)" " || "" || (16)" " || substr (collate (), 33)); 1130 /* space, BSHT, space, RRSBRS, space, alphanumerics */ 1131 dcl BS char (1) internal static options (constant) init (""); 1132 1133 P_string = translate (P_string, ALPHABET); 1134 if index (P_string, BS) ^= 0 then do; 1135 output_string = ""; 1136 call canonicalize_ (addr (P_string), length (P_string), addr (output_string), P_string_len, (0)); 1137 return (output_string); 1138 end; 1139 else return (P_string); 1140 end canon; 1141 1142 1143 /* Actually delete the marked messages (called by several entrypoints) */ 1144 1145 perform_deletions: 1146 procedure (p_report_errors, p_deletion_failed); 1147 1148 dcl (p_report_errors, p_deletion_failed) bit (1) aligned parameter; 1149 dcl next_message_block_ptr pointer; 1150 dcl (message_idx, idx) fixed binary; 1151 1152 p_deletion_failed = "0"b; /* assume everything works OK */ 1153 1154 message_idx = 0; /* will need the index in the user visible structure */ 1155 1156 do message_block_ptr = mailbox_info.message_blocks.first repeat (next_message_block_ptr) 1157 while (message_block_ptr ^= null ()); 1158 next_message_block_ptr = message_block.next; 1159 1160 do idx = 1 to message_block.n_used; 1161 im_message_info_ptr = addr (message_block.messages (idx)); 1162 message_ptr = im_message_info.message_ptr; 1163 1164 if ^im_message_info.already_deleted then do; 1165 message_idx = message_idx + 1; /* this message hasn't been deleted yet */ 1166 1167 if im_message_info.to_be_deleted then do; 1168 /*** caller has asked to delete this message */ 1169 1170 if im_message_info.can_be_deleted then do; 1171 /*** ... and it appears that the user still has sufficient access */ 1172 1173 if im_message_info.requests_acknowledgement then 1174 /*** ... let the sender know that this user never did read it */ 1175 call acknowledge_for_deletion (); 1176 1177 /*** ... now delete it */ 1178 call mailbox_$delete_index (mailbox_info.index, im_message_info.key, code); 1179 if (code = 0) | (code = error_table_$no_message) then 1180 im_message_info.already_deleted = "1"b; 1181 else call deletion_failure (code); 1182 end; /* ... it should have worked */ 1183 1184 else call deletion_failure (mlsys_et_$cant_be_deleted); 1185 end; /* can no longer delete it: let caller know */ 1186 end; 1187 end; 1188 end; 1189 1190 call mailbox_$compact_index (mailbox_info.index, 0.25e0, (0)); 1191 /* compact if more than 25% unused space */ 1192 1193 return; 1194 1195 1196 1197 /* Internal to perform_deletion: reflects the failure to delete a message by changing the appropriate data structures to 1198* indicate that said message can not be deleted; this change is required to allow future expunge or close operations to 1199* succeed. If requested, this procedure also signals the sub_error_ condition to inform the caller as to why this 1200* particular message could not be deleted; as mail_system_ is a ring-2 gate, this condition is not restartable */ 1201 1202 deletion_failure: 1203 procedure (p_code); 1204 1205 dcl p_code fixed binary (35); 1206 1207 p_deletion_failed = "1"b; /* so we can set the appropriate error code */ 1208 1209 im_message_info.can_be_deleted, /* can't delete it: record this and unmark it ... */ 1210 im_message_info.to_be_deleted, /* ... so that future expunge/close operations will work */ 1211 im_message_info.message_ptr -> message.can_be_deleted, 1212 im_message_info.message_ptr -> message.marked_for_deletion = "0"b; 1213 1214 mailbox_info.n_deleted_messages = mailbox_info.n_deleted_messages - 1; 1215 mailbox.n_deleted_messages = mailbox_info.n_deleted_messages; 1216 /* one less message marked for deletion */ 1217 1218 if p_report_errors then do; /* let the caller know about it ... */ 1219 mailbox_info.pending_deletion = "1"b; /* ... data structures are inconsistent */ 1220 1221 allocate delete_error_info in (mlsys_area) set (delete_error_info_ptr); 1222 mailbox_info.delete_error_info_ptr = delete_error_info_ptr; 1223 1224 delete_error_info.version = DELETE_ERROR_INFO_VERSION_1; 1225 delete_error_info.message_number = message_idx; 1226 delete_error_info.code = p_code; 1227 delete_error_info.additional_info = ""; 1228 1229 RESIGNAL_DELETION_FAILURE: 1230 call sub_err_ (p_code, MAIL_SYSTEM_, ACTION_CANT_RESTART, delete_error_info_ptr, (0), 1231 "Unable to delete message #^d.", message_idx); 1232 1233 go to RESIGNAL_DELETION_FAILURE; /* ... not restartable: this will never be reached, but ... */ 1234 end; 1235 1236 return; 1237 1238 end deletion_failure; 1239 1240 end perform_deletions; 1241 1242 /* Abort a suspended call to mail_system_$expunge_messages or mail_system_$close_mailbox: by simply reconstructing the 1243* user-visible mailbox data structure to indicate which messages have already been deleted */ 1244 1245 abort_delete_operation: 1246 entry (P_mailbox_ptr, P_code); 1247 1248 mailbox_ptr = copy_ptr (P_mailbox_ptr); 1249 1250 if ^verify_mailbox () then do; /* make sure caller passed us a mailbox */ 1251 P_code = mlsys_et_$not_mailbox; 1252 return; 1253 end; 1254 1255 mailbox_info_ptr = mailbox_reserved_data.info_ptr;/* need our internal description */ 1256 1257 if mailbox_info.pending_deletion then do; /* there were deletions in progress */ 1258 call reconstruct_mailbox (); 1259 P_code = 0; 1260 end; 1261 1262 else P_code = mlsys_et_$no_pending_deletion; /* there were no deletions in progress */ 1263 1264 return; 1265 1266 1267 1268 /* Actually reconstructs the mailbox structure (used by several entrypoints) */ 1269 1270 reconstruct_mailbox: 1271 procedure (); 1272 1273 dcl next_message_block_ptr pointer; 1274 dcl idx fixed binary; 1275 1276 mailbox_info.n_messages, /* must recompute all message counts */ 1277 mailbox_info.n_messages_by_type (*), mailbox_info.n_deleted_messages = 0; 1278 1279 do message_block_ptr = mailbox_info.message_blocks.first repeat (next_message_block_ptr) 1280 while (message_block_ptr ^= null ()); 1281 next_message_block_ptr = message_block.next; 1282 1283 do idx = 1 to message_block.n_used; 1284 im_message_info_ptr = addr (message_block.messages (idx)); 1285 1286 if ^im_message_info.already_deleted then do; 1287 mailbox_info.n_messages = mailbox_info.n_messages + 1; 1288 1289 mailbox.messages (mailbox_info.n_messages).key = im_message_info.key; 1290 mailbox.messages (mailbox_info.n_messages).message_ptr = im_message_info.message_ptr; 1291 1292 mailbox_info.n_messages_by_type (im_message_info.type) = 1293 mailbox_info.n_messages_by_type (im_message_info.type) + 1; 1294 1295 if im_message_info.to_be_deleted then 1296 /* record that it will be deleted later ... */ 1297 mailbox_info.n_deleted_messages = mailbox_info.n_deleted_messages + 1; 1298 end; 1299 end; 1300 end; 1301 1302 mailbox.n_messages = mailbox_info.n_messages; /* update the user-visible counts */ 1303 mailbox.n_ordinary_messages = mailbox_info.n_messages_by_type (ORDINARY_MESSAGES); 1304 mailbox.n_interactive_messages = mailbox_info.n_messages_by_type (INTERACTIVE_MESSAGES); 1305 mailbox.n_deleted_messages = mailbox_info.n_deleted_messages; 1306 1307 mailbox_info.pending_deletion = "0"b; /* no longer any deletions in progress */ 1308 1309 if mailbox_info.delete_error_info_ptr ^= null () then do; 1310 free mailbox_info.delete_error_info_ptr -> delete_error_info in (mlsys_area); 1311 mailbox_info.delete_error_info_ptr = null (); 1312 end; 1313 1314 end reconstruct_mailbox; 1315 1316 /* Mark the given message for subsequent deletion */ 1317 1318 mark_message_for_deletion: 1319 entry (P_message_ptr, P_code); 1320 1321 if ^mlsys_message_mgr_$verify_im_message (P_message_ptr, im_message_info_ptr, P_code) then return; 1322 1323 message_ptr = copy_ptr (P_message_ptr); /* get pointers to all approrpriate data structures */ 1324 mailbox_info_ptr = im_message_info.mailbox_info_ptr; 1325 mailbox_ptr = mailbox_info.mailbox_ptr; 1326 1327 if mailbox_info.pending_deletion then do; /* data structures are inconsistent */ 1328 P_code = mlsys_et_$deletion_pending; 1329 return; 1330 end; 1331 1332 call recompute_mailbox_access (code); /* revalidate our access to the mailbox */ 1333 if code ^= 0 then do; /* ... failed: mailbox deleted? */ 1334 P_code = code; 1335 return; 1336 end; 1337 1338 if im_message_info.can_be_deleted then /* it seems we can delete this message ... */ 1339 if im_message_info.to_be_deleted then /* ... but it was already marked */ 1340 code = mlsys_et_$already_marked_for_deletion; 1341 else do; /* ... and it wasn't marked earlier */ 1342 mailbox_info.n_deleted_messages, mailbox.n_deleted_messages = mailbox_info.n_deleted_messages + 1; 1343 im_message_info.to_be_deleted, message.marked_for_deletion = "1"b; 1344 code = 0; /* ... success */ 1345 end; 1346 1347 else code = mlsys_et_$cant_be_deleted; /* it isn't possible to delete this message */ 1348 1349 P_code = code; 1350 1351 return; 1352 1353 /* Remove the given message from the list of messages marked for subsequent deletion */ 1354 1355 unmark_message_for_deletion: 1356 entry (P_message_ptr, P_code); 1357 1358 if ^mlsys_message_mgr_$verify_im_message (P_message_ptr, im_message_info_ptr, P_code) then return; 1359 1360 message_ptr = copy_ptr (P_message_ptr); /* get pointers to all approrpriate data structures */ 1361 mailbox_info_ptr = im_message_info.mailbox_info_ptr; 1362 mailbox_ptr = mailbox_info.mailbox_ptr; 1363 1364 if mailbox_info.pending_deletion then do; /* data structures are inconsistent */ 1365 P_code = mlsys_et_$deletion_pending; 1366 return; 1367 end; 1368 1369 if im_message_info.to_be_deleted then do; /* it's marked for deletion all right ... */ 1370 mailbox_info.n_deleted_messages, mailbox.n_deleted_messages = mailbox_info.n_deleted_messages - 1; 1371 im_message_info.to_be_deleted, message.marked_for_deletion = "0"b; 1372 code = 0; /* ... success */ 1373 end; 1374 1375 else code = mlsys_et_$not_marked_for_deletion; /* it isn't possible to delete this message */ 1376 1377 P_code = code; 1378 1379 return; 1380 1381 /* Set a switch on an individual message */ 1382 1383 set_message_switch: 1384 entry (P_message_ptr, P_switch_type, P_switch_value, P_code); 1385 1386 1387 P_code = 0; 1388 if ^mlsys_message_mgr_$verify_im_message (P_message_ptr, im_message_info_ptr, P_code) then return; 1389 1390 message_ptr = copy_ptr (P_message_ptr); 1391 mailbox_info_ptr = im_message_info.mailbox_info_ptr; 1392 if ^mailbox_info.mode_flags.delete then do; /* only the mailbox "owner" can set a switch */ 1393 P_code = mlsys_et_$cant_update_message; 1394 return; 1395 end; 1396 1397 switch_type = P_switch_type; 1398 switch_value = P_switch_value; 1399 1400 if switch_type = PER_MESSAGE_SEEN_SWITCH_TYPE then do; 1401 if im_message_info.format = FIPS98_FORMAT_MESSAGE then 1402 im_message_info.mra.ms_ptr -> fips98_message.seen = switch_value; 1403 else if im_message_info.format = MAIL_FORMAT_MESSAGE then 1404 im_message_info.mra.ms_ptr -> mail_format.seen = switch_value; 1405 end; 1406 else do; 1407 P_code = error_table_$bad_subr_arg; /* only "seen" switch supported */ 1408 return; 1409 end; 1410 1411 call mailbox_$update_message_index (mailbox_info.index, im_message_info.mra.ms_len, im_message_info.key, 1412 im_message_info.mra.ms_ptr, code); 1413 1414 /* Having marked the message in the mailbox, mark the local copy */ 1415 1416 if switch_type = PER_MESSAGE_SEEN_SWITCH_TYPE then message.seen = switch_value; 1417 1418 P_code = code; 1419 1420 return; 1421 1422 /* Generate an acknowledgement for the given message if appropriate */ 1423 1424 acknowledge_message: 1425 entry (P_message_ptr, P_code); 1426 1427 if ^mlsys_message_mgr_$verify_im_message (P_message_ptr, im_message_info_ptr, P_code) then return; 1428 1429 message_ptr = copy_ptr (P_message_ptr); /* get pointers to all approrpriate data structures */ 1430 mailbox_info_ptr = im_message_info.mailbox_info_ptr; 1431 mailbox_ptr = mailbox_info.mailbox_ptr; 1432 1433 if mailbox_info.pending_deletion then do; /* data structures are inconsistent */ 1434 P_code = mlsys_et_$deletion_pending; 1435 return; 1436 end; 1437 1438 call recompute_mailbox_access (code); /* revalidate our access to the mailbox */ 1439 if code ^= 0 then do; /* ... failed: mailbox deleted? */ 1440 P_code = code; 1441 return; 1442 end; 1443 1444 if ^im_message_info.requests_acknowledgement then do; 1445 P_code = mlsys_et_$no_ack_needed; /* the message hasn't asked to be acknowledged */ 1446 return; 1447 end; 1448 1449 call determine_acknowledgement_recipient (code); /* determine who gets the acknowledgement */ 1450 1451 if code = 0 then /* have the recipient ... */ 1452 call deliver_acknowledgement ("0"b, code); /* ... send a standard acknowledgement message */ 1453 1454 if code = 0 then do; /* successfully sent the acknowledgement ... */ 1455 if im_message_info.format = FIPS98_FORMAT_MESSAGE then 1456 im_message_info.mra.ms_ptr -> fips98_message.acknowledge = "0"b; 1457 else if im_message_info.format = MAIL_FORMAT_MESSAGE then 1458 im_message_info.mra.ms_ptr -> mail_format.acknowledge = "0"b; 1459 call mailbox_$update_message_index (mailbox_info.index, im_message_info.mra.ms_len, im_message_info.key, 1460 im_message_info.mra.ms_ptr, code); 1461 if code ^= 0 then code = mlsys_et_$cant_update_message; 1462 end; 1463 1464 call delete_acknowledge_to_fields (); /* delete all Acknowledge-To fields */ 1465 im_message_info.requests_acknowledgement, message.must_be_acknowledged = "0"b; 1466 /* if it failed, it won't help to let them call back */ 1467 1468 P_code = code; /* reflect success/failure to the caller */ 1469 1470 return; 1471 1472 /* Generate a special acknowledgement message for a message which has been deleted without being "read" */ 1473 1474 acknowledge_for_deletion: 1475 procedure (); 1476 1477 dcl code fixed binary (35); 1478 1479 call determine_acknowledgement_recipient (code); /* determine who gets the acknowledgement */ 1480 1481 if code = 0 then /* have the recipient ... */ 1482 call deliver_acknowledgement ("1"b, code); /* ... send the non-standard acknowledgement message */ 1483 1484 return; 1485 1486 end acknowledge_for_deletion; 1487 1488 1489 1490 /* Delete any and all Acknowledge-To fields in the message (there should only be one, but...) */ 1491 1492 delete_acknowledge_to_fields: 1493 procedure (); 1494 1495 dcl idx fixed binary; 1496 1497 if message.envelope.acknowledge_to ^= null () then 1498 call mlsys_address_mgr_$decrement_reference_count (message.envelope.acknowledge_to); 1499 1500 do idx = 1 to message.n_redistributions; 1501 if message_redistributions_list.redistributions (idx).acknowledge_to ^= null () then 1502 call mlsys_address_mgr_$decrement_reference_count (message_redistributions_list.redistributions (idx) 1503 .acknowledge_to); 1504 end; 1505 1506 return; 1507 1508 end delete_acknowledge_to_fields; 1509 1510 /* Determine who is to receive the acknowledgement: In this implementation, the recipient must have a local mailbox */ 1511 1512 determine_acknowledgement_recipient: 1513 procedure (p_code); 1514 1515 dcl p_code fixed binary (35) parameter; 1516 1517 dcl (acknowledge_to, mte_address) pointer; 1518 dcl code fixed binary (35); 1519 dcl address_type fixed binary; 1520 dcl delivery_by_person_id char (32) var; 1521 1522 1523 if message.n_redistributions > 0 then do; /* redistributed: it's in the last Acknowledge-To field */ 1524 acknowledge_to = message_redistributions_list.redistributions (message.n_redistributions).acknowledge_to; 1525 is_redistributed = "1"b; /* ... we may need to mention this in the message */ 1526 end; 1527 else do; 1528 acknowledge_to = message.envelope.acknowledge_to; 1529 is_redistributed = "0"b; 1530 end; 1531 1532 if acknowledge_to = null () then do; /* no Acknowledge-To field(?) */ 1533 p_code = mlsys_et_$missing_acknowledge_to; 1534 return; 1535 end; 1536 1537 if message.from -> address_list.n_addresses = 1 then do; 1538 multiple_authors = "0"b; /* only one author */ 1539 author_is_ack_recipient = 1540 mlsys_address_mgr_$compare_addresses (acknowledge_to, message.from -> address_list.addresses (1), (0)) 1541 ; 1542 end; 1543 else do; /* several authors will affect the message format */ 1544 multiple_authors = "1"b; 1545 author_is_ack_recipient = "0"b; 1546 end; 1547 1548 mte_address = null (); /* for cleanup handler */ 1549 on condition (cleanup) 1550 begin; 1551 if mte_address ^= null () then call mlsys_address_mgr_$free_address (mte_address, (0)); 1552 end; 1553 1554 call mlsys_address_mgr_$get_address_type (acknowledge_to, address_type, code); 1555 if code ^= 0 then call bad_acknowledge_to (); /* huh? */ 1556 1557 if address_type = MAIL_TABLE_ADDRESS then do; /* mail-table address: look it up to get the target */ 1558 call mlsys_address_mgr_$get_mail_table_address (acknowledge_to, mte_address, code); 1559 if code ^= 0 then call bad_acknowledge_to (); 1560 acknowledge_to = mte_address; /* ... rest of the procedure uses acknowledge_to value */ 1561 call mlsys_address_mgr_$get_address_type (acknowledge_to, address_type, code); 1562 if code ^= 0 then call bad_acknowledge_to (); 1563 1564 if (address_type ^= USER_MAILBOX_ADDRESS) & (address_type ^= LOGBOX_ADDRESS) 1565 & (address_type ^= SAVEBOX_ADDRESS) & (address_type ^= MAILBOX_ADDRESS) then do; 1566 /* RL: mail table entry refers to non-mailbox, try using sender_id */ 1567 delivery_by_person_id = rtrim (im_message_info.mra.sender_id); 1568 if (length (delivery_by_person_id) > 1) 1569 & (substr (reverse (delivery_by_person_id), 1, 2) = reverse (".a")) then 1570 delivery_by_person_id = substr (delivery_by_person_id, 1, length (delivery_by_person_id) - 2); 1571 /* RL: remove ".a" suffix for person_id */ 1572 1573 if mte_address ^= null () then call mlsys_address_mgr_$free_address (mte_address, (0)); 1574 /* RL: free old address */ 1575 call mlsys_address_mgr_$create_user_mailbox_address (delivery_by_person_id, "", "", mte_address, code) 1576 ; 1577 1578 if code ^= 0 then call bad_acknowledge_to (); 1579 address_type = USER_MAILBOX_ADDRESS; 1580 end; 1581 1582 end; 1583 1584 if (address_type ^= USER_MAILBOX_ADDRESS) & (address_type ^= LOGBOX_ADDRESS) 1585 & (address_type ^= SAVEBOX_ADDRESS) & (address_type ^= MAILBOX_ADDRESS) then 1586 call bad_acknowledge_to (); /* the address doesn't reference a mailbox */ 1587 1588 call mlsys_address_mgr_$get_address_pathname (acknowledge_to, mailbox_dirname, mailbox_ename, ((32)" "), code); 1589 if code ^= 0 then call bad_acknowledge_to (); /* huh? */ 1590 1591 p_code = 0; /* success */ 1592 1593 1594 RETURN_FROM_DETERMINE_ACKNOWLEDGEMENT_RECIPIENT: 1595 if mte_address ^= null () then call mlsys_address_mgr_$free_address (mte_address, (0)); 1596 return; 1597 1598 1599 1600 /* Internal to determine_acknowledgement_recipient: returns mlsys_et_$bad_acknowledge_to to our caller */ 1601 1602 bad_acknowledge_to: 1603 procedure (); 1604 1605 p_code = mlsys_et_$bad_acknowledge_to; 1606 go to RETURN_FROM_DETERMINE_ACKNOWLEDGEMENT_RECIPIENT; 1607 1608 end bad_acknowledge_to; 1609 1610 end determine_acknowledgement_recipient; 1611 1612 /* Deliver the acknowledgement message */ 1613 1614 deliver_acknowledgement: 1615 procedure (p_send_delete_ack, p_code); 1616 1617 dcl p_send_delete_ack bit (1) aligned parameter; 1618 dcl p_code fixed binary (35) parameter; 1619 1620 dcl date_time_string character (64) varying; 1621 dcl 1 date_time_string_fixed aligned based (addr (date_time_string)), 1622 2 lth fixed binary (21), 1623 2 text character (64); 1624 1625 dcl author_string character (256) varying; 1626 dcl an_author pointer; 1627 1628 dcl subject character (subject_lth) unaligned based (subject_ptr); 1629 dcl subject_lth fixed binary (21); 1630 dcl subject_ptr pointer; 1631 dcl include_subject bit (1) aligned; 1632 1633 dcl message_lth fixed binary (21); 1634 1635 /* format: off */ 1636 1637 dcl (DELETION_PREFIX initial ("Deleted, possibly without reading, "), 1638 READING_PREFIX initial ("Acknowledging "), 1639 YOUR_MESSAGE initial ("your message of "), 1640 THE_MESSAGE initial ("the message of "), 1641 FROM initial (" from "), 1642 ET_AL initial (" et al"), 1643 FORWARDED_SUFFIX initial (" which you forwarded"), 1644 SUBJECT_PREFIX initial ("; Subject: ")) 1645 character (48) varying static options (constant); 1646 /* format: on */ 1647 1648 1649 /* Compute the length of the acknowledgement */ 1650 1651 if p_send_delete_ack then 1652 message_lth = length (DELETION_PREFIX); 1653 else message_lth = length (READING_PREFIX); 1654 1655 if author_is_ack_recipient then 1656 message_lth = message_lth + length (YOUR_MESSAGE); 1657 else do; 1658 message_lth = message_lth + length (THE_MESSAGE) + length (FROM); 1659 an_author = message.from -> address_list.addresses (1); 1660 call mlsys_misc_utils_$get_best_address_name (an_author, author_string, p_code); 1661 if p_code ^= 0 then do; /* fatal error */ 1662 p_code = mlsys_et_$cant_send_acknowledgement; 1663 return; 1664 end; 1665 message_lth = message_lth + length (author_string); 1666 if multiple_authors then message_lth = message_lth + length (ET_AL); 1667 end; 1668 1669 if is_redistributed then /* see if we should mention it was forwarded ... */ 1670 if ^author_is_ack_recipient then message_lth = message_lth + length (FORWARDED_SUFFIX); 1671 1672 date_time_string_fixed.lth = 0; /* this is an input/output parameter */ 1673 call mlsys_format_$format_date_time_field ("", message.date_time_created, "0"b, -1, 1674 addr (date_time_string_fixed.text), maxlength (date_time_string), date_time_string_fixed.lth, (0)); 1675 message_lth = message_lth + length (date_time_string); 1676 1677 if length (message_subject) > 0 then do; /* there's a subject to be included */ 1678 include_subject = "1"b; 1679 subject_ptr = message.subject.text_ptr; 1680 subject_lth = message.subject.text_lth; /* ... guarenteed to be only one line */ 1681 end; 1682 1683 else if message.interactive & (message.total_lines > 0) then 1684 if message.body_sections (1).section_type = MESSAGE_PREFORMATTED_BODY_SECTION then do; 1685 include_subject = "1"b; /* interactive: use first line of text as "subject" */ 1686 message_body_section_ptr = addr (message.body_sections (1)); 1687 subject_ptr = addr (message_preformatted_body_section_text); 1688 subject_lth = index (message_preformatted_body_section_text, NL) - 1; 1689 if subject_lth = -1 then subject_lth = length (message_preformatted_body_section_text); 1690 end; 1691 else include_subject = "0"b; /* interactive but not composed of text */ 1692 1693 else include_subject = "0"b; /* nothing to be used the subject */ 1694 1695 if include_subject then message_lth = message_lth + length (SUBJECT_PREFIX) + subject_lth; 1696 1697 1698 /* Construct the acknowledgement */ 1699 1700 begin; 1701 1702 dcl 1 ack_message aligned, /* use a mail_format style message */ 1703 2 header like mail_format.header, 1704 2 text character (message_lth); 1705 dcl text_used fixed binary (21); 1706 1707 dcl 1 wakeup_switches aligned, /* control switches for mailbox_$wakeup_add_index */ 1708 2 normal_wakeup bit (1) unaligned, /* ON => send a normal wakeup */ 1709 2 urgent_wakeup bit (1) unaligned, /* ON => send an urgent wakeup (requires "u" access) */ 1710 2 always_add bit (1) unaligned, /* ON => always add the message even if wakeup fails */ 1711 2 never_add bit (1) unaligned, /* ON => never add the message; test if wakeup can be sent */ 1712 2 pad bit (32) unaligned; 1713 1714 text_used = 0; /* nothing in the acknowledgement yet */ 1715 1716 if p_send_delete_ack then /* either "Acknowledging" or "Deleted without reading" */ 1717 call add_to_text (DELETION_PREFIX); 1718 else call add_to_text (READING_PREFIX); 1719 1720 if author_is_ack_recipient then /* either "your message of" or "the message of" */ 1721 call add_to_text (YOUR_MESSAGE); 1722 else call add_to_text (THE_MESSAGE); 1723 1724 call add_to_text (date_time_string); 1725 1726 if ^author_is_ack_recipient then do; 1727 call add_to_text (FROM); 1728 call add_to_text (author_string); 1729 if multiple_authors then call add_to_text (ET_AL); 1730 end; 1731 1732 if is_redistributed then /* see if we should mention it was forwarded ... */ 1733 if ^author_is_ack_recipient then call add_to_text (FORWARDED_SUFFIX); 1734 1735 if include_subject then do; 1736 call add_to_text (SUBJECT_PREFIX); 1737 substr (ack_message.text, (text_used + 1), subject_lth) = subject; 1738 text_used = text_used + subject_lth; 1739 end; 1740 1741 1742 /* Attempt to send the acknowledgement */ 1743 1744 ack_message.version = MAIL_FORMAT_VERSION_4; 1745 ack_message.sent_from = ""; 1746 ack_message.lines = 1; /* guaranteed */ 1747 ack_message.text_len = text_used; 1748 1749 unspec (ack_message.switches) = "0"b; 1750 ack_message.wakeup = "1"b; /* acknowledgements are interactive */ 1751 1752 mailbox_idx = 0; /* for cleanup handler */ 1753 1754 on condition (cleanup) 1755 begin; 1756 if mailbox_idx ^= 0 then do; 1757 call mailbox_$close (mailbox_idx, (0)); 1758 mailbox_idx = 0; 1759 end; 1760 end; 1761 1762 on condition (record_quota_overflow) 1763 begin; /* no room in the mailbox */ 1764 p_code = mlsys_et_$cant_send_acknowledgement; 1765 go to CLOSE_THE_ACK_MAILBOX; 1766 end; 1767 1768 call mailbox_$open (mailbox_dirname, mailbox_ename, mailbox_idx, p_code); 1769 1770 if p_code = 0 then do; /* have the mailbox */ 1771 string (wakeup_switches) = ""b; 1772 wakeup_switches.normal_wakeup = "1"b; /* ... send a normal wakeup (if possible) ... */ 1773 wakeup_switches.always_add = "1"b; /* ... and always leave it in the mailbox */ 1774 call mailbox_$wakeup_add_index (mailbox_idx, addr (ack_message), 1775 (36 * currentsize (ack_message) - 9 * (message_lth - text_used)), string (wakeup_switches), 1776 ((72)"0"b), p_code); 1777 if (p_code = error_table_$wakeup_denied) | (p_code = error_table_$messages_deferred) 1778 | (p_code = error_table_$messages_off) | (p_code = error_table_$no_info) then 1779 p_code = 0; 1780 if p_code ^= 0 then p_code = mlsys_et_$cant_send_acknowledgement; 1781 CLOSE_THE_ACK_MAILBOX: 1782 call mailbox_$close (mailbox_idx, (0)); 1783 mailbox_idx = 0; /* ... be sure to close the mailbox anwyay */ 1784 end; 1785 1786 else p_code = mlsys_et_$cant_send_acknowledgement; 1787 1788 1789 /* Internal to deliver_acknowledgement begin block: add a piece of text to the message */ 1790 1791 add_to_text: 1792 procedure (p_string); 1793 1794 dcl p_string character (*) varying parameter; 1795 1796 substr (ack_message.text, (text_used + 1), length (p_string)) = p_string; 1797 text_used = text_used + length (p_string); 1798 1799 return; 1800 1801 end add_to_text; 1802 1803 end; 1804 1805 return; 1806 1807 end deliver_acknowledgement; 1808 1809 /* Verify that the caller supplied a pointer to a properly constructed mailbox structure */ 1810 1811 verify_mailbox: 1812 procedure () returns (bit (1) aligned); 1813 1814 if mailbox_ptr = null () then return ("0"b); 1815 1816 if ^mlsys_data_$valid_segments (binary (baseno (mailbox_ptr), 18, 0)) then return ("0"b); 1817 /* supplied structure wasn't allocated by us */ 1818 1819 if mailbox.version ^= MAILBOX_VERSION_2 then /* supplied structure isn't a mailbox structure */ 1820 return ("0"b); 1821 1822 return ("1"b); /* supplied mailbox structure passes */ 1823 1824 end verify_mailbox; 1825 1826 1827 1828 /* Add the specified suffix to an entryname if possible */ 1829 1830 add_suffix: 1831 procedure (p_ename, p_suffix, p_new_ename, p_code); 1832 1833 dcl (p_ename, p_suffix) character (*) parameter; 1834 dcl p_new_ename character (32) parameter; 1835 dcl p_code fixed binary (35) parameter; 1836 1837 dcl (trimmed_ename, trimmed_suffix) character (33) varying; 1838 1839 trimmed_ename = rtrim (p_ename); 1840 trimmed_suffix = "." || rtrim (p_suffix); 1841 1842 if length (trimmed_ename) > length (p_new_ename) then do; 1843 p_code = error_table_$entlong; 1844 return; 1845 end; 1846 1847 if length (trimmed_ename) > length (trimmed_suffix) then 1848 /* original name has room for the suffix */ 1849 if substr (trimmed_ename, (length (trimmed_ename) - length (trimmed_suffix) + 1)) = trimmed_suffix then 1850 ; /* proper suffix is already present */ 1851 else trimmed_ename = trimmed_ename || trimmed_suffix; 1852 else trimmed_ename = trimmed_ename || trimmed_suffix; 1853 1854 p_new_ename = trimmed_ename; /* return it */ 1855 1856 if length (trimmed_ename) <= length (p_new_ename) then 1857 p_code = 0; /* it fit */ 1858 else p_code = error_table_$entlong; /* sorry */ 1859 1860 return; 1861 1862 end add_suffix; 1863 1864 /* Classify a message: determines the format (FIPS98, mail_format, unknown) and type (ordinary, interactive) */ 1865 1866 classify_message: 1867 procedure (p_message_ptr, p_message_lth, p_message_format, p_message_type); 1868 1869 dcl p_message_ptr pointer parameter; 1870 dcl p_message_lth fixed binary (24) parameter; 1871 dcl (p_message_format, p_message_type) fixed binary; 1872 1873 fips98_message_ptr, mail_format_ptr = p_message_ptr; 1874 /* allow following references to work OK */ 1875 1876 if fips98_message.version = FIPS98_MESSAGE_VERSION_1 then do; 1877 p_message_format = FIPS98_FORMAT_MESSAGE; 1878 if fips98_message.interactive then 1879 p_message_type = INTERACTIVE_MESSAGES; 1880 else p_message_type = ORDINARY_MESSAGES; 1881 end; 1882 1883 else if ((mail_format.version = MAIL_FORMAT_VERSION_2) | (mail_format.version = MAIL_FORMAT_VERSION_3) 1884 | (mail_format.version = MAIL_FORMAT_VERSION_4)) & (mail_format.lines <= mail_format.text_len) then do; 1885 p_message_format = MAIL_FORMAT_MESSAGE; 1886 if mail_format.wakeup | mail_format.urgent | mail_format.notify then 1887 p_message_type = INTERACTIVE_MESSAGES; 1888 else p_message_type = ORDINARY_MESSAGES; 1889 end; 1890 1891 else do; /* not recognizable */ 1892 p_message_format = UNKNOWN_FORMAT_MESSAGE; 1893 p_message_type = ORDINARY_MESSAGES; /* ... as we don't know where to look in the message */ 1894 end; 1895 1896 return; 1897 1898 end classify_message; 1899 1900 1901 1902 /* Returns "1"b if a message's sender_id (from ring-1) matches the criteria for "own" messages */ 1903 1904 message_from_self: 1905 procedure (p_sender_id) returns (bit (1) aligned); 1906 1907 dcl p_sender_id character (32) parameter; 1908 1909 if before (p_sender_id, ".") = "anonymous" then /* for anonymous users, project is important */ 1910 return (substr (p_sender_id, 1, length (rtrim (p_sender_id)) - 2) = mlsys_data_$user_id); 1911 1912 else return (before (p_sender_id, ".") = mlsys_data_$person_id); 1913 1914 end message_from_self; 1915 1916 /* Read the next message from a mailbox */ 1917 1918 read_next_message: 1919 procedure (); 1920 1921 dcl retry_count fixed binary; 1922 dcl retried bit (1) aligned; 1923 1924 im_message_info_ptr = find_next_message_block_slot (); 1925 mra_ptr = addr (im_message_info.mra); /* a place to store the data */ 1926 1927 mailbox_message_area_ptr = find_mailbox_message_area ("0"b); 1928 /* a place to allocate the mail_format */ 1929 1930 retry_count = 1; /* may retry because of mailbox salvaging or ... */ 1931 retried = "0"b; /* ... another program closing the mailbox too many times */ 1932 1933 1934 /* Try to read the message */ 1935 1936 RETRY_READ_MESSAGE: 1937 if mailbox_info.last_message_key = ""b then /* read the first message ... */ 1938 if mailbox_info.use_own_mode then /* ... from ourselves */ 1939 call mailbox_$own_read_index (mailbox_info.index, addr (mailbox_message_area.area), "0"b, mra_ptr, 1940 code); 1941 else /* ... in the mailbox period */ 1942 call mailbox_$read_index (mailbox_info.index, addr (mailbox_message_area.area), "0"b, mra_ptr, code); 1943 1944 else /* read the next message ... */ 1945 if mailbox_info.use_own_mode then /* ... from ourselves */ 1946 call mailbox_$own_incremental_read_index (mailbox_info.index, addr (mailbox_message_area.area), "01"b, 1947 mailbox_info.last_message_key, mra_ptr, code); 1948 else /* ... in the mailbox period */ 1949 call mailbox_$incremental_read_index (mailbox_info.index, addr (mailbox_message_area.area), 1950 "01"b /* next forward */, mailbox_info.last_message_key, mra_ptr, code); 1951 1952 if code ^= 0 then /* something went wrong ... */ 1953 if code = error_table_$noalloc then /* ... message won't fit in current area */ 1954 if mailbox_message_area.virgin_area then 1955 go to CANT_READ_MESSAGE; /* ... already tried empty area: can't ever read it */ 1956 else do; /* ... try again with an empty area */ 1957 mailbox_message_area_ptr = find_mailbox_message_area ("1"b); 1958 go to RETRY_READ_MESSAGE; 1959 end; 1960 1961 else if code = error_table_$bad_segment then do; 1962 mailbox_info.flags.salvaged = "1"b; /* ... mailbox was salvaged */ 1963 retry_count = retry_count + 1; 1964 if retry_count > mlsys_data_$max_opening_retries then go to CANT_READ_MESSAGE; 1965 /* mailbox seems permanently damaged */ 1966 call mailbox_$close (mailbox_info.index, (0)); 1967 mailbox_info.index = 0; /* in case following open call fails ... */ 1968 call mailbox_$open (mailbox_info.dirname, mailbox_info.ename, mailbox_info.index, code); 1969 if code = 0 then /* it opened again OK: try reading again */ 1970 go to RETRY_READ_MESSAGE; 1971 else go to CANT_READ_MESSAGE; 1972 end; 1973 1974 else if code = error_table_$seg_unknown then do; 1975 /* ... some other buggy program closed mailbox too often */ 1976 if retried then go to CANT_READ_MESSAGE;/* one try at this one, please ... */ 1977 retried = "1"b; 1978 call mailbox_$close (mailbox_info.index, (0)); 1979 mailbox_info.index = 0; /* in case the open fails ... */ 1980 call mailbox_$open (mailbox_info.dirname, mailbox_info.ename, mailbox_info.index, code); 1981 if code = 0 then /* mailbox opened OK: try again */ 1982 go to RETRY_READ_MESSAGE; 1983 else go to CANT_READ_MESSAGE; /* something is really amiss */ 1984 end; 1985 1986 else go to CANT_READ_MESSAGE; /* ... anything else is fatal */ 1987 1988 1989 /* Message has been successfully read */ 1990 1991 im_message_info.area_ptr = addr (mailbox_message_area.area); 1992 im_message_info.mailbox_info_ptr = mailbox_info_ptr; 1993 im_message_info.key = im_message_info.mra.ms_id; 1994 call classify_message (im_message_info.mra.ms_ptr, im_message_info.mra.ms_len, im_message_info.format, 1995 im_message_info.type); 1996 string (im_message_info.flags) = ""b; 1997 im_message_info.flags.mra_valid = "1"b; /* have data from ring-1 */ 1998 1999 if im_message_info.format = MAIL_FORMAT_MESSAGE then 2000 if im_message_info.mra.ms_len <= 36 * currentsize (mail_format) then do; 2001 /*** Ring-1 message isn't long enough to hold the mf_extension structure: The message must be treated 2002* as a non-canonical message; otherwise, retransmission of the message would fail horribly */ 2003 mail_format.obsolete = mail_format.obsolete | mail_format.canonical; 2004 mail_format.canonical = "0"b; 2005 end; 2006 2007 im_message_info.flags.can_be_deleted = /* determine if the user can delete this message */ 2008 (mailbox_info.ring1_privilege | aim_check_$equal (im_message_info.mra.access_class, get_authorization_ ())) 2009 & (mailbox_info.mode_flags.delete 2010 | (message_from_self (im_message_info.mra.sender_id) & mailbox_info.mode_flags.own)); 2011 2012 if im_message_info.format = FIPS98_FORMAT_MESSAGE then 2013 im_message_info.flags.requests_acknowledgement = fips98_message.acknowledge; 2014 else if im_message_info.format = MAIL_FORMAT_MESSAGE then 2015 im_message_info.flags.requests_acknowledgement = mail_format.acknowledge; 2016 else /*** if im_message_info.format = UNKNOWN_FORMAT_MESSAGE then */ 2017 im_message_info.flags.requests_acknowledgement = "0"b; 2018 2019 im_message_info.flags.requests_acknowledgement = /* only allow acknowledgements if user "owns" the mailbox */ 2020 im_message_info.flags.requests_acknowledgement & mailbox_info.mode_flags.delete 2021 & aim_check_$equal (im_message_info.mra.access_class, get_authorization_ ()); 2022 2023 im_message_info.message_ptr = null (); /* no user-visible data yet */ 2024 2025 mailbox_info.last_message_key = im_message_info.key; 2026 /* next call will do incremental read */ 2027 mailbox_message_area.virgin_area = "0"b; /* something's there now */ 2028 2029 code = 0; /* indicate success to caller */ 2030 2031 return; 2032 2033 2034 /* Fatal errors during reading transfer here */ 2035 2036 CANT_READ_MESSAGE: 2037 message_block.n_used = message_block.n_used - 1; /* back to before this message */ 2038 return; 2039 2040 /* Internal to read_next_message: finds the next available im_message_info datum, allocating a new message_block if 2041* necessary */ 2042 2043 find_next_message_block_slot: 2044 procedure () returns (pointer); 2045 2046 message_block_ptr = mailbox_info.message_blocks.last; 2047 2048 if message_block_ptr = null () then /* no previous message blocks */ 2049 call allocate_new_message_block (); 2050 else if message_block.n_used = hbound (message_block.messages, 1) then call allocate_new_message_block (); 2051 /* last message_block is full */ 2052 2053 message_block.n_used = message_block.n_used + 1; 2054 /* pick the next one */ 2055 2056 return (addr (message_block.messages (message_block.n_used))); 2057 2058 2059 2060 allocate_new_message_block: 2061 procedure (); 2062 2063 dcl new_message_block_ptr pointer; 2064 2065 allocate message_block in (mlsys_area) set (new_message_block_ptr); 2066 2067 new_message_block_ptr -> message_block.chain = null (); 2068 new_message_block_ptr -> message_block.n_used = 0; 2069 /* it's empty */ 2070 2071 if mailbox_info.message_blocks.last = null () then 2072 mailbox_info.message_blocks = new_message_block_ptr; 2073 /* first message_block for this mailbox */ 2074 2075 else do; /* chain it onto the end */ 2076 mailbox_info.message_blocks.last -> message_block.chain.next = new_message_block_ptr; 2077 new_message_block_ptr -> message_block.chain.previous = mailbox_info.message_blocks.last; 2078 mailbox_info.message_blocks.last = new_message_block_ptr; 2079 end; 2080 2081 message_block_ptr = new_message_block_ptr; 2082 /* and it's now the current one */ 2083 2084 return; 2085 2086 end allocate_new_message_block; 2087 2088 end find_next_message_block_slot; 2089 2090 /* Internal to read_next_message: find an area into which the mail_format for this message is to be read */ 2091 2092 find_mailbox_message_area: 2093 procedure (p_force_new_segment) returns (pointer); 2094 2095 dcl p_force_new_segment bit (1) aligned parameter; 2096 2097 dcl 1 local_area_info aligned like area_info; 2098 dcl new_mma_ptr pointer; 2099 2100 if p_force_new_segment | (mailbox_info.last_message_area_ptr = null ()) then do; 2101 call mlsys_storage_mgr_$get_temp_segment (new_mma_ptr, code); 2102 if code ^= 0 then go to CANT_READ_MESSAGE; 2103 unspec (local_area_info) = ""b; /* setup the area: not extensible */ 2104 local_area_info.version = area_info_version_1; 2105 local_area_info.areap = addr (new_mma_ptr -> mailbox_message_area.area); 2106 local_area_info.owner = MAIL_SYSTEM_; 2107 local_area_info.size = 2108 sys_info$max_seg_size - binary (rel (addr (new_mma_ptr -> mailbox_message_area.area)), 18); 2109 call define_area_ (addr (local_area_info), code); 2110 if code ^= 0 then do; 2111 call mlsys_storage_mgr_$release_temp_segment (new_mma_ptr, (0)); 2112 go to CANT_READ_MESSAGE; 2113 end; 2114 new_mma_ptr -> mailbox_message_area.previous = mailbox_info.last_message_area_ptr; 2115 new_mma_ptr -> mailbox_message_area.virgin_area = "1"b; 2116 /* not yet used */ 2117 mailbox_info.last_message_area_ptr = new_mma_ptr; 2118 /* it's the latest one now */ 2119 end; 2120 2121 return (mailbox_info.last_message_area_ptr); 2122 2123 end find_mailbox_message_area; 2124 2125 end read_next_message; 2126 2127 /* Create the user-visible message structure describing the selected message */ 2128 2129 construct_user_message: 2130 procedure (); 2131 2132 dcl 1 local_mbsp aligned like message_body_section_parameter; 2133 dcl ring_1_delivered_by pointer; 2134 dcl ring_1_delivered_by_comment character (32) varying; 2135 dcl ring_1_date_time_delivered fixed binary (71); 2136 2137 unspec (ring_1_date_time_delivered) = (18)"0"b || substr (im_message_info.key, 19); 2138 2139 if im_message_info.format = MAIL_FORMAT_MESSAGE then do; 2140 mail_format_ptr = im_message_info.mra.ms_ptr;/* there might be a "comment" */ 2141 if (before (im_message_info.mra.sender_id, ".") ^= mail_format.sent_from) 2142 & ((mail_format.sent_from ^= "") 2143 & (mail_format.sent_from ^= copy (NUL, length (mail_format.sent_from)))) then 2144 ring_1_delivered_by_comment = 2145 rtrim (canon (rtrim (mail_format.sent_from), length (rtrim (mail_format.sent_from)))); 2146 else ring_1_delivered_by_comment = ""; 2147 end; 2148 else ring_1_delivered_by_comment = ""; /* not for any other format */ 2149 2150 call mlsys_address_mgr_$create_user_mailbox_address 2151 (( 2152 substr (im_message_info.mra.sender_id, 1, (length (rtrim (im_message_info.mra.sender_id)) - length (".a"))) 2153 ), "", ring_1_delivered_by_comment, ring_1_delivered_by, (0)); 2154 call mlsys_address_mgr_$increment_reference_count (ring_1_delivered_by); 2155 2156 if im_message_info.format = FIPS98_FORMAT_MESSAGE then do; 2157 fips98_message_ptr = im_message_info.mra.ms_ptr; 2158 call mlsys_fips98_$decode_message (fips98_message.data.bytes (*), MESSAGE_VERSION_2, im_message_info_ptr, 2159 ring_1_delivered_by, ring_1_date_time_delivered, (im_message_info.requests_acknowledgement), 2160 message_ptr, code); 2161 if code ^= 0 then do; /* couldn't decode it: act like it's a bit string */ 2162 call create_message (); 2163 local_mbsp.version = MESSAGE_BODY_SECTION_PARAMETER_VERSION_2; 2164 message_body_section_ptr = addr (local_mbsp.section); 2165 message_bit_string_body_section.section_type = MESSAGE_BIT_STRING_BODY_SECTION; 2166 message_bit_string_body_section.bit_string_ptr = addr (fips98_message.data); 2167 message_bit_string_body_section.bit_string_lth = 9 * fips98_message.n_bytes; 2168 call mlsys_message_mgr_$add_body_section_no_copy (message_ptr, addr (local_mbsp), (-1), (0)); 2169 end; 2170 end; 2171 2172 else if im_message_info.format = MAIL_FORMAT_MESSAGE then do; 2173 mail_format_ptr = im_message_info.mra.ms_ptr; 2174 call mlsys_parse_text_$parse_im_message_text (mail_format.text, MESSAGE_VERSION_2, im_message_info_ptr, 2175 ring_1_delivered_by, ring_1_date_time_delivered, (im_message_info.requests_acknowledgement), 2176 (mail_format.canonical | mail_format.obsolete /* formerly "new_quoting" */), message_ptr, code); 2177 if code ^= 0 then do; /* couldn't parse it: act like it has no header */ 2178 call create_message (); 2179 local_mbsp.version = MESSAGE_BODY_SECTION_PARAMETER_VERSION_2; 2180 message_body_section_ptr = addr (local_mbsp.section); 2181 message_preformatted_body_section.section_type = MESSAGE_PREFORMATTED_BODY_SECTION; 2182 message_preformatted_body_section.text_ptr = addr (mail_format.text); 2183 message_preformatted_body_section.text_lth = length (mail_format.text); 2184 call mlsys_message_mgr_$add_body_section_no_copy (message_ptr, addr (local_mbsp), (-1), (0)); 2185 end; 2186 end; 2187 2188 else do; /* unknown format: make it all a bit string */ 2189 call create_message (); 2190 local_mbsp.version = MESSAGE_BODY_SECTION_PARAMETER_VERSION_2; 2191 message_body_section_ptr = addr (local_mbsp.section); 2192 message_bit_string_body_section.section_type = MESSAGE_BIT_STRING_BODY_SECTION; 2193 message_bit_string_body_section.bit_string_ptr = im_message_info.mra.ms_ptr; 2194 message_bit_string_body_section.bit_string_lth = im_message_info.mra.ms_len; 2195 call mlsys_message_mgr_$add_body_section_no_copy (message_ptr, addr (local_mbsp), (-1), (0)); 2196 end; 2197 2198 im_message_info.message_ptr = message_ptr; 2199 message.interactive = (im_message_info.type = INTERACTIVE_MESSAGES); 2200 message.can_be_deleted = im_message_info.can_be_deleted; 2201 message.must_be_acknowledged = im_message_info.requests_acknowledgement; 2202 message.access_class = im_message_info.mra.access_class; 2203 2204 if im_message_info.format = FIPS98_FORMAT_MESSAGE then 2205 message.seen = im_message_info.mra.ms_ptr -> fips98_message.seen; 2206 else if im_message_info.format = MAIL_FORMAT_MESSAGE then 2207 message.seen = im_message_info.mra.ms_ptr -> mail_format.seen; 2208 else message.seen = "0"b; 2209 2210 call mlsys_address_mgr_$decrement_reference_count (ring_1_delivered_by); 2211 2212 return; 2213 2214 2215 2216 /* Internal to construct_user_message: creates the message structure for unknown format or unparseable messages */ 2217 2218 create_message: 2219 procedure (); 2220 2221 call mlsys_message_mgr_$create_im_message (MESSAGE_VERSION_2, im_message_info_ptr, message_ptr, (0)); 2222 2223 message.envelope.date_time_delivered, message.envelope.date_time_mailed, message.header.date_time_created = 2224 ring_1_date_time_delivered; 2225 2226 call mlsys_message_id_mgr_$encode_local_id (ring_1_date_time_delivered, message.message_id); 2227 2228 call mlsys_address_list_mgr_$add_address (message.from, ring_1_delivered_by, ADDRESS_LIST_VERSION_2, (0)); 2229 2230 if im_message_info.requests_acknowledgement then do; 2231 message.envelope.acknowledge_to = ring_1_delivered_by; 2232 call mlsys_address_mgr_$increment_reference_count (message.envelope.acknowledge_to); 2233 end; 2234 2235 return; 2236 2237 end create_message; 2238 2239 end construct_user_message; 2240 2241 /* Recompute user's access to a mailbox and update any information about the mailbox which changes such as which messages 2242* can be deleted or acknowledged */ 2243 2244 /* Note: A change in access may prevent the user from reading desired messages in the future; this problem will be 2245* detected by the read_new_messages entrypoint */ 2246 2247 recompute_mailbox_access: 2248 procedure (p_code); 2249 2250 dcl p_code fixed binary (35) parameter; 2251 2252 dcl saved_im_message_info_ptr pointer; 2253 dcl code fixed binary (35); 2254 dcl retry_count fixed binary; 2255 dcl retried bit (1) aligned; 2256 2257 dcl next_message_block_ptr pointer; 2258 dcl idx fixed binary; 2259 2260 saved_im_message_info_ptr = im_message_info_ptr; /* might be needed by calling procedure */ 2261 2262 retry_count = 1; /* may retry because of mailbox salvaging or ... */ 2263 retried = "0"b; /* ... another program closing the mailbox too many times */ 2264 2265 RETRY_GET_MAILBOX_ACCESS: 2266 call mailbox_$get_mode_index (mailbox_info.index, mailbox_mode, code); 2267 if code ^= 0 then /* something went wrong ... */ 2268 if code = error_table_$moderr then ; /* ... user no longer has access to the mailbox */ 2269 2270 else if code = error_table_$bad_segment then do; 2271 mailbox_info.flags.salvaged = "1"b; /* ... mailbox was salvaged */ 2272 retry_count = retry_count + 1; 2273 if retry_count > mlsys_data_$max_opening_retries then go to CANT_RECOMPUTE_MAILBOX_ACCESS; 2274 /* mailbox seems permanently damaged */ 2275 call mailbox_$close (mailbox_info.index, (0)); 2276 mailbox_info.index = 0; /* in case following open call fails ... */ 2277 call mailbox_$open (mailbox_info.dirname, mailbox_info.ename, mailbox_info.index, code); 2278 if code = 0 then /* it opened again OK: try to get access again */ 2279 go to RETRY_GET_MAILBOX_ACCESS; 2280 else if code = error_table_$moderr then ; 2281 /* user no longer has access to the mailbox */ 2282 else go to CANT_RECOMPUTE_MAILBOX_ACCESS; 2283 end; 2284 2285 else if code = error_table_$seg_unknown then do; 2286 /* ... some other buggy program closed mailbox too often */ 2287 if retried then go to CANT_RECOMPUTE_MAILBOX_ACCESS; 2288 retried = "1"b; /* one try at this one, please ... */ 2289 call mailbox_$close (mailbox_info.index, (0)); 2290 mailbox_info.index = 0; /* in case the open fails ... */ 2291 call mailbox_$open (mailbox_info.dirname, mailbox_info.ename, mailbox_info.index, code); 2292 if code = 0 then /* mailbox opened OK: try again */ 2293 go to RETRY_GET_MAILBOX_ACCESS; 2294 else if code = error_table_$moderr then ; 2295 /* user no longer has access */ 2296 else go to CANT_RECOMPUTE_MAILBOX_ACCESS; 2297 end; 2298 2299 else do; /* ... anything else is fatal */ 2300 CANT_RECOMPUTE_MAILBOX_ACCESS: 2301 p_code = code; 2302 return; 2303 end; 2304 2305 if code = error_table_$moderr then mailbox_mode = ""b; 2306 /* user no longer has any access to the mailbox */ 2307 2308 string (user_privileges) = get_privileges_ (); /* must also check if ring-1 privilege changed */ 2309 2310 if (string (mailbox_info.mode_flags) = mailbox_mode) & (mailbox_info.ring1_privilege = user_privileges.ring1) 2311 then do; /* access hasn't changed */ 2312 p_code = 0; 2313 return; 2314 end; 2315 2316 string (mailbox_info.mode_flags) = mailbox_mode; 2317 if mailbox_info.mailbox_ptr ^= null () then /* reflect change to user */ 2318 mailbox_info.mailbox_ptr -> mailbox.mode = mailbox_mode; 2319 2320 mailbox_info.ring1_privilege = user_privileges.ring1; 2321 2322 message_idx = 0; /* index into user-visible structure */ 2323 2324 do message_block_ptr = mailbox_info.message_blocks.first repeat (next_message_block_ptr) 2325 while (message_block_ptr ^= null ()); 2326 next_message_block_ptr = message_block.next; 2327 2328 do idx = 1 to message_block.n_used; 2329 im_message_info_ptr = addr (message_block.messages (idx)); 2330 2331 im_message_info.flags.can_be_deleted = 2332 (mailbox_info.ring1_privilege 2333 | aim_check_$equal (im_message_info.mra.access_class, get_authorization_ ())) 2334 & (mailbox_info.mode_flags.delete 2335 | (message_from_self (im_message_info.mra.sender_id) & mailbox_info.mode_flags.own)); 2336 2337 if im_message_info.format = FIPS98_FORMAT_MESSAGE then 2338 im_message_info.flags.requests_acknowledgement = fips98_message.acknowledge; 2339 else if im_message_info.format = MAIL_FORMAT_MESSAGE then 2340 im_message_info.flags.requests_acknowledgement = mail_format.acknowledge; 2341 else /*** if im_message_info.format = UNKNOWN_FORMAT_MESSAGE then */ 2342 im_message_info.flags.requests_acknowledgement = "0"b; 2343 2344 im_message_info.flags.requests_acknowledgement = 2345 im_message_info.flags.requests_acknowledgement & mailbox_info.mode_flags.delete 2346 & aim_check_$equal (im_message_info.mra.access_class, get_authorization_ ()); 2347 2348 if im_message_info.message_ptr ^= null () then do; 2349 im_message_info.message_ptr -> message.flags.can_be_deleted = 2350 im_message_info.flags.can_be_deleted; 2351 im_message_info.message_ptr -> message.flags.must_be_acknowledged = 2352 im_message_info.flags.requests_acknowledgement; 2353 end; 2354 end; 2355 end; 2356 2357 im_message_info_ptr = saved_im_message_info_ptr; /* keep the caller happy */ 2358 2359 p_code = 0; 2360 2361 return; 2362 2363 end recompute_mailbox_access; 2364 2365 /* Release all storage associated with a mailbox and close the mailbox in ring-1 */ 2366 2367 release_mailbox_info: 2368 procedure (); 2369 2370 dcl (next_message_block_ptr, next_mma_ptr) pointer; 2371 dcl idx fixed binary; 2372 2373 if mailbox_info.index ^= 0 then do; /* there's a mailbox open in ring-1 ... */ 2374 call mailbox_$close (mailbox_info.index, (0)); 2375 mailbox_info.index = 0; /* in case cleanup handler gets called before we're done */ 2376 end; 2377 2378 if mailbox_info.address_ptr ^= null () then /* we don't care anymore */ 2379 call mlsys_address_mgr_$decrement_reference_count (mailbox_info.address_ptr); 2380 2381 do mailbox_message_area_ptr = mailbox_info.last_message_area_ptr repeat (next_mma_ptr) 2382 while (mailbox_message_area_ptr ^= null ()); 2383 next_mma_ptr = mailbox_message_area.previous; 2384 call mlsys_storage_mgr_$release_temp_segment (mailbox_message_area_ptr, (0)); 2385 end; 2386 2387 if mailbox_info.delete_error_info_ptr ^= null () then do; 2388 free mailbox_info.delete_error_info_ptr -> delete_error_info in (mlsys_area); 2389 mailbox_info.delete_error_info_ptr = null (); 2390 end; 2391 2392 if mailbox_info.mailbox_ptr ^= null () then do; /* free the user-visible data structure */ 2393 free mailbox_info.mailbox_ptr -> mailbox in (mlsys_area); 2394 mailbox_info.mailbox_ptr = null (); 2395 end; 2396 2397 do message_block_ptr = mailbox_info.message_blocks.first repeat (next_message_block_ptr) 2398 while (message_block_ptr ^= null ()); 2399 next_message_block_ptr = message_block.next; 2400 do idx = 1 to message_block.n_used; 2401 im_message_info_ptr = addr (message_block.messages (idx)); 2402 if im_message_info.message_ptr ^= null () then 2403 call mlsys_message_mgr_$free_message (im_message_info.message_ptr, (0)); 2404 end; 2405 free message_block in (mlsys_area); 2406 end; 2407 2408 free mailbox_info in (mlsys_area); 2409 mailbox_info_ptr = null (); /* just to be safe */ 2410 2411 return; 2412 2413 end release_mailbox_info; 2414 2415 /* Release all storage associated with any new messages processed by read_new_messages before a fatal error occured */ 2416 2417 release_new_mailbox_info: 2418 procedure (); 2419 2420 dcl the_area area based; 2421 dcl next_message_block_ptr pointer; 2422 dcl (first_idx, idx) fixed binary; 2423 2424 if n_new_messages > 0 then do; /* some new messages were read ... */ 2425 2426 do message_block_ptr = saved_message_block_ptr repeat (next_message_block_ptr) 2427 while (message_block_ptr ^= null ()); 2428 next_message_block_ptr = message_block.next; 2429 2430 if message_block_ptr = saved_message_block_ptr then 2431 first_idx = saved_message_block_n_used + 1; 2432 else first_idx = 1; 2433 2434 do idx = first_idx to message_block.n_used; 2435 im_message_info_ptr = addr (message_block.messages (idx)); 2436 mra_ptr = addr (im_message_info.mra); 2437 if mra.ms_ptr ^= null () then do; /* ... release the message itself */ 2438 free message_bits in (im_message_info.area_ptr -> the_area); 2439 mra.ms_ptr = null (); 2440 end; 2441 if im_message_info.message_ptr ^= null () then 2442 call mlsys_message_mgr_$free_message (im_message_info.message_ptr, (0)); 2443 end; /* ... release any user visible structures */ 2444 2445 if message_block_ptr ^= saved_message_block_ptr then free message_block in (mlsys_area); 2446 end; 2447 2448 mailbox_info.message_blocks.last = saved_message_block_ptr; 2449 saved_message_block_ptr -> message_block.next = null (); 2450 saved_message_block_ptr -> message_block.n_used = saved_message_block_n_used; 2451 2452 n_new_messages = 0; /* done with that part */ 2453 end; 2454 2455 if new_mailbox_ptr ^= null () then do; /* started to create new mailbox ... */ 2456 if new_mailbox_ptr ^= mailbox_ptr then /* ... it was different */ 2457 free new_mailbox_ptr -> mailbox in (mlsys_area); 2458 new_mailbox_ptr = null (); 2459 end; 2460 2461 return; 2462 2463 end release_new_mailbox_info; 2464 1 1 /* BEGIN INCLUDE FILE ... mlsys_copy_ptr.incl.pl1 */ 1 2 /* Created: August 1983 by G. Palter */ 1 3 /* Recoded: October 1983 by W. Olin Sibert to be guarenteed to work */ 1 4 1 5 /* Copies a pointer parameter while changing the ring number in said pointer to the ring of execution: This change of 1 6* ring number is required to allow the mail system to properly manipulate ring-2 objects as requested by the caller as 1 7* the caller's pointer to said object would cause an access violation. The mail system does its own validation to insure 1 8* that the pointer provided by the caller is legitimate */ 1 9 1 10 copy_ptr: 1 11 procedure (p_pointer) returns (pointer); 1 12 1 13 dcl p_pointer pointer parameter; 1 14 dcl return_value pointer options (packed); 1 15 1 16 return_value = p_pointer; /* packed pointers don't have ring numbers ... */ 1 17 1 18 return (return_value); /* ... so it will be set to the ring of execution */ 1 19 1 20 end copy_ptr; 1 21 1 22 /* END INCLUDE FILE ... mlsys_copy_ptr.incl.pl1 */ 2465 2466 2 1 /* BEGIN INCLUDE FILE ... mlsys_mailbox.incl.pl1 */ 2 2 /* Created: April 1983 by G. Palter */ 2 3 2 4 /* Definition of a mailbox as used by the Multics Mail System */ 2 5 2 6 dcl 1 mailbox aligned based (mailbox_ptr), 2 7 2 version character (8) unaligned, 2 8 2 reserved bit (144), /* for exclusive use of the mail system */ 2 9 2 mailbox_address pointer, /* mail system address of this mailbox */ 2 10 2 mailbox_dirname character (168) unaligned, /* directory containing this mailbox */ 2 11 2 mailbox_ename character (32) unaligned, /* entry name of this mailbox (includes ".mbx") */ 2 12 2 mailbox_type fixed binary, /* type of mailbox (see below) */ 2 13 2 mode bit (36), /* user's effective extended access to this mailbox */ 2 14 2 flags, 2 15 3 salvaged bit (1) unaligned, /* ON => this mailbox has been salvaged since last open */ 2 16 3 reserved bit (35) unaligned, /* for exclusive use of the mail system */ 2 17 2 message_selection_mode fixed binary, /* types of messages read: all/ordinary/interactive */ 2 18 2 sender_selection_mode fixed binary, /* whose messages were read: all/own/not-own */ 2 19 2 message_reading_level fixed binary, /* how much of each message read: keys/messages */ 2 20 2 n_messages fixed binary, /* total # of messages in this mailbox structure */ 2 21 2 n_ordinary_messages fixed binary, /* ... # of ordinary messages here */ 2 22 2 n_interactive_messages fixed binary, /* ... # of interactive messages here */ 2 23 2 n_deleted_messages fixed binary, /* ... # of messages here marked for later deletion */ 2 24 2 messages (mailbox_n_messages refer (mailbox.n_messages)), 2 25 3 key bit (72), /* unique key to read this message if not already read */ 2 26 3 message_ptr pointer; /* -> the message structure */ 2 27 2 28 dcl MAILBOX_VERSION_2 character (8) static options (constant) initial ("mlsmbx02"); 2 29 2 30 dcl mailbox_ptr pointer; 2 31 2 32 dcl mailbox_n_messages fixed binary; /* for exclusive use of the mail system */ 2 33 2 34 2 35 /* Types of mailboxes distinguished by the mail system */ 2 36 2 37 dcl (USER_DEFAULT_MAILBOX initial (1), /* the user's default mailbox for receiving mail */ 2 38 USER_LOGBOX initial (2), /* the user's logbox */ 2 39 SAVEBOX initial (3), /* a savebox */ 2 40 OTHER_MAILBOX initial (4)) /* any other type of mailbox */ 2 41 fixed binary static options (constant); 2 42 2 43 /* END INCLUDE FILE ... mlsys_mailbox.incl.pl1 */ 2467 2468 3 1 /* BEGIN INCLUDE FILE ... mlsys_mailbox_modes.incl.pl1 */ 3 2 /* Created: June 1983 by G. Palter */ 3 3 3 4 /* Extended access modes (and combinations thereof) defined for a mailbox */ 3 5 3 6 dcl (N_MBX_ACCESS initial ("0000000"b), /* no access */ 3 7 3 8 A_MBX_ACCESS initial ("1000000"b), /* add messages */ 3 9 D_MBX_ACCESS initial ("0100000"b), /* delete any message (also indicates owner of mailbox) */ 3 10 R_MBX_ACCESS initial ("0010000"b), /* read any message */ 3 11 O_MBX_ACCESS initial ("0001000"b), /* read/delete any message sent by yourself */ 3 12 S_MBX_ACCESS initial ("0000100"b), /* get count of messages in the mailbox */ 3 13 W_MBX_ACCESS initial ("0000010"b), /* can send a wakeup to this mailbox (interactive messages and 3 14* mail notifications) */ 3 15 U_MBX_ACCESS initial ("0000001"b), /* can send an urgent wakeup (unused today) */ 3 16 3 17 ADROSW_MBX_ACCESS initial ("1111110"b), /* access granted to creator/owner of a mailbox */ 3 18 AOW_MBX_ACCESS initial ("1001010"b)) /* access granted to all other users */ 3 19 bit (36) aligned static options (constant); 3 20 3 21 /* END INCLUDE FILE ... mlsys_mailbox_modes.incl.pl1 */ 2469 2470 4 1 /* BEGIN INCLUDE FILE ... mlsys_open_options.incl.pl1 */ 4 2 /* Created: June 1983 by G. Palter */ 4 3 4 4 /* Options for the mail_system_$open_mailbox entrypoint */ 4 5 4 6 dcl 1 open_options aligned based (open_options_ptr), 4 7 2 version character (8), 4 8 2 message_selection_mode fixed binary, /* what types are to be read (all/ordinary/interactive) */ 4 9 2 sender_selection_mode fixed binary, /* selects messages by who sent them */ 4 10 2 message_reading_level fixed binary; /* specifies whether all or only part of a message is read */ 4 11 4 12 dcl OPEN_OPTIONS_VERSION_2 character (8) static options (constant) initial ("mlsopn02"); 4 13 4 14 dcl open_options_ptr pointer; 4 15 4 16 4 17 dcl ALL_MESSAGES fixed binary static options (constant) initial (0); 4 18 /* read all messages in the mailbox ... 4 19* ... used as both a message and sender selection mode */ 4 20 4 21 /* Defined message selection modes */ 4 22 4 23 dcl (ORDINARY_MESSAGES initial (1), /* read only ordinary messages */ 4 24 INTERACTIVE_MESSAGES initial (2)) /* read only interactive messages */ 4 25 fixed binary static options (constant); 4 26 4 27 4 28 /* Defined sender selection modes */ 4 29 4 30 dcl (ACCESSIBLE_MESSAGES initial (-1), /* reads whatever messages are accessible */ 4 31 OWN_MESSAGES initial (1), /* reads only those messages sent by this user */ 4 32 NOT_OWN_MESSAGES initial (2)) /* reads only those messages not sent by this user */ 4 33 fixed binary static options (constant); 4 34 4 35 4 36 /* Defined message reading levels */ 4 37 4 38 dcl (READ_KEYS initial (1), /* reads only the unique key of each message */ 4 39 READ_MESSAGES initial (2)) /* reads the entire content of each message */ 4 40 fixed binary static options (constant); 4 41 4 42 /* END INCLUDE FILE ... mlsys_open_options.incl.pl1 */ 2471 2472 5 1 /* BEGIN INCLUDE FILE ... mlsys_close_options.incl.pl1 */ 5 2 /* Created: June 1983 by G. Palter */ 5 3 5 4 /* Options for the mail_system_$close_mailbox entrypoint */ 5 5 5 6 dcl 1 close_options aligned based (close_options_ptr), 5 7 2 version character (8) unaligned, 5 8 2 flags, 5 9 3 perform_deletions bit (1) unaligned, /* ON => perform deletions requested earlier */ 5 10 3 report_deletion_errors bit (1) unaligned, /* ON => report problems deleting via sub_err_ */ 5 11 3 mbz bit (34) unaligned; /* must be set to ""b by the caller */ 5 12 5 13 dcl CLOSE_OPTIONS_VERSION_2 character (8) static options (constant) initial ("mlsclo02"); 5 14 5 15 dcl close_options_ptr pointer; 5 16 5 17 /* END INCLUDE FILE ... mlsys_close_options.incl.pl1 */ 2473 2474 6 1 /* BEGIN INCLUDE FILE ... mlsys_delete_error_info.incl.pl1 */ 6 2 /* Created: June 1983 by G. Palter */ 6 3 6 4 /* Describes why the mail system could not delete a message which was marked for deletion: passed to the caller of 6 5* mail_system_$close_mailbox or mail_system_$expunge_messages via sub_err_ */ 6 6 6 7 dcl 1 delete_error_info aligned based (delete_error_info_ptr), 6 8 2 version character (8) unaligned, 6 9 2 message_number fixed binary, /* set to index of message which couldn't be deleted */ 6 10 2 code fixed binary (35), /* set to indicate why message could not be deleted */ 6 11 2 additional_info character (256) varying; /* set to additional information to be displayed with the 6 12* error message for the above status code */ 6 13 6 14 dcl DELETE_ERROR_INFO_VERSION_1 character (8) static options (constant) initial ("mlsdel01"); 6 15 6 16 dcl delete_error_info_ptr pointer; 6 17 6 18 /* END INCLUDE FILE ... mlsys_delete_error_info.incl.pl1 */ 2475 2476 7 1 /* BEGIN INCLUDE FILE ... mlsys_internal_data.incl.pl1 */ 7 2 7 3 7 4 /****^ HISTORY COMMENTS: 7 5* 1) change(86-06-11,Mills), approve(86-06-11,MCR7419), 7 6* audit(86-06-17,Margolin), install(86-06-30,MR12.0-1080): 7 7* Added mlsys_data_$domains_available. 7 8* END HISTORY COMMENTS */ 7 9 7 10 7 11 /* Created: May 1981 by G. Palter */ 7 12 /* Modified: July 1983 by G. Palter to merge with mlsys_data_ */ 7 13 7 14 /* Constants used internally by the Multics mail system */ 7 15 7 16 dcl mlsys_data_$max_opening_retries fixed binary external; /* maximum number of times to reopen a mailbox if it gets 7 17* damaged and salvaged while open */ 7 18 7 19 dcl mlsys_data_$max_lock_wait_retries fixed binary external; 7 20 /* maximum number of times to try to send a message while the 7 21* mailbox is locked (being salvaged?) */ 7 22 7 23 7 24 /* Allocation overhead factors: When allocating those structures with refer extents, insure that the variable portion of 7 25* the structure contains a multiple of the appropriate constant number of slots. These extra slots will be used for 7 26* later additions to the structure; when a new element must be added to a full structure, add this many new slots (rather 7 27* than a single new slot) 7 28* 7 29* The following expression should be used to determine the initial allocation: 7 30* 7 31* n_slots_to_allocate = n_slots_needed + CONSTANT - mod (n_slots_needed, CONSTANT); */ 7 32 7 33 dcl (mlsys_data_$mailbox_allocation, /* mailbox.messages */ 7 34 mlsys_data_$message_body_sections_allocation, /* message.body_sections */ 7 35 mlsys_data_$message_redistributions_list_allocation, /* message_redistributions_list.redistributions */ 7 36 mlsys_data_$message_user_fields_allocation, /* message_user_fields_list.user_fields */ 7 37 mlsys_data_$message_references_list_allocation, /* message_references_list.references */ 7 38 mlsys_data_$address_list_allocation) /* address_list.addresses */ 7 39 fixed binary external; 7 40 7 41 7 42 /* Static data user by the Multics mail system */ 7 43 7 44 dcl (mlsys_data_$forum_not_available, /* 1 => forum isn't available on the system or in this ring */ 7 45 mlsys_data_$ism_not_available, /* 1 => no inter-system mailer on this system */ 7 46 mlsys_data_$domains_available) /* 1 => domain name system software on this sytem */ 7 47 fixed binary (1) external; 7 48 7 49 dcl (mlsys_data_$subsystem_ring, /* ring in which the mail system is secured */ 7 50 mlsys_data_$highest_usable_ring, /* highest ring of execution which may use the mail system */ 7 51 mlsys_data_$lowest_forum_ring) /* lowest ring of execution with access to forum */ 7 52 fixed binary (3) external; 7 53 7 54 dcl mlsys_data_$temp_segment_list_ptr pointer external; /* -> list of all mail system temporary segments */ 7 55 7 56 dcl mlsys_data_$valid_segments (0:4095) bit (1) unaligned external; 7 57 /* indicates which segments have been used by the mail system 7 58* for the allocation of user-visible data in order to 7 59* validate that pointers passed from the user-ring are OK */ 7 60 7 61 dcl mlsys_area area based (mlsys_data_$subsystem_area_ptr);/* area used for all user-visible allocations ... */ 7 62 dcl mlsys_data_$subsystem_area_ptr pointer external; /* ... and the pointer on which it is based */ 7 63 7 64 dcl mlsys_data_$hash_tables_segment_ptr pointer external; /* -> hash tables used by the mail system */ 7 65 7 66 dcl mlsys_data_$transmit_cache_ptr pointer external; /* -> cache of recently used mailboxes for mlsys_transmit_ */ 7 67 7 68 dcl mlsys_data_$user_is_anonymous bit (1) aligned external;/* ON => the user is an anonymous user */ 7 69 7 70 dcl mlsys_data_$person_id character (24) varying external; /* the user's Person_id */ 7 71 dcl mlsys_data_$project_id character (12) varying external;/* the user's Project_id */ 7 72 dcl mlsys_data_$user_id character (32) varying external; /* the user's User_id (Person_id.Project_id) */ 7 73 7 74 /* END INCLUDE FILE ... mlsys_internal_data.incl.pl1 */ 2477 2478 8 1 /* BEGIN INCLUDE FILE ... mlsys_fips98_message.incl.pl1 */ 8 2 8 3 8 4 /****^ HISTORY COMMENTS: 8 5* 1) change(86-01-09,Herbst), approve(86-03-25,MCR7367), 8 6* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 8 7* Added "seen" switch. 8 8* END HISTORY COMMENTS */ 8 9 8 10 8 11 /* Created: June 1983 by G. Palter */ 8 12 8 13 /* Definition of a message as stored in the mailbox by the Multics Mail System: The format used to store messages is 8 14* defined by Federal Information Processing Standard 98 with Multics extensions. In addition, the data is stored in 8 15* 8-bit bytes right-justified within 9-bit characters to accomodate the Multics hardware */ 8 16 8 17 dcl 1 fips98_message aligned based (fips98_message_ptr), 8 18 2 header, 8 19 3 version character (8) unaligned, 8 20 3 flags, 8 21 4 interactive bit (1) unaligned, /* ON => this is an interactive message */ 8 22 4 acknowledge bit (1) unaligned, /* ON => this message requests an acknowledgement */ 8 23 4 seen bit (1) unaligned, /* ON => has been printed by read_mail */ 8 24 4 pad bit (33) unaligned, 8 25 3 n_bytes fixed binary (21), /* # of bytes of encoded information */ 8 26 2 data aligned, /* insures that the following is word aligned */ 8 27 3 bytes (fips98_message_n_bytes refer (fips98_message.n_bytes)) bit (9) unaligned; 8 28 8 29 dcl FIPS98_MESSAGE_VERSION_1 character (8) static options (constant) initial ("fips98_1"); 8 30 8 31 dcl fips98_message_ptr pointer; 8 32 8 33 dcl fips98_message_n_bytes fixed binary (21); 8 34 8 35 /* END INCLUDE FILE ... mlsys_fips98_message.incl.pl1 */ 2479 2480 9 1 /* BEGIN Mailbox Message Include File (mail_format.incl.pl1) */ 9 2 9 3 9 4 /****^ HISTORY COMMENTS: 9 5* 1) change(86-01-09,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. 9 8* 2) change(86-06-02,Herbst), approve(86-06-02,MCR7367), audit(86-06-30,Wong), 9 9* install(86-06-30,MR12.0-1080): 9 10* Updated to version 4 for seen switch. 9 11* END HISTORY COMMENTS */ 9 12 9 13 /* Last modified by K. T. Pogran, 3/6/75 */ 9 14 /* Modified by D. M. Wells, August 10, 1977 for v4 message segments. */ 9 15 /* Modified: 3 June 1981 by G. Palter for mail system subroutine interface */ 9 16 9 17 declare mail_format_ptr pointer aligned; 9 18 9 19 declare MAIL_FORMAT_VERSION_4 initial (4) 9 20 fixed bin internal static options (constant); 9 21 9 22 declare text_length fixed bin (21); 9 23 9 24 declare 1 mail_format aligned based (mail_format_ptr), 9 25 2 header, 9 26 3 version fixed bin (17), 9 27 3 sent_from char (32) aligned, 9 28 3 lines fixed bin (17), 9 29 3 text_len fixed bin (21), 9 30 3 switches aligned, 9 31 4 wakeup bit (1) unaligned, 9 32 4 urgent bit (1) unaligned, 9 33 4 notify bit (1) unaligned, 9 34 4 acknowledge bit (1) unaligned, 9 35 4 obsolete bit (1) unaligned, 9 36 4 canonical bit (1) unaligned, 9 37 4 seen bit (1) unaligned, 9 38 4 others bit (65) unaligned, 9 39 2 text char(text_length refer (mail_format.header.text_len)) aligned; 9 40 9 41 /* END Mailbox Message Include File (mail_format.incl.pl1) */ 2481 2482 10 1 /* BEGIN INCLUDE FILE . . . mseg_return_args.incl.pl1 */ 10 2 10 3 10 4 /* structure returned when message is read from a message segment */ 10 5 10 6 10 7 dcl ms_arg_ptr ptr; 10 8 10 9 dcl 1 mseg_return_args based (ms_arg_ptr) aligned, 10 10 2 ms_ptr ptr, /* pointer to message */ 10 11 2 ms_len fixed bin (24), /* length of message in bits */ 10 12 2 sender_id char (32) unaligned, /* process-group ID of sender */ 10 13 2 level fixed bin, /* validation level of sender */ 10 14 2 ms_id bit (72), /* unique ID of message */ 10 15 2 sender_authorization bit (72), /* access authorization of message sender */ 10 16 2 access_class bit (72); /* message access class */ 10 17 10 18 10 19 /* END INCLUDE FILE . . . mseg_return_args.incl.pl1 */ 2483 2484 11 1 /* BEGIN INCLUDE FILE ... mlsys_message.incl.pl1 */ 11 2 11 3 11 4 /****^ HISTORY COMMENTS: 11 5* 1) change(85-12-19,Herbst), approve(86-03-25,MCR7367), 11 6* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 11 7* Added seen switch to message. 11 8* END HISTORY COMMENTS */ 11 9 11 10 11 11 /* Created: June 1983 by G. Palter */ 11 12 11 13 /* Definition of a message as used by the Multics Mail System */ 11 14 11 15 dcl 1 message aligned based (message_ptr), 11 16 2 version character (8) unaligned, 11 17 2 reserved bit (144), /* for exclusive use of the mail system */ 11 18 2 n_reply_references fixed binary, /* # of messages for which this is a reply */ 11 19 2 n_user_fields fixed binary, /* # of non-standard header fields in this message */ 11 20 2 n_redistributions fixed binary, /* # of times this message has been forwarded */ 11 21 2 n_body_sections fixed binary, /* # of sections in the body */ 11 22 2 flags, 11 23 3 interactive bit (1) unaligned, /* ON => this is an interactive message */ 11 24 3 can_be_deleted bit (1) unaligned, /* ON => the user can delete this message if desired */ 11 25 3 marked_for_deletion bit (1) unaligned, /* ON => message will be deleted when mailbox is closed */ 11 26 3 must_be_acknowledged bit (1) unaligned, /* ON => an ACK should be generated when message is read */ 11 27 3 seen bit (1) unaligned, /* ON => user has printed message at least once */ 11 28 3 reserved bit (31) unaligned, /* for use by the mail system */ 11 29 2 pad bit (36), 11 30 2 envelope like message_envelope, /* who/when/how the message was mailed & delivered */ 11 31 2 header, 11 32 3 message_id bit (72), /* ID of this message (same value for all copies) */ 11 33 3 access_class bit (72), /* AIM access class of this message */ 11 34 3 date_time_created fixed binary (71), /* date/time this message was composed */ 11 35 3 from pointer, /* -> address list of author(s) of the message */ 11 36 3 reply_to pointer, /* -> address list of recipients for reply (if not authors) */ 11 37 3 to pointer, /* -> address list of primary recipients */ 11 38 3 cc pointer, /* -> address list of secondary recipients */ 11 39 3 bcc pointer, /* -> address list of blind recipients */ 11 40 3 subject like message_text_field, /* subject of the message */ 11 41 3 reply_references pointer, /* -> list of messages for which this message is a reply */ 11 42 3 user_fields_list pointer, /* -> list of user-defined fields in this message */ 11 43 2 redistributions_list pointer, /* -> redistributions list for this message */ 11 44 2 body, 11 45 3 total_lines fixed binary (21), /* total # of lines in the body or -1 if indeterminate */ 11 46 3 pad bit (36), 11 47 3 body_sections (message_n_body_sections refer (message.n_body_sections)) like message_body_section; 11 48 11 49 dcl MESSAGE_VERSION_2 character (8) static options (constant) initial ("mlsmsg02"); 11 50 11 51 dcl message_subject character (message.header.subject.text_lth) unaligned based (message.header.subject.text_ptr); 11 52 11 53 dcl message_ptr pointer; 11 54 11 55 dcl (message_n_body_sections, message_trace_n_relays, message_n_redistributions, message_n_user_fields, 11 56 message_references_list_n_references) 11 57 fixed binary; /* for exclusive use of the mail system */ 11 58 11 59 /* Definition of a message envelope: describes when, by whom, and by what route the message was mailed */ 11 60 11 61 dcl 1 message_envelope aligned based (message_envelope_ptr), 11 62 2 date_time_mailed fixed binary (71), /* date/time this message was entered into the mail system */ 11 63 2 sender pointer, /* -> address of entity that mailed the message */ 11 64 2 trace pointer, /* -> message_trace describing how it got here */ 11 65 2 date_time_delivered fixed binary (71), /* date/time this message was delivered */ 11 66 2 delivered_by pointer, /* -> address of entity that delivered the message */ 11 67 2 acknowledge_to pointer; /* -> address of entity to receive ACK when message is read */ 11 68 11 69 dcl message_envelope_ptr pointer; 11 70 11 71 11 72 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate the message envelope */ 11 73 11 74 dcl 1 message_envelope_parameter aligned based (message_envelope_parameter_ptr), 11 75 2 pad pointer, /* forces even word alignment */ 11 76 2 version character (8) unaligned, 11 77 2 envelope like message_envelope; 11 78 11 79 dcl MESSAGE_ENVELOPE_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsenv02"); 11 80 11 81 dcl message_envelope_parameter_ptr pointer; 11 82 11 83 11 84 /* Definition of a message trace: describes the route and each relay operation by which a message was passed through the 11 85* networks to reach this recipient */ 11 86 11 87 dcl 1 message_trace aligned based (message_trace_ptr), 11 88 2 version character (8) unaligned, 11 89 2 reserved bit (144), /* ... exclusively for use by the mail system */ 11 90 2 implicit_route pointer, /* -> an address_route which defines the route it took */ 11 91 2 pad bit (36), 11 92 2 n_relays fixed binary, /* # of relay operations required to reach this site */ 11 93 2 relays (message_trace_n_relays refer (message_trace.n_relays)), 11 94 3 date_time_relayed fixed binary (71), /* ... when this relay operation took place */ 11 95 3 sending_host character (256) varying, /* ... the host which relayed the message */ 11 96 3 receiving_host character (256) varying, /* ... the host which received it */ 11 97 3 communications_media character (32) unaligned, /* ... medium over which relay took place (ARPA, Tymnet) */ 11 98 3 communications_protocol character (32) unaligned,/* ... low-level protocol used (TCP, X.25) */ 11 99 3 mail_protocol character (32) unaligned, /* ... mailer protocol used (SMTP, NBS) */ 11 100 3 relay_id bit (72), /* ... unique ID assigned by receiving system or ""b */ 11 101 3 relay_recipient pointer; /* ... -> address of recipient as given by sending system */ 11 102 11 103 dcl MESSAGE_TRACE_VERSION_2 character (8) static options (constant) initial ("mlstrc02"); 11 104 11 105 dcl message_trace_ptr pointer; 11 106 11 107 /* Definition of a message's redistributions list */ 11 108 11 109 dcl 1 message_redistributions_list aligned based (message.redistributions_list), 11 110 2 version character (8) unaligned, 11 111 2 reserved bit (144), /* ... exclusively for use by the mail system */ 11 112 2 pad bit (36), 11 113 2 n_redistributions fixed binary, /* # of redistributions */ 11 114 2 redistributions (message_n_redistributions refer (message_redistributions_list.n_redistributions)) 11 115 like message_redistribution; /* the redistributions: oldest first */ 11 116 11 117 dcl MESSAGE_REDISTRIBUTIONS_LIST_VERSION_2 character (8) static options (constant) initial ("mlsrl002"); 11 118 11 119 11 120 /* Definition of a single redistribution (forwarding) of a message */ 11 121 11 122 dcl 1 message_redistribution aligned based (message_redistribution_ptr), 11 123 2 envelope like message_envelope, 11 124 2 header, 11 125 3 message_id bit (72), /* ID of this redistribution (same for all copies) */ 11 126 3 date_time_created fixed binary (71), /* date/time when this redistribution was made */ 11 127 3 from pointer, /* -> address list of authors of this redistribution */ 11 128 3 to pointer, /* -> address list of recipients of the redistribution */ 11 129 3 comment like message_text_field; /* optional comment associated with the redistribution */ 11 130 11 131 dcl message_redistribution_comment character (message_redistribution.comment.text_lth) unaligned 11 132 based (message_redistribution.comment.text_ptr); 11 133 11 134 dcl message_redistribution_ptr pointer; 11 135 11 136 11 137 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate the redistributions of a message */ 11 138 11 139 dcl 1 message_redistribution_parameter aligned based (message_redistribution_parameter_ptr), 11 140 2 pad pointer, /* forces even word alignment */ 11 141 2 version character (8) unaligned, 11 142 2 redistribution like message_redistribution; 11 143 11 144 dcl MESSAGE_REDISTRIBUTION_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsdist2"); 11 145 11 146 dcl message_redistribution_parameter_ptr pointer; 11 147 11 148 /* Definition of the list of user-defined fields in a message */ 11 149 11 150 dcl 1 message_user_fields_list aligned based (message.user_fields_list), 11 151 2 version character (8) unaligned, 11 152 2 reserved bit (144), /* ... exclusively for use by the mail system */ 11 153 2 pad bit (36), 11 154 2 n_user_fields fixed binary, /* # of user-defined fields in the message */ 11 155 2 user_fields (message_n_user_fields refer (message_user_fields_list.n_user_fields)) 11 156 like message_user_field; /* the actual user-defined fields */ 11 157 11 158 dcl MESSAGE_USER_FIELDS_LIST_VERSION_2 character (8) static options (constant) initial ("mlsufl02"); 11 159 11 160 11 161 /* Definition of a user defined message header field */ 11 162 11 163 dcl 1 message_user_field aligned based (message_user_field_ptr), 11 164 2 header, 11 165 3 field_id bit (36) aligned, /* identifies the purpose of this field */ 11 166 3 field_type fixed binary, /* type of data contained in this field */ 11 167 2 field_type_variable bit (144); /* the actual data (see below) */ 11 168 11 169 dcl message_user_field_ptr pointer; 11 170 11 171 11 172 /* Defined types of user defined fields */ 11 173 11 174 dcl (MESSAGE_TEXT_USER_FIELD initial (1), /* content of the field is a text string */ 11 175 MESSAGE_ADDRESS_LIST_USER_FIELD initial (2), /* content of the field is an address list */ 11 176 MESSAGE_DATE_USER_FIELD initial (3), /* content of the field is a date/time */ 11 177 MESSAGE_INTEGER_USER_FIELD initial (4)) /* content of the filed is a fixed binary value */ 11 178 fixed binary static options (constant); 11 179 11 180 11 181 /* Structures used to access the data for the different types of user defined fields */ 11 182 11 183 dcl 1 message_text_user_field aligned based (message_user_field_ptr), 11 184 2 header like message_user_field.header, 11 185 2 text like message_text_field; /* the message text */ 11 186 11 187 dcl message_text_user_field_text character (message_text_user_field.text.text_lth) unaligned 11 188 based (message_text_user_field.text.text_ptr); 11 189 11 190 dcl 1 message_address_list_user_field aligned based (message_user_field_ptr), 11 191 2 header like message_user_field.header, 11 192 2 address_list_ptr pointer, /* -> the address list */ 11 193 2 pad bit (72); 11 194 11 195 dcl 1 message_date_user_field aligned based (message_user_field_ptr), 11 196 2 header like message_user_field.header, 11 197 2 date_time fixed binary (71), /* the clock reading */ 11 198 2 pad bit (72); 11 199 11 200 dcl 1 message_integer_user_field aligned based (message_user_field_ptr), 11 201 2 header like message_user_field.header, 11 202 2 value fixed binary (35), /* the integer value */ 11 203 2 pad bit (108); 11 204 11 205 11 206 /* Structure used in calls to mail_system_ entrypoints which manipulate the user-defined fields of a message */ 11 207 11 208 dcl 1 message_user_field_parameter aligned based (message_user_field_parameter_ptr), 11 209 2 pad pointer, /* forces even word alignment */ 11 210 2 version character (8) unaligned, 11 211 2 user_field like message_user_field; 11 212 11 213 dcl MESSAGE_USER_FIELD_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsudf02"); 11 214 11 215 dcl message_user_field_parameter_ptr pointer; 11 216 11 217 /* Definition of a list of message references used as the value of message header fields (eg: In-Reply-To) */ 11 218 11 219 dcl 1 message_references_list aligned based (message_references_list_ptr), 11 220 2 version character (8) unaligned, 11 221 2 reserved bit (144), /* ... exclusively for use by the mail system */ 11 222 2 pad bit (36), 11 223 2 n_references fixed binary, /* # of references in this list */ 11 224 2 references (message_references_list_n_references refer (message_references_list.n_references)) 11 225 like message_reference; /* the references themselves */ 11 226 11 227 dcl MESSAGE_REFERENCES_LIST_VERSION_2 character (8) static options (constant) initial ("mlsref02"); 11 228 11 229 dcl message_references_list_ptr pointer; 11 230 11 231 11 232 /* Definition of a reference to another message */ 11 233 11 234 dcl 1 message_reference aligned based (message_reference_ptr), 11 235 2 message_id bit (72), /* ID of the other message */ 11 236 2 date_time_created fixed binary (71), /* date/time the other message was created */ 11 237 2 from pointer, /* -> address list of authors of the other message */ 11 238 2 subject like message_text_field; /* subject of the other message */ 11 239 11 240 dcl message_reference_subject character (message_reference.subject.text_lth) unaligned 11 241 based (message_reference.subject.text_ptr); 11 242 11 243 dcl message_reference_ptr pointer; 11 244 11 245 11 246 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate message references */ 11 247 11 248 dcl 1 message_reference_parameter aligned based (message_reference_parameter_ptr), 11 249 2 pad pointer, /* forces even word alignment */ 11 250 2 version character (8) unaligned, 11 251 2 reference like message_reference; 11 252 11 253 dcl MESSAGE_REFERENCE_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsref02"); 11 254 11 255 dcl message_reference_parameter_ptr pointer; 11 256 11 257 11 258 /* Definition of a text field in a message (Subject, Comment, or a user defined field) */ 11 259 11 260 dcl 1 message_text_field aligned based (message_text_field_ptr), 11 261 2 text_ptr pointer, /* -> the actual text */ 11 262 2 text_lth fixed binary (21), /* length of said text */ 11 263 2 flags, 11 264 3 multiline_text bit (1) unaligned, /* ON => the text of this field may span multiple lines; 11 265* OFF => the text will always be a single line */ 11 266 3 reserved bit (35) unaligned; /* for exclusive use of the mail system */ 11 267 11 268 dcl message_text_field_text character (message_text_field.text_lth) unaligned based (message_text_field.text_ptr); 11 269 11 270 dcl message_text_field_ptr pointer; 11 271 11 272 /* Definition of a section of the body of a message */ 11 273 11 274 dcl 1 message_body_section aligned based (message_body_section_ptr), 11 275 2 header, 11 276 3 section_type fixed binary, /* type of "text" stored in this section */ 11 277 3 section_n_lines fixed binary (21), /* # of lines in this section or -1 if indeterminate */ 11 278 2 section_type_variable bit (144); /* the actual data (see below) */ 11 279 11 280 dcl message_body_section_ptr pointer; 11 281 11 282 11 283 /* Defined types of message body sections */ 11 284 11 285 dcl (MESSAGE_PREFORMATTED_BODY_SECTION initial (1), /* text formatted by the authors/sender */ 11 286 MESSAGE_BIT_STRING_BODY_SECTION initial (2)) /* arbitrary bit string */ 11 287 fixed binary static options (constant); 11 288 11 289 11 290 /* Structures used to access the data for the different types of message body sections */ 11 291 11 292 dcl 1 message_preformatted_body_section aligned based (message_body_section_ptr), 11 293 2 header like message_body_section.header, 11 294 2 text_ptr pointer, /* -> the text */ 11 295 2 text_lth fixed binary (21), /* length of said text in characters */ 11 296 2 reserved bit (36); /* for exclusive use of the mail system */ 11 297 11 298 dcl message_preformatted_body_section_text character (message_preformatted_body_section.text_lth) unaligned 11 299 based (message_preformatted_body_section.text_ptr); 11 300 11 301 dcl 1 message_bit_string_body_section aligned based (message_body_section_ptr), 11 302 2 header like message_body_section.header, 11 303 2 bit_string_ptr pointer, /* -> the bit string */ 11 304 2 bit_string_lth fixed binary (24), /* length of said bit string in bits (obviously) */ 11 305 2 reserved bit (36); /* for exclusive use of the mail system */ 11 306 11 307 dcl message_bit_string_body_section_bit_string bit (message_bit_string_body_section.bit_string_lth) unaligned 11 308 based (message_bit_string_body_section.bit_string_ptr); 11 309 11 310 11 311 /* Structure used in calls to mail_system_ entrypoints which manipulate the sections of a message's body */ 11 312 11 313 dcl 1 message_body_section_parameter aligned based (message_body_section_parameter_ptr), 11 314 2 pad pointer, /* forces even word alignment */ 11 315 2 version character (8) unaligned, 11 316 2 section like message_body_section; 11 317 11 318 dcl MESSAGE_BODY_SECTION_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsmbs02"); 11 319 11 320 dcl message_body_section_parameter_ptr pointer; 11 321 11 322 /* END INCLUDE FILE ... mlsys_message.incl.pl1 */ 2485 2486 12 1 /* BEGIN INCLUDE FILE ... mlsys_address_list.incl.pl1 */ 12 2 /* Created: June 1983 by G. Palter */ 12 3 12 4 /* Definition of an address list -- a collection of addresses used as the value of certain message fields, etc. */ 12 5 12 6 dcl 1 address_list aligned based (address_list_ptr), 12 7 2 version character (8) unaligned, 12 8 2 reserved bit (144), /* ... exclusively for use by the mail system */ 12 9 2 n_addresses fixed binary, /* # of address in this list */ 12 10 2 addresses (address_list_n_addresses refer (address_list.n_addresses)) pointer; 12 11 12 12 dcl ADDRESS_LIST_VERSION_2 character (8) static options (constant) initial ("mlsals02"); 12 13 12 14 dcl address_list_ptr pointer; 12 15 12 16 dcl address_list_n_addresses fixed binary; /* reserved exclusively for use by the mail system */ 12 17 12 18 /* END INCLUDE FILE ... mlsys_address_list.incl.pl1 */ 2487 2488 13 1 /* BEGIN INCLUDE FILE ... mlsys_address_types.incl.pl1 */ 13 2 /* Created: June 1983 by G. Palter */ 13 3 13 4 /* Types of addresses supported by the Multics Mail System */ 13 5 13 6 dcl (INVALID_ADDRESS initial (0), /* a syntactically invalid address: used as a place holder 13 7* when parsing printed representations */ 13 8 USER_MAILBOX_ADDRESS initial (1), /* identifies a user's default mailbox */ 13 9 LOGBOX_ADDRESS initial (2), /* identifies a user's logbox */ 13 10 SAVEBOX_ADDRESS initial (3), /* identifies one of a user's saveboxes by pathname */ 13 11 MAILBOX_ADDRESS initial (4), /* identifies some other mailbox by pathname */ 13 12 FORUM_ADDRESS initial (5), /* identifies a forum meeting by pathname */ 13 13 FOREIGN_ADDRESS initial (6), /* identifies a user (or group) on another compute system */ 13 14 MAIL_TABLE_ADDRESS initial (7), /* identifies an entry in the system's mail table */ 13 15 MAILING_LIST_ADDRESS initial (8), /* identifies a mailing list by pathname */ 13 16 NAMED_GROUP_ADDRESS initial (9)) /* identifies a named group of addresses */ 13 17 fixed binary static options (constant); 13 18 13 19 /* END INCLUDE FILE ... mlsys_address_types.incl.pl1 */ 2489 2490 14 1 /* BEGIN INCLUDE FILE aim_template.incl.pl1 */ 14 2 14 3 /* Created 740723 by PG */ 14 4 /* Modified 06/28/78 by C. D. Tavares to add rcp privilege */ 14 5 /* Modified 83-05-10 by E. N. Kitltitz to add communications privilege */ 14 6 14 7 /* This structure defines the components of both an access 14 8* class and an access authorization as interpreted by the 14 9* Access Isolation Mechanism. */ 14 10 14 11 14 12 dcl 1 aim_template aligned based, /* authorization/access class template */ 14 13 2 categories bit (36), /* access categories */ 14 14 2 level fixed bin (17) unaligned, /* sensitivity level */ 14 15 2 privileges unaligned, /* special access privileges (in authorization only) */ 14 16 (3 ipc, /* interprocess communication privilege */ 14 17 3 dir, /* directory privilege */ 14 18 3 seg, /* segment privilege */ 14 19 3 soos, /* security out-of-service privilege */ 14 20 3 ring1, /* ring 1 access privilege */ 14 21 3 rcp, /* RCP resource access privilege */ 14 22 3 comm) bit (1), /* communications cross-AIM privilege */ 14 23 3 pad bit (11); 14 24 14 25 14 26 /* END INCLUDE FILE aim_template.incl.pl1 */ 2491 2492 15 1 /* BEGIN INCLUDE FILE area_info.incl.pl1 12/75 */ 15 2 15 3 dcl area_info_version_1 fixed bin static init (1) options (constant); 15 4 15 5 dcl area_infop ptr; 15 6 15 7 dcl 1 area_info aligned based (area_infop), 15 8 2 version fixed bin, /* version number for this structure is 1 */ 15 9 2 control aligned like area_control, /* control bits for the area */ 15 10 2 owner char (32) unal, /* creator of the area */ 15 11 2 n_components fixed bin, /* number of components in the area (returned only) */ 15 12 2 size fixed bin (18), /* size of the area in words */ 15 13 2 version_of_area fixed bin, /* version of area (returned only) */ 15 14 2 areap ptr, /* pointer to the area (first component on multisegment area) */ 15 15 2 allocated_blocks fixed bin, /* number of blocks allocated */ 15 16 2 free_blocks fixed bin, /* number of free blocks not in virgin */ 15 17 2 allocated_words fixed bin (30), /* number of words allocated in the area */ 15 18 2 free_words fixed bin (30); /* number of words free in area not in virgin */ 15 19 15 20 dcl 1 area_control aligned based, 15 21 2 extend bit (1) unal, /* says area is extensible */ 15 22 2 zero_on_alloc bit (1) unal, /* says block gets zerod at allocation time */ 15 23 2 zero_on_free bit (1) unal, /* says block gets zerod at free time */ 15 24 2 dont_free bit (1) unal, /* debugging aid, turns off free requests */ 15 25 2 no_freeing bit (1) unal, /* for allocation method without freeing */ 15 26 2 system bit (1) unal, /* says area is managed by system */ 15 27 2 pad bit (30) unal; 15 28 15 29 /* END INCLUDE FILE area_info.incl.pl1 */ 2493 2494 16 1 /* BEGIN INCLUDE FILE ... rdm_switch_types.incl.pl1 */ 16 2 16 3 16 4 /****^ HISTORY COMMENTS: 16 5* 1) change(86-03-25,Herbst), approve(86-03-25,MCR7367), 16 6* audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059): 16 7* New file. 16 8* END HISTORY COMMENTS */ 16 9 16 10 /* Constants for telling rdm_mailbox_interface_$set_message_switch which switch to set */ 16 11 16 12 dcl PER_MESSAGE_SEEN_SWITCH_TYPE char (4) aligned int static options (constant) init ("SEEN"); 16 13 16 14 /* END INCLUDE FILE ... rdm_switch_types.incl.pl1 */ 2495 2496 17 1 /* BEGIN INCLUDE FILE sub_err_flags.incl.pl1 BIM 11/81 */ 17 2 /* format: style3 */ 17 3 17 4 /* These constants are to be used for the flags argument of sub_err_ */ 17 5 /* They are just "string (condition_info_header.action_flags)" */ 17 6 17 7 declare ( 17 8 ACTION_CAN_RESTART init (""b), 17 9 ACTION_CANT_RESTART init ("1"b), 17 10 ACTION_DEFAULT_RESTART 17 11 init ("01"b), 17 12 ACTION_QUIET_RESTART 17 13 init ("001"b), 17 14 ACTION_SUPPORT_SIGNAL 17 15 init ("0001"b) 17 16 ) bit (36) aligned internal static options (constant); 17 17 17 18 /* End include file */ 2497 2498 2499 end mlsys_mailbox_mgr_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/02/89 0815.0 mlsys_mailbox_mgr_.pl1 >spec>install>1079>mlsys_mailbox_mgr_.pl1 2465 1 10/27/83 2104.2 mlsys_copy_ptr.incl.pl1 >ldd>include>mlsys_copy_ptr.incl.pl1 2467 2 10/27/83 2104.2 mlsys_mailbox.incl.pl1 >ldd>include>mlsys_mailbox.incl.pl1 2469 3 10/27/83 2104.2 mlsys_mailbox_modes.incl.pl1 >ldd>include>mlsys_mailbox_modes.incl.pl1 2471 4 10/27/83 2104.2 mlsys_open_options.incl.pl1 >ldd>include>mlsys_open_options.incl.pl1 2473 5 10/27/83 2104.2 mlsys_close_options.incl.pl1 >ldd>include>mlsys_close_options.incl.pl1 2475 6 10/27/83 2104.2 mlsys_delete_error_info.incl.pl1 >ldd>include>mlsys_delete_error_info.incl.pl1 2477 7 06/30/86 2023.8 mlsys_internal_data.incl.pl1 >ldd>include>mlsys_internal_data.incl.pl1 2479 8 05/22/86 1225.8 mlsys_fips98_message.incl.pl1 >ldd>include>mlsys_fips98_message.incl.pl1 2481 9 06/30/86 2023.8 mail_format.incl.pl1 >ldd>include>mail_format.incl.pl1 2483 10 05/17/82 1411.5 mseg_return_args.incl.pl1 >ldd>include>mseg_return_args.incl.pl1 2485 11 05/22/86 1225.8 mlsys_message.incl.pl1 >ldd>include>mlsys_message.incl.pl1 2487 12 10/27/83 2104.2 mlsys_address_list.incl.pl1 >ldd>include>mlsys_address_list.incl.pl1 2489 13 10/27/83 2104.2 mlsys_address_types.incl.pl1 >ldd>include>mlsys_address_types.incl.pl1 2491 14 09/07/83 1610.6 aim_template.incl.pl1 >ldd>include>aim_template.incl.pl1 2493 15 06/11/76 1043.4 area_info.incl.pl1 >ldd>include>area_info.incl.pl1 2495 16 05/22/86 1225.8 rdm_switch_types.incl.pl1 >ldd>include>rdm_switch_types.incl.pl1 2497 17 04/16/82 0958.1 sub_err_flags.incl.pl1 >ldd>include>sub_err_flags.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 013540 constant fixed bin(17,0) initial dcl 4-30 ref 471 518 ACTION_CANT_RESTART 000220 constant bit(36) initial dcl 17-7 set ref 1229* ADDRESS_LIST_VERSION_2 000152 constant char(8) initial packed unaligned dcl 12-12 set ref 2228* ALL_MESSAGES constant fixed bin(17,0) initial dcl 4-17 ref 471 520 534 593 760 ALPHABET 000100 automatic char(256) initial packed unaligned dcl 1129 set ref 1129* 1133 BS constant char(1) initial packed unaligned dcl 1131 ref 1134 CLOSE_OPTIONS_VERSION_2 000164 constant char(8) initial packed unaligned dcl 5-13 ref 1053 DELETE_ERROR_INFO_VERSION_1 000162 constant char(8) initial packed unaligned dcl 6-14 ref 1224 DELETION_PREFIX 000133 constant varying char(48) initial dcl 1637 set ref 1651 1716* ET_AL 000032 constant varying char(48) initial dcl 1637 set ref 1666 1729* FIPS98_FORMAT_MESSAGE constant fixed bin(17,0) initial dcl 240 ref 1401 1455 1877 2012 2156 2204 2337 FIPS98_MESSAGE_VERSION_1 000160 constant char(8) initial packed unaligned dcl 8-29 ref 1876 FORWARDED_SUFFIX 000015 constant varying char(48) initial dcl 1637 set ref 1669 1732* FROM 000047 constant varying char(48) initial dcl 1637 set ref 1658 1727* INTERACTIVE_MESSAGES constant fixed bin(17,0) initial dcl 4-23 ref 132 132 438 471 496 502 502 502 502 516 521 525 534 542 571 573 579 579 581 582 582 582 640 644 645 653 708 720 748 812 814 857 857 866 870 908 915 953 972 979 1156 1214 1214 1215 1219 1257 1276 1276 1279 1295 1295 1304 1305 1307 1327 1342 1342 1364 1370 1370 1433 1878 1886 1936 1936 1944 1944 1948 1962 2007 2025 2046 2071 2071 2071 2071 2076 2077 2078 2100 2114 2117 2121 2199 2271 2310 2320 2324 2331 2381 2397 2408 2448 LOGBOX_ADDRESS constant fixed bin(17,0) initial dcl 13-6 ref 1564 1584 MAILBOX_ADDRESS constant fixed bin(17,0) initial dcl 13-6 ref 1564 1584 MAILBOX_VERSION_2 000170 constant char(8) initial packed unaligned dcl 2-28 ref 459 625 795 1819 MAIL_FORMAT_MESSAGE constant fixed bin(17,0) initial dcl 240 ref 998 1023 1403 1457 1885 1999 2014 2139 2172 2206 2339 MAIL_FORMAT_VERSION_2 constant fixed bin(17,0) initial dcl 284 ref 1883 MAIL_FORMAT_VERSION_3 constant fixed bin(17,0) initial dcl 285 ref 1883 MAIL_FORMAT_VERSION_4 constant fixed bin(17,0) initial dcl 9-19 ref 1744 1883 MAIL_SYSTEM_ 000172 constant char(32) initial packed unaligned dcl 278 set ref 1229* 2106 MAIL_TABLE_ADDRESS constant fixed bin(17,0) initial dcl 13-6 ref 1557 MESSAGE_BIT_STRING_BODY_SECTION constant fixed bin(17,0) initial dcl 11-285 ref 2165 2192 MESSAGE_BODY_SECTION_PARAMETER_VERSION_2 000154 constant char(8) initial packed unaligned dcl 11-318 ref 2163 2179 2190 MESSAGE_PREFORMATTED_BODY_SECTION constant fixed bin(17,0) initial dcl 11-285 ref 1683 2181 MESSAGE_VERSION_2 000156 constant char(8) initial packed unaligned dcl 11-49 set ref 2158* 2174* 2221* NL constant char(1) initial packed unaligned dcl 281 ref 1688 NOT_OWN_MESSAGES constant fixed bin(17,0) initial dcl 4-30 ref 471 534 601 768 NUL constant char(1) initial packed unaligned dcl 280 ref 2141 OPEN_OPTIONS_VERSION_2 000166 constant char(8) initial packed unaligned dcl 4-12 ref 466 ORDINARY_MESSAGES constant fixed bin(17,0) initial dcl 4-23 ref 132 132 437 496 502 502 502 502 516 521 525 534 542 571 573 579 579 579 579 581 582 582 582 607 607 640 643 643 644 645 653 708 720 748 812 814 857 857 857 857 857 857 865 865 866 869 908 915 953 972 979 1156 1214 1214 1215 1219 1257 1276 1276 1276 1276 1279 1292 1292 1295 1295 1303 1303 1304 1305 1307 1327 1342 1342 1364 1370 1370 1433 1880 1888 1893 1936 1936 1944 1944 1948 1962 2007 2025 2046 2071 2071 2071 2071 2076 2077 2078 2100 2114 2117 2121 2271 2310 2320 2324 2331 2381 2397 2408 2448 OWN_MESSAGES constant fixed bin(17,0) initial dcl 4-30 ref 524 542 PER_MESSAGE_SEEN_SWITCH_TYPE 000150 constant char(4) initial dcl 16-12 ref 1400 1416 P_close_options_ptr parameter pointer dcl 116 ref 1042 1046 P_code parameter fixed bin(35,0) dcl 68 set ref 365 370* 371 450* 456 460* 467* 477* 482* 483 679* 689* 696 702* 709* 716* 722* 727* 874* 876* 886* 896 902* 909* 927* 932* 940* 947 950* 954* 961 966* 973* 991* 1011* 1018 1021* 1035* 1042 1049* 1054* 1059* 1068* 1080* 1082* 1092 1098* 1107* 1109* 1111* 1245 1251* 1259* 1262* 1318 1321* 1328* 1334* 1349* 1355 1358* 1365* 1377* 1383 1387* 1388* 1393* 1407* 1418* 1424 1427* 1434* 1440* 1445* 1468* P_include_by_type parameter bit(1) dcl 78 ref 365 402 P_mailbox_dirname parameter char packed unaligned dcl 70 ref 365 369 456 481 P_mailbox_ename parameter char packed unaligned dcl 71 set ref 365 370* 456 482* P_mailbox_ptr parameter pointer dcl 72 set ref 456 677* 696 699* 872* 896 899* 961 964* 1042 1045* 1078* 1092 1095* 1245 1248* P_mailbox_version parameter char(8) packed unaligned dcl 87 ref 456 459 P_message_canonical_form_lth parameter fixed bin(21,0) dcl 106 set ref 947 961 1003* P_message_canonical_form_ptr parameter pointer dcl 105 set ref 947 961 1002* P_message_idx parameter fixed bin(17,0) dcl 100 ref 896 922 961 986 P_message_mf_extension_ptr parameter pointer dcl 112 set ref 1018 1026* P_message_mf_ptr parameter pointer dcl 111 set ref 1018 1025* P_message_ptr parameter pointer dcl 73 set ref 947 950* 1018 1021* 1318 1321* 1323* 1355 1358* 1360* 1383 1388* 1390* 1424 1427* 1429* P_n_interactive_messages parameter fixed bin(17,0) dcl 81 set ref 365 406* 438* P_n_messages parameter fixed bin(17,0) dcl 79 set ref 365 400* P_n_new_interactive_messages parameter fixed bin(17,0) dcl 95 set ref 696 870* P_n_new_messages parameter fixed bin(17,0) dcl 93 set ref 696 868* P_n_new_ordinary_messages parameter fixed bin(17,0) dcl 94 set ref 696 869* P_n_ordinary_messages parameter fixed bin(17,0) dcl 80 set ref 365 406* 437* P_open_options_ptr parameter pointer dcl 86 ref 456 464 P_string parameter char packed unaligned dcl 1121 set ref 1119 1133* 1133 1134 1136 1136 1136 1136 1139 P_string_len parameter fixed bin(21,0) dcl 1122 set ref 1119 1123 1136* P_switch_type parameter char(4) dcl 120 ref 1383 1397 P_switch_value parameter bit(1) dcl 121 ref 1383 1398 READING_PREFIX 000116 constant varying char(48) initial dcl 1637 set ref 1653 1718* READ_KEYS constant fixed bin(17,0) initial dcl 4-38 ref 471 663 842 READ_MESSAGES constant fixed bin(17,0) initial dcl 4-38 ref 471 R_MBX_ACCESS constant bit(36) initial dcl 3-6 ref 417 417 SAVEBOX_ADDRESS constant fixed bin(17,0) initial dcl 13-6 ref 1564 1584 SUBJECT_PREFIX 000000 constant varying char(48) initial dcl 1637 set ref 1695 1736* THE_MESSAGE 000064 constant varying char(48) initial dcl 1637 set ref 1658 1722* UNKNOWN_FORMAT_MESSAGE constant fixed bin(17,0) initial dcl 240 ref 1892 USER_MAILBOX_ADDRESS constant fixed bin(17,0) initial dcl 13-6 ref 1564 1579 1584 YOUR_MESSAGE 000101 constant varying char(48) initial dcl 1637 set ref 1655 1720* access_class 34 based bit(72) level 3 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 2007* 2019* 2202 2331* 2344* access_class 32 based bit(72) level 3 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" set ref 2202* ack_message 000100 automatic structure level 1 dcl 1702 set ref 1774 1774 1774 acknowledge 2(01) based bit(1) level 4 in structure "fips98_message" packed packed unaligned dcl 8-17 in procedure "mlsys_mailbox_mgr_" set ref 1455* 2012 2337 acknowledge 13(03) based bit(1) level 4 in structure "mail_format" packed packed unaligned dcl 9-24 in procedure "mlsys_mailbox_mgr_" set ref 1457* 2014 2339 acknowledge_to 000100 automatic pointer dcl 1517 in procedure "determine_acknowledgement_recipient" set ref 1524* 1528* 1532 1539* 1554* 1558* 1560* 1561* 1588* acknowledge_to 26 based pointer level 3 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" set ref 1497 1497* 1528 2231* 2232* acknowledge_to 22 based pointer array level 4 in structure "message_redistributions_list" dcl 11-109 in procedure "mlsys_mailbox_mgr_" set ref 1501 1501* 1524 additional_info 4 based varying char(256) level 2 dcl 6-7 set ref 1227* addr builtin function dcl 360 ref 375 424 424 432 432 627 628 658 706 784 798 799 837 906 919 970 983 1002 1063 1102 1136 1136 1136 1136 1161 1255 1284 1672 1673 1673 1673 1673 1673 1686 1687 1774 1774 1925 1936 1936 1941 1941 1944 1944 1948 1948 1991 2056 2105 2107 2109 2109 2164 2166 2168 2168 2180 2182 2184 2184 2191 2195 2195 2329 2401 2435 2436 address_list based structure level 1 dcl 12-6 address_ptr 62 based pointer level 2 dcl 140 set ref 502* 560* 562* 564* 631 803 2378 2378* address_type 000105 automatic fixed bin(17,0) dcl 1519 set ref 1554* 1557 1561* 1564 1564 1564 1564 1579* 1584 1584 1584 1584 addresses 10 based pointer array level 2 dcl 12-6 set ref 1539* 1659 addwordno builtin function dcl 360 ref 1026 aim_check_$equal 000116 constant entry external dcl 304 ref 2007 2019 2331 2344 aim_template based structure level 1 dcl 14-12 already_deleted 10(03) based bit(1) level 3 packed packed unaligned dcl 218 set ref 920 984 1164 1179* 1286 always_add 0(02) 000101 automatic bit(1) level 2 packed packed unaligned dcl 1707 set ref 1773* an_author 000550 automatic pointer dcl 1626 set ref 1659* 1660* area 4 based area(1024) level 2 in structure "mailbox_message_area" dcl 184 in procedure "mlsys_mailbox_mgr_" set ref 595 762 1936 1936 1941 1941 1944 1944 1948 1948 1991 2105 2107 area 000252 stack reference condition dcl 358 in procedure "mlsys_mailbox_mgr_" ref 554 739 area_control based structure level 1 dcl 15-20 area_info based structure level 1 dcl 15-7 area_info_version_1 constant fixed bin(17,0) initial dcl 15-3 ref 2104 area_ptr 2 based pointer level 2 dcl 218 set ref 1991* 2438 areap 16 000670 automatic pointer level 2 dcl 2097 set ref 2105* author_is_ack_recipient 000246 automatic bit(1) dcl 276 set ref 1539* 1545* 1655 1669 1720 1726 1732 author_string 000447 automatic varying char(256) dcl 1625 set ref 1660* 1665 1728* baseno builtin function dcl 360 ref 1816 before builtin function dcl 360 ref 1909 1912 2141 binary builtin function dcl 360 ref 1816 2107 bit_string_lth 4 based fixed bin(24,0) level 2 dcl 11-301 set ref 2167* 2194* bit_string_ptr 2 based pointer level 2 dcl 11-301 set ref 2166* 2193* body 62 based structure level 2 dcl 11-15 body_sections 64 based structure array level 3 dcl 11-15 set ref 1686 bytes 4 based bit(9) array level 3 packed packed unaligned dcl 8-17 set ref 2158* can_be_deleted 10(01) based bit(1) level 3 in structure "im_message_info" packed packed unaligned dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 1170 1209* 1338 2007* 2200 2331* 2349 can_be_deleted 12(01) based bit(1) level 3 in structure "message" packed packed unaligned dcl 11-15 in procedure "mlsys_mailbox_mgr_" set ref 1209* 2200* 2349* canonical 13(05) based bit(1) level 4 packed packed unaligned dcl 9-24 set ref 1001 1023 2003 2004* 2174 canonicalize_ 000254 constant entry external dcl 1125 ref 1136 chain based structure level 2 dcl 197 set ref 2067* cleanup 000260 stack reference condition dcl 358 ref 380 487 737 1549 1754 close_options based structure level 1 dcl 5-6 close_options_ptr 000274 automatic pointer dcl 5-15 set ref 1046* 1053 1058 1072 1072 code 3 based fixed bin(35,0) level 2 in structure "delete_error_info" dcl 6-7 in procedure "mlsys_mailbox_mgr_" set ref 1226* code 000100 automatic fixed bin(35,0) dcl 126 in procedure "mlsys_mailbox_mgr_" set ref 393* 394 395 395* 414* 415 418* 424* 425 428 432* 434 434 440* 450 506* 507 510* 511 528* 539* 546* 556* 567* 569 587 587 689 714* 715 716 741* 755 755 886 1004* 1006* 1009* 1011 1027* 1030* 1033* 1035 1066* 1067 1068 1178* 1179 1179 1181* 1332* 1333 1334 1338* 1344* 1347* 1349 1372* 1375* 1377 1411* 1418 1438* 1439 1440 1449* 1451 1451* 1454 1459* 1461 1461* 1468 1936* 1941* 1944* 1948* 1952 1952 1961 1968* 1969 1974 1980* 1981 2029* 2101* 2102 2109* 2110 2158* 2161 2174* 2177 code 000772 automatic fixed bin(35,0) dcl 2253 in procedure "recompute_mailbox_access" set ref 2265* 2267 2267 2270 2277* 2278 2280 2285 2291* 2292 2294 2300 2305 code 000406 automatic fixed bin(35,0) dcl 1477 in procedure "acknowledge_for_deletion" set ref 1479* 1481 1481* code 000104 automatic fixed bin(35,0) dcl 1518 in procedure "determine_acknowledgement_recipient" set ref 1554* 1555 1558* 1559 1561* 1562 1575* 1578 1588* 1589 collate builtin function dcl 1127 ref 1129 copy builtin function dcl 360 ref 2141 currentsize builtin function dcl 360 ref 1026 1774 1999 data 4 based structure level 2 dcl 8-17 set ref 2166 date_time_created 34 based fixed bin(71,0) level 3 dcl 11-15 set ref 1673* 2223* date_time_delivered 22 based fixed bin(71,0) level 3 dcl 11-15 set ref 2223* date_time_mailed 14 based fixed bin(71,0) level 3 dcl 11-15 set ref 2223* date_time_string 000426 automatic varying char(64) dcl 1620 set ref 1672 1673 1673 1673 1673 1673 1675 1724* date_time_string_fixed based structure level 1 dcl 1621 define_area_ 000120 constant entry external dcl 305 ref 2109 delete 72(01) based bit(1) level 3 packed packed unaligned dcl 140 set ref 567 1392 2007 2019 2331 2344 delete_error_info based structure level 1 dcl 6-7 set ref 1221 1310 2388 delete_error_info_ptr 000276 automatic pointer dcl 6-16 in procedure "mlsys_mailbox_mgr_" set ref 1221* 1222 1224 1225 1226 1227 1229* delete_error_info_ptr 66 based pointer level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 502* 1222* 1309 1310 1311* 2387 2388 2389* deletion_failed 000245 automatic bit(1) dcl 274 set ref 1072* 1074* 1080 1104* 1107 delivery_by_person_id 000106 automatic varying char(32) dcl 1520 set ref 1567* 1568 1568 1568* 1568 1568 1575* dirname based char(168) level 2 packed packed unaligned dcl 140 set ref 498* 506* 632 804 1968* 1980* 2277* 2291* divide builtin function dcl 360 ref 616 ename 52 based char(32) level 2 packed packed unaligned dcl 140 set ref 499* 506* 633 805 1968* 1980* 2277* 2291* envelope 10 based structure array level 3 in structure "message_redistributions_list" dcl 11-109 in procedure "mlsys_mailbox_mgr_" envelope 14 based structure level 2 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" error_table_$bad_index 000014 external static fixed bin(35,0) dcl 288 ref 927 991 error_table_$bad_segment 000016 external static fixed bin(35,0) dcl 288 ref 1961 2270 error_table_$bad_subr_arg 000020 external static fixed bin(35,0) dcl 288 ref 477 1059 1407 error_table_$entlong 000022 external static fixed bin(35,0) dcl 288 ref 1843 1858 error_table_$messages_deferred 000024 external static fixed bin(35,0) dcl 288 ref 1777 error_table_$messages_off 000026 external static fixed bin(35,0) dcl 288 ref 1777 error_table_$moderr 000030 external static fixed bin(35,0) dcl 288 ref 395 528 2267 2280 2294 2305 error_table_$no_info 000034 external static fixed bin(35,0) dcl 288 ref 1777 error_table_$no_message 000036 external static fixed bin(35,0) dcl 288 ref 428 434 587 755 1179 error_table_$noalloc 000032 external static fixed bin(35,0) dcl 288 ref 556 741 1952 error_table_$seg_unknown 000040 external static fixed bin(35,0) dcl 288 ref 1974 2285 error_table_$unimplemented_version 000042 external static fixed bin(35,0) dcl 288 ref 460 467 1054 error_table_$wakeup_denied 000044 external static fixed bin(35,0) dcl 288 ref 1777 fips98_message based structure level 1 dcl 8-17 fips98_message_ptr 000300 automatic pointer dcl 8-31 set ref 1873* 1876 1878 2012 2157* 2158 2166 2167 2337 first based pointer level 3 dcl 140 set ref 653 915 979 1156 1279 2324 2397 first_idx 000243 automatic fixed bin(17,0) dcl 272 in procedure "mlsys_mailbox_mgr_" set ref 831* 834* 836 first_idx 000102 automatic fixed bin(17,0) dcl 2422 in procedure "release_new_mailbox_info" set ref 2430* 2432* 2434 flags 12 based structure level 2 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" flags based structure level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" flags 2 based structure level 3 in structure "fips98_message" dcl 8-17 in procedure "mlsys_mailbox_mgr_" flags 74 based structure level 2 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 639* 811* flags 10 based structure level 2 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 1996* flags 2 based structure level 2 in structure "mailbox_message_area" dcl 184 in procedure "mlsys_mailbox_mgr_" flags 2 based structure level 2 in structure "close_options" dcl 5-6 in procedure "mlsys_mailbox_mgr_" format 6 based fixed bin(17,0) level 2 dcl 218 set ref 998 1023 1401 1403 1455 1457 1994* 1999 2012 2014 2139 2156 2172 2204 2206 2337 2339 from 36 based pointer level 3 dcl 11-15 set ref 1537 1539 1659 2228* get_authorization_ 000122 constant entry external dcl 306 ref 2007 2007 2019 2019 2331 2331 2344 2344 get_privileges_ 000124 constant entry external dcl 307 ref 515 2308 get_system_free_area_ 000126 constant entry external dcl 308 ref 373 hbound builtin function dcl 360 ref 2050 header 30 based structure level 2 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" header 64 based structure array level 4 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" header based structure level 2 in structure "message_preformatted_body_section" dcl 11-292 in procedure "mlsys_mailbox_mgr_" header 000100 automatic structure level 2 in structure "ack_message" dcl 1702 in begin block on line 1700 header 4 based structure level 3 in structure "message_user_field_parameter" dcl 11-208 in procedure "mlsys_mailbox_mgr_" header 4 000724 automatic structure level 3 in structure "local_mbsp" dcl 2132 in procedure "construct_user_message" header based structure level 2 in structure "fips98_message" dcl 8-17 in procedure "mlsys_mailbox_mgr_" header based structure level 2 in structure "message_user_field" dcl 11-163 in procedure "mlsys_mailbox_mgr_" header based structure level 2 in structure "message_body_section" dcl 11-274 in procedure "mlsys_mailbox_mgr_" header based structure level 2 in structure "message_bit_string_body_section" dcl 11-301 in procedure "mlsys_mailbox_mgr_" header 10 based structure array level 3 in structure "message_user_fields_list" dcl 11-150 in procedure "mlsys_mailbox_mgr_" header based structure level 2 in structure "mail_format" dcl 9-24 in procedure "mlsys_mailbox_mgr_" header 4 based structure level 3 in structure "message_body_section_parameter" dcl 11-313 in procedure "mlsys_mailbox_mgr_" idx 000353 automatic fixed bin(17,0) dcl 1150 in procedure "perform_deletions" set ref 1160* 1161* idx 000104 automatic fixed bin(17,0) dcl 2371 in procedure "release_mailbox_info" set ref 2400* 2401* idx 000244 automatic fixed bin(17,0) dcl 272 in procedure "mlsys_mailbox_mgr_" set ref 657* 658* 836* 837* 918* 919* 982* 983* idx 000416 automatic fixed bin(17,0) dcl 1495 in procedure "delete_acknowledge_to_fields" set ref 1500* 1501 1501* idx 000374 automatic fixed bin(17,0) dcl 1274 in procedure "reconstruct_mailbox" set ref 1283* 1284* idx 001000 automatic fixed bin(17,0) dcl 2258 in procedure "recompute_mailbox_access" set ref 2328* 2329* idx 000103 automatic fixed bin(17,0) dcl 2422 in procedure "release_new_mailbox_info" set ref 2434* 2435* im_message_info based structure level 1 dcl 218 im_message_info_ptr 000200 automatic pointer dcl 234 set ref 593 601 607 607 658* 661 669 713* 760 768 773 773 837* 840 848 919* 920 930 938 950* 952 983* 984 998 1000 1021* 1023 1023 1025 1065* 1161* 1162 1164 1167 1170 1173 1178 1179 1209 1209 1209 1209 1284* 1286 1289 1290 1292 1292 1295 1321* 1324 1338 1338 1343 1358* 1361 1369 1371 1388* 1391 1401 1401 1403 1403 1411 1411 1411 1427* 1430 1444 1455 1455 1457 1457 1459 1459 1459 1465 1567 1924* 1925 1991 1992 1993 1993 1994 1994 1994 1994 1996 1997 1999 1999 2007 2007 2007 2012 2012 2014 2014 2016 2019 2019 2019 2023 2025 2137 2139 2140 2141 2150 2150 2156 2157 2158* 2158 2172 2173 2174* 2174 2193 2194 2198 2199 2200 2201 2202 2204 2204 2206 2206 2221* 2230 2260 2329* 2331 2331 2331 2337 2337 2339 2339 2341 2344 2344 2344 2348 2349 2349 2351 2351 2357* 2401* 2402 2402 2435* 2436 2438 2441 2441 include_subject 000556 automatic bit(1) dcl 1631 set ref 1678* 1685* 1691* 1693* 1695 1735 index 71 based fixed bin(17,0) level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 501* 506* 510* 567* 1178* 1190* 1411* 1459* 1936* 1941* 1944* 1948* 1966* 1967* 1968* 1978* 1979* 1980* 2265* 2275* 2276* 2277* 2289* 2290* 2291* 2373 2374* 2375* index builtin function dcl 360 in procedure "mlsys_mailbox_mgr_" ref 1134 1688 info_ptr based pointer level 2 dcl 210 set ref 627* 706 798* 906 970 1063 1102 1255 interactive 2 based bit(1) level 4 in structure "fips98_message" packed packed unaligned dcl 8-17 in procedure "mlsys_mailbox_mgr_" ref 1878 interactive 12 based bit(1) level 3 in structure "message" packed packed unaligned dcl 11-15 in procedure "mlsys_mailbox_mgr_" set ref 1683 2199* is_redistributed 000250 automatic bit(1) dcl 276 set ref 1525* 1529* 1669 1732 key 4 based bit(72) level 2 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 661 840 1178* 1289 1411* 1459* 1993* 2025 2137 key 104 based bit(72) array level 3 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 661* 840* 1289* last based pointer level 3 dcl 140 set ref 748 2046 2071 2076 2077 2078* 2448* last_message_area_ptr based pointer level 2 dcl 140 set ref 502* 2100 2114 2117* 2121 2381 last_message_key based bit(72) level 2 dcl 140 set ref 581* 1936 1944* 1948* 2025* length builtin function dcl 360 ref 1136 1136 1568 1568 1651 1653 1655 1658 1658 1665 1666 1669 1675 1677 1689 1695 1796 1797 1842 1842 1847 1847 1847 1847 1856 1856 1909 2141 2141 2141 2150 2150 2183 lines 11 000100 automatic fixed bin(17,0) level 3 in structure "ack_message" dcl 1702 in begin block on line 1700 set ref 1746* lines 11 based fixed bin(17,0) level 3 in structure "mail_format" dcl 9-24 in procedure "mlsys_mailbox_mgr_" ref 1883 local_area_info 000670 automatic structure level 1 dcl 2097 set ref 2103* 2109 2109 local_mbsp 000724 automatic structure level 1 dcl 2132 set ref 2168 2168 2184 2184 2195 2195 local_mra 000202 automatic structure level 1 dcl 249 set ref 375 424 424 432 432 lth based fixed bin(21,0) level 2 dcl 1621 set ref 1672* 1673* mail_format based structure level 1 dcl 9-24 set ref 1026 1999 mail_format_ptr 000302 automatic pointer dcl 9-17 set ref 1000* 1001 1002 1003 1025* 1026 1026 1873* 1883 1883 1883 1883 1883 1886 1886 1886 1999 2003 2003 2003 2004 2014 2140* 2141 2141 2141 2141 2141 2141 2141 2141 2173* 2174 2174 2174 2182 2183 2339 mailbox based structure level 1 dcl 2-6 set ref 622 793 860 2393 2456 mailbox_$check_salv_bit_index 000130 constant entry external dcl 309 ref 567 mailbox_$close 000132 constant entry external dcl 310 ref 383 445 1757 1781 1966 1978 2275 2289 2374 mailbox_$compact_index 000134 constant entry external dcl 311 ref 1190 mailbox_$delete_index 000136 constant entry external dcl 312 ref 1178 mailbox_$get_mode_index 000140 constant entry external dcl 313 ref 414 510 2265 mailbox_$incremental_read_index 000142 constant entry external dcl 314 ref 432 1948 mailbox_$open 000144 constant entry external dcl 315 ref 506 1768 1968 1980 2277 2291 mailbox_$open_if_full 000146 constant entry external dcl 316 ref 393 mailbox_$own_incremental_read_index 000150 constant entry external dcl 318 ref 1944 mailbox_$own_read_index 000152 constant entry external dcl 320 ref 1936 mailbox_$read_index 000154 constant entry external dcl 321 ref 424 1941 mailbox_$update_message_index 000156 constant entry external dcl 322 ref 1411 1459 mailbox_$wakeup_add_index 000160 constant entry external dcl 323 ref 1774 mailbox_address 6 based pointer level 2 dcl 2-6 set ref 631* 803* mailbox_dirname 10 based char(168) level 2 in structure "mailbox" packed packed unaligned dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 632* 804* mailbox_dirname 000101 automatic char(168) packed unaligned dcl 128 in procedure "mlsys_mailbox_mgr_" set ref 369* 393* 481* 498 560* 1588* 1768* mailbox_ename 62 based char(32) level 2 in structure "mailbox" packed packed unaligned dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 633* 805* mailbox_ename 000153 automatic char(32) packed unaligned dcl 129 in procedure "mlsys_mailbox_mgr_" set ref 370* 393* 482* 499 560* 1588* 1768* mailbox_idx 000231 automatic fixed bin(17,0) dcl 263 set ref 377* 382 383* 384* 393* 414* 424* 432* 445 445* 1752* 1756 1757* 1758* 1768* 1774* 1781* 1783* mailbox_info based structure level 1 dcl 140 set ref 496 2408 mailbox_info_ptr 000170 automatic pointer dcl 177 in procedure "mlsys_mailbox_mgr_" set ref 485* 489 496* 498 499 501 502 502 502 502 502 506 506 506 510 513 516 518 520 521 523 524 525 533 534 534 542 542 551 552 560 562 564 564 566 567 567 571 573 579 579 579 581 582 593 593 601 605 605 607 607 616 623 627 630 631 632 633 634 635 636 637 640 642 643 644 645 653 663 686 706* 708 720 720 726 748 760 760 768 784 788 798 802 803 804 805 806 807 808 809 812 814 825 842 856 856 857 857 861 864 865 866 906* 908 915 952* 953 970* 972 979 1063* 1102* 1109 1156 1178 1190 1214 1214 1215 1219 1222 1255* 1257 1276 1276 1276 1279 1287 1287 1289 1290 1292 1292 1295 1295 1302 1303 1304 1305 1307 1309 1310 1311 1324* 1325 1327 1342 1342 1361* 1362 1364 1370 1370 1391* 1392 1411 1430* 1431 1433 1459 1936 1936 1936 1941 1944 1944 1944 1948 1948 1962 1966 1967 1968 1968 1968 1978 1979 1980 1980 1980 1992 2007 2007 2007 2019 2025 2046 2071 2071 2076 2077 2078 2100 2114 2117 2121 2265 2271 2275 2276 2277 2277 2277 2289 2290 2291 2291 2291 2310 2310 2316 2317 2317 2320 2324 2331 2331 2331 2344 2373 2374 2375 2378 2378 2381 2387 2388 2389 2392 2393 2394 2397 2408 2409* 2448 mailbox_info_ptr based pointer level 2 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 952 1324 1361 1391 1430 1992* mailbox_message_area based structure level 1 dcl 184 mailbox_message_area_ptr 000172 automatic pointer dcl 191 set ref 595 762 1927* 1936 1936 1941 1941 1944 1944 1948 1948 1952 1957* 1991 2027 2381* 2381* 2383 2384* mailbox_mode 000232 automatic bit(36) dcl 264 set ref 414* 417 510* 513 2265* 2305* 2310 2316 2317 mailbox_n_messages 000270 automatic fixed bin(17,0) dcl 2-32 set ref 616* 622 622 628 788* 789* 789 789 793 793 799 mailbox_ptr 64 based pointer level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 502* 623* 861* 1325 1362 1431 2317 2317 2392 2393 2394* mailbox_ptr 000266 automatic pointer dcl 2-30 in procedure "mlsys_mailbox_mgr_" set ref 622* 623 625 627 628 630 631 632 633 634 635 636 637 639 640 642 643 644 645 661 663 669 677 699* 706 784 784 817 818 848 859 860 861* 864 865 866 872 899* 906 938 964* 970 1045* 1063 1095* 1102 1215 1248* 1255 1289 1290 1302 1303 1304 1305 1325* 1342 1362* 1370 1431* 1814 1816 1819 2456 mailbox_reserved_data based structure level 1 dcl 210 mailbox_salvaged_bit 000233 automatic bit(1) dcl 265 set ref 567* 571 mailbox_type 72 based fixed bin(17,0) level 2 dcl 2-6 set ref 630* 802* marked_for_deletion 12(02) based bit(1) level 3 packed packed unaligned dcl 11-15 set ref 1209* 1343* 1371* maxlength builtin function dcl 360 ref 1673 1673 mbz 2(02) based bit(34) level 3 packed packed unaligned dcl 5-6 ref 1058 message based structure level 1 dcl 11-15 message_bit_string_body_section based structure level 1 dcl 11-301 message_bits based bit dcl 254 ref 387 431 448 595 762 2438 message_block based structure level 1 dcl 197 set ref 2065 2405 2445 message_block_ptr 000174 automatic pointer dcl 205 set ref 597 597 653* 653* 655 657 658* 764 764 827* 827* 829 831 836 837* 915* 915* 917 918 919* 979* 979* 981 982 983* 1156* 1156* 1158 1160 1161* 1279* 1279* 1281 1283 1284* 2036 2036 2046* 2048 2050 2050 2053 2053 2056 2056 2081* 2324* 2324* 2326 2328 2329* 2397* 2397* 2399 2400 2401 2405* 2426* 2426* 2428 2430 2434 2435 2445 2445* message_blocks based structure level 2 dcl 140 set ref 502* 582* 2071* message_body_section based structure level 1 dcl 11-274 message_body_section_parameter based structure level 1 dcl 11-313 message_body_section_ptr 000306 automatic pointer dcl 11-280 set ref 1686* 1687 1687 1688 1688 1689 1689 2164* 2165 2166 2167 2180* 2181 2182 2183 2191* 2192 2193 2194 message_envelope based structure level 1 dcl 11-61 message_format 000241 automatic fixed bin(17,0) dcl 270 set ref 429* message_id 30 based bit(72) level 3 dcl 11-15 set ref 2226* message_idx 000165 automatic fixed bin(17,0) dcl 134 in procedure "mlsys_mailbox_mgr_" set ref 651* 659* 659 661 663 669 781* 817* 818 818* 825* 838* 838 840 842 848 913* 921* 921 922 938 977* 985* 985 986 2322* message_idx 000352 automatic fixed bin(17,0) dcl 1150 in procedure "perform_deletions" set ref 1154* 1165* 1165 1225 1229* message_lth 000557 automatic fixed bin(21,0) dcl 1633 set ref 1651* 1653* 1655* 1655 1658* 1658 1665* 1665 1666* 1666 1669* 1669 1675* 1675 1695* 1695 1702 1737 1774 1774 1796 message_number 2 based fixed bin(17,0) level 2 dcl 6-7 set ref 1225* message_preformatted_body_section based structure level 1 dcl 11-292 message_preformatted_body_section_text based char packed unaligned dcl 11-298 set ref 1687 1688 1689 message_ptr 000304 automatic pointer dcl 11-53 in procedure "mlsys_mailbox_mgr_" set ref 1162* 1323* 1343 1360* 1371 1390* 1416 1429* 1465 1497 1497 1500 1501 1501 1523 1524 1524 1528 1537 1539 1659 1673 1677 1677 1679 1680 1683 1683 1683 1686 2158* 2168* 2174* 2184* 2195* 2198 2199 2200 2201 2202 2204 2206 2208 2221* 2223 2223 2223 2226 2228 2231 2232 message_ptr 106 based pointer array level 3 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 663* 669* 842* 848* 938* 1290* message_ptr 12 based pointer level 2 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 669 848 930 938 1162 1209 1209 1290 2023* 2198* 2348 2349 2351 2402 2402* 2441 2441* message_reading_level 75 based fixed bin(17,0) level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 552* 636 663 808 842 message_reading_level 4 based fixed bin(17,0) level 2 in structure "open_options" dcl 4-6 in procedure "mlsys_mailbox_mgr_" ref 471 471 552 message_reading_level 77 based fixed bin(17,0) level 2 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 636* 808* message_redistribution based structure level 1 dcl 11-122 message_redistributions_list based structure level 1 dcl 11-109 message_reference based structure level 1 dcl 11-234 message_selection_mode 73 based fixed bin(17,0) level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 551* 593 593 634 760 760 806 message_selection_mode 2 based fixed bin(17,0) level 2 in structure "open_options" dcl 4-6 in procedure "mlsys_mailbox_mgr_" ref 471 471 551 message_selection_mode 75 based fixed bin(17,0) level 2 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 634* 806* message_subject based char packed unaligned dcl 11-51 ref 1677 message_text_field based structure level 1 dcl 11-260 message_type 000242 automatic fixed bin(17,0) dcl 270 set ref 429* 430 430 message_user_field based structure level 1 dcl 11-163 messages 6 based structure array level 2 in structure "message_block" dcl 197 in procedure "mlsys_mailbox_mgr_" set ref 658 837 919 983 1161 1284 2050 2056 2329 2401 2435 messages 104 based structure array level 2 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 818* 818 mlsys_address_list_mgr_$add_address 000162 constant entry external dcl 325 ref 2228 mlsys_address_mgr_$compare_addresses 000164 constant entry external dcl 326 ref 1539 mlsys_address_mgr_$create_mailbox_address 000166 constant entry external dcl 327 ref 560 mlsys_address_mgr_$create_user_mailbox_address 000170 constant entry external dcl 329 ref 1575 2150 mlsys_address_mgr_$decrement_reference_count 000172 constant entry external dcl 331 ref 1497 1501 2210 2378 mlsys_address_mgr_$free_address 000174 constant entry external dcl 332 ref 1551 1573 1594 mlsys_address_mgr_$get_address_pathname 000176 constant entry external dcl 333 ref 1588 mlsys_address_mgr_$get_address_type 000200 constant entry external dcl 335 ref 1554 1561 mlsys_address_mgr_$get_mail_table_address 000202 constant entry external dcl 336 ref 1558 mlsys_address_mgr_$increment_reference_count 000204 constant entry external dcl 337 ref 562 2154 2232 mlsys_area based area(1024) dcl 7-61 ref 496 622 793 860 1221 1310 2065 2388 2393 2405 2408 2445 2456 mlsys_data_$mailbox_allocation 000242 external static fixed bin(17,0) dcl 7-33 ref 616 616 616 789 789 mlsys_data_$max_opening_retries 000240 external static fixed bin(17,0) dcl 7-16 ref 1964 2273 mlsys_data_$person_id 000250 external static varying char(24) dcl 7-70 ref 1912 mlsys_data_$subsystem_area_ptr 000246 external static pointer dcl 7-62 ref 496 622 793 860 1221 1310 2065 2388 2393 2405 2408 2445 2456 mlsys_data_$user_id 000252 external static varying char(32) dcl 7-72 ref 1909 mlsys_data_$valid_segments 000244 external static bit(1) array packed unaligned dcl 7-56 ref 1816 mlsys_et_$all_messages_deleted 000046 external static fixed bin(35,0) dcl 288 ref 1109 mlsys_et_$already_marked_for_deletion 000050 external static fixed bin(35,0) dcl 288 ref 1338 mlsys_et_$bad_acknowledge_to 000052 external static fixed bin(35,0) dcl 288 ref 1605 mlsys_et_$cant_be_deleted 000054 external static fixed bin(35,0) dcl 288 set ref 1184* 1347 mlsys_et_$cant_send_acknowledgement 000056 external static fixed bin(35,0) dcl 288 ref 1662 1764 1780 1786 mlsys_et_$cant_update_message 000060 external static fixed bin(35,0) dcl 288 ref 1393 1461 mlsys_et_$deletion_pending 000062 external static fixed bin(35,0) dcl 288 ref 709 909 954 973 1328 1365 1434 mlsys_et_$message_already_read 000064 external static fixed bin(35,0) dcl 288 ref 932 mlsys_et_$missing_acknowledge_to 000066 external static fixed bin(35,0) dcl 288 ref 1533 mlsys_et_$no_ack_needed 000070 external static fixed bin(35,0) dcl 288 ref 1445 mlsys_et_$no_message_canonical_form 000072 external static fixed bin(35,0) dcl 288 ref 1006 1009 1030 1033 mlsys_et_$no_more_messages 000074 external static fixed bin(35,0) dcl 288 ref 876 mlsys_et_$no_o_permission 000076 external static fixed bin(35,0) dcl 288 ref 546 722 mlsys_et_$no_pending_deletion 000100 external static fixed bin(35,0) dcl 288 ref 1262 mlsys_et_$no_r_permission 000102 external static fixed bin(35,0) dcl 288 ref 418 539 727 mlsys_et_$no_s_permission 000104 external static fixed bin(35,0) dcl 288 ref 395 mlsys_et_$not_mailbox 000106 external static fixed bin(35,0) dcl 288 ref 702 902 966 1049 1098 1251 mlsys_et_$not_marked_for_deletion 000110 external static fixed bin(35,0) dcl 288 ref 1375 mlsys_et_$some_messages_not_deleted 000112 external static fixed bin(35,0) dcl 288 ref 1080 1107 mlsys_fips98_$decode_message 000206 constant entry external dcl 338 ref 2158 mlsys_format_$format_date_time_field 000210 constant entry external dcl 341 ref 1673 mlsys_mailbox_utils_$classify_mailbox_address 000212 constant entry external dcl 344 ref 564 mlsys_message_id_mgr_$encode_local_id 000214 constant entry external dcl 345 ref 2226 mlsys_message_mgr_$add_body_section_no_copy 000216 constant entry external dcl 346 ref 2168 2184 2195 mlsys_message_mgr_$create_im_message 000220 constant entry external dcl 347 ref 2221 mlsys_message_mgr_$free_message 000222 constant entry external dcl 348 ref 2402 2441 mlsys_message_mgr_$verify_im_message 000224 constant entry external dcl 349 ref 950 1021 1321 1358 1388 1427 mlsys_misc_utils_$get_best_address_name 000226 constant entry external dcl 350 ref 1660 mlsys_parse_text_$parse_im_message_text 000230 constant entry external dcl 351 ref 2174 mlsys_storage_mgr_$get_temp_segment 000232 constant entry external dcl 354 ref 2101 mlsys_storage_mgr_$release_temp_segment 000234 constant entry external dcl 355 ref 2111 2384 mod builtin function dcl 360 ref 789 mode 73 based bit(36) level 2 dcl 2-6 set ref 637* 809* 2317* mode_flags 72 based structure level 2 dcl 140 set ref 513* 637 809 2310 2316* mra based structure level 1 dcl 251 in procedure "mlsys_mailbox_mgr_" mra 14 based structure level 2 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 1925 2436 mra_ptr 000224 automatic pointer dcl 252 set ref 375* 387 387 387 431 431 431 448 448 448 595 595 595 762 762 762 1925* 1936* 1941* 1944* 1948* 2436* 2437 2438 2438 2438 2439 mra_valid 10 based bit(1) level 3 packed packed unaligned dcl 218 set ref 1997* ms_id 30 based bit(72) level 3 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 1993 ms_id 14 000202 automatic bit(72) level 2 in structure "local_mra" dcl 249 in procedure "mlsys_mailbox_mgr_" set ref 432* ms_len 2 000202 automatic fixed bin(24,0) level 2 in structure "local_mra" dcl 249 in procedure "mlsys_mailbox_mgr_" set ref 429* ms_len 2 based fixed bin(24,0) level 2 in structure "mra" dcl 251 in procedure "mlsys_mailbox_mgr_" ref 387 387 431 431 448 448 595 595 762 762 2438 2438 ms_len 16 based fixed bin(24,0) level 3 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 1411* 1459* 1994* 1999 2194 ms_ptr 14 based pointer level 3 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 1000 1023 1025 1401 1403 1411* 1455 1457 1459* 1994* 2140 2157 2173 2193 2204 2206 ms_ptr based pointer level 2 in structure "mra" dcl 251 in procedure "mlsys_mailbox_mgr_" set ref 387 431 448 595 762 2437 2438 2439* ms_ptr 000202 automatic pointer level 2 in structure "local_mra" dcl 249 in procedure "mlsys_mailbox_mgr_" set ref 378* 386 388* 429* 448 mseg_return_args based structure level 1 dcl 10-9 mte_address 000102 automatic pointer dcl 1517 set ref 1548* 1551 1551* 1558* 1560 1573 1573* 1575* 1594 1594* multiple_authors 000247 automatic bit(1) dcl 276 set ref 1538* 1544* 1666 1729 must_be_acknowledged 12(03) based bit(1) level 3 packed packed unaligned dcl 11-15 set ref 1465* 2201* 2351* n_addresses 6 based fixed bin(17,0) level 2 dcl 12-6 ref 1537 n_bytes 3 based fixed bin(21,0) level 3 dcl 8-17 ref 2158 2167 n_deleted_messages 103 based fixed bin(17,0) level 2 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 645* 814* 1215* 1305* 1342* 1370* n_deleted_messages based fixed bin(17,0) level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 579* 645 814 1214* 1214 1215 1276* 1295* 1295 1305 1342 1342* 1370 1370* n_interactive_messages 102 based fixed bin(17,0) level 2 dcl 2-6 set ref 644* 866* 1304* n_messages 76 based fixed bin(17,0) level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 579* 605* 605 616 642 784 788 825 856* 856 864 1109 1276* 1287* 1287 1289 1290 1302 n_messages 100 based fixed bin(17,0) level 2 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 622* 642* 793* 817 860 864* 1302* 2393 2456 n_messages 000163 automatic fixed bin(17,0) dcl 131 in procedure "mlsys_mailbox_mgr_" set ref 393* 400 405 n_messages_allocated 2 based fixed bin(17,0) level 2 dcl 210 set ref 628* 784 799* n_messages_by_type 000165 automatic fixed bin(17,0) array dcl 132 in procedure "mlsys_mailbox_mgr_" set ref 422* 430* 430 437 438 n_messages_by_type 77 based fixed bin(17,0) array level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 579* 607* 607 643 644 857* 857 865 866 1276* 1292* 1292 1303 1304 n_new_messages 000164 automatic fixed bin(17,0) dcl 131 set ref 735* 745* 772* 772 784 788 856 868 874 2424 2452* n_new_messages_by_type 000165 automatic fixed bin(17,0) array dcl 132 set ref 746* 773* 773 857 869 870 n_ordinary_messages 101 based fixed bin(17,0) level 2 dcl 2-6 set ref 643* 865* 1303* n_redistributions 10 based fixed bin(17,0) level 2 dcl 11-15 ref 1500 1523 1524 n_used 4 based fixed bin(17,0) level 2 dcl 197 set ref 597* 597 657 749 764* 764 836 918 982 1160 1283 2036* 2036 2050 2053* 2053 2056 2068* 2328 2400 2434 2450* new_mailbox_ptr 000234 automatic pointer dcl 267 set ref 734* 784* 793* 795 798 799 802 803 804 805 806 807 808 809 811 812 814 818 840 842 859 861 2455 2456 2456 2458* new_message_block_ptr 000660 automatic pointer dcl 2063 set ref 2065* 2067 2068 2071 2076 2077 2078 2081 new_mma_ptr 000714 automatic pointer dcl 2098 set ref 2101* 2105 2107 2111* 2114 2115 2117 next 2 based pointer level 3 dcl 197 set ref 655 829 917 981 1158 1281 2076* 2326 2399 2428 2449* next_message_block_ptr 000100 automatic pointer dcl 2421 in procedure "release_new_mailbox_info" set ref 2428* 2446 next_message_block_ptr 000776 automatic pointer dcl 2257 in procedure "recompute_mailbox_access" set ref 2326* 2355 next_message_block_ptr 000176 automatic pointer dcl 205 in procedure "mlsys_mailbox_mgr_" set ref 655* 672 829* 851 917* 925 981* 989 next_message_block_ptr 000372 automatic pointer dcl 1273 in procedure "reconstruct_mailbox" set ref 1281* 1300 next_message_block_ptr 000350 automatic pointer dcl 1149 in procedure "perform_deletions" set ref 1158* 1188 next_message_block_ptr 000100 automatic pointer dcl 2370 in procedure "release_mailbox_info" set ref 2399* 2406 next_mma_ptr 000102 automatic pointer dcl 2370 set ref 2383* 2385 normal_wakeup 000101 automatic bit(1) level 2 packed packed unaligned dcl 1707 set ref 1772* notify 13(02) based bit(1) level 4 packed packed unaligned dcl 9-24 ref 1886 null builtin function dcl 360 ref 378 386 388 448 485 489 502 582 653 663 686 713 734 827 842 915 930 979 1065 1078 1156 1279 1309 1311 1497 1501 1532 1548 1551 1573 1594 1814 2023 2048 2067 2071 2100 2317 2324 2348 2378 2381 2387 2389 2392 2394 2397 2402 2409 2426 2437 2439 2441 2449 2455 2458 obsolete 13(04) based bit(1) level 4 packed packed unaligned dcl 9-24 set ref 2003* 2003 2174 open_options based structure level 1 dcl 4-6 open_options_ptr 000272 automatic pointer dcl 4-14 set ref 464* 466 471 471 471 471 471 471 518 533 534 534 542 551 552 output_string 000100 automatic char packed unaligned dcl 1123 set ref 1135* 1136 1136 1137 own 72(03) based bit(1) level 3 packed packed unaligned dcl 140 set ref 523 542 720 2007 2331 owner 2 000670 automatic char(32) level 2 packed packed unaligned dcl 2097 set ref 2106* p_code parameter fixed bin(35,0) dcl 1205 in procedure "deletion_failure" set ref 1202 1226 1229* p_code parameter fixed bin(35,0) dcl 2250 in procedure "recompute_mailbox_access" set ref 2247 2300* 2312* 2359* p_code parameter fixed bin(35,0) dcl 1835 in procedure "add_suffix" set ref 1830 1843* 1856* 1858* p_code parameter fixed bin(35,0) dcl 1515 in procedure "determine_acknowledgement_recipient" set ref 1512 1533* 1591* 1605* p_code parameter fixed bin(35,0) dcl 1618 in procedure "deliver_acknowledgement" set ref 1614 1660* 1661 1662* 1764* 1768* 1770 1774* 1777 1777 1777 1777 1777* 1780 1780* 1786* p_deletion_failed parameter bit(1) dcl 1148 set ref 1145 1152* 1207* p_ename parameter char packed unaligned dcl 1833 ref 1830 1839 p_force_new_segment parameter bit(1) dcl 2095 ref 2092 2100 p_message_format parameter fixed bin(17,0) dcl 1871 set ref 1866 1877* 1885* 1892* p_message_lth parameter fixed bin(24,0) dcl 1870 ref 1866 p_message_ptr parameter pointer dcl 1869 ref 1866 1873 p_message_type parameter fixed bin(17,0) dcl 1871 set ref 1866 1878* 1880* 1886* 1888* 1893* p_new_ename parameter char(32) packed unaligned dcl 1834 set ref 1830 1842 1854* 1856 p_pointer parameter pointer dcl 1-13 ref 1-10 1-16 p_report_errors parameter bit(1) dcl 1148 ref 1145 1218 p_send_delete_ack parameter bit(1) dcl 1617 ref 1614 1651 1716 p_sender_id parameter char(32) packed unaligned dcl 1907 ref 1904 1909 1909 1909 1912 p_string parameter varying char dcl 1794 ref 1791 1796 1796 1797 p_suffix parameter char packed unaligned dcl 1833 ref 1830 1840 pending_deletion based bit(1) level 3 packed packed unaligned dcl 140 set ref 708 908 953 972 1219* 1257 1307* 1327 1364 1433 perform_deletions 2 based bit(1) level 3 packed packed unaligned dcl 5-6 ref 1072 previous based pointer level 2 in structure "mailbox_message_area" dcl 184 in procedure "mlsys_mailbox_mgr_" set ref 2114* 2383 previous based pointer level 3 in structure "message_block" dcl 197 in procedure "mlsys_mailbox_mgr_" set ref 2077* privileges 000230 automatic structure level 2 in structure "user_privileges" packed packed unaligned dcl 259 in procedure "mlsys_mailbox_mgr_" privileges 1(18) based structure level 2 in structure "aim_template" packed packed unaligned dcl 14-12 in procedure "mlsys_mailbox_mgr_" read 72(02) based bit(1) level 3 packed packed unaligned dcl 140 set ref 518 534 726 record_quota_overflow 000000 stack reference condition dcl 358 ref 1762 redistributions 10 based structure array level 2 dcl 11-109 redistributions_list 60 based pointer level 2 dcl 11-15 ref 1501 1501 1524 rel builtin function dcl 360 ref 2107 report_deletion_errors 2(01) based bit(1) level 3 packed packed unaligned dcl 5-6 ref 1072 requests_acknowledgement 10(04) based bit(1) level 3 packed packed unaligned dcl 218 set ref 1173 1444 1465* 2012* 2014* 2016* 2019* 2019 2158 2174 2201 2230 2337* 2339* 2341* 2344* 2344 2351 reserved 2 based bit(144) level 2 dcl 2-6 set ref 627 628 706 784 798 799 906 970 1063 1102 1255 retried 000643 automatic bit(1) dcl 1922 in procedure "read_next_message" set ref 1931* 1976 1977* retried 000774 automatic bit(1) dcl 2255 in procedure "recompute_mailbox_access" set ref 2263* 2287 2288* retry_count 000773 automatic fixed bin(17,0) dcl 2254 in procedure "recompute_mailbox_access" set ref 2262* 2272* 2272 2273 retry_count 000642 automatic fixed bin(17,0) dcl 1921 in procedure "read_next_message" set ref 1930* 1963* 1963 1964 return_value 001010 automatic pointer packed dcl 1-14 set ref 1-16* 1-18 reverse builtin function dcl 360 ref 1568 1568 ring1 0(04) 000230 automatic bit(1) level 3 packed packed unaligned dcl 259 set ref 516 2310 2320 ring1_privilege based bit(1) level 3 packed packed unaligned dcl 140 set ref 516* 2007 2310 2320* 2331 ring_1_date_time_delivered 000752 automatic fixed bin(71,0) dcl 2135 set ref 2137* 2158* 2174* 2223 2226* ring_1_delivered_by 000736 automatic pointer dcl 2133 set ref 2150* 2154* 2158* 2174* 2210* 2228* 2231 ring_1_delivered_by_comment 000740 automatic varying char(32) dcl 2134 set ref 2141* 2146* 2148* 2150* rtrim builtin function dcl 360 ref 1567 1839 1840 1909 2141 2141 2141 2141 2141 2150 salvaged based bit(1) level 3 in structure "mailbox_info" packed packed unaligned dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 571* 573* 640 812 1962* 2271* salvaged 74 based bit(1) level 3 in structure "mailbox" packed packed unaligned dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 640* 812* saved_im_message_info_ptr 000770 automatic pointer dcl 2252 set ref 2260* 2357 saved_message_block_n_used 000240 automatic fixed bin(17,0) dcl 268 set ref 749* 831 2430 2450 saved_message_block_ptr 000236 automatic pointer dcl 267 set ref 748* 749 827 831 2426 2430 2445 2448 2449 2450 section 4 000724 automatic structure level 2 dcl 2132 set ref 2164 2180 2191 section_type based fixed bin(17,0) level 3 in structure "message_preformatted_body_section" dcl 11-292 in procedure "mlsys_mailbox_mgr_" set ref 2181* section_type 64 based fixed bin(17,0) array level 5 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" set ref 1683 section_type based fixed bin(17,0) level 3 in structure "message_bit_string_body_section" dcl 11-301 in procedure "mlsys_mailbox_mgr_" set ref 2165* 2192* seen 2(02) based bit(1) level 4 in structure "fips98_message" packed packed unaligned dcl 8-17 in procedure "mlsys_mailbox_mgr_" set ref 1401* 2204 seen 13(06) based bit(1) level 4 in structure "mail_format" packed packed unaligned dcl 9-24 in procedure "mlsys_mailbox_mgr_" set ref 1403* 2206 seen 12(04) based bit(1) level 3 in structure "message" packed packed unaligned dcl 11-15 in procedure "mlsys_mailbox_mgr_" set ref 1416* 2204* 2206* 2208* sender_id 17 based char(32) level 3 packed packed unaligned dcl 218 set ref 601* 768* 1567 2007* 2141 2150 2150 2331* sender_selection_mode 74 based fixed bin(17,0) level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 520* 524* 533* 601 635 768 807 sender_selection_mode 3 based fixed bin(17,0) level 2 in structure "open_options" dcl 4-6 in procedure "mlsys_mailbox_mgr_" ref 471 471 518 533 534 534 542 sender_selection_mode 76 based fixed bin(17,0) level 2 in structure "mailbox" dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 635* 807* sent_from 1 000100 automatic char(32) level 3 in structure "ack_message" dcl 1702 in begin block on line 1700 set ref 1745* sent_from 1 based char(32) level 3 in structure "mail_format" dcl 9-24 in procedure "mlsys_mailbox_mgr_" ref 2141 2141 2141 2141 2141 2141 2141 2141 size 13 000670 automatic fixed bin(18,0) level 2 dcl 2097 set ref 2107* status 72(04) based bit(1) level 3 packed packed unaligned dcl 140 set ref 566 string builtin function dcl 360 set ref 513* 515* 637 639* 809 811* 1771* 1774 1774 1996* 2308* 2310 2316* sub_err_ 000236 constant entry external dcl 356 ref 1229 subject 50 based structure level 3 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" subject based char packed unaligned dcl 1628 in procedure "deliver_acknowledgement" ref 1737 subject_lth 000552 automatic fixed bin(21,0) dcl 1629 set ref 1680* 1688* 1689 1689* 1695 1737 1737 1738 subject_ptr 000554 automatic pointer dcl 1630 set ref 1679* 1687* 1737 substr builtin function dcl 360 set ref 1129 1568 1568 1737* 1796* 1847 1909 2137 2150 switch_type 000166 automatic char(4) dcl 135 set ref 1397* 1400 1416 switch_value 000167 automatic bit(1) dcl 136 set ref 1398* 1401 1403 1416 switches 13 based structure level 3 in structure "mail_format" dcl 9-24 in procedure "mlsys_mailbox_mgr_" switches 13 000100 automatic structure level 3 in structure "ack_message" dcl 1702 in begin block on line 1700 set ref 1749* sys_info$max_seg_size 000114 external static fixed bin(19,0) dcl 302 ref 2107 system_area based area(1024) dcl 256 ref 387 431 448 system_area_ptr 000226 automatic pointer dcl 257 set ref 373* 387 424* 431 432* 448 text 15 based char level 2 in structure "mail_format" dcl 9-24 in procedure "mlsys_mailbox_mgr_" set ref 1002 2174* 2182 2183 text 15 000100 automatic char level 2 in structure "ack_message" dcl 1702 in begin block on line 1700 set ref 1737* 1796* text 1 based char(64) level 2 in structure "date_time_string_fixed" dcl 1621 in procedure "deliver_acknowledgement" set ref 1673 1673 text_len 12 000100 automatic fixed bin(21,0) level 3 in structure "ack_message" dcl 1702 in begin block on line 1700 set ref 1747* text_len 12 based fixed bin(21,0) level 3 in structure "mail_format" dcl 9-24 in procedure "mlsys_mailbox_mgr_" ref 1002 1003 1026 1883 1999 2174 2174 2182 2183 text_lth 52 based fixed bin(21,0) level 4 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" ref 1677 1680 text_lth 4 based fixed bin(21,0) level 2 in structure "message_preformatted_body_section" dcl 11-292 in procedure "mlsys_mailbox_mgr_" set ref 1687 1688 1689 2183* text_ptr 50 based pointer level 4 in structure "message" dcl 11-15 in procedure "mlsys_mailbox_mgr_" ref 1677 1679 text_ptr 2 based pointer level 2 in structure "message_preformatted_body_section" dcl 11-292 in procedure "mlsys_mailbox_mgr_" set ref 1687 1688 1689 2182* text_used 000100 automatic fixed bin(21,0) dcl 1705 set ref 1714* 1737 1738* 1738 1747 1774 1796 1797* 1797 the_area based area(1024) dcl 2420 ref 2438 to_be_deleted 10(02) based bit(1) level 3 packed packed unaligned dcl 218 set ref 1167 1209* 1295 1338 1343* 1369 1371* total_lines 62 based fixed bin(21,0) level 3 dcl 11-15 ref 1683 translate builtin function dcl 1127 ref 1133 trimmed_ename 000574 automatic varying char(33) dcl 1837 set ref 1839* 1842 1847 1847 1847 1851* 1851 1852* 1852 1854 1856 trimmed_suffix 000606 automatic varying char(33) dcl 1837 set ref 1840* 1847 1847 1847 1851 1852 type 70 based fixed bin(17,0) level 2 in structure "mailbox_info" dcl 140 in procedure "mlsys_mailbox_mgr_" set ref 564* 630 802 type 7 based fixed bin(17,0) level 2 in structure "im_message_info" dcl 218 in procedure "mlsys_mailbox_mgr_" set ref 593 607 607 760 773 773 1292 1292 1994* 2199 unspec builtin function dcl 360 set ref 1749* 2103* 2137* urgent 13(01) based bit(1) level 4 packed packed unaligned dcl 9-24 ref 1886 use_own_mode based bit(1) level 3 packed packed unaligned dcl 140 set ref 521* 525* 534* 542* 720 1936 1944 user_privileges 000230 automatic structure level 1 dcl 259 set ref 515* 2308* version 000100 automatic fixed bin(17,0) level 3 in structure "ack_message" dcl 1702 in begin block on line 1700 set ref 1744* version based char(8) level 3 in structure "fips98_message" packed packed unaligned dcl 8-17 in procedure "mlsys_mailbox_mgr_" ref 1876 version 2 000724 automatic char(8) level 2 in structure "local_mbsp" packed packed unaligned dcl 2132 in procedure "construct_user_message" set ref 2163* 2179* 2190* version based char(8) level 2 in structure "open_options" dcl 4-6 in procedure "mlsys_mailbox_mgr_" ref 466 version based char(8) level 2 in structure "mailbox" packed packed unaligned dcl 2-6 in procedure "mlsys_mailbox_mgr_" set ref 625* 795* 1819 version based char(8) level 2 in structure "delete_error_info" packed packed unaligned dcl 6-7 in procedure "mlsys_mailbox_mgr_" set ref 1224* version based char(8) level 2 in structure "close_options" packed packed unaligned dcl 5-6 in procedure "mlsys_mailbox_mgr_" ref 1053 version 000670 automatic fixed bin(17,0) level 2 in structure "local_area_info" dcl 2097 in procedure "find_mailbox_message_area" set ref 2104* version based fixed bin(17,0) level 3 in structure "mail_format" dcl 9-24 in procedure "mlsys_mailbox_mgr_" ref 1883 1883 1883 virgin_area 2 based bit(1) level 3 packed packed unaligned dcl 184 set ref 1952 2027* 2115* wakeup 13 000100 automatic bit(1) level 4 in structure "ack_message" packed packed unaligned dcl 1702 in begin block on line 1700 set ref 1750* wakeup 13 based bit(1) level 4 in structure "mail_format" packed packed unaligned dcl 9-24 in procedure "mlsys_mailbox_mgr_" ref 1886 wakeup_switches 000101 automatic structure level 1 dcl 1707 set ref 1771* 1774 1774 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ACTION_CAN_RESTART internal static bit(36) initial dcl 17-7 ACTION_DEFAULT_RESTART internal static bit(36) initial dcl 17-7 ACTION_QUIET_RESTART internal static bit(36) initial dcl 17-7 ACTION_SUPPORT_SIGNAL internal static bit(36) initial dcl 17-7 ADROSW_MBX_ACCESS internal static bit(36) initial dcl 3-6 AOW_MBX_ACCESS internal static bit(36) initial dcl 3-6 A_MBX_ACCESS internal static bit(36) initial dcl 3-6 D_MBX_ACCESS internal static bit(36) initial dcl 3-6 FOREIGN_ADDRESS internal static fixed bin(17,0) initial dcl 13-6 FORUM_ADDRESS internal static fixed bin(17,0) initial dcl 13-6 INVALID_ADDRESS internal static fixed bin(17,0) initial dcl 13-6 MAILING_LIST_ADDRESS internal static fixed bin(17,0) initial dcl 13-6 MESSAGE_ADDRESS_LIST_USER_FIELD internal static fixed bin(17,0) initial dcl 11-174 MESSAGE_DATE_USER_FIELD internal static fixed bin(17,0) initial dcl 11-174 MESSAGE_ENVELOPE_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 11-79 MESSAGE_INTEGER_USER_FIELD internal static fixed bin(17,0) initial dcl 11-174 MESSAGE_REDISTRIBUTIONS_LIST_VERSION_2 internal static char(8) initial packed unaligned dcl 11-117 MESSAGE_REDISTRIBUTION_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 11-144 MESSAGE_REFERENCES_LIST_VERSION_2 internal static char(8) initial packed unaligned dcl 11-227 MESSAGE_REFERENCE_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 11-253 MESSAGE_TEXT_USER_FIELD internal static fixed bin(17,0) initial dcl 11-174 MESSAGE_TRACE_VERSION_2 internal static char(8) initial packed unaligned dcl 11-103 MESSAGE_USER_FIELDS_LIST_VERSION_2 internal static char(8) initial packed unaligned dcl 11-158 MESSAGE_USER_FIELD_PARAMETER_VERSION_2 internal static char(8) initial packed unaligned dcl 11-213 NAMED_GROUP_ADDRESS internal static fixed bin(17,0) initial dcl 13-6 N_MBX_ACCESS internal static bit(36) initial dcl 3-6 OTHER_MAILBOX internal static fixed bin(17,0) initial dcl 2-37 O_MBX_ACCESS internal static bit(36) initial dcl 3-6 SAVEBOX internal static fixed bin(17,0) initial dcl 2-37 S_MBX_ACCESS internal static bit(36) initial dcl 3-6 USER_DEFAULT_MAILBOX internal static fixed bin(17,0) initial dcl 2-37 USER_LOGBOX internal static fixed bin(17,0) initial dcl 2-37 U_MBX_ACCESS internal static bit(36) initial dcl 3-6 W_MBX_ACCESS internal static bit(36) initial dcl 3-6 address_list_n_addresses automatic fixed bin(17,0) dcl 12-16 address_list_ptr automatic pointer dcl 12-14 area_infop automatic pointer dcl 15-5 fips98_message_n_bytes automatic fixed bin(21,0) dcl 8-33 message_address_list_user_field based structure level 1 dcl 11-190 message_bit_string_body_section_bit_string based bit packed unaligned dcl 11-307 message_body_section_parameter_ptr automatic pointer dcl 11-320 message_date_user_field based structure level 1 dcl 11-195 message_envelope_parameter based structure level 1 dcl 11-74 message_envelope_parameter_ptr automatic pointer dcl 11-81 message_envelope_ptr automatic pointer dcl 11-69 message_integer_user_field based structure level 1 dcl 11-200 message_n_body_sections automatic fixed bin(17,0) dcl 11-55 message_n_redistributions automatic fixed bin(17,0) dcl 11-55 message_n_user_fields automatic fixed bin(17,0) dcl 11-55 message_redistribution_comment based char packed unaligned dcl 11-131 message_redistribution_parameter based structure level 1 dcl 11-139 message_redistribution_parameter_ptr automatic pointer dcl 11-146 message_redistribution_ptr automatic pointer dcl 11-134 message_reference_parameter based structure level 1 dcl 11-248 message_reference_parameter_ptr automatic pointer dcl 11-255 message_reference_ptr automatic pointer dcl 11-243 message_reference_subject based char packed unaligned dcl 11-240 message_references_list based structure level 1 dcl 11-219 message_references_list_n_references automatic fixed bin(17,0) dcl 11-55 message_references_list_ptr automatic pointer dcl 11-229 message_text_field_ptr automatic pointer dcl 11-270 message_text_field_text based char packed unaligned dcl 11-268 message_text_user_field based structure level 1 dcl 11-183 message_text_user_field_text based char packed unaligned dcl 11-187 message_trace based structure level 1 dcl 11-87 message_trace_n_relays automatic fixed bin(17,0) dcl 11-55 message_trace_ptr automatic pointer dcl 11-105 message_user_field_parameter based structure level 1 dcl 11-208 message_user_field_parameter_ptr automatic pointer dcl 11-215 message_user_field_ptr automatic pointer dcl 11-169 message_user_fields_list based structure level 1 dcl 11-150 mlsys_data_$address_list_allocation external static fixed bin(17,0) dcl 7-33 mlsys_data_$domains_available external static fixed bin(1,0) dcl 7-44 mlsys_data_$forum_not_available external static fixed bin(1,0) dcl 7-44 mlsys_data_$hash_tables_segment_ptr external static pointer dcl 7-64 mlsys_data_$highest_usable_ring external static fixed bin(3,0) dcl 7-49 mlsys_data_$ism_not_available external static fixed bin(1,0) dcl 7-44 mlsys_data_$lowest_forum_ring external static fixed bin(3,0) dcl 7-49 mlsys_data_$max_lock_wait_retries external static fixed bin(17,0) dcl 7-19 mlsys_data_$message_body_sections_allocation external static fixed bin(17,0) dcl 7-33 mlsys_data_$message_redistributions_list_allocation external static fixed bin(17,0) dcl 7-33 mlsys_data_$message_references_list_allocation external static fixed bin(17,0) dcl 7-33 mlsys_data_$message_user_fields_allocation external static fixed bin(17,0) dcl 7-33 mlsys_data_$project_id external static varying char(12) dcl 7-71 mlsys_data_$subsystem_ring external static fixed bin(3,0) dcl 7-49 mlsys_data_$temp_segment_list_ptr external static pointer dcl 7-54 mlsys_data_$transmit_cache_ptr external static pointer dcl 7-66 mlsys_data_$user_is_anonymous external static bit(1) dcl 7-68 ms_arg_ptr automatic pointer dcl 10-7 text_length automatic fixed bin(21,0) dcl 9-22 NAMES DECLARED BY EXPLICIT CONTEXT. ALL_MESSAGES_HAVE_BEEN_READ 002074 constant label dcl 616 set ref 587 CANT_READ_MESSAGE 010637 constant label dcl 2036 ref 1952 1964 1971 1974 1976 1983 2102 2112 CANT_RECOMPUTE_MAILBOX_ACCESS 012241 constant label dcl 2300 ref 2273 2280 2287 2294 CHECK_FOR_CANONICAL_FORM 003654 constant label dcl 998 ref 958 986 CLOSE_THE_ACK_MAILBOX 007360 constant label dcl 1781 ref 1765 ERROR_RETURN_FROM_OPEN_MAILBOX 002302 constant label dcl 686 ref 507 511 529 540 547 557 569 590 ERROR_RETURN_FROM_READ_NEW_MESSAGES 003237 constant label dcl 883 ref 742 758 EXCLUDE_CURRENT_MESSAGE 002017 constant label dcl 595 ref 601 EXCLUDE_NEW_MESSAGE 002563 constant label dcl 762 ref 768 FOUND_REQUESTED_MESSAGE 003404 constant label dcl 930 ref 922 READ_ALL_NEW_MESSAGES 002637 constant label dcl 781 ref 755 READ_NEXT_MESSAGE 002073 constant label dcl 610 ref 598 READ_NEXT_NEW_MESSAGE 002636 constant label dcl 775 ref 765 RESIGNAL_DELETION_FAILURE 005553 constant label dcl 1229 ref 1233 RETRY_GET_MAILBOX_ACCESS 012057 constant label dcl 2265 ref 2278 2292 RETRY_READ_MESSAGE 010024 constant label dcl 1936 ref 1958 1969 1981 RETURN_FROM_DETERMINE_ACKNOWLEDGEMENT_RECIPIENT 006521 constant label dcl 1594 ref 1606 RETURN_FROM_GET_MESSAGE_COUNTS 001050 constant label dcl 445 ref 397 402 407 415 419 425 434 abort_delete_operation 004226 constant entry external dcl 1245 acknowledge_for_deletion 006017 constant entry internal dcl 1474 ref 1173 acknowledge_message 004743 constant entry external dcl 1424 add_suffix 007470 constant entry internal dcl 1830 ref 370 482 add_to_text 007403 constant entry internal dcl 1791 ref 1716 1718 1720 1722 1724 1727 1728 1729 1732 1736 allocate_new_message_block 010701 constant entry internal dcl 2060 ref 2048 2050 bad_acknowledge_to 006540 constant entry internal dcl 1602 ref 1555 1559 1562 1578 1584 1589 canon 005147 constant entry internal dcl 1119 ref 2141 classify_message 007656 constant entry internal dcl 1866 ref 429 1994 close_mailbox 004006 constant entry external dcl 1042 construct_user_message 011117 constant entry internal dcl 2129 ref 668 847 936 copy_ptr 013363 constant entry internal dcl 1-10 ref 699 899 964 1045 1095 1248 1323 1360 1390 1429 create_message 011754 constant entry internal dcl 2218 ref 2162 2178 2189 delete_acknowledge_to_fields 006043 constant entry internal dcl 1492 ref 1464 deletion_failure 005455 constant entry internal dcl 1202 ref 1181 1184 deliver_acknowledgement 006546 constant entry internal dcl 1614 ref 1451 1481 determine_acknowledgement_recipient 006115 constant entry internal dcl 1512 ref 1449 1479 expunge_messages 004140 constant entry external dcl 1092 find_mailbox_message_area 010756 constant entry internal dcl 2092 ref 1927 1957 find_next_message_block_slot 010643 constant entry internal dcl 2043 ref 1924 get_message_counts 000410 constant entry external dcl 365 get_message_mf_if_canonical 003712 constant entry external dcl 1018 mark_message_for_deletion 004307 constant entry external dcl 1318 message_from_self 007736 constant entry internal dcl 1904 ref 601 768 2007 2331 mlsys_mailbox_mgr_ 000373 constant entry external dcl 60 open_mailbox 001123 constant entry external dcl 456 perform_deletions 005305 constant entry internal dcl 1145 ref 1072 1104 read_message 003252 constant entry external dcl 896 read_message_canonical_form 003515 constant entry external dcl 961 read_message_canonical_form_p 003432 constant entry external dcl 947 read_new_messages 002322 constant entry external dcl 696 read_next_message 010007 constant entry internal dcl 1918 ref 586 754 recompute_mailbox_access 012050 constant entry internal dcl 2247 ref 714 1066 1332 1438 reconstruct_mailbox 005623 constant entry internal dcl 1270 ref 1105 1258 release_mailbox_info 012602 constant entry internal dcl 2367 ref 489 686 1076 release_new_mailbox_info 013126 constant entry internal dcl 2417 ref 737 883 set_message_switch 004567 constant entry external dcl 1383 unmark_message_for_deletion 004447 constant entry external dcl 1355 verify_mailbox 007432 constant entry internal dcl 1811 ref 701 901 965 1048 1097 1250 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 15406 15664 13544 15416 Length 17000 13544 256 1077 1641 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mlsys_mailbox_mgr_ 977 external procedure is an external procedure. on unit on line 380 82 on unit on unit on line 487 64 on unit on unit on line 554 64 on unit on unit on line 737 64 on unit on unit on line 739 64 on unit canon 152 internal procedure uses auto adjustable storage, uses returns(char(*)) or returns(bit(*)), and is called during a stack extension. perform_deletions internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. deletion_failure internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. reconstruct_mailbox internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. acknowledge_for_deletion internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. delete_acknowledge_to_fields internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. determine_acknowledgement_recipient 128 internal procedure enables or reverts conditions. on unit on line 1549 72 on unit bad_acknowledge_to internal procedure shares stack frame of internal procedure determine_acknowledgement_rec deliver_acknowledgement internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. begin block on line 1700 119 begin block uses auto adjustable storage, and enables or reverts conditions. on unit on line 1754 72 on unit on unit on line 1762 64 on unit add_to_text internal procedure shares stack frame of begin block on line 1700. verify_mailbox internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. add_suffix internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. classify_message internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. message_from_self internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. read_next_message internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. find_next_message_block_slot internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. allocate_new_message_block internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. find_mailbox_message_area internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. construct_user_message internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. create_message internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. recompute_mailbox_access internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. release_mailbox_info 94 internal procedure is called by several nonquick procedures. release_new_mailbox_info 84 internal procedure is called by several nonquick procedures. copy_ptr internal procedure shares stack frame of external procedure mlsys_mailbox_mgr_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME begin block on line 1700 000100 text_used begin block on line 1700 000100 ack_message begin block on line 1700 000101 wakeup_switches begin block on line 1700 canon 000100 output_string canon 000100 ALPHABET canon determine_acknowledgement_recipient 000100 acknowledge_to determine_acknowledgement_recipient 000102 mte_address determine_acknowledgement_recipient 000104 code determine_acknowledgement_recipient 000105 address_type determine_acknowledgement_recipient 000106 delivery_by_person_id determine_acknowledgement_recipient mlsys_mailbox_mgr_ 000100 code mlsys_mailbox_mgr_ 000101 mailbox_dirname mlsys_mailbox_mgr_ 000153 mailbox_ename mlsys_mailbox_mgr_ 000163 n_messages mlsys_mailbox_mgr_ 000164 n_new_messages mlsys_mailbox_mgr_ 000165 n_messages_by_type mlsys_mailbox_mgr_ 000165 message_idx mlsys_mailbox_mgr_ 000165 n_new_messages_by_type mlsys_mailbox_mgr_ 000166 switch_type mlsys_mailbox_mgr_ 000167 switch_value mlsys_mailbox_mgr_ 000170 mailbox_info_ptr mlsys_mailbox_mgr_ 000172 mailbox_message_area_ptr mlsys_mailbox_mgr_ 000174 message_block_ptr mlsys_mailbox_mgr_ 000176 next_message_block_ptr mlsys_mailbox_mgr_ 000200 im_message_info_ptr mlsys_mailbox_mgr_ 000202 local_mra mlsys_mailbox_mgr_ 000224 mra_ptr mlsys_mailbox_mgr_ 000226 system_area_ptr mlsys_mailbox_mgr_ 000230 user_privileges mlsys_mailbox_mgr_ 000231 mailbox_idx mlsys_mailbox_mgr_ 000232 mailbox_mode mlsys_mailbox_mgr_ 000233 mailbox_salvaged_bit mlsys_mailbox_mgr_ 000234 new_mailbox_ptr mlsys_mailbox_mgr_ 000236 saved_message_block_ptr mlsys_mailbox_mgr_ 000240 saved_message_block_n_used mlsys_mailbox_mgr_ 000241 message_format mlsys_mailbox_mgr_ 000242 message_type mlsys_mailbox_mgr_ 000243 first_idx mlsys_mailbox_mgr_ 000244 idx mlsys_mailbox_mgr_ 000245 deletion_failed mlsys_mailbox_mgr_ 000246 author_is_ack_recipient mlsys_mailbox_mgr_ 000247 multiple_authors mlsys_mailbox_mgr_ 000250 is_redistributed mlsys_mailbox_mgr_ 000266 mailbox_ptr mlsys_mailbox_mgr_ 000270 mailbox_n_messages mlsys_mailbox_mgr_ 000272 open_options_ptr mlsys_mailbox_mgr_ 000274 close_options_ptr mlsys_mailbox_mgr_ 000276 delete_error_info_ptr mlsys_mailbox_mgr_ 000300 fips98_message_ptr mlsys_mailbox_mgr_ 000302 mail_format_ptr mlsys_mailbox_mgr_ 000304 message_ptr mlsys_mailbox_mgr_ 000306 message_body_section_ptr mlsys_mailbox_mgr_ 000350 next_message_block_ptr perform_deletions 000352 message_idx perform_deletions 000353 idx perform_deletions 000372 next_message_block_ptr reconstruct_mailbox 000374 idx reconstruct_mailbox 000406 code acknowledge_for_deletion 000416 idx delete_acknowledge_to_fields 000426 date_time_string deliver_acknowledgement 000447 author_string deliver_acknowledgement 000550 an_author deliver_acknowledgement 000552 subject_lth deliver_acknowledgement 000554 subject_ptr deliver_acknowledgement 000556 include_subject deliver_acknowledgement 000557 message_lth deliver_acknowledgement 000574 trimmed_ename add_suffix 000606 trimmed_suffix add_suffix 000642 retry_count read_next_message 000643 retried read_next_message 000660 new_message_block_ptr allocate_new_message_block 000670 local_area_info find_mailbox_message_area 000714 new_mma_ptr find_mailbox_message_area 000724 local_mbsp construct_user_message 000736 ring_1_delivered_by construct_user_message 000740 ring_1_delivered_by_comment construct_user_message 000752 ring_1_date_time_delivered construct_user_message 000770 saved_im_message_info_ptr recompute_mailbox_access 000772 code recompute_mailbox_access 000773 retry_count recompute_mailbox_access 000774 retried recompute_mailbox_access 000776 next_message_block_ptr recompute_mailbox_access 001000 idx recompute_mailbox_access 001010 return_value copy_ptr release_mailbox_info 000100 next_message_block_ptr release_mailbox_info 000102 next_mma_ptr release_mailbox_info 000104 idx release_mailbox_info release_new_mailbox_info 000100 next_message_block_ptr release_new_mailbox_info 000102 first_idx release_new_mailbox_info 000103 idx release_new_mailbox_info THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_char_temp enter_begin_block leave_begin_block call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other return_mac tra_ext_1 alloc_auto_adj bound_ck_signal mdfx1 enable_op shorten_stack ext_entry ext_entry_desc int_entry int_entry_desc reverse_cs set_chars_eis return_chars_eis translate_2 THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. aim_check_$equal canonicalize_ define_area_ freen_ get_authorization_ get_privileges_ get_system_free_area_ mailbox_$check_salv_bit_index mailbox_$close mailbox_$compact_index mailbox_$delete_index mailbox_$get_mode_index mailbox_$incremental_read_index mailbox_$open mailbox_$open_if_full mailbox_$own_incremental_read_index mailbox_$own_read_index mailbox_$read_index mailbox_$update_message_index mailbox_$wakeup_add_index mlsys_address_list_mgr_$add_address mlsys_address_mgr_$compare_addresses mlsys_address_mgr_$create_mailbox_address mlsys_address_mgr_$create_user_mailbox_address mlsys_address_mgr_$decrement_reference_count mlsys_address_mgr_$free_address mlsys_address_mgr_$get_address_pathname mlsys_address_mgr_$get_address_type mlsys_address_mgr_$get_mail_table_address mlsys_address_mgr_$increment_reference_count mlsys_fips98_$decode_message mlsys_format_$format_date_time_field mlsys_mailbox_utils_$classify_mailbox_address mlsys_message_id_mgr_$encode_local_id mlsys_message_mgr_$add_body_section_no_copy mlsys_message_mgr_$create_im_message mlsys_message_mgr_$free_message mlsys_message_mgr_$verify_im_message mlsys_misc_utils_$get_best_address_name mlsys_parse_text_$parse_im_message_text mlsys_storage_mgr_$allocate mlsys_storage_mgr_$get_temp_segment mlsys_storage_mgr_$release_temp_segment sub_err_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_index error_table_$bad_segment error_table_$bad_subr_arg error_table_$entlong error_table_$messages_deferred error_table_$messages_off error_table_$moderr error_table_$no_info error_table_$no_message error_table_$noalloc error_table_$seg_unknown error_table_$unimplemented_version error_table_$wakeup_denied mlsys_data_$mailbox_allocation mlsys_data_$max_opening_retries mlsys_data_$person_id mlsys_data_$subsystem_area_ptr mlsys_data_$user_id mlsys_data_$valid_segments mlsys_et_$all_messages_deleted mlsys_et_$already_marked_for_deletion mlsys_et_$bad_acknowledge_to mlsys_et_$cant_be_deleted mlsys_et_$cant_send_acknowledgement mlsys_et_$cant_update_message mlsys_et_$deletion_pending mlsys_et_$message_already_read mlsys_et_$missing_acknowledge_to mlsys_et_$no_ack_needed mlsys_et_$no_message_canonical_form mlsys_et_$no_more_messages mlsys_et_$no_o_permission mlsys_et_$no_pending_deletion mlsys_et_$no_r_permission mlsys_et_$no_s_permission mlsys_et_$not_mailbox mlsys_et_$not_marked_for_deletion mlsys_et_$some_messages_not_deleted sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 132 000340 60 000372 63 000401 365 000402 369 000434 370 000442 371 000471 373 000473 375 000502 377 000504 378 000505 380 000507 382 000523 383 000526 384 000537 386 000541 387 000545 388 000567 390 000572 393 000573 394 000631 395 000633 397 000640 400 000641 402 000644 405 000647 406 000651 407 000653 414 000654 415 000667 417 000671 418 000675 419 000700 422 000701 424 000723 425 000746 428 000750 429 000754 430 000756 431 000761 432 001003 434 001030 435 001035 437 001036 438 001043 440 001047 445 001050 448 001064 450 001112 452 001114 456 001115 459 001151 460 001157 461 001162 464 001163 466 001166 467 001172 468 001175 471 001176 477 001214 478 001217 481 001220 482 001225 483 001254 485 001256 487 001260 489 001274 490 001306 496 001307 498 001336 499 001342 501 001345 502 001346 506 001364 507 001411 510 001413 511 001427 513 001431 515 001434 516 001445 518 001457 520 001470 521 001472 522 001475 523 001476 524 001501 525 001503 526 001506 528 001507 529 001512 530 001513 533 001514 534 001516 539 001531 540 001534 541 001535 542 001536 546 001547 547 001552 551 001553 552 001557 554 001561 556 001575 557 001600 560 001603 562 001643 564 001653 566 001670 567 001674 569 001715 571 001717 572 001730 573 001731 579 001737 581 001766 582 001772 586 002002 587 002003 590 002010 593 002011 595 002017 597 002042 598 002045 601 002046 605 002065 607 002067 610 002073 616 002074 622 002103 623 002126 625 002130 627 002133 628 002134 630 002136 631 002140 632 002142 633 002145 634 002150 635 002152 636 002154 637 002156 639 002160 640 002161 642 002171 643 002174 644 002176 645 002201 651 002203 653 002204 655 002222 657 002225 658 002235 659 002241 661 002242 663 002252 668 002262 669 002263 671 002271 672 002273 677 002276 679 002300 681 002301 686 002302 689 002312 691 002314 696 002315 699 002335 701 002345 702 002352 703 002355 706 002356 708 002361 709 002372 710 002375 713 002376 714 002400 715 002402 716 002404 717 002405 720 002406 722 002423 723 002426 725 002427 726 002430 727 002434 728 002437 734 002440 735 002442 737 002443 739 002465 741 002501 742 002504 745 002507 746 002510 748 002531 749 002543 752 002545 754 002546 755 002547 758 002554 760 002555 762 002563 764 002606 765 002611 768 002612 772 002631 773 002632 775 002636 781 002637 784 002640 788 002650 789 002653 793 002663 795 002706 798 002711 799 002713 802 002715 803 002717 804 002721 805 002724 806 002727 807 002731 808 002733 809 002735 811 002737 812 002740 814 002750 817 002752 818 002763 819 002773 825 002775 827 003000 829 003006 831 003011 834 003021 836 003023 837 003033 838 003037 840 003040 842 003050 847 003060 848 003061 850 003067 851 003071 856 003074 857 003077 859 003147 860 003153 861 003176 864 003202 865 003206 866 003210 868 003213 869 003216 870 003222 872 003226 874 003227 876 003233 878 003236 883 003237 886 003243 888 003245 896 003246 899 003265 901 003275 902 003302 903 003305 906 003306 908 003311 909 003322 910 003325 913 003326 915 003327 917 003344 918 003347 919 003357 920 003363 921 003366 922 003367 924 003373 925 003375 927 003400 928 003403 930 003404 932 003410 933 003413 936 003414 938 003415 940 003423 942 003424 947 003425 950 003447 952 003470 953 003473 954 003503 955 003506 958 003507 961 003510 964 003534 965 003544 966 003551 967 003554 970 003555 972 003560 973 003571 974 003574 977 003575 979 003576 981 003614 982 003617 983 003627 984 003633 985 003636 986 003637 988 003643 989 003645 991 003650 992 003653 998 003654 1000 003660 1001 003662 1002 003665 1003 003667 1004 003671 1005 003672 1006 003673 1007 003676 1009 003677 1011 003702 1013 003704 1018 003705 1021 003723 1023 003744 1025 003754 1026 003757 1027 003766 1028 003767 1030 003770 1033 003774 1035 003777 1037 004001 1042 004002 1045 004021 1046 004031 1048 004035 1049 004042 1050 004045 1053 004046 1054 004053 1055 004056 1058 004057 1059 004062 1060 004065 1063 004066 1065 004071 1066 004073 1067 004075 1068 004077 1069 004100 1072 004101 1074 004114 1076 004115 1078 004121 1080 004123 1082 004132 1084 004133 1092 004134 1095 004153 1097 004163 1098 004170 1099 004173 1102 004174 1104 004177 1105 004203 1107 004204 1109 004213 1111 004222 1113 004223 1245 004224 1248 004241 1250 004251 1251 004256 1252 004261 1255 004262 1257 004265 1258 004276 1259 004277 1260 004300 1262 004301 1264 004304 1318 004305 1321 004320 1323 004341 1324 004352 1325 004355 1327 004357 1328 004370 1329 004373 1332 004374 1333 004376 1334 004400 1335 004401 1338 004402 1342 004415 1343 004430 1344 004435 1345 004436 1347 004437 1349 004442 1351 004444 1355 004445 1358 004460 1360 004501 1361 004512 1362 004515 1364 004517 1365 004531 1366 004534 1369 004535 1370 004541 1371 004546 1372 004552 1373 004553 1375 004554 1377 004557 1379 004561 1383 004562 1387 004600 1388 004601 1390 004622 1391 004633 1392 004636 1393 004641 1394 004644 1397 004645 1398 004650 1400 004653 1401 004656 1403 004671 1405 004701 1407 004702 1408 004705 1411 004706 1416 004725 1418 004736 1420 004740 1424 004741 1427 004754 1429 004775 1430 005006 1431 005011 1433 005013 1434 005024 1435 005027 1438 005030 1439 005032 1440 005034 1441 005035 1444 005036 1445 005042 1446 005045 1449 005046 1451 005054 1454 005070 1455 005072 1457 005102 1459 005107 1461 005127 1464 005134 1465 005135 1468 005143 1470 005145 1119 005146 1123 005162 1129 005172 1133 005205 1134 005222 1135 005234 1136 005241 1137 005266 1139 005276 1145 005305 1152 005307 1154 005310 1156 005311 1158 005330 1160 005333 1161 005343 1162 005347 1164 005351 1165 005355 1167 005356 1170 005361 1173 005364 1178 005370 1179 005405 1181 005416 1182 005420 1184 005421 1187 005430 1188 005432 1190 005435 1193 005454 1202 005455 1207 005457 1209 005462 1214 005474 1215 005504 1218 005507 1219 005513 1221 005520 1222 005536 1224 005541 1225 005545 1226 005547 1227 005552 1229 005553 1233 005621 1236 005622 1270 005623 1276 005624 1279 005654 1281 005666 1283 005671 1284 005701 1286 005705 1287 005710 1289 005712 1290 005722 1292 005724 1295 005730 1299 005740 1300 005742 1302 005745 1303 005751 1304 005753 1305 005756 1307 005765 1309 005771 1310 005775 1311 006013 1314 006016 1474 006017 1479 006020 1481 006026 1484 006042 1492 006043 1497 006044 1500 006060 1501 006071 1504 006111 1506 006113 1512 006114 1523 006122 1524 006126 1525 006132 1526 006134 1528 006135 1529 006137 1532 006140 1533 006144 1534 006147 1537 006150 1538 006154 1539 006155 1542 006172 1544 006173 1545 006175 1548 006176 1549 006200 1551 006214 1552 006232 1554 006233 1555 006246 1557 006251 1558 006254 1559 006267 1560 006272 1561 006274 1562 006307 1564 006312 1567 006323 1568 006345 1573 006370 1575 006407 1578 006441 1579 006444 1584 006446 1588 006457 1589 006514 1591 006517 1594 006521 1596 006537 1602 006540 1605 006541 1606 006545 1614 006546 1651 006550 1653 006556 1655 006560 1658 006566 1659 006570 1660 006574 1661 006616 1662 006621 1663 006624 1665 006625 1666 006627 1669 006633 1672 006642 1673 006643 1675 006722 1677 006724 1678 006727 1679 006731 1680 006733 1681 006734 1683 006735 1685 006745 1686 006747 1687 006751 1688 006753 1689 006765 1690 006771 1691 006772 1693 006774 1695 006775 1700 007003 1702 007006 1714 007015 1716 007016 1718 007026 1720 007031 1722 007041 1724 007044 1726 007055 1727 007061 1728 007064 1729 007075 1732 007103 1735 007114 1736 007117 1737 007122 1738 007132 1744 007133 1745 007135 1746 007141 1747 007143 1749 007145 1750 007150 1752 007152 1754 007154 1756 007170 1757 007174 1758 007205 1760 007210 1762 007211 1764 007225 1765 007232 1768 007235 1770 007264 1771 007270 1772 007271 1773 007273 1774 007275 1777 007337 1780 007354 1781 007360 1783 007373 1784 007375 1786 007376 1803 007401 1791 007403 1796 007414 1797 007427 1799 007430 1805 007431 1811 007432 1814 007434 1816 007442 1819 007456 1822 007465 1830 007470 1839 007506 1840 007531 1842 007565 1843 007571 1844 007574 1847 007575 1851 007613 1852 007626 1854 007640 1856 007645 1858 007652 1860 007655 1866 007656 1873 007660 1876 007664 1877 007671 1878 007673 1880 007701 1881 007703 1883 007704 1885 007716 1886 007720 1888 007726 1889 007730 1892 007731 1893 007733 1896 007735 1904 007736 1909 007740 1912 007776 1918 010007 1924 010010 1925 010012 1927 010015 1930 010021 1931 010023 1936 010024 1941 010071 1944 010116 1948 010154 1952 010203 1957 010214 1958 010220 1961 010221 1962 010223 1963 010232 1964 010233 1966 010236 1967 010247 1968 010251 1969 010276 1971 010300 1974 010301 1976 010303 1977 010305 1978 010307 1979 010321 1980 010323 1981 010350 1983 010352 1991 010353 1992 010357 1993 010361 1994 010366 1996 010402 1997 010404 1999 010406 2003 010421 2004 010426 2007 010430 2012 010524 2014 010536 2016 010547 2019 010551 2023 010616 2025 010620 2027 010632 2029 010635 2031 010636 2036 010637 2038 010642 2043 010643 2046 010645 2048 010657 2050 010665 2053 010671 2056 010673 2060 010701 2065 010702 2067 010720 2068 010724 2071 010725 2076 010746 2077 010751 2078 010753 2081 010754 2084 010755 2092 010756 2100 010760 2101 010776 2102 011007 2103 011011 2104 011014 2105 011016 2106 011021 2107 011024 2109 011035 2110 011050 2111 011052 2112 011064 2114 011065 2115 011077 2117 011102 2121 011103 2129 011117 2137 011120 2139 011125 2140 011130 2141 011132 2146 011253 2147 011255 2148 011256 2150 011257 2154 011334 2156 011344 2157 011350 2158 011352 2161 011431 2162 011433 2163 011434 2164 011436 2165 011440 2166 011442 2167 011445 2168 011451 2170 011473 2172 011474 2173 011476 2174 011500 2177 011566 2178 011570 2179 011571 2180 011573 2181 011575 2182 011577 2183 011602 2184 011605 2186 011627 2189 011630 2190 011631 2191 011633 2192 011635 2193 011637 2194 011642 2195 011645 2198 011667 2199 011672 2200 011702 2201 011706 2202 011713 2204 011717 2206 011731 2208 011742 2210 011744 2212 011753 2218 011754 2221 011755 2223 011773 2226 012000 2228 012011 2230 012030 2231 012034 2232 012037 2235 012047 2247 012050 2260 012052 2262 012054 2263 012056 2265 012057 2267 012073 2270 012101 2271 012103 2272 012112 2273 012113 2275 012116 2276 012127 2277 012131 2278 012156 2280 012160 2283 012163 2285 012164 2287 012166 2288 012170 2289 012172 2290 012204 2291 012206 2292 012233 2294 012235 2297 012240 2300 012241 2302 012244 2305 012245 2308 012251 2310 012261 2312 012304 2313 012306 2316 012307 2317 012311 2320 012320 2322 012326 2324 012327 2326 012344 2328 012347 2329 012357 2331 012363 2337 012457 2339 012471 2341 012502 2344 012504 2348 012551 2349 012555 2351 012562 2354 012567 2355 012571 2357 012574 2359 012576 2361 012600 2367 012601 2373 012607 2374 012613 2375 012624 2378 012627 2381 012642 2383 012663 2384 012666 2385 012700 2387 012704 2388 012711 2389 012727 2392 012733 2393 012737 2394 012762 2397 012766 2399 013005 2400 013010 2401 013021 2402 013027 2404 013045 2405 013047 2406 013066 2408 013072 2409 013121 2411 013124 2417 013125 2424 013133 2426 013136 2428 013145 2430 013150 2432 013160 2434 013162 2435 013173 2436 013201 2437 013203 2438 013207 2439 013231 2441 013234 2443 013254 2445 013256 2446 013301 2448 013305 2449 013317 2450 013321 2452 013323 2455 013324 2456 013330 2458 013357 2461 013362 1 10 013363 1 16 013365 1 18 013370 ----------------------------------------------------------- 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