1 11/28/86  ws_
   2 
   3 
   4 The Work Station subroutine library provides the application
   5 programmer with a means of accessing the facilities provided by MOWSE,
   6 including facilities for: registering with MOWSE, obtaining
   7 information from MOWSE, and making requests of other applications
   8 which are registered with MOWSE.
   9 
  10 In most cases, equivalent functionality has been provided for both
  11 machines (the PC and Multics).  Help is available (through Multics
  12 info segs) for both sides, and is accessed by entering the subroutine
  13 or entrypoint name following the help command.
  14 
  15 For more information on the use of the subroutine library, please
  16 consult the MOWSE Application Programmer's Manual.
  17 
  18 
  19 Entry points in ws_:
  20     (List is generated by the help command)
  21 
  22 
  23 :Entry: connect_request: 11/28/86  ws_$connect_request
  24 
  25 
  26 Function:
  27 Requests a connection to an application which has been loaded
  28 by sending a "REQUEST_CONNECT" minor capability to the
  29 requested application.
  30 
  31 
  32 Syntax:
  33 dcl ws_$connect_request entry
  34     (char (*),
  35      char (*),
  36      fixed bin,
  37      ptr,
  38      fixed bin (35));
  39 call ws_$connect_request
  40     (capability_name,
  41      args,
  42      system,
  43      mcb_ptr,
  44      code);
  45 
  46 
  47 Arguments:
  48 capability_name  (Input)
  49     The name of the major capability of the application to
  50     which the connect is requested.
  51 args (Input)
  52     Any command line arguments which may be necessary if the
  53     capability is to be started before the connection is made.
  54 system (Input)
  55     The system of the capability being connected to.
  56 
  57 
  58 mcb_ptr  (Input)
  59     The pointer to the application's MOWSE Control Block
  60     assigned by a call to ws_$create_instance.
  61 code  (Output)
  62     The error code immediately returned from MOWSE.
  63     Values:
  64             0 - no error
  65             Or a standard Multics system error code.
  66 
  67 
  68 Examples:
  69 call ws_$connect_request ("bft", "load", REMOTE, mcb_ptr,
  70 code);
  71 
  72 
  73 :Entry: connect_response: 11/28/86  ws_$connect_response
  74 
  75 
  76 Function:
  77 Replies to an application's request for a connection.  This
  78 allows the application of the ws_$connect_request call to
  79 be notified either of this application's acceptance of the connect
  80 request (by supplying the new major capability_number), or
  81 rejection of the request (by supplying an error code).  The
  82 application which made the request for connection will receive
  83 the RESPONSE_CONNECT which will indicate the success or fail
  84 of the request.
  85 
  86 
  87 Syntax:
  88 dcl ws_$connect_response entry
  89     (fixed bin(17),
  90     fixed bin(17),
  91     ptr,
  92     fixed bin(35));
  93 call ws_$connect_response
  94     (status,
  95     major_capability,
  96     mcb_ptr,
  97     code);
  98 
  99 
 100 Arguments:
 101 status  (Input)
 102     The acceptance/rejectance of the connect request.
 103     Values ACCEPT
 104             REJECT
 105 major_capability  (Input)
 106     The major capability number of the application to which
 107     the response is destined.
 108 
 109 
 110 mcb_ptr  (Input)
 111     A pointer to the mcb which is associated with the
 112     connection.  The mcb can be either the original mcb
 113     obtained by the application, or the address of a new mcb
 114     obtained by the application specifically for this
 115     connection.
 116 code  (Output)
 117     The error code immediately returned from MOWSE.
 118     Values:
 119             0 - no error
 120             Or a standard Multics system error code.
 121 
 122 
 123 Examples:
 124 call ws_$connect_response (ACCEPT, request_capability,
 125                            mcb_ptr, code);
 126 call ws_$connect_response (REJECT, request_capability,
 127                            mcb_ptr, code);
 128 
 129 
 130 :Entry: create_instance: 11/28/86  ws_$create_instance
 131 
 132 
 133 Function:
 134 Registers the calling routine with MOWSE by assigning it a
 135 major capability number and adding it to MOWSE's capability
 136 table.  The calling routine must supply the name by which it
 137 is to be known to MOWSE, and the entry point describing where
 138 it is to be invoked by an execute capability.
 139 
 140 
 141 Syntax:
 142 dcl ws_$create_instance entry
 143     (char(*),
 144      char(*),
 145      fixed bin(17),
 146      fixed bin(17),
 147      ptr,
 148      ptr,
 149      fixed bin(35))
 150 
 151 
 152 call ws_$create_instance
 153     (capability_name,
 154      entry_name,
 155      inbuff_length,
 156      outbuff_length,
 157      data_block_ptr,
 158      mcb_ptr,
 159      code)
 160 
 161 
 162 Arguments:
 163 capability_name  (Input)
 164     The name by which the calling capability will be known to
 165     MOWSE.
 166 entry_name  (Input)
 167     The entry point (by name) which will be invoked when MOWSE
 168     has a message destined for the application.
 169 inbuff_length  (Input)
 170     The length (in characters) of the message buffer which
 171     receives argument data from incoming messages.  The buffer
 172     will be allocated with the size specified or
 173     MINIMUM_BUFFER_SIZE, whichever is larger.
 174 
 175 
 176 outbuff_length  (Input)
 177     The length (in characters) of the message buffer which
 178     will be used for outgoing messages.  The buffer will be
 179     allocated with the size specified or MINIMUM_BUFFER_SIZE,
 180     whichever is larger.
 181 data_block_ptr  (Input)
 182     A pointer to the application's local data which is to be
 183     preserved across calls to the capability through MOWSE.
 184     This provides an alternate method to static variables of
 185     preserving data across the starts and stops of the
 186     application's life in MOWSE thus providing reentrancy.
 187 
 188 
 189 mcb_ptr  (Output)
 190     A pointer to the application's MOWSE Control Block which
 191     will be used by MOWSE to maintain information on the
 192     application.
 193 code  (Output)
 194     The error code immediately returned from MOWSE.
 195     Values:
 196             0 - no error
 197             Or a standard Multics system error code.
 198 
 199 
 200 Notes:
 201 All applications which expect to receive messages must have
 202 registered with MOWSE (through create_instance) in order to
 203 receive messages.  A message is provided to the application
 204 when the destination of the message specifies the major
 205 capability number of the application.  The application will
 206 then be invoked at the entry name provided with the message
 207 (argument data), its length, and a pointer to the applications
 208 data_block as follows:
 209 
 210 
 211    dcl application_$entry_point entry
 212           (fixed bin,
 213            fixed bin,
 214            ptr,
 215            fixed bin,
 216            ptr,
 217            ptr);
 218 
 219 
 220    application_$entry_point (minor_capability, major_sender,
 221               arg_ptr, arg_length, mcb_ptr, data_block_ptr);
 222 
 223 
 224 The buffers inbuff and outbuff allow MOWSE to send and receive
 225 messages longer than one communications packet (defined by
 226 PACKET_SIZE) in a manner transparent to the capability.
 227 
 228 
 229 Examples:
 230 call ws_$create_instance ("bft", "bft_$process_event",
 231          256, 256, data_ptr, mcb_ptr, code);
 232 
 233 
 234 :Entry: destroy_instance: 11/28/86  ws_$destroy_instance
 235 
 236 
 237 Function:
 238 Removes the reference to the application from MOWSE's
 239 capability table and deallocates the inbuff and outbuff
 240 message buffer space.
 241 
 242 
 243 Syntax:
 244 dcl ws_$destroy_instance entry
 245     (ptr,
 246      fixed bin(35));
 247 call ws_$destroy_instance
 248     (mcb_ptr
 249      code);
 250 
 251 
 252 Arguments:
 253 mcb_ptr  (Input)
 254     The pointer to the application's MOWSE Control Block
 255     assigned by a call to ws_$create_instance.
 256 code  (Output)
 257     The error code immediately returned from MOWSE.
 258     Values:
 259             0 - no error
 260             Or a standard Multics system error code.
 261 
 262 
 263 Examples:
 264 call ws_$destroy_instance (mcb_ptr, code);
 265 
 266 
 267 :Entry: disconnect_request: 11/28/86  ws_$disconnect_request
 268 
 269 
 270 Function:
 271 Requests that conversation to the specified application be
 272 terminated by sending a REQUEST_DISCONNECT to the specified
 273 capability.
 274 
 275 
 276 Syntax:
 277 dcl ws_$disconnect_request entry
 278     (fixed bin(17),
 279     ptr,
 280     fixed bin(35));
 281 call ws_$disconnect_request
 282     (capability_number,
 283     mcb_ptr,
 284     code);
 285 
 286 
 287 Arguments:
 288 capability_number  (Input)
 289     The major capability number of the application which is to
 290     be disconnected.
 291 mcb_ptr  (Input)
 292     The pointer to the application's MOWSE Control Block
 293     assigned by a call to ws_$create_instance.
 294 code  (Output)
 295     The error code immediately returned from MOWSE.
 296     Values:
 297             0 - no error
 298             Or a standard Multics system error code.
 299 
 300 
 301 Examples:
 302 call ws_$disconnect_request (bft_major_cap, mcb_ptr, code);
 303 
 304 
 305 :Entry: disconnect_response: 11/28/86  ws_$disconnect_response
 306 
 307 
 308 Function:
 309 Notifies the application which requested a disconnect that the
 310 disconnect was accepted or rejected.  A RESPONSE_DISCONNECT
 311 message will be sent to the application which made the
 312 disconnect request.
 313 
 314 
 315 Syntax:
 316 dcl ws_$disconnect_response
 317     (fixed bin(17),
 318     fixed bin(17),
 319     ptr,
 320     fixed bin(35));
 321 call ws_$disconnect_response
 322     (status,
 323     major_capability,
 324     mcb_ptr,
 325     code);
 326 
 327 
 328 Arguments:
 329 status  (Input)
 330     The acceptance/rejection of the disconnect request.
 331     Values ACCEPT
 332             REJECT
 333 major_capability  (Input)
 334     The major capability number of the application to which
 335     the response is destined.
 336 
 337 
 338 mcb_ptr  (Input)
 339     The pointer to the application's MOWSE control block
 340     assigned by a call to ws_$create_instance.
 341 code  (Output)
 342     The error code immediately returned from MOWSE.
 343     Values:
 344             0 - no error
 345             Or a standard Multics system error code.
 346 
 347 
 348 Examples:
 349 call ws_$disconnect_response (ACCEPT,
 350                               request_capability,
 351                               mcb_ptr, code);
 352 call ws_$disconnect_response (REJECT,
 353                               request_capability,
 354                               mcb_ptr, code);
 355 
 356 
 357 :Entry: execute_capability: 11/28/86  ws_$execute_capability
 358 
 359 
 360 Function:
 361 Executes the minor capability function of the specified major
 362 capability with the arguments provided.
 363 
 364 
 365 Syntax:
 366 dcl ws_$execute_capability entry
 367     (fixed bin(17),
 368      fixed bin(17),
 369      ptr,
 370      fixed bin(17),
 371      ptr,
 372      fixed bin(35));
 373 call ws_$execute_capability
 374     (major_capability_number,
 375      minor_capability_number,
 376      arg_ptr,
 377      arg_length,
 378      mcb_ptr,
 379      code);
 380 
 381 
 382 Arguments:
 383 major_capability_number  (Input)
 384     The identifier of the capability to be executed.
 385 minor_capability_number  (Input)
 386     The identifier of a specific function to be performed by
 387     the specified major_capability.
 388 arg_ptr  (Input)
 389     A pointer to the argument data to be supplied to the
 390     specified capability, NULL if there is no argument data.
 391 
 392 
 393 arg_length  (Input)
 394     The length of the argument data in bytes, zero if there is
 395     no data.
 396 mcb_ptr  (Input)
 397     The pointer to the application's MOWSE Control Block
 398     assigned by a call to ws_$create_instance.
 399 code  (Output)
 400     The error code immediately returned from MOWSE.
 401     Values:
 402             0 - no error
 403             Or a standard Multics system error code.
 404 
 405 
 406 Notes:
 407 MOWSE assumes that the argument data has been converted to
 408 character string format by the calling application.  If not,
 409 MOWSE will lose every 9th bit of the argument data as only 8
 410 of the 9 bits per character are transferred to the remote
 411 capability.
 412 
 413 
 414 If MOWSE was incapable of starting execution of the specified
 415 application, the calling application will be notified through
 416 the predefined minor capability FAIL_CAPABILITY.
 417 
 418 
 419 Examples:
 420 call ws_$execute_capability (pc_foo_id, add_num_id, num_arg_ptr,
 421          num_arg_len, mcb_ptr, code);
 422 
 423 
 424 :Entry: execute_command: 11/28/86  ws_$execute_command
 425 
 426 
 427 Function:
 428 Sends a command string to the command processor on the
 429 specified system.
 430 
 431 
 432 Syntax:
 433 dcl ws_$execute_command entry
 434     (char(*),
 435      fixed bin(17),
 436      fixed bin(17),
 437      ptr,
 438      fixed bin(35))
 439 call ws_$execute_command
 440     (command_string,
 441      system,
 442      command_id,
 443      mcb_ptr,
 444      code)
 445 
 446 
 447 Arguments:
 448 command_string  (Input)
 449     The string of characters that is typed on the system
 450     to execute the command.
 451 system  (Input)
 452     A constant specifying the system the command_string will be
 453     executed on.
 454     Values LOCAL_SYSTEM
 455             REMOTE_SYSTEM
 456 command_id  (Output)
 457     The tag which will be associated with the command_string
 458     being executed and the resultant EXECUTE_COMMAND_REPY
 459     predefined minor capability.
 460 
 461 
 462 mcb_ptr  (Input)
 463     The pointer to the application's MOWSE Control Block
 464     assigned by a call to ws_$create_instance.
 465 code  (Output)
 466     The error code immediately returned from MOWSE.
 467     Values:
 468             0 - no error
 469             Or a standard Multics system error code.
 470 
 471 
 472 Notes:
 473 There are two ways in which information is returned to
 474 the calling application.  One is the immediate return which
 475 provides the error information as specified in code.  The
 476 second is through a delayed response message via the
 477 predefined minor capability EXECUTE_COMMAND_REPLY which
 478 provides the calling application with information at the
 479 completion of the command.
 480 
 481 
 482 Two types of information are provided.  One is a success or failure
 483 of the command - this is important in the case of remote commands
 484 which caused the command processor on the remote system to fail.  The
 485 second is to provide the handler with the major capability number of
 486 the application which may have been loaded by the command.
 487 
 488 
 489 Since execute_command calls the system's command processor
 490 with the command_string, an application may be called which
 491 loads itself into the MOWSE.  Thus, an application may use
 492 execute_command to load another application.
 493 
 494 
 495 Output from a command executing on the PC (by the PC's command
 496 processor) appears on the terminal screen with total
 497 disregard to MOWSE.  If a terminal emulator is executing and
 498 it calls a PC routine through execute_command - such as "dir"
 499 - the output appears on the screen without passing through
 500 the terminal emulator.
 501 
 502 
 503 Examples:
 504 call ws_$execute_command ("dir \user\smith\*.*",
 505          REMOTE_SYSTEM, com_id, mcb_ptr, code);
 506 call ws_$execute_command ("ls -d >udd>m>Smith",
 507          LOCAL_SYSTEM, com_id, mcb_ptr, code);
 508 call ws_$execute_command ("bft", REMOTE_SYSTEM,
 509          com_id, mcb_ptr, code);
 510 
 511 
 512 :Entry: find_capability_number: 11/28/86  ws_$find_capability_number
 513 
 514 
 515 Function:
 516 Finds the major capability number of an application given a
 517 capability name.
 518 
 519 
 520 Syntax:
 521 dcl ws_$find_capability_number entry
 522     (char(*),
 523      fixed bin(17),
 524      fixed bin(17),
 525      fixed bin(35));
 526 call ws_$find_capability_number
 527     (capability_name,
 528      system_id,
 529      major_capability_number,
 530      code);
 531 
 532 
 533 Arguments:
 534 capability_name  (Input)
 535     The capability name to be looked for.
 536 system_id  (Input)
 537     The system which is to be looked at to find the capability
 538     name.
 539     Values  LOCAL_SYSTEM
 540 
 541 
 542 major_capability_number  (input/output)
 543     Indicates where MOWSE is to begin searching of the
 544     capability table for the name specified, 0 will find the
 545     first case, and returns the major capability number of the
 546     found name.
 547 code  (Output)
 548     The error code immediately returned from MOWSE.
 549     Values:
 550             0 - no error
 551             Or a standard Multics system error code.
 552 
 553 
 554 Notes:
 555 MOWSE looks for the capability name in its capability table in
 556 the following fashion:
 557 
 558 
 559     1) If the provided major capability number is invalid,
 560     MOWSE will begin searching from the top of the table
 561     specified by the system_id.
 562     2) If the major capability number is valid, MOWSE will
 563     begin searching from the next entry on the same system of
 564     the major capability number.
 565     3) If the system id is invalid, MOWSE will search from the
 566     first entry on the local CAT.
 567 
 568 
 569 Examples:
 570 call ws_$find_capability_number ("bft",
 571          major_capability_number, code);
 572 
 573 
 574 :Entry: find_capability_name: 11/28/86  ws_$find_capability_name
 575 
 576 
 577 Function:
 578 Finds the name of a capability given its major capability
 579 number.
 580 
 581 
 582 Syntax:
 583 dcl ws_$find_capability_name entry
 584     (fixed bin(17),
 585      char(*),
 586      fixed bin (35));
 587 call ws_$find_capability_name
 588     (major_capability_number,
 589      capability_name,
 590      code);
 591 
 592 
 593 Arguments:
 594 major_capability_number  (Input)
 595     The major capability number of the capability name to be
 596     found.
 597 capability_name  (Output)
 598     The name of the capability.
 599 code  (Output)
 600     The error code immediately returned from MOWSE.
 601     Values:
 602             0 - no error
 603             Or a standard Multics system error code.
 604 
 605 
 606 Examples:
 607 ws_$find_capability_name (major_cap, cap_name, code);
 608 
 609 
 610 :Entry: get_status: 11/28/86  ws_$get_status
 611 
 612 
 613 Function:
 614 Requests status information from the specified application.
 615 
 616 
 617 Syntax:
 618 dcl ws_$get_status entry
 619     (fixed bin(17),
 620      char(*),
 621      char(*),
 622      fixed bin(35));
 623 call ws_$get_status
 624     (major_number,
 625      status_request,
 626      status_result,
 627      code);
 628 
 629 
 630 Arguments:
 631 major_number  (Input)
 632     The major capability number of the application for which
 633     status information is requested.
 634 status_request  (Input)
 635     The argument data to be provided to the application to be
 636     called.
 637 status_result  (Output)
 638     The resultant character status information.
 639 code  (Output)
 640     The error code immediately returned from MOWSE.
 641     Values:
 642             0 - no error
 643             Or a standard Multics system error code.
 644 
 645 
 646 Notes:
 647 This entry must only be called by a foreground application as
 648 it will wait within the call until a response is received.
 649 The requested application is notified of the request via the
 650 predefined minor capability STATUS.
 651 
 652 
 653 Examples:
 654 call ws_$get_status (bft_major_cap, "pending", status, code);
 655 
 656 
 657 :Entry: put_background_message: 11/28/86  ws_$put_background_message
 658 
 659 
 660 Function:
 661 Provides a background application with the means of displaying
 662 one of two types of special messages to the foreground channel
 663 through a foreground application such as the terminal
 664 emulator.
 665 
 666 
 667     1) Information messages which inform the user such as
 668     errors and status.
 669     2) Query messages which ask the user for input, which is
 670     relayed back to the requesting application through the
 671     predefined minor capability "QUERY_REPLY".
 672 
 673 
 674 Syntax:
 675 dcl ws_$put_background_message entry options (variable);
 676 call ws_$put_background_message
 677     (mcb_ptr,
 678      code,
 679      caller,
 680      control_string,
 681      arg1, ..., argN);
 682 
 683 
 684 Arguments:
 685 mcb_ptr  (Input)
 686     The pointer to the application's MOWSE Control Block
 687     assigned by a call to ws_$create_instance.
 688 code  (Input)
 689     Determines the type of the message to be displayed.
 690     If code is 0, the message will consist only of the
 691     contents of the control string.
 692     If code is a standard Multics code, it will be expanded as
 693     in com_err_.
 694     If code is "SEND_QUERY", the control string will be used
 695     to prompt the user for a response.
 696 
 697 
 698 caller  (Input)
 699     The name of the routine making the call to
 700     ws_$put_background_message.
 701 control_string  (Input)
 702     An ioa_ subroutine control string.  This argument is
 703     optional (see com_err_).
 704 argI  (Input)
 705     ioa_ subroutine arguments to be substituted into the
 706     control_string argument.  These arguments are optional.
 707     They can only be used however, if the control_string
 708     argument is given first.
 709 
 710 
 711 Notes:
 712 All arguments are exactly as under com_err_ with the exception
 713 of the contents of the code parameter (as discussed above) and
 714 the mcb_ptr.
 715 
 716 
 717 All messages are placed into MOWSE for future retrieval
 718 through a call to ws_$get_background_message.  If there is no
 719 foreground application executing to retrieve these messages,
 720 they will go unnoticed.  This is especially important in the
 721 case of query messages as no response will be returned until
 722 the message has been retrieved and processed by the foreground
 723 application.
 724 
 725 
 726 If the code is specified as SEND_QUERY, the user's response
 727 will be provided to the calling application through the
 728 predefined minor capability "QUERY_REPLY".
 729 
 730 
 731 Examples:
 732 call ws_$put_background_message (mcb_ptr, error_code, "bft",
 733          "retrieve error ^d", bft_$invalid_dir);
 734 call ws_$put_background_message (mcb_ptr, 0, "bft",
 735          "transfer of file ^a complete", trans.name);
 736 call ws_$put_background_message (mcb_ptr,
 737          SEND_QUERY, "bft",
 738          "File ^a exists overwrite?", trans.name);
 739 
 740 
 741 :Entry: put_status: 11/28/86  ws_$put_status
 742 
 743 
 744 Function:
 745 Sends a status string to the application which made a request
 746 for status information.
 747 
 748 
 749 Syntax:
 750 dcl ws_$put_status entry
 751     (fixed bin(17),
 752      char(*),
 753      ptr,
 754      fixed bin(35));
 755 call ws_$put_status
 756     (destination_major,
 757      status,
 758      mcb_ptr,
 759      code);
 760 
 761 
 762 Arguments:
 763 destination_major  (Input)
 764     The major capability number of the application to which
 765     the status information is to be sent.
 766 status  (Input)
 767     Character string which comprises the status information up
 768     to a length PACKET_SIZE.
 769 mcb_ptr  (Input)
 770     The pointer to the application's MOWSE Control Block
 771     assigned by a call to ws_$create_instance.
 772 code  (Output)
 773     The error code immediately returned from MOWSE.
 774     Values:
 775             0 - no error
 776             Or a standard Multics system error code.
 777 
 778 
 779 Notes:
 780 The calling application must have been invoked with the
 781 predefined minor capability STATUS, as it is only then that the
 782 requesting application is awaiting status information.
 783 
 784 
 785 Examples:
 786 call ws_$put_status (major_cap, "status no pending requests",
 787          mcb_ptr, code);
 788 
 789 
 790 :Entry: reset_capability: 11/28/86  ws_$reset_capability
 791 
 792 
 793 Function:
 794 Tells MOWSE to reset the specified application.  The
 795 application to be reset is notified via the predefined minor
 796 capability RESET_APPLICATION.
 797 
 798 
 799 Syntax:
 800 dcl ws_$reset_capability entry
 801     (fixed bin(17),
 802      ptr,
 803      fixed bin(35));
 804 call ws_$reset_capability
 805     (major_number,
 806      mcb_ptr,
 807      code);
 808 
 809 
 810 Arguments:
 811 major_number  (Input)
 812     The major capability number of the application to be
 813     reset.
 814 mcb_ptr  (Input)
 815     A pointer to the mcb of the application executing the
 816     function.
 817 code  (Output)
 818     The error code immediately returned from MOWSE.
 819     Values:
 820             0 - no error
 821             Or a standard Multics system error code.
 822 
 823 
 824 Notes:
 825 MOWSE notifies the application through the predefined minor
 826 capability RESET_APPLICATION and clears all of the flags
 827 associated with the application.  All messages occurring
 828 between the request and the completion of the request will be
 829 discarded by MOWSE.
 830 
 831 
 832 Examples:
 833 call ws_$reset_capability (bft_major_cap, code);
 834 
 835 
 836 :Entry: resume_capability: 11/28/86  ws_$resume_capability
 837 
 838 
 839 Function:
 840 Tells MOWSE to resume the specified application.  The
 841 application to be resumed is notified via the predefined minor
 842 capability RESUME_APPLICATION.
 843 
 844 
 845 Syntax:
 846 dcl ws_$resume_capability entry
 847     (fixed bin(17),
 848      ptr,
 849      fixed bin(35));
 850 call ws_$resume_capability
 851     (major_number,
 852      mcb_ptr,
 853      code);
 854 
 855 
 856 Arguments:
 857 major_number  (Input)
 858     The major capability number of the application to be
 859     resumed.
 860 mcb_ptr  (Input)
 861     A pointer to the mcb of the application executing this
 862     function.
 863 code  (Output)
 864     The error code immediately returned from MOWSE.
 865     Values:
 866             0 - no error
 867             Or a standard Multics system error code.
 868 
 869 
 870 Notes:
 871 If the specified capability is not in suspension, the request
 872 will be ignored.  The capability to be resumed is informed via
 873 the predefined minor RESUME_APPLICATION.
 874 
 875 
 876 Examples:
 877 call ws_$resume_capability (bft_major_cap, code);
 878 
 879 
 880 :Entry: send_query_reply: 11/28/86  ws_$send_query_reply
 881 
 882 
 883 Function:
 884 Sends the user's response to a query message to the originator
 885 of the background query message (see ws_$get_background_message).
 886 
 887 
 888 Syntax:
 889 dcl ws_$send_query_reply entry
 890     (char(*),
 891      fixed bin(17),
 892      fixed bin(35));
 893 call ws_$send_query_reply
 894     (reply_string,
 895      destination_major,
 896      code);
 897 
 898 
 899 Arguments:
 900 reply_string  (Input)
 901     The user's response to the query message obtained through
 902     a call to ws_$get_background_message.
 903 destination_major  (Input)
 904     The major capability number of the application which is to
 905     receive this response string (see
 906     ws_$get_background_message).
 907 code  (Output)
 908     The error code immediately returned from MOWSE.
 909     Values:
 910             0 - no error
 911             Or a standard Multics system error code.
 912 
 913 
 914 Notes:
 915 A call to this procedure must be performed whenever a
 916 QUERY_MESSAGE type is returned from ws_$get_background_message
 917 as the requesting application is waiting for the response.
 918 Currently, ws_$send_query_reply is a null routine, as only the
 919 terminal emulator is capable of such functions.
 920 
 921 
 922 Examples:
 923 call ws_$send_query_reply (user_response, sender_major,
 924          code);
 925 
 926 
 927 :Entry: sleep: 11/28/86  ws_$sleep
 928 
 929 
 930 Function:
 931 Forces the calling application to sleep (suspend execution)
 932 for the specified number of seconds.  When an application is
 933 put to sleep, it cannot accept any messages except
 934 TERMINATE_CAPABILITY and RESET_CAPABILITY.  The calling
 935 application will be notified through the predefined minor
 936 capability WAKE_UP.
 937 
 938 
 939 Syntax:
 940 dcl ws_$sleep entry
 941     (ptr,
 942      fixed bin(17)
 943      fixed bin(35));
 944 call ws_$sleep
 945     (mcb_ptr,
 946      time,
 947      code);
 948 
 949 
 950 Arguments:
 951 mcb_ptr  (Input)
 952     A pointer to the mcb of the application executing this
 953     function.
 954 time  (Input)
 955     The number of seconds the application is to sleep.
 956 code  (Output)
 957     The error code immediately returned from MOWSE.
 958     Values:
 959              0 - no error
 960              Or a standard Multics system error code.
 961 
 962 
 963 Notes:
 964 The application is notified to awaken via the predefined minor
 965 capability WAKE_UP.
 966 
 967 
 968 Examples:
 969 call ws_$sleep (mcb_ptr, 10);
 970 
 971 
 972 :Entry: suspend_capability: 11/28/86  ws_$suspend_capability
 973 
 974 
 975 Function:
 976 Tells MOWSE to suspend the specified application.  The
 977 application to be suspended is notified via the predefined
 978 minor capability SUSPEND_APPLICATION.  A suspended application
 979 is unable to send or receive messages.
 980 
 981 
 982 Syntax:
 983 dcl ws_$suspend_capability entry
 984     (fixed bin(17),
 985      ptr,
 986      fixed bin(35));
 987 call ws_$suspend_capability
 988     (major_number,
 989      mcb_ptr,
 990      code);
 991 
 992 
 993 Arguments:
 994 major_number  (Input)
 995     Capability number of the application to be suspended.
 996 mcb_ptr  (Input)
 997     A pointer to the mcb of the application executing this
 998     library function.
 999 code  (Output)
1000     The error code immediately returned from MOWSE.
1001     Values:
1002             0 - no error
1003             Or a standard Multics system error code.
1004 
1005 
1006 Notes:
1007 The specified application will be suspended - unable to send
1008 or receive messages - by MOWSE until a call to
1009 ws_$resume_capability has been called for that application.
1010 
1011 
1012 Examples:
1013 call ws_$suspend_capability (bft_major_cap, code);
1014 
1015 
1016 :Entry: terminate_capability: 11/28/86  ws_$terminate_capability
1017 
1018 
1019 Function:
1020 Tells MOWSE to terminate the specified application.  The
1021 application to be terminated is notified via the predefined
1022 minor capability TERMINATE_APPLICATION.
1023 
1024 
1025 Syntax:
1026 dcl ws_$terminate_capability entry
1027     (fixed bin(17),
1028      ptr,
1029      fixed bin(35));
1030 call ws_$terminate_capability
1031     (major_number,
1032      mcb_ptr,
1033      code);
1034 
1035 
1036 Arguments:
1037 major_number  (Input)
1038     The major capability number of the application to be
1039     terminated.
1040 mcb_ptr  (Input)
1041     A pointer to the mcb of the application executing this
1042     function.
1043 code  (Output)
1044     The error code immediately returned from MOWSE.
1045     Values:
1046             0 - no error
1047             Or a standard Multics system error code.
1048 
1049 
1050 Notes:
1051 MOWSE will remove the specified application from its
1052 capability table after the application has been notified.
1053 
1054 
1055 Examples:
1056 call ws_$terminate_capability (bft_major_cap, code);
1057 
1058