COMPILATION LISTING OF SEGMENT send_message Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 12/07/87 1321.8 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 /****^ HISTORY COMMENTS: 10* 1) change(83-11-22,Lippard), approve(), audit(), install(): 11* A rewrite by Jim Lippard of the send_message command which was part of 12* message_facility.pl1 (written 12/01/75 by Steve Herbst). This is the 13* standard command for sending interactive messages. 14* 2) change(84-06-26,Lippard), approve(), audit(), install(): 15* Modified to merge in "accepting" (based on the original "accepting" 16* written by James R. Davis on April 29, 1980 which was based on an idea 17* of Paul Benjamin). 18* 3) change(84-11-15,Lippard), approve(), audit(), install(): 19* Modified to remove the short name "acc" from accepting. 20* 4) change(84-12-14,Lippard), approve(), audit(), install(): 21* Modified to do the right thing with error_table_$no_info. 22* 5) change(85-06-03,Lippard), approve(85-11-18,MCR7298), 23* audit(86-01-10,Spitzer), install(86-01-20,MR12.0-1006): 24* Modified to handle errors properly for accepting. 25* 6) change(85-08-19,Lippard), approve(85-11-18,MCR7298), 26* audit(86-01-10,Spitzer), install(86-01-20,MR12.0-1006): 27* Modified to correct the error message produced when attempting to send 28* a message to a user whose mail table entry points to a mailing list, 29* add -update_destination (-upds) and -no_update_destination (-nupds), 30* and -acknowledge_if_deferred (-ackid). 31* 7) change(87-12-02,GWMay), approve(87-12-02,MCR7801), 32* audit(87-12-03,Lippard), install(87-12-07,MR12.2-1008): 33* Changed to terminate without error when the code error_table_$end_of_info 34* is returned by iox_$get_line in the input loop. The change allows the 35* command to be used as a filter without error. 36* END HISTORY COMMENTS */ 37 38 send_message: sm: procedure options (variable); 39 dcl ME char (24); 40 dcl VERSION char (3) internal static options (constant) initial ("1.4"); 41 42 dcl com_err_ entry () options (variable); 43 44 dcl convert_access_class_$from_string entry (bit (72) aligned, char (*), fixed bin (35)); 45 46 dcl cu_$cp entry (ptr, fixed bin (21), fixed bin (35)); 47 48 dcl expand_pathname_$add_suffix entry (char (*), char (*), char (*), char (*), fixed bin (35)); 49 dcl get_system_free_area_ entry () returns (ptr); 50 51 dcl ioa_ entry () options (variable); 52 53 dcl iox_$get_line entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (35)); 54 dcl iox_$user_input ptr ext static; 55 56 dcl mail_system_$create_user_mailbox_address entry (char (*) varying, char (*) varying, char (*) varying, 57 ptr, fixed bin (35)); 58 dcl mail_system_$create_mail_table_address entry (char (*) varying, char (*) varying, char (*) varying, 59 ptr, fixed bin (35)); 60 dcl mail_system_$free_address entry (ptr, fixed bin (35)); 61 dcl mail_system_$get_address_pathname entry (ptr, char (*), char (*), char (*), fixed bin (35)); 62 dcl mail_system_$get_mail_table_address entry (ptr, ptr, fixed bin (35)); 63 dcl mlsys_utils_$parse_mailbox_control_args entry (ptr, fixed bin, ptr, char (*), char (*), fixed bin (35)); 64 65 dcl pathname_ entry (char (*), char (*)) returns (char (168)); 66 67 dcl message_facility_$get_last_message_info entry (ptr, ptr, fixed bin (35)); 68 dcl message_facility_$get_msgf_mbx_ptr entry (char (*), char (*), ptr, fixed bin (35)); 69 dcl message_facility_$send_message entry (char (*), char (*), char (*), ptr, fixed bin (35)); 70 dcl message_facility_$send_message_access_class entry (char (*), char (*), char (*), ptr, bit (72) aligned, fixed bin (35)); 71 72 dcl requote_string_ entry (char (*)) returns (char (*)); 73 74 dcl ssu_$abort_line entry () options (variable); 75 dcl ssu_$arg_count entry (ptr, fixed bin); 76 dcl ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin (21)); 77 dcl ssu_$destroy_invocation entry (ptr); 78 dcl ssu_$print_message entry () options (variable); 79 dcl ssu_$return_arg entry (ptr, fixed bin, bit (1) aligned, ptr, fixed bin (21)); 80 dcl ssu_$standalone_invocation entry (ptr, char (*), char (*), ptr, entry, fixed bin (35)); 81 82 dcl user_info_$whoami entry (char (*), char (*), char (*)); 83 84 dcl af_allowed bit (1) aligned; 85 86 dcl active_function bit (1) aligned; 87 88 dcl arg_count fixed bin; 89 dcl arg_ptr ptr; 90 dcl arg_len fixed bin (21); 91 dcl arg char (arg_len) based (arg_ptr); 92 93 dcl return_ptr ptr; 94 dcl return_len fixed bin (21); 95 dcl return_arg char (return_len) varying based (return_ptr); 96 97 dcl access_class bit (1) aligned; 98 dcl acknowledge bit (1) aligned; 99 dcl ack_if_deferred bit (1) aligned; 100 dcl comment bit (1) aligned; 101 dcl control_args bit (1) aligned; 102 dcl destination bit (1) aligned; 103 dcl escape bit (1) aligned; 104 dcl express bit (1) aligned; 105 dcl inhibit_error bit (1) aligned; 106 dcl last_destination bit (1) aligned; 107 dcl last_sender bit (1) aligned; 108 dcl long bit (1) aligned; 109 dcl message_allocated bit (1) aligned; 110 dcl print_destination bit (1) aligned; 111 dcl no_print_destination bit (1) aligned; 112 dcl pathname bit (1) aligned internal static; 113 dcl suppress_errors bit (1) aligned; 114 dcl suppress_warnings bit (1) aligned; 115 dcl update_destination bit (1) aligned; 116 117 dcl access_class_arg bit (72) aligned; 118 dcl comment_field char (32); 119 dcl destination_arg char (168); 120 121 dcl dname char (168); 122 dcl ename char (32); 123 124 dcl person char (22); 125 dcl project char (9); 126 127 dcl last_destination_arg char (168) internal static init (""); 128 dcl last_dname char (168) internal static init (""); 129 dcl last_ename char (32) internal static init (""); 130 131 dcl last_person char (22); 132 dcl last_project char (9); 133 134 dcl 1 local_lmi aligned like last_message_info; 135 136 dcl msgf_mbx_ptr ptr; 137 138 dcl idx fixed bin; 139 140 dcl 1 ca_options aligned like parse_ca_options; 141 142 dcl address_ptr ptr; 143 dcl mt_address_ptr ptr; 144 145 dcl chars_read fixed bin (21); 146 147 dcl old_message_ptr ptr; 148 dcl old_message_len fixed bin (21); 149 dcl message_ptr ptr; 150 dcl message_len fixed bin (21); 151 dcl message_space char (1600) aligned; 152 dcl message char (message_len) aligned based (message_ptr); 153 dcl start_len fixed bin (21); 154 155 dcl area_ptr ptr; 156 dcl area area based (area_ptr); 157 158 dcl sci_ptr ptr; 159 160 dcl cleanup condition; 161 162 dcl (addr, after, before, index, length, null, reverse, rtrim, search, substr) builtin; 163 164 dcl TRUE bit (1) internal static options (constant) init ("1"b); 165 dcl FALSE bit (1) internal static options (constant) init ("0"b); 166 dcl DOT_NL char (2) internal static options (constant) init (". 167 "); 168 169 170 dcl (code, old_code) fixed bin (35); 171 172 dcl (error_table_$badopt, 173 error_table_$end_of_info, 174 error_table_$long_record, 175 error_table_$messages_deferred, 176 error_table_$messages_off, 177 error_table_$no_append, 178 error_table_$noarg, 179 error_table_$no_dir, 180 error_table_$noentry, 181 error_table_$wakeup_denied) external fixed bin (35); 182 183 dcl mlsys_et_$invalid_user_id_syntax external fixed bin (35); 184 185 ME = "send_message"; 186 af_allowed = FALSE; 187 active_function = FALSE; 188 go to COMMON; 189 190 accepting: entry; 191 ME = "accepting"; 192 af_allowed = TRUE; 193 go to COMMON; 194 195 last_message_destination: lmds: entry; 196 ME = "last_message_destination"; 197 af_allowed = TRUE; 198 inhibit_error = FALSE; 199 200 COMMON: 201 /* initialize variables */ 202 sci_ptr = null (); 203 address_ptr, mt_address_ptr = null (); 204 area_ptr = null (); 205 access_class, acknowledge, ack_if_deferred, destination, express, last_destination, last_sender, long, message_allocated, 206 suppress_errors, suppress_warnings = FALSE; 207 comment, escape, update_destination = TRUE; 208 print_destination, no_print_destination = FALSE; 209 call user_info_$whoami (person, project, ""); 210 comment_field = person; 211 212 message_ptr = addr (message_space); 213 message_len = length (message_space); 214 message = ""; 215 216 on cleanup call cleanup_sm; 217 218 /* create ssu invocation */ 219 call ssu_$standalone_invocation (sci_ptr, ME, VERSION, null, abort_sm, code); 220 221 if code ^= 0 then do; 222 call com_err_ (code, ME, "Creating standalone subsystem invocation."); 223 return; 224 end; 225 226 /* process arguments */ 227 if af_allowed then call ssu_$return_arg (sci_ptr, arg_count, active_function, return_ptr, return_len); 228 else call ssu_$arg_count (sci_ptr, arg_count); 229 230 if ME = "last_message_destination" then do; /* last_message_destination ends here */ 231 do idx = 1 to arg_count; 232 call ssu_$arg_ptr (sci_ptr, idx, arg_ptr, arg_len); 233 if arg = "-inhibit_error" | arg = "-ihe" then inhibit_error = TRUE; 234 else if index (arg, "-") = 1 then call ssu_$abort_line (sci_ptr, error_table_$badopt, "^a", arg); 235 else call ssu_$abort_line (sci_ptr, (0), "Usage: lmds {-control_arg}"); 236 end; 237 238 239 if last_destination_arg = "" then do; 240 if ^inhibit_error then call ssu_$abort_line (sci_ptr, (0), "No last message destination."); 241 else if active_function then return_arg = ""; 242 end; 243 244 else do; 245 if active_function then return_arg = requote_string_ (rtrim (last_destination_arg)); 246 else call ioa_ ("^a", last_destination_arg); 247 end; 248 249 go to MAIN_RETURN; 250 end; 251 252 control_args = TRUE; 253 254 do idx = 1 to arg_count while (control_args); 255 call ssu_$arg_ptr (sci_ptr, idx, arg_ptr, arg_len); 256 257 if (arg = "-acknowledge" | arg = "-ack") & ^af_allowed then do; 258 acknowledge = TRUE; 259 ack_if_deferred = FALSE; 260 end; 261 else if (arg = "-no_acknowledge" | arg = "-nack") & ^af_allowed then acknowledge, ack_if_deferred = FALSE; 262 else if (arg = "-acknowledge_if_deferred" | arg = "-ackid") & ^af_allowed then do; 263 ack_if_deferred = TRUE; 264 acknowledge = FALSE; 265 end; 266 267 else if (arg = "-brief" | arg = "-bf") & ^af_allowed then do; 268 suppress_warnings = TRUE; 269 suppress_errors, long = FALSE; 270 end; 271 272 else if (arg = "-long" | arg = "-lg") & ^af_allowed then do; 273 suppress_warnings, suppress_errors = FALSE; 274 long = TRUE; 275 end; 276 277 else if (arg = "-silent" | arg = "-sil") & ^af_allowed then do; 278 suppress_warnings, suppress_errors = TRUE; 279 long = FALSE; 280 end; 281 282 else if (arg = "-comment" | arg = "-com") & ^af_allowed then do; 283 idx = idx + 1; 284 if idx > arg_count then 285 call ssu_$abort_line (sci_ptr, error_table_$noarg, 286 "A character string must be given after ""^a"".", arg); 287 call ssu_$arg_ptr (sci_ptr, idx, arg_ptr, arg_len); 288 if arg_len > length (send_mail_info.sent_from) then 289 call ssu_$abort_line (sci_ptr, (0), "Comment field may be no longer than ^d characters.", 290 length (send_mail_info.sent_from)); 291 comment = TRUE; 292 comment_field = arg; 293 end; 294 295 else if (arg = "-no_comment" | arg = "-ncom") & ^af_allowed then do; 296 comment = FALSE; 297 comment_field = ""; 298 end; 299 300 else if (arg = "-escape" | arg = "-esc") & ^af_allowed then escape = TRUE; 301 else if (arg = "-no_escape" | arg = "-no_escape") & ^af_allowed then escape = FALSE; 302 303 else if (arg = "-express" | arg = "-xps") & ^af_allowed then express = TRUE; 304 else if (arg = "-no_express" | arg = "-nxps") & ^af_allowed then express = FALSE; 305 else if (arg = "-access_class" | arg = "-acc") & ^af_allowed then do; 306 idx = idx + 1; 307 308 if idx > arg_count then 309 call ssu_$abort_line (sci_ptr, error_table_$noarg, "An access class must be specified after ""^a"".", arg); 310 311 call ssu_$arg_ptr (sci_ptr, idx, arg_ptr, arg_len); 312 313 call convert_access_class_$from_string (access_class_arg, arg, code); 314 315 if code ^= 0 then 316 call ssu_$abort_line (sci_ptr, code, "^a", arg); 317 318 access_class = TRUE; 319 end; 320 321 else if arg = "-last_message_destination" | arg = "-lmds" then do; 322 if destination then call print_usage_message; 323 destination, last_destination, print_destination = TRUE; 324 destination_arg = last_destination_arg; 325 dname = last_dname; 326 ename = last_ename; 327 end; 328 329 else if arg = "-last_message_sender" | arg = "-lms" then do; 330 if destination then call print_usage_message; 331 dname = ">udd>" || rtrim (project) || ">" || person; 332 ename = rtrim (person) || ".mbx"; 333 334 call message_facility_$get_msgf_mbx_ptr (dname, ename, msgf_mbx_ptr, code); 335 if code ^= 0 then call ssu_$abort_line (sci_ptr, code, 336 "While getting message facility mailbox pointer. ^a", pathname_ (dname, ename)); 337 338 local_lmi.version = LAST_MESSAGE_INFO_VERSION_1; 339 call message_facility_$get_last_message_info (msgf_mbx_ptr, addr (local_lmi), code); 340 if code ^= 0 then call ssu_$abort_line (sci_ptr, code, 341 "While getting last message info. ^a", pathname_ (dname, ename)); 342 343 if local_lmi.last_message_id = ""b then call ssu_$abort_line (sci_ptr, (0), "No last message."); 344 345 message_info_ptr = local_lmi.last_message_ptr; 346 destination_arg, last_destination_arg = 347 substr (message_info.sender, 1, length (rtrim (message_info.sender)) - 2); 348 last_person = before (destination_arg, "."); 349 last_project = after (destination_arg, "."); 350 dname = ">udd>" || rtrim (last_project) || ">" || last_person; 351 ename = rtrim (last_person) || ".mbx"; 352 destination, last_destination, last_sender, print_destination = TRUE; 353 end; 354 355 356 else if arg = "-pathname" | arg = "-pn" then do; 357 idx = idx + 1; 358 if idx > arg_count then 359 call ssu_$abort_line (sci_ptr, error_table_$noarg, 360 "A mailbox pathname must be given after ""^a"".", arg); 361 if destination then call print_usage_message; 362 call ssu_$arg_ptr (sci_ptr, idx, arg_ptr, arg_len); 363 call expand_pathname_$add_suffix (arg, "mbx", dname, ename, code); 364 if code ^= 0 then 365 call ssu_$abort_line (sci_ptr, code, "^a", arg); 366 destination, pathname = TRUE; 367 destination_arg = pathname_ (dname, ename); 368 end; 369 370 else if (arg = "-print_destination" | arg = "-prds") & ^af_allowed then do; 371 print_destination = TRUE; 372 no_print_destination = FALSE; 373 end; 374 else if (arg = "-no_print_destination" | arg = "-nprds") & ^af_allowed then do; 375 print_destination = FALSE; 376 no_print_destination = TRUE; 377 end; 378 else if (arg = "-update_destination" | arg = "-upds") & ^af_allowed then update_destination = TRUE; 379 else if (arg = "-no_update_destination" | arg = "-nupds") & ^af_allowed then update_destination = FALSE; 380 else if index (arg, "-") ^= 1 & destination then control_args = FALSE; 381 382 else if search (arg, "<>") ^= 0 then do; 383 call expand_pathname_$add_suffix (arg, "mbx", dname, ename, code); 384 385 if code ^= 0 then call ssu_$abort_line (sci_ptr, code, "^a", arg); 386 387 destination = TRUE; 388 destination_arg = arg; 389 pathname = TRUE; 390 end; 391 392 else if index (arg, "-") ^= 1 then do; 393 call mail_system_$create_user_mailbox_address ((arg), "", "", address_ptr, code); 394 395 if code = mlsys_et_$invalid_user_id_syntax then do; 396 call mail_system_$create_mail_table_address ((arg), "", "", address_ptr, code); 397 if code = 0 then do; 398 call mail_system_$get_mail_table_address (address_ptr, mt_address_ptr, code); 399 if code = 0 then do; 400 call mail_system_$free_address (address_ptr, (0)); 401 address_ptr = mt_address_ptr; 402 end; 403 end; 404 end; 405 406 if code ^= 0 then call ssu_$abort_line (sci_ptr, code, "^a", arg); 407 408 call mail_system_$get_address_pathname (address_ptr, dname, ename, "", code); 409 if code ^= 0 then call ssu_$abort_line (sci_ptr, code, "^a", arg); 410 411 if before (reverse (rtrim (ename)), ".") = "slm" then call ssu_$abort_line (sci_ptr, (0), "Mailing lists are not supported by this command. ^a", arg); 412 413 destination = TRUE; 414 destination_arg = arg; 415 pathname = FALSE; 416 end; 417 418 else do; /* let mlsys_utils_ handle this potential address */ 419 ca_options.version = PARSE_CA_OPTIONS_VERSION_1; 420 ca_options.logbox_creation_mode = DONT_CREATE_MAILBOX; 421 ca_options.savebox_creation_mode = DONT_CREATE_MAILBOX; 422 ca_options.abort_on_errors = TRUE; 423 ca_options.validate_addresses = FALSE; 424 ca_options.mbz = ""b; 425 426 call mlsys_utils_$parse_mailbox_control_args (sci_ptr, idx, addr (ca_options), dname, ename, code); 427 if code ^= 0 then call ssu_$abort_line (sci_ptr, code); 428 idx = idx - 1; /* let the do loop increment it rather than mlsys_utils_ */ 429 430 destination = TRUE; 431 destination_arg = pathname_ (dname, ename); 432 pathname = TRUE; 433 end; 434 end; /* arg loop */ 435 436 if ^control_args & af_allowed then call print_usage_message; 437 else if ^control_args then idx = idx - 1; 438 439 if ^destination then call print_usage_message; 440 441 if last_destination & last_destination_arg = "" then 442 call ssu_$abort_line (sci_ptr, (0), "No last destination."); 443 444 /* set last info */ 445 if ^af_allowed & update_destination then do; 446 last_destination_arg = destination_arg; 447 last_dname = dname; 448 last_ename = ename; 449 end; 450 451 if acknowledge & ^long then suppress_warnings = TRUE; 452 453 send_mail_info.version = send_mail_info_version_2; 454 send_mail_info.sent_from = comment_field; 455 send_mail_info.wakeup = TRUE; 456 send_mail_info.mbz1 = ""b; 457 send_mail_info.always_add = ^express; 458 send_mail_info.never_add = FALSE; 459 send_mail_info.notify = FALSE; 460 send_mail_info.acknowledge = acknowledge; 461 send_mail_info.mbz = ""b; 462 463 code = test_sendable (); 464 old_code = code; 465 466 if ack_if_deferred & (code = error_table_$messages_deferred 467 | code = error_table_$messages_off) then send_mail_info.acknowledge = TRUE; 468 469 if af_allowed then do; /* accepting ends here */ 470 if code = error_table_$messages_off 471 | code = error_table_$messages_deferred then 472 if ^active_function then call print_code (); 473 else return_arg = "false"; 474 else if code ^= 0 then call ssu_$print_message (sci_ptr, code, "Cannot determine accepting state. ^a", destination_arg); 475 else if ^active_function then do; 476 if pathname then call ssu_$print_message (sci_ptr, (0), 477 "Messages are being accepted on the mailbox ^a.", destination_arg); 478 else call ssu_$print_message (sci_ptr, (0), "^a is accepting messages.", destination_arg); 479 end; 480 else return_arg = "true"; 481 go to MAIN_RETURN; 482 end; 483 484 if code ^= 0 then call print_code (); 485 486 if idx <= arg_count then do; /* there is a message to send */ 487 start_len = 1; 488 message = ""; 489 do idx = idx to arg_count; 490 call ssu_$arg_ptr (sci_ptr, idx, arg_ptr, arg_len); 491 if start_len + arg_len > message_len then do; /* need more space */ 492 old_message_ptr = message_ptr; 493 old_message_len = message_len; 494 message_len = message_len + arg_len + length (message_space); 495 if area_ptr = null () then area_ptr = get_system_free_area_ (); 496 497 allocate message in (area) set (message_ptr); 498 message_allocated = TRUE; 499 message = substr (old_message_ptr -> message, 1, old_message_len); 500 if old_message_len > length (message_space) then free old_message_ptr -> message in (area); 501 substr (message, old_message_len + 1) = ""; 502 end; 503 substr (message, start_len, arg_len) = arg; 504 start_len = start_len + arg_len + 1; 505 end; /* arg loop */ 506 507 if access_class then 508 call message_facility_$send_message_access_class (dname, ename, substr (message, 1, start_len - 1), 509 addr (send_mail_info), access_class_arg, code); 510 else call message_facility_$send_message (dname, ename, substr (message, 1, start_len - 1), 511 addr (send_mail_info), code); 512 513 if message_allocated then free message in (area); 514 515 if print_destination & ^no_print_destination then 516 call ioa_ ("Sent to ^a^[ (last message ^[sender^;destination^])^].", destination_arg, last_destination, last_sender); 517 518 if code ^= old_code then call print_code (); 519 520 goto MAIN_RETURN; 521 end; /* message on command line */ 522 523 else do; /* input mode */ 524 code = 0; 525 526 call ioa_ ("Input to ^a:", destination_arg); 527 do while (code = 0); 528 call iox_$get_line (iox_$user_input, message_ptr, message_len, chars_read, code); 529 if code ^= 0 then if code = error_table_$long_record then do; 530 call ssu_$print_message (sci_ptr, code, "user_input"); 531 call ssu_$print_message (sci_ptr, (0), "Maximum message length is ^d characters. Message truncated to ""^a"".", message_len, message); 532 code = 0; 533 end; 534 else if code = error_table_$end_of_info then goto MAIN_RETURN; 535 else call ssu_$abort_line (sci_ptr, code, "user_input"); 536 537 if substr (message, 1, chars_read) = DOT_NL then goto MAIN_RETURN; /* exit input mode */ 538 if substr (message, 1, 2) = ".." & escape then do; 539 substr (message, 1, 2) = " "; 540 call cu_$cp (message_ptr, chars_read, code); 541 code = 0; 542 end; 543 else do; 544 if access_class then 545 call message_facility_$send_message_access_class (dname, ename, substr (message, 1, chars_read), 546 addr (send_mail_info), access_class_arg, code); 547 else call message_facility_$send_message (dname, ename, substr (message, 1, chars_read), 548 addr (send_mail_info), code); 549 550 if code ^= old_code then 551 if code = 0 & ^suppress_warnings then 552 call ssu_$print_message (sci_ptr, (0), "^[A process^s^;^a^] is now accepting messages^[ on the mailbox ^a^].", pathname, destination_arg, pathname, destination_arg); 553 else if code ^= 0 then call print_code (); 554 old_code = code; 555 if code ^= 0 then if (code = error_table_$messages_off 556 | code = error_table_$wakeup_denied 557 | code = error_table_$messages_deferred) then code = 0; 558 end; /* sending it */ 559 end; /* input loop */ 560 end; /* message with input loop */ 561 562 if code ^= 0 & code ^= old_code then call print_code (); 563 MAIN_RETURN: 564 call cleanup_sm (); 565 RETURN_FROM_SM: 566 return; 567 568 cleanup_sm: proc (); 569 if message_allocated then do; 570 message_allocated = FALSE; 571 free message in (area); 572 end; 573 if address_ptr ^= null () then call mail_system_$free_address (address_ptr, (0)); 574 if sci_ptr ^= null () then call ssu_$destroy_invocation (sci_ptr); 575 return; 576 end cleanup_sm; 577 578 abort_sm: proc (); 579 call cleanup_sm (); 580 go to RETURN_FROM_SM; 581 end abort_sm; 582 583 test_sendable: proc () returns (fixed bin (35)); 584 dcl return_code fixed bin (35); 585 send_mail_info.never_add = TRUE; 586 if access_class then 587 call message_facility_$send_message_access_class (dname, ename, "", addr (send_mail_info), access_class_arg, return_code); 588 else call message_facility_$send_message (dname, ename, "", addr (send_mail_info), return_code); 589 send_mail_info.never_add = FALSE; 590 return (return_code); 591 end test_sendable; 592 593 594 print_code: proc; 595 dcl error_occurred bit (1) aligned; 596 error_occurred = FALSE; 597 if code = error_table_$no_append then do; 598 if ^suppress_errors then call ssu_$print_message (sci_ptr, (0), 599 "Insufficient access to add a message to^[ mailbox of^] ^a", ^pathname, destination_arg); 600 error_occurred = TRUE; 601 end; 602 else if code = error_table_$noentry | code = error_table_$no_dir then do; 603 if ^suppress_errors then call ssu_$print_message (sci_ptr, (0), 604 "No mailbox^[ for^] ^a.", ^pathname, destination_arg); 605 error_occurred = TRUE; 606 end; 607 else if code = error_table_$messages_off then if ^suppress_warnings then do; 608 if pathname then call ssu_$print_message (sci_ptr, (0), 609 "No process is accepting messages on the mailbox ^a.", destination_arg); 610 else call ssu_$print_message (sci_ptr, (0), 611 "^a is not accepting messages or not logged in.", destination_arg); 612 end; 613 else ; 614 else if code = error_table_$messages_deferred then if ^suppress_warnings then do; 615 if pathname then call ssu_$print_message (sci_ptr, (0), 616 "Messages are deferred on the mailbox ^a.", destination_arg); 617 else call ssu_$print_message (sci_ptr, (0), 618 "^a has deferred messages.", destination_arg); 619 end; 620 else ; 621 else if code = error_table_$wakeup_denied then if ^suppress_warnings then do; 622 call ssu_$print_message (sci_ptr, (0), 623 "Insufficient access to send a wakeup to ^a. Message may not be printed immediately.", destination_arg); 624 end; 625 else ; 626 else do; 627 error_occurred = TRUE; 628 if ^suppress_errors then call ssu_$print_message (sci_ptr, code, "^a", destination_arg); 629 end; 630 if express & ((suppress_warnings & error_occurred) | ^suppress_warnings) then 631 call ssu_$print_message (sci_ptr, (0), "Message not sent to ^a.", destination_arg); 632 if express | error_occurred then call abort_sm (); 633 end print_code; 634 635 /* This procedure prints a usage message for accepting or send_message */ 636 print_usage_message: procedure; 637 if af_allowed then 638 call ssu_$abort_line (sci_ptr, (0), "Usage: ^[[^]accepting address^[]^]", active_function, active_function); 639 else call ssu_$abort_line (sci_ptr, (0), "Usage: sm {-control_args} address {message}"); 640 end print_usage_message; 641 642 1 1 /* BEGIN INCLUDE FILE last_message_info.incl.pl1 */ 1 2 /* Written 05/15/84 by Jim Lippard */ 1 3 /* Modified 01/11/85 by Jim Lippard to remove last_message_index. */ 1 4 1 5 dcl 1 last_message_info aligned based (last_message_info_ptr), 1 6 2 version char (8), 1 7 2 last_message_ptr ptr, 1 8 2 last_message_id bit (72) aligned, 1 9 2 last_message_number fixed bin; 1 10 1 11 dcl last_message_info_ptr ptr; 1 12 1 13 dcl LAST_MESSAGE_INFO_VERSION_1 char (8) internal static options (constant) init ("lastmsg1"); 1 14 1 15 /* END INCLUDE FILE last_message_info.incl.pl1 */ 643 644 2 1 /* BEGIN INCLUDE FILE message_info.incl.pl1 */ 2 2 /* Written 05/15/84 by Jim Lippard */ 2 3 2 4 dcl 1 message_info aligned based (message_info_ptr), 2 5 2 version char (8), 2 6 2 sender char (32), 2 7 2 message_ptr ptr, 2 8 2 authorization bit (72); 2 9 2 10 dcl message_info_ptr ptr; 2 11 2 12 dcl MESSAGE_INFO_VERSION_1 char (8) internal static options (constant) init ("msginfo1"); 2 13 2 14 /* END INCLUDE FILE message_info.incl.pl1 */ 645 646 3 1 /* BEGIN send_mail_info include file */ 3 2 3 3 dcl send_mail_info_version_2 fixed bin init(2); 3 4 3 5 dcl 1 send_mail_info aligned, 3 6 2 version fixed bin, /* = 2 */ 3 7 2 sent_from char(32) aligned, 3 8 2 switches, 3 9 3 wakeup bit(1) unal, 3 10 3 mbz1 bit(1) unal, 3 11 3 always_add bit(1) unal, 3 12 3 never_add bit(1) unal, 3 13 3 notify bit(1) unal, 3 14 3 acknowledge bit(1) unal, 3 15 3 mbz bit(30) unal; 3 16 3 17 /* END send_mail_info include file */ 647 648 4 1 /* BEGIN INCLUDE FILE ... mlsys_parse_ca_options.incl.pl1 */ 4 2 /* Created: June 1983 by G. Palter */ 4 3 /* Modified: March 1984 by G. Palter to remove ignore_log_save option */ 4 4 4 5 /* Options for the mlsys_utils_$parse_address_control_arguments, mlsys_utils_$parse_address_list_control_arguments, and 4 6* mlsys_utils_$parse_mailbox_control_arguments entrypoints */ 4 7 4 8 dcl 1 parse_ca_options aligned based (parse_ca_options_ptr), 4 9 2 version character (8) unaligned, 4 10 2 logbox_creation_mode fixed binary, /* specifies the action to be taken if the address/mailbox is 4 11* the user's logbox, address/mailbox validation is requested, 4 12* and the logbox does not exist */ 4 13 2 savebox_creation_mode fixed binary, /* ... same as above but for any savebox */ 4 14 2 flags, 4 15 3 abort_on_errors bit (1) unaligned, /* ON => use ssu_$abort_line to report errors (ie: abort on 4 16* the first error); OFF => use ssu_$print_message */ 4 17 3 validate_addresses bit (1) unaligned, /* ON => validate the existence of the address/mailbox; 4 18* OFF => only validate the command/request line syntax */ 4 19 3 mbz bit (34) unaligned; /* must be set to ""b by the caller */ 4 20 4 21 dcl PARSE_CA_OPTIONS_VERSION_1 character (8) static options (constant) initial ("mlspca01"); 4 22 4 23 dcl parse_ca_options_ptr pointer; 4 24 4 25 4 26 /* Defined logbox/savebox creation modes */ 4 27 4 28 dcl (DONT_CREATE_MAILBOX initial (0), /* do not create the mailbox and issue an error message */ 4 29 QUERY_TO_CREATE_MAILBOX initial (1), /* ask the user for permission to create the mailbox */ 4 30 CREATE_AND_ANNOUNCE_MAILBOX initial (2), /* create the mailbox and inform the user of this action */ 4 31 SILENTLY_CREATE_MAILBOX initial (3)) /* create the mailbox but don't inform the user */ 4 32 fixed binary static options (constant); 4 33 4 34 /* END INCLUDE FILE ... mlsys_parse_ca_options.incl.pl1 */ 649 650 end send_message; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 12/07/87 1321.4 send_message.pl1 >spec>install>MR12.2-1008>send_message.pl1 643 1 01/22/85 2000.0 last_message_info.incl.pl1 >ldd>include>last_message_info.incl.pl1 645 2 11/08/84 0926.0 message_info.incl.pl1 >ldd>include>message_info.incl.pl1 647 3 04/27/78 1504.4 send_mail_info.incl.pl1 >ldd>include>send_mail_info.incl.pl1 649 4 06/18/84 1324.1 mlsys_parse_ca_options.incl.pl1 >ldd>include>mlsys_parse_ca_options.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. DONT_CREATE_MAILBOX constant fixed bin(17,0) initial dcl 4-28 ref 420 421 DOT_NL 006775 constant char(2) initial unaligned dcl 166 ref 537 FALSE constant bit(1) initial unaligned dcl 165 ref 186 187 198 205 208 259 261 264 269 273 279 296 301 304 372 375 379 380 415 423 458 459 570 589 596 LAST_MESSAGE_INFO_VERSION_1 000002 constant char(8) initial unaligned dcl 1-13 ref 338 ME 000100 automatic char(24) unaligned dcl 39 set ref 185* 191* 196* 219* 222* 230 PARSE_CA_OPTIONS_VERSION_1 000000 constant char(8) initial unaligned dcl 4-21 ref 419 TRUE constant bit(1) initial unaligned dcl 164 ref 192 197 207 233 252 258 263 268 274 278 291 300 303 318 323 352 366 371 376 378 387 389 413 422 430 432 451 455 466 498 585 600 605 627 VERSION 000004 constant char(3) initial unaligned dcl 40 set ref 219* abort_on_errors 4 000347 automatic bit(1) level 3 packed unaligned dcl 140 set ref 422* access_class 000121 automatic bit(1) dcl 97 set ref 205* 318* 507 544 586 access_class_arg 000144 automatic bit(72) dcl 117 set ref 313* 507* 544* 586* ack_if_deferred 000123 automatic bit(1) dcl 99 set ref 205* 259* 261* 263* 466 acknowledge 11(05) 001231 automatic bit(1) level 3 in structure "send_mail_info" packed unaligned dcl 3-5 in procedure "sm" set ref 460* 466* acknowledge 000122 automatic bit(1) dcl 98 in procedure "sm" set ref 205* 258* 261* 264* 451 460 active_function 000107 automatic bit(1) dcl 86 set ref 187* 227* 241 245 470 475 637* 637* addr builtin function dcl 162 ref 212 339 339 426 426 507 507 510 510 544 544 547 547 586 586 588 588 address_ptr 000354 automatic pointer dcl 142 set ref 203* 393* 396* 398* 400* 401* 408* 573 573* af_allowed 000106 automatic bit(1) dcl 84 set ref 186* 192* 197* 227 257 261 262 267 272 277 282 295 300 301 303 304 305 370 374 378 379 436 445 469 637 after builtin function dcl 162 ref 349 always_add 11(02) 001231 automatic bit(1) level 3 packed unaligned dcl 3-5 set ref 457* area based area(1024) dcl 156 ref 497 500 513 571 area_ptr 001212 automatic pointer dcl 155 set ref 204* 495 495* 497 500 513 571 arg based char unaligned dcl 91 set ref 233 233 234 234* 257 257 261 261 262 262 267 267 272 272 277 277 282 282 284* 292 295 295 300 300 301 301 303 303 304 304 305 305 308* 313* 315* 321 321 329 329 356 356 358* 363* 364* 370 370 374 374 378 378 379 379 380 382 383* 385* 388 392 393 396 406* 409* 411* 414 503 arg_count 000110 automatic fixed bin(17,0) dcl 88 set ref 227* 228* 231 254 284 308 358 486 489 arg_len 000114 automatic fixed bin(21,0) dcl 90 set ref 232* 233 233 234 234 234 255* 257 257 261 261 262 262 267 267 272 272 277 277 282 282 284 284 287* 288 292 295 295 300 300 301 301 303 303 304 304 305 305 308 308 311* 313 313 315 315 321 321 329 329 356 356 358 358 362* 363 363 364 364 370 370 374 374 378 378 379 379 380 382 383 383 385 385 388 392 393 396 406 406 409 409 411 411 414 490* 491 494 503 503 504 arg_ptr 000112 automatic pointer dcl 89 set ref 232* 233 233 234 234 255* 257 257 261 261 262 262 267 267 272 272 277 277 282 282 284 287* 292 295 295 300 300 301 301 303 303 304 304 305 305 308 311* 313 315 321 321 329 329 356 356 358 362* 363 364 370 370 374 374 378 378 379 379 380 382 383 385 388 392 393 396 406 409 411 414 490* 503 before builtin function dcl 162 ref 348 411 ca_options 000347 automatic structure level 1 dcl 140 set ref 426 426 chars_read 000360 automatic fixed bin(21,0) dcl 145 set ref 528* 537 540* 544 544 547 547 cleanup 001216 stack reference condition dcl 160 ref 216 code 001224 automatic fixed bin(35,0) dcl 170 set ref 219* 221 222* 313* 315 315* 334* 335 335* 339* 340 340* 363* 364 364* 383* 385 385* 393* 395 396* 397 398* 399 406 406* 408* 409 409* 426* 427 427* 463* 464 466 466 470 470 474 474* 484 507* 510* 518 524* 527 528* 529 529 530* 532* 534 535* 540* 541* 544* 547* 550 550 553 554 555 555 555 555 555* 562 562 597 602 602 607 614 621 628* com_err_ 000146 constant entry external dcl 42 ref 222 comment 000124 automatic bit(1) dcl 100 set ref 207* 291* 296* comment_field 000146 automatic char(32) unaligned dcl 118 set ref 210* 292* 297* 454 control_args 000125 automatic bit(1) dcl 101 set ref 252* 254 380* 436 437 convert_access_class_$from_string 000150 constant entry external dcl 44 ref 313 cu_$cp 000152 constant entry external dcl 46 ref 540 destination 000126 automatic bit(1) dcl 102 set ref 205* 322 323* 330 352* 361 366* 380 387* 413* 430* 439 destination_arg 000156 automatic char(168) unaligned dcl 119 set ref 324* 346* 348 349 367* 388* 414* 431* 446 474* 476* 478* 515* 526* 550* 550* 598* 603* 608* 610* 615* 617* 622* 628* 630* dname 000230 automatic char(168) unaligned dcl 121 set ref 325* 331* 334* 335* 335* 340* 340* 350* 363* 367* 383* 408* 426* 431* 447 507* 510* 544* 547* 586* 588* ename 000302 automatic char(32) unaligned dcl 122 set ref 326* 332* 334* 335* 335* 340* 340* 351* 363* 367* 383* 408* 411 426* 431* 448 507* 510* 544* 547* 586* 588* error_occurred 001264 automatic bit(1) dcl 595 set ref 596* 600* 605* 627* 630 632 error_table_$badopt 000236 external static fixed bin(35,0) dcl 172 set ref 234* error_table_$end_of_info 000240 external static fixed bin(35,0) dcl 172 ref 534 error_table_$long_record 000242 external static fixed bin(35,0) dcl 172 ref 529 error_table_$messages_deferred 000244 external static fixed bin(35,0) dcl 172 ref 466 470 555 614 error_table_$messages_off 000246 external static fixed bin(35,0) dcl 172 ref 466 470 555 607 error_table_$no_append 000250 external static fixed bin(35,0) dcl 172 ref 597 error_table_$no_dir 000254 external static fixed bin(35,0) dcl 172 ref 602 error_table_$noarg 000252 external static fixed bin(35,0) dcl 172 set ref 284* 308* 358* error_table_$noentry 000256 external static fixed bin(35,0) dcl 172 ref 602 error_table_$wakeup_denied 000260 external static fixed bin(35,0) dcl 172 ref 555 621 escape 000127 automatic bit(1) dcl 103 set ref 207* 300* 301* 538 expand_pathname_$add_suffix 000154 constant entry external dcl 48 ref 363 383 express 000130 automatic bit(1) dcl 104 set ref 205* 303* 304* 457 630 632 flags 4 000347 automatic structure level 2 dcl 140 get_system_free_area_ 000156 constant entry external dcl 49 ref 495 idx 000346 automatic fixed bin(17,0) dcl 138 set ref 231* 232* 254* 255* 283* 283 284 287* 306* 306 308 311* 357* 357 358 362* 426* 428* 428* 437* 437 486 489* 489* 490* index builtin function dcl 162 ref 234 380 392 inhibit_error 000131 automatic bit(1) dcl 105 set ref 198* 233* 240 ioa_ 000160 constant entry external dcl 51 ref 246 515 526 iox_$get_line 000162 constant entry external dcl 53 ref 528 iox_$user_input 000164 external static pointer dcl 54 set ref 528* last_destination 000132 automatic bit(1) dcl 106 set ref 205* 323* 352* 441 515* last_destination_arg 000011 internal static char(168) initial unaligned dcl 127 set ref 239 245 245 246* 324 346* 441 446* last_dname 000063 internal static char(168) initial unaligned dcl 128 set ref 325 447* last_ename 000135 internal static char(32) initial unaligned dcl 129 set ref 326 448* last_message_id 4 000334 automatic bit(72) level 2 dcl 134 set ref 343 last_message_info based structure level 1 dcl 1-5 last_message_ptr 2 000334 automatic pointer level 2 dcl 134 set ref 345 last_person 000323 automatic char(22) unaligned dcl 131 set ref 348* 350 351 last_project 000331 automatic char(9) unaligned dcl 132 set ref 349* 350 last_sender 000133 automatic bit(1) dcl 107 set ref 205* 352* 515* length builtin function dcl 162 ref 213 288 288 288 346 494 500 local_lmi 000334 automatic structure level 1 dcl 134 set ref 339 339 logbox_creation_mode 2 000347 automatic fixed bin(17,0) level 2 dcl 140 set ref 420* long 000134 automatic bit(1) dcl 108 set ref 205* 269* 274* 279* 451 mail_system_$create_mail_table_address 000170 constant entry external dcl 58 ref 396 mail_system_$create_user_mailbox_address 000166 constant entry external dcl 56 ref 393 mail_system_$free_address 000172 constant entry external dcl 60 ref 400 573 mail_system_$get_address_pathname 000174 constant entry external dcl 61 ref 408 mail_system_$get_mail_table_address 000176 constant entry external dcl 62 ref 398 mbz 4(02) 000347 automatic bit(34) level 3 in structure "ca_options" packed unaligned dcl 140 in procedure "sm" set ref 424* mbz 11(06) 001231 automatic bit(30) level 3 in structure "send_mail_info" packed unaligned dcl 3-5 in procedure "sm" set ref 461* mbz1 11(01) 001231 automatic bit(1) level 3 packed unaligned dcl 3-5 set ref 456* message based char dcl 152 set ref 214* 488* 497 499* 499 500 501* 503* 507 507 510 510 513 531* 537 538 539* 544 544 547 547 571 message_allocated 000135 automatic bit(1) dcl 109 set ref 205* 498* 513 569 570* message_facility_$get_last_message_info 000204 constant entry external dcl 67 ref 339 message_facility_$get_msgf_mbx_ptr 000206 constant entry external dcl 68 ref 334 message_facility_$send_message 000210 constant entry external dcl 69 ref 510 547 588 message_facility_$send_message_access_class 000212 constant entry external dcl 70 ref 507 544 586 message_info based structure level 1 dcl 2-4 message_info_ptr 001226 automatic pointer dcl 2-10 set ref 345* 346 346 message_len 000370 automatic fixed bin(21,0) dcl 150 set ref 213* 214 488 491 493 494* 494 497 497 499 499 500 500 501 503 507 507 510 510 513 513 528* 531* 531 531 537 538 539 544 544 547 547 571 571 message_ptr 000366 automatic pointer dcl 149 set ref 212* 214 488 492 497* 499 501 503 507 507 510 510 513 528* 531 537 538 539 540* 544 544 547 547 571 message_space 000371 automatic char(1600) dcl 151 set ref 212 213 494 500 mlsys_et_$invalid_user_id_syntax 000262 external static fixed bin(35,0) dcl 183 ref 395 mlsys_utils_$parse_mailbox_control_args 000200 constant entry external dcl 63 ref 426 msgf_mbx_ptr 000344 automatic pointer dcl 136 set ref 334* 339* mt_address_ptr 000356 automatic pointer dcl 143 set ref 203* 398* 401 never_add 11(03) 001231 automatic bit(1) level 3 packed unaligned dcl 3-5 set ref 458* 585* 589* no_print_destination 000137 automatic bit(1) dcl 111 set ref 208* 372* 376* 515 notify 11(04) 001231 automatic bit(1) level 3 packed unaligned dcl 3-5 set ref 459* null builtin function dcl 162 ref 200 203 204 219 219 495 573 574 old_code 001225 automatic fixed bin(35,0) dcl 170 set ref 464* 518 550 554* 562 old_message_len 000364 automatic fixed bin(21,0) dcl 148 set ref 493* 499 500 501 old_message_ptr 000362 automatic pointer dcl 147 set ref 492* 499 500 parse_ca_options based structure level 1 dcl 4-8 pathname 000010 internal static bit(1) dcl 112 set ref 366* 389* 415* 432* 476 550* 550* 598 603 608 615 pathname_ 000202 constant entry external dcl 65 ref 335 335 340 340 367 431 person 000312 automatic char(22) unaligned dcl 124 set ref 209* 210 331 332 print_destination 000136 automatic bit(1) dcl 110 set ref 208* 323* 352* 371* 375* 515 project 000320 automatic char(9) unaligned dcl 125 set ref 209* 331 requote_string_ 000214 constant entry external dcl 72 ref 245 return_arg based varying char dcl 95 set ref 241* 245* 473* 480* return_code 001254 automatic fixed bin(35,0) dcl 584 set ref 586* 588* 590 return_len 000120 automatic fixed bin(21,0) dcl 94 set ref 227* 241 245 473 480 return_ptr 000116 automatic pointer dcl 93 set ref 227* 241 245 473 480 reverse builtin function dcl 162 ref 411 rtrim builtin function dcl 162 ref 245 245 331 332 346 350 351 411 savebox_creation_mode 3 000347 automatic fixed bin(17,0) level 2 dcl 140 set ref 421* sci_ptr 001214 automatic pointer dcl 158 set ref 200* 219* 227* 228* 232* 234* 235* 240* 255* 284* 287* 288* 308* 311* 315* 335* 340* 343* 358* 362* 364* 385* 406* 409* 411* 426* 427* 441* 474* 476* 478* 490* 530* 531* 535* 550* 574 574* 598* 603* 608* 610* 615* 617* 622* 628* 630* 637* 639* search builtin function dcl 162 ref 382 send_mail_info 001231 automatic structure level 1 dcl 3-5 set ref 507 507 510 510 544 544 547 547 586 586 588 588 send_mail_info_version_2 001230 automatic fixed bin(17,0) initial dcl 3-3 set ref 453 3-3* sender 2 based char(32) level 2 dcl 2-4 ref 346 346 sent_from 1 001231 automatic char(32) level 2 dcl 3-5 set ref 288 288 288 454* ssu_$abort_line 000216 constant entry external dcl 74 ref 234 235 240 284 288 308 315 335 340 343 358 364 385 406 409 411 427 441 535 637 639 ssu_$arg_count 000220 constant entry external dcl 75 ref 228 ssu_$arg_ptr 000222 constant entry external dcl 76 ref 232 255 287 311 362 490 ssu_$destroy_invocation 000224 constant entry external dcl 77 ref 574 ssu_$print_message 000226 constant entry external dcl 78 ref 474 476 478 530 531 550 598 603 608 610 615 617 622 628 630 ssu_$return_arg 000230 constant entry external dcl 79 ref 227 ssu_$standalone_invocation 000232 constant entry external dcl 80 ref 219 start_len 001211 automatic fixed bin(21,0) dcl 153 set ref 487* 491 503 504* 504 507 507 510 510 substr builtin function dcl 162 set ref 346 499 501* 503* 507 507 510 510 537 538 539* 544 544 547 547 suppress_errors 000140 automatic bit(1) dcl 113 set ref 205* 269* 273* 278* 598 603 628 suppress_warnings 000141 automatic bit(1) dcl 114 set ref 205* 268* 273* 278* 451* 550 607 614 621 630 630 switches 11 001231 automatic structure level 2 dcl 3-5 update_destination 000142 automatic bit(1) dcl 115 set ref 207* 378* 379* 445 user_info_$whoami 000234 constant entry external dcl 82 ref 209 validate_addresses 4(01) 000347 automatic bit(1) level 3 packed unaligned dcl 140 set ref 423* version 000347 automatic char(8) level 2 in structure "ca_options" packed unaligned dcl 140 in procedure "sm" set ref 419* version 001231 automatic fixed bin(17,0) level 2 in structure "send_mail_info" dcl 3-5 in procedure "sm" set ref 453* version 000334 automatic char(8) level 2 in structure "local_lmi" dcl 134 in procedure "sm" set ref 338* wakeup 11 001231 automatic bit(1) level 3 packed unaligned dcl 3-5 set ref 455* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. CREATE_AND_ANNOUNCE_MAILBOX internal static fixed bin(17,0) initial dcl 4-28 MESSAGE_INFO_VERSION_1 internal static char(8) initial unaligned dcl 2-12 QUERY_TO_CREATE_MAILBOX internal static fixed bin(17,0) initial dcl 4-28 SILENTLY_CREATE_MAILBOX internal static fixed bin(17,0) initial dcl 4-28 last_message_info_ptr automatic pointer dcl 1-11 parse_ca_options_ptr automatic pointer dcl 4-23 NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 001041 constant label dcl 200 ref 188 193 MAIN_RETURN 005624 constant label dcl 563 ref 249 481 520 534 537 RETURN_FROM_SM 005630 constant label dcl 565 ref 580 abort_sm 005705 constant entry internal dcl 578 ref 219 219 632 accepting 001000 constant entry external dcl 190 cleanup_sm 005632 constant entry internal dcl 568 ref 216 563 579 last_message_destination 001025 constant entry external dcl 195 lmds 001015 constant entry external dcl 195 print_code 006031 constant entry internal dcl 594 ref 470 484 518 553 562 print_usage_message 006500 constant entry internal dcl 636 ref 322 330 361 436 439 send_message 000763 constant entry external dcl 38 sm 000753 constant entry external dcl 38 test_sendable 005722 constant entry internal dcl 583 ref 463 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 7562 10046 6777 7572 Length 10456 6777 264 374 562 136 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME sm 926 external procedure is an external procedure. on unit on line 216 64 on unit cleanup_sm 72 internal procedure is called by several nonquick procedures. abort_sm 64 internal procedure is assigned to an entry variable. test_sendable internal procedure shares stack frame of external procedure sm. print_code internal procedure shares stack frame of external procedure sm. print_usage_message internal procedure shares stack frame of external procedure sm. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 pathname sm 000011 last_destination_arg sm 000063 last_dname sm 000135 last_ename sm STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME sm 000100 ME sm 000106 af_allowed sm 000107 active_function sm 000110 arg_count sm 000112 arg_ptr sm 000114 arg_len sm 000116 return_ptr sm 000120 return_len sm 000121 access_class sm 000122 acknowledge sm 000123 ack_if_deferred sm 000124 comment sm 000125 control_args sm 000126 destination sm 000127 escape sm 000130 express sm 000131 inhibit_error sm 000132 last_destination sm 000133 last_sender sm 000134 long sm 000135 message_allocated sm 000136 print_destination sm 000137 no_print_destination sm 000140 suppress_errors sm 000141 suppress_warnings sm 000142 update_destination sm 000144 access_class_arg sm 000146 comment_field sm 000156 destination_arg sm 000230 dname sm 000302 ename sm 000312 person sm 000320 project sm 000323 last_person sm 000331 last_project sm 000334 local_lmi sm 000344 msgf_mbx_ptr sm 000346 idx sm 000347 ca_options sm 000354 address_ptr sm 000356 mt_address_ptr sm 000360 chars_read sm 000362 old_message_ptr sm 000364 old_message_len sm 000366 message_ptr sm 000370 message_len sm 000371 message_space sm 001211 start_len sm 001212 area_ptr sm 001214 sci_ptr sm 001224 code sm 001225 old_code sm 001226 message_info_ptr sm 001230 send_mail_info_version_2 sm 001231 send_mail_info sm 001254 return_code test_sendable 001264 error_occurred print_code THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this call_int_other return_mac tra_ext_1 enable_op shorten_stack ext_entry int_entry reverse_cs set_chars_eis op_alloc_ op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ convert_access_class_$from_string cu_$cp expand_pathname_$add_suffix get_system_free_area_ ioa_ iox_$get_line mail_system_$create_mail_table_address mail_system_$create_user_mailbox_address mail_system_$free_address mail_system_$get_address_pathname mail_system_$get_mail_table_address message_facility_$get_last_message_info message_facility_$get_msgf_mbx_ptr message_facility_$send_message message_facility_$send_message_access_class mlsys_utils_$parse_mailbox_control_args pathname_ requote_string_ ssu_$abort_line ssu_$arg_count ssu_$arg_ptr ssu_$destroy_invocation ssu_$print_message ssu_$return_arg ssu_$standalone_invocation user_info_$whoami THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$end_of_info error_table_$long_record error_table_$messages_deferred error_table_$messages_off error_table_$no_append error_table_$no_dir error_table_$noarg error_table_$noentry error_table_$wakeup_denied iox_$user_input mlsys_et_$invalid_user_id_syntax LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 3 3 000746 38 000752 185 000771 186 000774 187 000775 188 000776 190 000777 191 001006 192 001011 193 001013 195 001014 196 001033 197 001036 198 001040 200 001041 203 001043 204 001046 205 001047 207 001063 208 001067 209 001072 210 001113 212 001116 213 001120 214 001122 216 001125 219 001147 221 001210 222 001212 223 001236 227 001237 228 001261 230 001272 231 001276 232 001305 233 001322 234 001337 235 001404 236 001431 239 001433 240 001440 241 001467 242 001473 245 001474 246 001551 249 001570 252 001571 254 001573 255 001605 257 001622 258 001640 259 001642 260 001643 261 001644 262 001664 263 001676 264 001700 265 001701 267 001702 268 001714 269 001716 270 001721 272 001722 273 001734 274 001737 275 001741 277 001742 278 001754 279 001757 280 001760 282 001761 283 001773 284 001774 287 002032 288 002047 291 002105 292 002107 293 002114 295 002115 296 002127 297 002130 298 002133 300 002134 301 002151 303 002164 304 002201 305 002215 306 002227 308 002230 311 002266 313 002303 315 002327 318 002363 319 002365 321 002366 322 002376 323 002401 324 002405 325 002411 326 002414 327 002417 329 002420 330 002430 331 002433 332 002502 334 002531 335 002557 338 002631 339 002633 340 002650 343 002722 345 002754 346 002756 348 003004 349 003015 350 003033 351 003102 352 003131 353 003137 356 003140 357 003150 358 003151 361 003207 362 003212 363 003227 364 003265 366 003321 367 003325 368 003344 370 003345 371 003357 372 003361 373 003362 374 003363 375 003375 376 003376 377 003400 378 003401 379 003416 380 003432 382 003451 383 003464 385 003522 387 003556 388 003560 389 003565 390 003567 392 003570 393 003573 395 003634 396 003641 397 003702 398 003705 399 003720 400 003722 401 003734 406 003736 408 003772 409 004023 411 004057 413 004143 414 004146 415 004153 416 004155 419 004156 420 004161 421 004163 422 004164 423 004166 424 004170 426 004172 427 004230 428 004247 430 004251 431 004253 432 004273 434 004276 436 004300 437 004310 439 004314 441 004317 445 004353 446 004357 447 004363 448 004366 451 004371 453 004377 454 004401 455 004404 456 004406 457 004410 458 004416 459 004420 460 004422 461 004427 463 004431 464 004433 466 004435 469 004454 470 004456 473 004467 474 004501 475 004533 476 004536 478 004572 479 004622 480 004623 481 004634 484 004635 486 004640 487 004643 488 004645 489 004652 490 004661 491 004676 492 004702 493 004704 494 004706 495 004711 497 004724 498 004733 499 004735 500 004743 501 004753 503 004762 504 004771 505 004774 507 004776 510 005052 513 005120 515 005130 518 005163 520 005167 524 005170 526 005171 527 005213 528 005216 529 005235 530 005242 531 005266 532 005326 533 005327 534 005330 535 005332 537 005356 538 005364 539 005372 540 005374 541 005407 542 005410 544 005411 547 005462 550 005525 553 005601 554 005604 555 005606 559 005617 562 005620 563 005624 565 005630 568 005631 569 005637 570 005642 571 005643 573 005650 574 005667 575 005703 578 005704 579 005712 580 005717 583 005722 585 005724 586 005726 588 005770 589 006023 590 006025 594 006031 596 006032 597 006033 598 006037 600 006101 601 006103 602 006104 603 006110 605 006152 606 006154 607 006155 608 006161 610 006215 613 006245 614 006246 615 006252 617 006306 620 006336 621 006337 622 006343 625 006373 627 006374 628 006376 630 006426 632 006467 633 006477 636 006500 637 006501 639 006537 640 006564 ----------------------------------------------------------- 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