home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff299.lzh / Rxil / Rxil.doc < prev    next >
Text File  |  1989-12-30  |  24KB  |  786 lines

  1.  
  2.     Documentation for the ARexx Interface Library (Rxil)
  3.             Release 1.0
  4.  
  5.  
  6.  
  7. Copyright © 1989 by Donald T. Meyer, Stormgate Software
  8. All Rights Reserved
  9.  
  10.  
  11.  
  12.  
  13.         CONTENTS
  14.  
  15.     Change Log
  16.  
  17.     Variable Glossary
  18.  
  19.     Defined Symbol Glossary
  20.  
  21.     Structure Descriptions
  22.  
  23.     Tutorial
  24.  
  25.     Notes
  26.  
  27.  
  28.  
  29. =====================================================================
  30.  
  31.  
  32. In the following document, several terms and documantation conventions
  33. will be observed:
  34.  
  35.     When refering to ARexx message ports, "private" and "secret" refer
  36.     to the same port.
  37.  
  38.     The code that uses this library may be refered to as the "client".
  39.  
  40.  
  41.  
  42. --------------------------------------------------------------------------
  43. --------------------------------------------------------------------------
  44. --------------------------------------------------------------------------
  45.  
  46.  
  47.  
  48. ======================   Changes in 1.0 (no X)  ====================
  49.  
  50. Added RXERR_INVALID_ARG error code define.  Made changes in demo.c
  51. to use this instead of RXERR_BAD_VARIABLE.
  52.  
  53. Added support for a "startup" macro to the demo.c program.
  54.  
  55. RxilCheckPort() would return a RXERR_BAD_VARIABLE if unable to allocate
  56. enough memory to copy the command line for a received command.  Oops.
  57. Changed it to RXERR_NO_MEMORY.
  58.  
  59. Found & Fixed bug in cancel.c which allowed the cancel requester to
  60. be posted when it already was!
  61.  
  62. Changed the version string to be derived from a #define in the rxil.h
  63. file.  No real impact on anything.
  64.  
  65.  
  66.  
  67. ======================   Changes in X1.0   =========================
  68.  
  69. Minor enhancement to the RxilDump formatting of command data.
  70.  
  71. Major additions to RxilHandleReturn().
  72. This will now post a requester if Intuition has been opened, and will use
  73. the CLI otherwise.  This also no longer uses 'C' standard I/O, rather it
  74. uses the native AmigaDOS calls like Open() and Write().  This is to
  75. facilitate those who don't want stdio pulled in. Note that RxilDump() is
  76. the only routine here which uses stdio.  Since this is really for debugging
  77. and learning only, it will probably stay that way (unless it really bothers
  78. someone).
  79.  
  80. Dependence on precompiled header files has been eliminated.
  81.  
  82. Function documentation broken off into separate file "Functions.doc"
  83.  
  84. Added "test.rexx" program.  This does not do any automatic demo of the
  85. functions, but does facilitate playing around.
  86.  
  87. The old "smalldemo" program was renamed "demo".
  88.  
  89.  
  90.  
  91. ======================   Changes in X0.9   =========================
  92.  
  93. Added Version member to RxilDef
  94.  
  95. Cleaned up some incorrect prototypes in the rxil.h.
  96.  
  97. Changed the argument checking scheme to use a minimum and a maximum
  98. number of arguments as opposed to the single value previously checked
  99. against.
  100.  
  101. The structure member "Privilege" was spelled incorrectly. (blush)
  102. It has been corrected.
  103.  
  104. Added feature to append an "instance" number onto the public port name.
  105. This allows multiple instances of the application program to be run,
  106. each having a unique portname.
  107.  
  108. Added a flags argument to the diagnostic command RxilDumpRdef() to
  109. control what is displayed.  Also added display of the commands.
  110.  
  111.  
  112. ====================================================================
  113.  
  114.  
  115.  
  116.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  117.     ::                            ::
  118.     ::        Variable Glossary            ::
  119.     ::                            ::
  120.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  121.  
  122.  
  123.  
  124.     RexxSysBase
  125.  
  126. This is a pointer to the ARexx library opened by RxilInit() and closed
  127. by RxilCleanup().
  128. This should never be altered by client code.
  129. Defined in the Rxil library modules.
  130.  
  131.  
  132.  
  133.     global_rdef
  134.  
  135. The pointer to the global RxilDef structure.  This must be set to the
  136. value returned from the call to RxilInit().
  137. Once set by this call, this should not be altered.
  138. Immediatly after calling RxilCleanup(), this should be set to NULL.
  139. This must be defined in the client's program.
  140. Example:
  141.             global_rdef = RxilInit( RXIL_PUBLIC, "MyPort" );
  142.             .
  143.             .
  144.             .
  145.             RxilCleanup( global_rdef );
  146.             global_rdef = NULL;
  147.  
  148.  
  149.  
  150. --------------------------------------------------------------------------
  151.  
  152.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  153.     ::                            ::
  154.     ::        Defined Symbol Glossary            ::
  155.     ::                            ::
  156.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  157.  
  158.  
  159.  
  160.     RXIL_PUBLIC
  161.     RXIL_PRIVATE
  162.     RXIL_SECRET
  163. These are flags which are passed to the RxilInit() routine to control which
  164. ports are opened.
  165.  
  166.  
  167.     RXIL_AS_IS
  168. This is a flag which is passed to the RxilInit() routine to inhibit the
  169. instance number which would normally be appended to the port name.
  170.  
  171.  
  172.     RXIL_MAX_ARGS
  173. This is the maximum number of arguments (plus one) that may appear on a
  174. command line which is sent to the application's ARexx port.  The default is
  175. twenty, which should be enough for anything I can imagine.
  176.  
  177.  
  178.     RXIL_ARGV()
  179.     RXIL_ARGC
  180. These macros are used in the same way that the "argc" and "argv" allow
  181. access to the command line arguments passed to main() in a standard 'C'
  182. program.  Like their 'C' counterparts, RXIL_ARGC will be set to 2 if there
  183. is 1 argument.  The first argument is accessed as RXIL_ARGV(1).
  184.  
  185.  
  186.     RXIL_STATE_AVAILABLE
  187.     RXIL_STATE_PENDING
  188.     RXIL_STATE_RETURNED
  189. These are the possible states for a RxilInvocation structure to be in.
  190. AVAILABLE indicates that the structure may be freed or used to launch a
  191. macro.
  192. PENDING means that a macro has been launched using this structure and we
  193. are awaiting a reply when the macro terminates.
  194. RETURNED indicates that the termination reply has been received and that we
  195. may handle the return.  The state will be changed to AVAILABLE by the
  196. RxilCleanupReturn() function.
  197.  
  198.  
  199.     RXIL_NOLAUNCH
  200. A flag for the Flags member in the global RxilDef structure.
  201. If set, this will disable the "loopback" feature whereby a macro can launch
  202. other macros.
  203.  
  204.     RXIL_NO_CLEARABORT
  205. A flag for the Flags member in the global RxilDef structure.
  206. This will prevent the RxilCheckPort() function from clearing the abort flag
  207. automaticly whenever there are no pending macros.
  208.  
  209.     RXIL_NOABORT
  210. A flag for the Flags member in the global RxilDef structure.
  211. This flag will prevent the Cancel requester from being used when a macro
  212. is launched.
  213.  
  214.     RXIL_NO_REQ
  215. A flag for the Flags member in the global RxilDef structure.
  216. Force routines such as RxilHandleReturn() to send thier messages to the CLI
  217. as opposed to a requester, which is the default action.
  218.  
  219.  
  220.     RXIL_FROM_REXX
  221. A macro which returns a value indicating which port (Public or Private) the
  222. ARexx command which is executing came in to.  One very important use for
  223. this would be for error handling, which will usually be different depending
  224. upon wether an action was initiated by a user menu selection etc. or by a
  225. command from ARexx.
  226.  
  227.  
  228.     RXIL_WAITFLAG
  229. This macro gives the flag bit(s) to wait on (via Wait()) for the ports that
  230. are opened by RxilInit() to receive commands at.
  231.  
  232.  
  233. --------------------------------------------------------------------------
  234.  
  235.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  236.     ::                            ::
  237.     ::        Structure Descriptions            ::
  238.     ::                            ::
  239.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  240.  
  241.  
  242.  
  243.  
  244.     ***************   RxilFunction Structure   ****************
  245.  
  246.  
  247.     Name
  248.  
  249. The function name.  This can be in upper or lower case.  See the CaseFlag
  250. member of this structure for more information.
  251.  
  252.  
  253.     Func
  254.  
  255. Vector to the function's 'C' code.
  256.  
  257.  
  258.     ArgCount
  259.  
  260. Number of args expected.  Set to NO_ARGCHECK if we don't care or will
  261. ascertain within the function itself.
  262. Note: This argument count, unlike the value returned by RXIL_ARGC, does
  263. not include the command name itself.  I.E., if you want to receive one
  264. argunt, set this to 1.
  265.  
  266.  
  267.     CaseFlag
  268.  
  269. If set to boolean TRUE, the command name matching will be case sensitive.
  270.  
  271.  
  272.     Privlege
  273.  
  274. Set to either REXX_PUBLIC or REXX_SECRET to control which port(s) this
  275. command is valid from.  If REXX_PUBLIC, than this command may be executed
  276. from either port.
  277.  
  278.  
  279.  
  280.  
  281.     ***************   RxilDef Structure   ****************
  282.  
  283.  
  284.     Flags
  285.  
  286. These are flagbits which can be set to control various things about the
  287. Rexx Interface Library.
  288.  
  289. RXIL_NOLAUNCH        If set, unrecognized commands received at the
  290.             ARexx port will be returned with an error code
  291.             rather than "looped" back out to ARexx.
  292.  
  293. RXIL_NO_CLEARABORT    Normally, the library will clear the Abort flag
  294.             whenever the last ARexx program launched by the
  295.             library returns.  This will disable that feature.
  296.  
  297. RXIL_NOABORT        If set, the "Cancel" requester will not appear when
  298.             an ARexx macro is initiated from the library.
  299.  
  300. RXIL_NO_REQ        If set, the RxilHandleReturn() routine (and perhaps
  301.             others in the future) will send it's messages to
  302.             the CLI instead of trying to use an Autorequest.
  303.  
  304.  
  305.  
  306.     PortName
  307.  
  308. Name which will be used for the public Exec message port opened to recieve
  309. commands from ARexx.  This is set when RxilInit() is called, and subsequent
  310. changes will have no effect.
  311. By default, an "instance" number will be appended to the portname which
  312. was passed to RxilInit().  This allows there to be multiple instances of
  313. an application running, each with a unique public port name.
  314. This may be overridden via the RXIL_AS_IS flag being passed to RxilInit().
  315. Default: none
  316.  
  317.  
  318.     Console
  319.  
  320. An AmigaDOS stream which will be set as the default I/O for commands and
  321. functions launched by the application.  This will normally be a console
  322. stream, such as "CON:10/10/400/100/ARexxStream".
  323. This stream will not be used for ARexx programs that have been "looped" back
  324. out in response to a command.
  325. Default: "CON:10/10/400/100/"
  326.  
  327.  
  328.     Extension
  329.  
  330. This is the extension which will be used by ARexx to search for this
  331. programs macros.  This should be an application-specific extension.
  332. Default: ".rexx"
  333.  
  334.  
  335.     HostPort
  336.  
  337. The Exec Message Port name that command and function invocation messages
  338. will be sent to.  This is normally "REXX", but may also be "AREXX" if
  339. the 1.10 version of ARexx is in use.  If "AREXX", commands and functions
  340. will "detach", and no return status or value will be available.
  341. Default: "REXX"
  342.  
  343.  
  344.     CommandTable
  345.  
  346. This is the pointer to an array of RxilFunction structures which is
  347. used for the dispatching of commands received at the application's
  348. ARexx port.
  349. Default: NULL
  350.  
  351.  
  352.     Abort
  353.  
  354. When set, this flag will cause commands recieved at the ARexx port to be
  355. returned with an error code.
  356. There are several flag bits which may be set in the Flags member of the
  357. RxilDef structure that affect this flag.
  358.  
  359.  
  360.     SecretPortName
  361.  
  362. The name of the "secret" or "private" port which may optionaly be opened
  363. by RxilInit().  This name is created by concatenating the word "PRIVATE"
  364. and a unique number onto the PortName.
  365. This is set when RxilInit() is called, and subsequent changes will have no
  366. effect.
  367. Default: none
  368.  
  369.  
  370.     CancelWindow
  371.  
  372. If NULL, the cancel requester will be opened upon the WorkBench screen.
  373. This may be set to a Window pointer, in which case the cancel requester
  374. will open on the screen containing the window.  Note that the cancel
  375. requester always opens it own window, this member is merely a means
  376. of selecting the screen.
  377. The window pointer stored here is also used by RxilHandleReturn() to
  378. decide where to post it's requester.
  379.  
  380.  
  381.     SigBit
  382.  
  383. Contains the Exec signal bit(s) used by the ARexx port(s).  This should
  384. be read only via the macro RXIL_WAITFLAG.
  385. This should never be altered by client code.
  386.  
  387.  
  388.     FromRexx
  389.  
  390. This contains a value which indicates which port a command is from
  391. (public or private).  This also indicates that a command is from
  392. an ARexx port (when non-zero).  Some functions may need to know whether
  393. they have been called in response to an ARexx command, or through
  394. the "normal" user interface.  Error handling and reporting will normally
  395. be handled differently in these cases.
  396. This should only be read via the macro RXIL_FROMREXX.
  397. This should never be altered by client code.
  398.  
  399.  
  400.     Arg
  401.  
  402. An array of pointers to the argument strings for an ARexx command.
  403. Like the 'C' argv[] array, the command name will be in the zereoth
  404. element, with the first actual argument being RXIL_ARGV(1).
  405. These should only be read via the macro RXIL_ARGV().
  406. This should never be altered by client code.
  407.  
  408.  
  409.     ArgCount
  410.  
  411. The count of arguments from the ARexx commandline.  Again, like the
  412. argc of 'C', this will be 1 if there were no arguments, 2 if there
  413. is one argument, etc.
  414. This should only be read via the macro RXIL_ARGC.
  415. This should never be altered by client code.
  416.  
  417.  
  418.     LockCount
  419.  
  420. If non-zero there is an ARexx program which has been given or acquired
  421. a "lock" on the private ARexx port.
  422. This should never be altered by client code.
  423.  
  424.  
  425.     Version
  426.  
  427. A pointer to a null-terminated string which contains the Rxil copyright
  428. message and version.
  429.  
  430.  
  431. Structure members past this point are private, and used only by the
  432. Rxil internal functions.  They should never be altered by client code,
  433. and client code should have little reason to ever read them.
  434.  
  435.  
  436.  
  437.  
  438.     ***************   RxilInvocation Structure   ****************
  439.  
  440.     Next
  441.  
  442. This member is private.
  443.  
  444.  
  445.     RexxMsg
  446.  
  447. This member is private.
  448.  
  449.  
  450.     Parent
  451.  
  452. This member is private.
  453.  
  454.  
  455.     IHostPort
  456.  
  457. The name of the Exec message port to send the "launch" mesage to.  This
  458. will normally be "REXX".
  459. Default: global_rdef->HostPort
  460.  
  461.  
  462.     State
  463.  
  464. The current state of the RexxInvocation structure.  This will indicate
  465. wether or not the structure is available for use (to launch an ARexx
  466. program), is waiting for an ARexx program to finish, or that the ARexx
  467. program has finished and a result is waiting to be cleaned up.
  468.  
  469.  
  470.     Type
  471.  
  472. This determines whether or not the ARexx program will be launched as a
  473. command or a function.  This can be either RXCOMM or RXFUNC.
  474. Default: Whatever was passed as an argument to CreateRxi().
  475.  
  476.  
  477.     Name
  478.  
  479. The command (ARexx program) name.  This must be set by the client code
  480. prior to calling RxilLaunch().
  481. Default: None
  482.  
  483.  
  484.     FileExt
  485.  
  486. This is the extension which will be used by ARexx to search for this
  487. program.  This should be an application-specific extension.
  488. Default: global_rdef->Extension
  489.  
  490.  
  491.     CommAddr
  492.  
  493. This will be the default host ADDRESS for the ARexx program when launched.
  494. Default: The secret port name (if open), otherwise the public port name.
  495.  
  496.  
  497.     Console
  498.  
  499. An AmigaDOS stream which will be set as the default I/O for commands and
  500. functions launched by the application.  This will normally be a console
  501. stream, such as "CON:10/10/400/100/ARexxStream".
  502. This stream will not be used for ARexx programs that have been "looped" back
  503. out in response to a command.
  504. Default: global_rdef->Console
  505.  
  506.  
  507.     ActionFlags
  508.  
  509. These are the rm_Action flag bits.  Whatever is here will be anded with
  510. the rm_Action field of the ARexx program launch RexxMsg.
  511.  
  512.  
  513.     CountArgs
  514.  
  515. If TRUE, the data pointed to by the FuncArg array is not be considered
  516. NULL terminated ('C' string style).  The argument length must in this
  517. case be stored in the ArgLen array.
  518.  
  519.  
  520.     FuncArg
  521.  
  522. Pointer to argument strings for an ARexx function mode invocation only.
  523. These are assumed to be NULL terminated 'C' style strings unless the
  524. CountArgs flag is TRUE.
  525.  
  526.  
  527.     ArgLen
  528.  
  529. If the CountArgs flag is TRUE, this array contains the lengths of the
  530. argument data pointed at by the corresponding members of the FuncArg
  531. array.
  532.  
  533.  
  534.  
  535. --------------------------------------------------------------------------
  536.  
  537.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  538.     ::                            ::
  539.     ::            Tutorial            ::
  540.     ::                            ::
  541.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  542.  
  543.  
  544.  
  545.     *******   Making A Program ARexx Compatible   *******
  546.  
  547. This consists of being able to receive commands from ARexx, and in some
  548. cases, having the ability to use ARexx as a macro language.
  549.  
  550. An ARexx port is a public Exec MessagePort that an application program or
  551. utility opens to allow the receipt of commands from ARexx.  These commands
  552. can not only cause the program to do various actions, but information may
  553. also be returned to the ARexx program which sent the command.
  554.  
  555. The second thing involved in allowing a program to make full use of ARexx
  556. is the ability to "launch" macro programs written in ARexx.  These macro's
  557. normally send commands back to the ARexx port to cause sequences of actions
  558. to take place.
  559.  
  560.  
  561.  
  562.     *******   What The ARexx Interface Library (Rxil) Does   *******
  563.  
  564. This linkable 'C' library makes adding complete, full-featured ARexx
  565. compatability to a program almost a trivial exercise.
  566. Opening of both "public" and "private" ports is supported, as well as an
  567. easy facility for launching macros.
  568. All allocations are tracked, and everything may be cleaned up by one
  569. function call.
  570.  
  571.  
  572.  
  573.         *******   How It Works   *******
  574.  
  575. A complete tutorial on ARexx interfacing, and the features provided by Rxil
  576. would be quite large.  Since one of the reasons for the creation of Rxil
  577. was to alleviate the need to become an expert in the (sometimes subtle)
  578. nuances of implementing an ARexx interface, I'm not going to try.
  579. The best way to understand the features of this library is to first read
  580. chapter 10 in the "ARexx User's Reference Manual", and then study the
  581. example code in the program "demo.c" which comes with this library.
  582. Have a hardcopy of the "rxil.h" header file handy (study it also) while
  583. looking at the sample code.
  584. It wouldn't hurt to read the functions descriptions contained in the file
  585. "Functions.doc" either.  Some of these functions are normally called by
  586. other higher-level functions in the library, and as such you may not need
  587. to ever call them directly.  The reason they are kept visible is to support
  588. any special needs that may require that they be called directly or replaced
  589. by a similar function.
  590. Also, please feel free to E-Mail (or US Mail for that matter) me any
  591. questions you may have about using this library.
  592.  
  593.  
  594.  
  595.     *******   Structures and Variables Required   *******
  596.  
  597. The structure RxilDef is the anchor point of the library.  This contains
  598. things used by almost every function in the library, as well as things set
  599. directly by the program which uses the library to control various things.
  600. A pointer to a structure of this type must be defined by every program
  601. which uses Rxil.  An instance of this structure will be allocated by a call
  602. to RxilInit(), and freed by the call to RxilCleanup().
  603.  
  604. Commands are dispatched via a structure of type RxilFunction which the
  605. program must define if it wishes to receive commands.  This structure
  606. (actually, an array of these structures) contains the command name, a
  607. vector to the code which performs the command, and some other attributes
  608. such as argument counts to allow the library to do argument checking.
  609.  
  610.  
  611.  
  612.  
  613.         ********  Functions Required  *******
  614.  
  615.     RxilInit()        always needed
  616.  
  617. This call must be made before anything can be done with the other library
  618. functions.  This will open the ARexx library (rexxsyslib.library) and open
  619. the port or ports that the program wishes to receive commands at.  A
  620. RxilDef structure is allocated, and it's pointer returned.  This pointer
  621. MUST be stored in the variable "global_rdef".
  622. If the initializations fail, any subsequent calls to the normal Rxil
  623. library functions should be harmless.  This will prevent your program from
  624. crashing if ARexx is not present (always a possibility).
  625. Once this call is made, some of the members of the RxilDef structure will
  626. normally need to be initialized.  These include the "Flags", "Console",
  627. "Extension", "HostPort", and "CommandTable" members.
  628.  
  629.  
  630.  
  631.     RxilCleanup()        always needed
  632.  
  633. This call must be made before the program exits.  This will close the ARexx
  634. library, free the RxilDef structure, and close the port(s).
  635. Any RxilInvocation structures which may have been allocated by
  636. RxilCreateRxi() will also be freed.  If there are macros which have been
  637. launched and not yet replied, this function will wait till they return.
  638. Note that this may distress the user, if they do not understand why the
  639. program refuses to "go away".  If this is a possibility, it would be best
  640. to check by calling RxilPending(), and let the user know what is happening.
  641.  
  642.  
  643.  
  644.     RxilCheckPort()        always needed
  645.  
  646. When a message is received at the port(s), this function should be called
  647. to handle it.  Normally this is done by Wait()ing on the whatever flags
  648. your program normally waits on, combined with the flag bit(s) given by the
  649. macro RXIL_WAITFLAG.
  650. This routine does quite a bit, including dispatching commands that are
  651. received, getting the returns for macros that have been launched, and
  652. looping back out macros called by commands (it gets quite spagetti-like
  653. after a while!).
  654.  
  655.  
  656.  
  657.     RxilCreateRxi()        macro launching only
  658.  
  659. Allocates and initializes a RxilInvocation structure.  This structure may
  660. then be used to launch an ARexx command or function macro.  Once the macro
  661. has returned and been cleaned up via RxilCleanupReturn(), the
  662. RxilInvocation structure may be re-used.  It could also be freed by a call
  663. to RxilDeleteRxi() if so desired.
  664.  
  665.  
  666.  
  667.     RxilDeleteRxi()        optional, macro launching only
  668.  
  669. Frees up a RxilInvocation structure which was allocated by RxilCreateRxi().
  670. Note that any RxilInvocation structures allocated and not explicitly freed
  671. with this function will be freed automaticly by the call to RxilCleanup().
  672.  
  673.  
  674.  
  675.     RxilGetReturn()        macro launching only
  676.  
  677. If a macro invocation has been replied, but not yet cleaned up, this will
  678. return a pointer to it's RxilInvocation structure.  This should be called
  679. in a loop until it returns NULL, subsequent to calling RxilCheckPort().
  680. The RxilInvocation structure should be cleaned up and then either freed or
  681. put back in the "pool" for re-use.
  682.  
  683.  
  684.  
  685.     RxilLaunch()        macro launching only
  686.  
  687. This will take a properly initialized RxilInvocation structure and use it
  688. to launch a command or function macro.
  689. The RxilInvocation structure must be initialized with the name of the
  690. program to launch.  If the ARexx program is to be launched as a function
  691. rather than a command, the arguments should be passed by setting pointers
  692. to the argument data in the FuncArg members of the RxilInvocation
  693. structure.  These arguments may be null terminated strings.  If arguments
  694. which may contain binary are to be used, the CountArgs member of the
  695. RxilInvocation structure should be set to TRUE, and the argument length set
  696. into the ArgLen members of the structure.
  697.  
  698.  
  699.  
  700.     RxilHandleReturn()    optional, macro launching only
  701.  
  702. This will inform the user (via requester or message to the CLI) about any
  703. error returns or result strings from a macro.
  704. This is provided as both a general purpose routine which many programs
  705. might find adequete and as an example for those who wish to deal with macro
  706. returns in a custom manner.
  707.  
  708.  
  709.  
  710.     RxilCleanupReturn()    macro launching only
  711.  
  712. This frees anything which was allocated by RxilLaunch() or returned by
  713. ARexx after a macro invocation structure has been replied.
  714. This should always be called for the structures returned by
  715. RxilGetReturn().
  716.  
  717.  
  718.  
  719.     RxilSetResult()        command support
  720.  
  721. This is a handy function to make it easy to set a result string for a
  722. command recieved at the ARexx port.  Used in command handling routines.
  723.  
  724.  
  725.  
  726.     RxilCmdLock()        command support
  727.     RxilCmdUnlock()        command support
  728.  
  729. These will perform the "lock" and "unlock" actions which allow an ARexx
  730. program to gain exclusive access to a program's ARexx facilities.  These
  731. should be made entrys in the dispatch table (the array of RxilFunction
  732. structures) if the ability to "lock" and "unlock" is desired.
  733.  
  734.  
  735.  
  736.  
  737. The rest of the functions which have not been mentioned here do not need to
  738. be called directly (or at all) for most implementations.
  739.  
  740.  
  741.     )))))))))))))))))====================((((((((((((((((((((
  742.  
  743.  
  744. Commands that we launch will use the secret port as their initial host
  745. address if it is open.  If not, they will use the public port.
  746.  
  747. Functions that we launch will default to having "REXX" as their initial
  748. host address.
  749.  
  750. Note that in all of the above cases, that these are the values placed
  751. in the RexxInvocation structure when it is created.  They most definitly
  752. may be changed to anything the caller desires prior to being used to
  753. launch a macro.
  754.  
  755.  
  756.             -------------------
  757.  
  758.     Logical Consistency Caveats:
  759.  
  760.  
  761. If no secret port is opened, then the "lock" and "unlock" commands are
  762. useless and should NOT be used!
  763.  
  764. Also, if no secret port is opened, commands having a privlege of
  765. REXX_SECRET will never be executed!
  766.  
  767.  
  768.  
  769. --------------------------------------------------------------------------
  770.  
  771.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  772.     ::                            ::
  773.     ::            Notes                ::
  774.     ::                            ::
  775.     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  776.  
  777.  
  778. Don't forget to clear the "rexx_abort" flag after things have aborted
  779. if you have set the RXIL_NO_CLEARABORT flag.
  780.  
  781.  
  782.  
  783.  
  784. --------------------------------------------------------------------------
  785.  
  786.