home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / os2 / rexx-fix.arj / REXXSAA.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-13  |  29.9 KB  |  802 lines

  1. /*********************************************************************\
  2. *
  3. * Module Name: REXXSAA.H
  4. *
  5. * REXX Common Definitions File
  6. *
  7. * @Copyright  1989, 1991 IBM Corporation
  8. * Licensed Materials - Property of IBM
  9. *
  10. * *********************************************************************
  11. *
  12. *   #define:              To include:
  13. *
  14. *   INCL_REXXSAA          Complete Rexx support
  15. *   INCL_RXSUBCOM         Rexx subcommand handler support
  16. *   INCL_RXSHV            Rexx shared variable pool support
  17. *   INCL_RXFUNC           Rexx external function support
  18. *   INCL_RXSYSEXIT        Rexx system exit support
  19. *   INCL_RXMACRO          Rexx macro space support
  20. *   INCL_RXARI            Rexx asynchronous Trace/Halt support
  21. *
  22. \*********************************************************************/
  23. #ifndef REXXSAA_INCLUDED
  24. #define REXXSAA_INCLUDED
  25.  
  26. /* XLATON */
  27.  
  28. #ifndef OS2_INCLUDED
  29. #include <os2.h>
  30. #endif
  31.  
  32. /*********************************************************************/
  33. /*                                                                   */
  34. /*                            Common                                 */
  35. /*                                                                   */
  36. /*********************************************************************/
  37.  
  38. /* This section defines return codes and constants that are the      */
  39. /* same for both 16-bit and 32-bit REXX calls.                       */
  40.  
  41. #ifdef INCL_REXXSAA
  42. #define INCL_RXSUBCOM
  43. #define INCL_RXSHV
  44. #define INCL_RXFUNC
  45. #define INCL_RXSYSEXIT
  46. #define INCL_RXMACRO
  47. #define INCL_RXARI
  48. #endif /* INCL_REXXSAA */
  49.  
  50.  
  51. /***    Structure for external interface string (RXSTRING) */
  52.  
  53. typedef struct _RXSTRING {          /* rxstr */
  54.         ULONG  strlength;           /*   length of string         */
  55.         PCH    strptr;              /*   pointer to string        */
  56. }  RXSTRING;
  57.  
  58. typedef RXSTRING     *PRXSTRING;       /* pointer to a RXSTRING      */
  59.  
  60. #define RXAUTOBUFLEN         256L
  61.  
  62.  
  63. /***    Structure for system exit block (RXSYSEXIT) 32-bit */
  64.  
  65. typedef struct _RXSYSEXIT {            /* syse */
  66.    PSZ   sysexit_name;                 /* subcom enviro for sysexit  */
  67.    LONG  sysexit_code;                 /* sysexit function code      */
  68. }  RXSYSEXIT;
  69.  
  70. typedef RXSYSEXIT *PRXSYSEXIT;         /* pointer to a RXSYSEXIT     */
  71.  
  72.  
  73. /* XLATOFF */
  74. /***    Macros for RXSTRING manipulation                   */
  75.  
  76. #define RXNULLSTRING(r)      (!(r).strptr)
  77. #define RXZEROLENSTRING(r)   ((r).strptr && !(r).strlength)
  78. #define RXVALIDSTRING(r)     ((r).strptr && (r).strlength)
  79. #define RXSTRLEN(r)          (RXNULLSTRING(r)?0L:(r).strlength)
  80. #define RXSTRPTR(r)          (r).strptr
  81. #define MAKERXSTRING(r,p,l)  {(r).strptr=(PCH)p;(r).strlength=(ULONG)l;}
  82.  
  83. /* XLATON */
  84.  
  85. /*** Call type codes for use on interpreter startup                  */
  86. #define RXCOMMAND       0              /* Program called as Command  */
  87. #define RXSUBROUTINE    1              /* Program called as Subroutin*/
  88. #define RXFUNCTION      2              /* Program called as Function */
  89.  
  90. /***    Subcommand Interface defines*/
  91. #ifdef INCL_RXSUBCOM
  92.  
  93.  
  94. /***    Drop Authority for RXSUBCOM interface */
  95.  
  96. #define RXSUBCOM_DROPPABLE   0x00     /* handler to be dropped by all*/
  97. #define RXSUBCOM_NONDROP     0x01     /* process with same PID as the*/
  98.                                       /* registrant may drop environ */
  99.  
  100. /***    Return Codes from RXSUBCOM interface */
  101.  
  102. #define RXSUBCOM_ISREG       0x01     /* Subcommand is registered    */
  103. #define RXSUBCOM_ERROR       0x01     /* Subcommand Ended in Error   */
  104. #define RXSUBCOM_FAILURE     0x02     /* Subcommand Ended in Failure */
  105. #define RXSUBCOM_BADENTRY    1001     /* Invalid Entry Conditions    */
  106. #define RXSUBCOM_NOEMEM      1002     /* Insuff stor to complete req */
  107. #define RXSUBCOM_BADTYPE     1003     /* Bad registration type.      */
  108. #define RXSUBCOM_NOTINIT     1004     /* API system not initialized. */
  109. #define RXSUBCOM_OK           0       /* Function Complete           */
  110. #define RXSUBCOM_DUP         10       /* Duplicate Environment Name- */
  111.                                       /* but Registration Completed  */
  112. #define RXSUBCOM_MAXREG      20       /* Cannot register more        */
  113.                                       /* handlers                    */
  114. #define RXSUBCOM_NOTREG      30       /* Name Not Registered         */
  115. #define RXSUBCOM_NOCANDROP   40       /* Name not droppable          */
  116. #define RXSUBCOM_LOADERR     50       /* Could not load function     */
  117. #define RXSUBCOM_NOPROC     127       /* RXSUBCOM routine - not found*/
  118.  
  119. #endif /* INCL_RXSUBCOM for defines */
  120.  
  121. /***    Shared Variable Pool Interface defines */
  122. #ifdef INCL_RXSHV
  123.  
  124. /***    Function Codes for Variable Pool Interface (shvcode) */
  125.  
  126. #define RXSHV_SET          0x00       /* Set var from given value    */
  127. #define RXSHV_FETCH        0x01       /* Copy value of var to buffer */
  128. #define RXSHV_DROPV        0x02       /* Drop variable               */
  129. #define RXSHV_SYSET        0x03       /* Symbolic name Set variable  */
  130. #define RXSHV_SYFET        0x04       /* Symbolic name Fetch variable*/
  131. #define RXSHV_SYDRO        0x05       /* Symbolic name Drop variable */
  132. #define RXSHV_NEXTV        0x06       /* Fetch "next" variable       */
  133. #define RXSHV_PRIV         0x07       /* Fetch private information   */
  134. #define RXSHV_EXIT         0x08       /* Set function exit value     */
  135.  
  136. /***    Return Codes for Variable Pool Interface */
  137.  
  138. #define RXSHV_NOAVL         144       /* Interface not available     */
  139.  
  140. /***    Return Code Flags for Variable Pool Interface (shvret) */
  141.  
  142. #define RXSHV_OK           0x00       /* Execution was OK            */
  143. #define RXSHV_NEWV         0x01       /* Variable did not exist      */
  144. #define RXSHV_LVAR         0x02       /* Last var trans via SHVNEXTV */
  145. #define RXSHV_TRUNC        0x04       /* Truncation occurred-Fetch   */
  146. #define RXSHV_BADN         0x08       /* Invalid variable name       */
  147. #define RXSHV_MEMFL        0x10       /* Out of memory failure       */
  148. #define RXSHV_BADF         0x80       /* Invalid funct code (shvcode)*/
  149.  
  150.  
  151. /***    Structure of Shared Variable Request Block (SHVBLOCK) */
  152.  
  153. typedef struct _SHVBLOCK {            /* shvb */
  154.     struct _SHVBLOCK  *shvnext;       /* pointer to the next block   */
  155.     RXSTRING           shvname;       /* Pointer to the name buffer  */
  156.     RXSTRING           shvvalue;      /* Pointer to the value buffer */
  157.     ULONG              shvnamelen;    /* Length of the name value    */
  158.     ULONG              shvvaluelen;   /* Length of the fetch value   */
  159.     UCHAR              shvcode;       /* Function code for this block*/
  160.     UCHAR              shvret;        /* Individual Return Code Flags*/
  161. }   SHVBLOCK;
  162.  
  163. typedef SHVBLOCK *PSHVBLOCK;
  164.  
  165. #endif /* INCL_RXSHV for defines */
  166.  
  167. /***    External Function Interface */
  168. #ifdef INCL_RXFUNC
  169.  
  170. /***    Registration Type Identifiers for Available Function Table */
  171.  
  172. #define RXFUNC_DYNALINK       1        /* Function Available in DLL  */
  173. #define RXFUNC_CALLENTRY      2        /* Registered as mem entry pt.*/
  174.  
  175.  
  176. /***    Return Codes from RxFunction interface */
  177.  
  178.  
  179. #define RXFUNC_OK             0        /* REXX-API Call Successful   */
  180. #define RXFUNC_DEFINED       10        /* Function Defined in AFT    */
  181. #define RXFUNC_NOMEM         20        /* Not Enough Mem to Add      */
  182. #define RXFUNC_NOTREG        30        /* Funct Not Registered in AFT*/
  183. #define RXFUNC_MODNOTFND     40        /* Funct Dll Module Not Found */
  184. #define RXFUNC_ENTNOTFND     50        /* Funct Entry Point Not Found*/
  185. #define RXFUNC_NOTINIT       60        /* API not initialized        */
  186. #define RXFUNC_BADTYPE       70        /* Bad function type          */
  187. #endif /* INCL_RXFUNC for defines */
  188.  
  189. /***   System Exits defines */
  190. #ifdef INCL_RXSYSEXIT
  191.  
  192. /***    Drop Authority for Rexx Exit interface */
  193.  
  194. #define RXEXIT_DROPPABLE     0x00     /* handler to be dropped by all*/
  195. #define RXEXIT_NONDROP       0x01     /* process with same PID as the*/
  196.                                       /* registrant may drop environ */
  197.  
  198.  
  199. /***    Exit return actions */
  200.  
  201. #define RXEXIT_HANDLED       0        /* Exit handled exit event     */
  202. #define RXEXIT_NOT_HANDLED   1        /* Exit passes on exit event   */
  203. #define RXEXIT_RAISE_ERROR   (-1)     /* Exit handler error occurred */
  204.  
  205. /***    Return Codes from RXEXIT interface */
  206.  
  207. #define RXEXIT_ISREG         0x01     /* Exit is registered          */
  208. #define RXEXIT_ERROR         0x01     /* Exit Ended in Error         */
  209. #define RXEXIT_FAILURE       0x02     /* Exit Ended in Failure       */
  210. #define RXEXIT_BADENTRY      1001     /* Invalid Entry Conditions    */
  211. #define RXEXIT_NOEMEM        1002     /* Insuff stor to complete req */
  212. #define RXEXIT_BADTYPE       1003     /* Bad registration type.      */
  213. #define RXEXIT_NOTINIT       1004     /* API system not initialized. */
  214. #define RXEXIT_OK             0       /* Function Complete           */
  215. #define RXEXIT_DUP           10       /* Duplicate Exit Name-        */
  216.                                       /* but Registration Completed  */
  217. #define RXEXIT_MAXREG        20       /* Cannot register more        */
  218.                                       /* handlers                    */
  219. #define RXEXIT_NOTREG        30       /* Name Not Registered         */
  220. #define RXEXIT_NOCANDROP     40       /* Name not droppable          */
  221. #define RXEXIT_LOADERR       50       /* Could not load function     */
  222. #define RXEXIT_NOPROC       127       /* RXEXIT routine - not found  */
  223.  
  224.  
  225.  
  226. /* System Exit function and sub-function definitions */
  227.  
  228. #define RXENDLST    0                 /* End of exit list.           */
  229. #define RXFNC    2                    /* Process external functions. */
  230. #define    RXFNCCAL 1                 /* subcode value.              */
  231. #define RXCMD    3                    /* Process host commands.      */
  232. #define    RXCMDHST 1                 /* subcode value.              */
  233. #define RXMSQ    4                    /* Manipulate queue.           */
  234. #define    RXMSQPLL 1                 /* Pull a line from queue      */
  235. #define    RXMSQPSH 2                 /* Place a line on queue       */
  236. #define    RXMSQSIZ 3                 /* Return num of lines on queue*/
  237. #define    RXMSQNAM 20                /* Set active queue name       */
  238. #define RXSIO    5                    /* Session I/O.                */
  239. #define    RXSIOSAY 1                 /* SAY a line to STDOUT        */
  240. #define    RXSIOTRC 2                 /* Trace output                */
  241. #define    RXSIOTRD 3                 /* Read from char stream       */
  242. #define    RXSIODTR 4                 /* DEBUG read from char stream */
  243. #define    RXSIOTLL 5                 /* Return linelength(N/A OS/2) */
  244. #define RXHLT    7                    /* Halt processing.            */
  245. #define    RXHLTCLR 1                 /* Clear HALT indicator        */
  246. #define    RXHLTTST 2                 /* Test HALT indicator         */
  247. #define RXTRC    8                    /* Test ext trace indicator.   */
  248. #define    RXTRCTST 1                 /* subcode value.              */
  249. #define RXINI    9                    /* Initialization processing.  */
  250. #define    RXINIEXT 1                 /* subcode value.              */
  251. #define RXTER   10                    /* Termination processing.     */
  252. #define    RXTEREXT 1                 /* subcode value.              */
  253. #define RXNOOFEXITS 11                /* 1 + largest exit number.    */
  254.  
  255. typedef PUCHAR PEXIT;                 /* ptr to exit parameter block */
  256. #endif /* INCL_RXSYSEXIT for defines */
  257.  
  258. /***    Asynchronous Request Interface defines */
  259. #ifdef INCL_RXARI
  260.  
  261. /***    Return Codes from Asynchronous Request interface */
  262.  
  263. #define RXARI_OK                   0  /* Interface completed         */
  264. #define RXARI_NOT_FOUND            1  /* Target program not found    */
  265. #define RXARI_PROCESSING_ERROR     2  /* Error processing request    */
  266. #endif /* INCL_RXARI for defines */
  267.  
  268. /***    Macro Space Interface defines */
  269. #ifdef INCL_RXMACRO
  270.  
  271. /***    Registration Search Order Flags */
  272.  
  273. #define RXMACRO_SEARCH_BEFORE       1  /* Beginning of search order  */
  274. #define RXMACRO_SEARCH_AFTER        2  /* End of search order        */
  275.  
  276.  
  277. /***    Return Codes from RxMacroSpace interface */
  278.  
  279. #define RXMACRO_OK                 0  /* Macro interface completed   */
  280. #define RXMACRO_NO_STORAGE         1  /* Not Enough Storage Available*/
  281. #define RXMACRO_NOT_FOUND          2  /* Requested function not found*/
  282. #define RXMACRO_EXTENSION_REQUIRED 3  /* File ext required for save  */
  283. #define RXMACRO_ALREADY_EXISTS     4  /* Macro functions exist       */
  284. #define RXMACRO_FILE_ERROR         5  /* File I/O error in save/load */
  285. #define RXMACRO_SIGNATURE_ERROR    6  /* Incorrect format for load   */
  286. #define RXMACRO_SOURCE_NOT_FOUND   7  /* Requested cannot be found   */
  287. #define RXMACRO_INVALID_POSITION   8  /* Invalid search order pos    */
  288. #define RXMACRO_NOT_INIT           9  /* API not initialized         */
  289. #endif /* INCL_RXMACRO for defines */
  290.  
  291. /*********************************************************************/
  292. /*                                                                   */
  293. /*                            32-bit                                 */
  294. /*                                                                   */
  295. /*********************************************************************/
  296.  
  297. /* XLATOFF */
  298. /***    Main Entry Point to the REXXSAA Interpreter */
  299.  
  300.  
  301. #pragma linkage(RexxStart,system)
  302. LONG   APIENTRY RexxStart (
  303.          LONG ,                        /* Num of args passed to rexx */
  304.          PRXSTRING,                    /* Array of args passed to rex*/
  305.          PSZ,                          /* [d:][path] filename[.ext]  */
  306.          PRXSTRING,                    /* Loc of rexx proc in memory */
  307.          PSZ,                          /* ASCIIZ initial environment.*/
  308.          LONG ,                        /* type (command,subrtn,funct)*/
  309.          PRXSYSEXIT,                   /* SysExit env. names &  codes*/
  310.          PSHORT,                       /* Ret code from if numeric   */
  311.          PRXSTRING );                  /* Retvalue from the rexx proc*/
  312.  
  313. /***   Uppercase Entry Point Name */
  314. #define REXXSTART   RexxStart
  315.  
  316. /* XLATON */
  317.  
  318. /***    Subcommand Interface */
  319. #ifdef INCL_RXSUBCOM
  320.  
  321.  
  322. /* XLATOFF */
  323.  
  324. /* This typedef simplifies coding of a Subcommand handler.           */
  325. #pragma linkage(RexxSubcomHandler,system)
  326. typedef ULONG RexxSubcomHandler(PRXSTRING,
  327.                                 PUSHORT,
  328.                                 PRXSTRING);
  329.  
  330. /***   RexxRegisterSubcomDll -- Register a DLL entry point           */
  331. /***   as a Subcommand handler */
  332.  
  333. #pragma linkage(RexxRegisterSubcomDll,system)
  334. APIRET APIENTRY RexxRegisterSubcomDll (
  335.          PSZ,                          /* Name of subcom handler     */
  336.          PSZ,                          /* Name of DLL                */
  337.          PSZ,                          /* Name of procedure in DLL   */
  338.          PUCHAR,                       /* User area                  */
  339.          ULONG  );                     /* Drop authority.            */
  340.  
  341. /***   Uppercase Entry Point Name */
  342. #define REXXREGISTERSUBCOMDLL  RexxRegisterSubcomDll
  343.  
  344.  
  345. /***   RexxRegisterSubcomExe -- Register an EXE entry point          */
  346. /***   as a Subcommand handler */
  347.  
  348. #pragma linkage(RexxRegisterSubcomExe,system)
  349. APIRET APIENTRY RexxRegisterSubcomExe (
  350.          PSZ,                          /* Name of subcom handler     */
  351.          PFN,                          /* address of handler in EXE  */
  352.          PUCHAR);                      /* User area                  */
  353.  
  354. /***   Uppercase Entry Point Name */
  355. #define REXXREGISTERSUBCOMEXE  RexxRegisterSubcomExe
  356.  
  357.  
  358.  
  359. /***    RexxQuerySubcom - Query an environment for Existance */
  360.  
  361. #pragma linkage(RexxQuerySubcom,system)
  362. APIRET APIENTRY RexxQuerySubcom(
  363.          PSZ,                          /* Name of the Environment    */
  364.          PSZ,                          /* DLL Module Name            */
  365.          PUSHORT,                      /* Stor for existance code    */
  366.          PUCHAR );                     /* Stor for user word         */
  367.  
  368. /***   Uppercase Entry Point Name */
  369. #define REXXQUERYSUBCOM  RexxQuerySubcom
  370.  
  371.  
  372.  
  373. /***    RexxDeregisterSubcom - Drop registration of a Subcommand     */
  374. /***    environment */
  375.  
  376. #pragma linkage(RexxDeregisterSubcom,system)
  377. APIRET APIENTRY RexxDeregisterSubcom(
  378.          PSZ,                          /* Name of the Environment    */
  379.          PSZ );                        /* DLL Module Name            */
  380.  
  381. /***   Uppercase Entry Point Name */
  382. #define REXXDEREGISTERSUBCOM  RexxDeregisterSubcom
  383.  
  384.  
  385. /* XLATON */
  386. #endif /* INCL_RXSUBCOM */
  387.  
  388.  
  389.  
  390. /***    Shared Variable Pool Interface */
  391. #ifdef INCL_RXSHV
  392.  
  393. /* XLATOFF */
  394.  
  395. /***    RexxVariablePool - Request Variable Pool Service */
  396.  
  397. #pragma linkage(RexxVariablePool,system)
  398. APIRET APIENTRY RexxVariablePool(
  399.          PSHVBLOCK);                  /* Pointer to list of SHVBLOCKs*/
  400.  
  401. /***   Uppercase Entry Point Name */
  402. #define REXXVARIABLEPOOL  RexxVariablePool
  403. /* XLATON */
  404.  
  405.  
  406. #endif /* INCL_RXSHV */
  407.  
  408.  
  409. /***    External Function Interface */
  410. #ifdef INCL_RXFUNC
  411.  
  412. /* XLATOFF */
  413.  
  414. /* This typedef simplifies coding of an External Function.           */
  415. #pragma linkage(RexxFunctionHandler,system)
  416. typedef ULONG RexxFunctionHandler(PUCHAR,
  417.                                   ULONG,
  418.                                   PRXSTRING,
  419.                                   PSZ,
  420.                                   PRXSTRING);
  421.  
  422. /***    RexxRegisterFunctionDll - Register a function in the AFT */
  423.  
  424. #pragma linkage(RexxRegisterFunctionDll,system)
  425. APIRET APIENTRY RexxRegisterFunctionDll (
  426.         PSZ,                           /* Name of function to add    */
  427.         PSZ,                           /* Dll file name (if in dll)  */
  428.         PSZ);                          /* Entry in dll               */
  429.  
  430. /***   Uppercase Entry Point Name */
  431. #define REXXREGISTERFUNCTIONDLL  RexxRegisterFunctionDll
  432.  
  433.  
  434. /***    RexxRegisterFunctionExe - Register a function in the AFT */
  435.  
  436. #pragma linkage(RexxRegisterFunctionExe,system)
  437. APIRET APIENTRY RexxRegisterFunctionExe (
  438.         PSZ,                           /* Name of function to add    */
  439.         PFN);                          /* Entry point in EXE         */
  440.  
  441. /***   Uppercase Entry Point Name */
  442. #define REXXREGISTERFUNCTIONEXE  RexxRegisterFunctionExe
  443.  
  444.  
  445.  
  446. /***    RexxDeregisterFunction - Delete a function from the AFT */
  447.  
  448. #pragma linkage(RexxDeregisterFunction,system)
  449. APIRET APIENTRY RexxDeregisterFunction (
  450.         PSZ );                         /* Name of function to remove */
  451.  
  452. /***   Uppercase Entry Point Name */
  453. #define REXXDEREGISTERFUNCTION  RexxDeregisterFunction
  454.  
  455.  
  456.  
  457. /***    RexxQueryFunction - Scan the AFT for a function */
  458.  
  459. #pragma linkage(RexxQueryFunction,system)
  460. APIRET APIENTRY RexxQueryFunction (
  461.         PSZ );                         /* Name of function to find   */
  462.  
  463. /***   Uppercase Entry Point Name */
  464. #define REXXQUERYFUNCTION  RexxQueryFunction
  465.  
  466.  
  467.  
  468. /* XLATON */
  469.  
  470.  
  471. #endif /* INCL_RXFUNC */
  472.  
  473.  
  474. /***   System Exits */
  475. #ifdef INCL_RXSYSEXIT
  476.  
  477. /***    Subfunction RXFNCCAL - External Function Calls */
  478.  
  479. typedef _Packed struct _RXFNC_FLAGS {          /* fl */
  480.    unsigned rxfferr  : 1;              /* Invalid call to routine.   */
  481.    unsigned rxffnfnd : 1;              /* Function not found.        */
  482.    unsigned rxffsub  : 1;              /* Called as a subroutine     */
  483. }  RXFNC_FLAGS ;
  484.  
  485. typedef _Packed struct _RXFNCCAL_PARM {        /* fnc */
  486.    RXFNC_FLAGS       rxfnc_flags ;     /* function flags             */
  487.    PUCHAR            rxfnc_name;       /* Pointer to function name.  */
  488.    USHORT            rxfnc_namel;      /* Length of function name.   */
  489.    PUCHAR            rxfnc_que;        /* Current queue name.        */
  490.    USHORT            rxfnc_quel;       /* Length of queue name.      */
  491.    USHORT            rxfnc_argc;       /* Number of args in list.    */
  492.    PRXSTRING         rxfnc_argv;       /* Pointer to argument list.  */
  493.    RXSTRING          rxfnc_retc;       /* Return value.              */
  494. }  RXFNCCAL_PARM;
  495.  
  496.  
  497. /***    Subfunction RXCMDHST -- Process Host Commands     */
  498.  
  499. typedef _Packed struct _RXCMD_FLAGS {          /* fl */
  500.    unsigned rxfcfail : 1;              /* Command failed.            */
  501.    unsigned rxfcerr  : 1;              /* Command ERROR occurred.    */
  502. }  RXCMD_FLAGS;
  503.  
  504. typedef _Packed struct _RXCMDHST_PARM {        /* rx */
  505.    RXCMD_FLAGS       rxcmd_flags;      /* error/failure flags        */
  506.    PUCHAR            rxcmd_address;    /* Pointer to address name.   */
  507.    USHORT            rxcmd_addressl;   /* Length of address name.    */
  508.    PUCHAR            rxcmd_dll;        /* dll name for command.      */
  509.    USHORT            rxcmd_dll_len;    /* Length of dll name.        */
  510.    RXSTRING          rxcmd_command;    /* The command string.        */
  511.    RXSTRING          rxcmd_retc;       /* Pointer to return buffer   */
  512. }  RXCMDHST_PARM;
  513.  
  514.  
  515. /***     Subfunction RXMSQPLL -- Pull Entry from Queue */
  516.  
  517. typedef struct _RXMSQPLL_PARM {        /* pll */
  518.    RXSTRING          rxmsq_retc;       /* Pointer to dequeued entry  */
  519.                                        /* buffer.  User allocated.   */
  520. } RXMSQPLL_PARM;
  521.  
  522.  
  523. /***    Subfunction RXMSQPSH -- Push Entry on Queue */
  524.  
  525. typedef _Packed struct _RXMSQ_FLAGS {          /* fl */
  526.    unsigned rxfmlifo : 1;              /* Stack entry LIFO if set    */
  527. }  RXMSQ_FLAGS;
  528.  
  529. typedef _Packed struct _RXMSQPSH_PARM {        /* psh */
  530.    RXMSQ_FLAGS       rxmsq_flags;      /* LIFO/FIFO flag             */
  531.    RXSTRING          rxmsq_value;      /* The entry to be pushed.    */
  532. }  RXMSQPSH_PARM;
  533.  
  534.  
  535. /***    Subfunction RXMSQSIZ -- Return the Current Queue Size */
  536.  
  537. typedef struct _RXMSQSIZ_PARM {        /* siz */
  538.    ULONG             rxmsq_size;       /* Number of Lines in Queue   */
  539. }  RXMSQSIZ_PARM;
  540.  
  541.  
  542. /***    Subfunction RXMSQNAM -- Set Current Queue Name */
  543.  
  544. typedef struct _RXMSQNAM_PARM {        /* nam */
  545.    RXSTRING          rxmsq_name;       /* RXSTRING containing        */
  546.                                        /* queue name.                */
  547. }  RXMSQNAM_PARM;
  548.  
  549.  
  550. /***    Subfunction RXSIOSAY -- Perform SAY Clause */
  551.  
  552. typedef struct _RXSIOSAY_PARM {        /* say */
  553.    RXSTRING          rxsio_string;     /* String to display.         */
  554. }  RXSIOSAY_PARM;
  555.  
  556.  
  557. /***    Subfunction RXSIOTRC -- Write Trace Output */
  558.  
  559. typedef struct _RXSIOTRC_PARM { /* trcparm */
  560.    RXSTRING          rxsio_string;     /* Trace line to display.     */
  561. }  RXSIOTRC_PARM;
  562.  
  563.  
  564. /***    Subfunction RXSIOTRD -- Read Input from the Terminal */
  565.  
  566. typedef struct _RXSIOTRD_PARM {        /* trd */
  567.    RXSTRING          rxsiotrd_retc;    /* RXSTRING for output.       */
  568. }  RXSIOTRD_PARM;
  569.  
  570.  
  571. /***    Subfunction RXSIODTR -- Read Debug Input from the Terminal */
  572.  
  573. typedef struct _RXSIODTR_PARM {        /* dtr */
  574.    RXSTRING          rxsiodtr_retc;    /* RXSTRING for output.       */
  575. }  RXSIODTR_PARM;
  576.  
  577.  
  578. /***    Subfunction RXHSTTST -- Test for HALT Condition */
  579.  
  580. typedef struct _RXHLT_FLAGS {          /* fl Halt flag               */
  581.    unsigned rxfhhalt : 1;              /* Set if HALT occurred.      */
  582. }  RXHLT_FLAGS;
  583.  
  584. typedef struct _RXHLTTST_PARM {        /* tst */
  585.    RXHLT_FLAGS rxhlt_flags;            /* Set if HALT occurred       */
  586. }  RXHLTTST_PARM;
  587.  
  588.  
  589. /***    Subfunction RXTRCTST -- Test for TRACE Condition */
  590.  
  591. typedef struct _RXTRC_FLAGS {          /* fl Trace flags             */
  592.    unsigned rxftrace : 1;              /* Set to run external trace. */
  593. }  RXTRC_FLAGS;
  594.  
  595. typedef struct _RXTRCTST_PARM {        /* tst */
  596.    RXTRC_FLAGS rxtrc_flags;            /* Set to run external trace  */
  597. }  RXTRCTST_PARM;
  598.  
  599.  
  600. /* XLATOFF */
  601.  
  602. /* This typedef simplifies coding of an Exit handler.                */
  603. #pragma linkage(RexxExitHandler,system)
  604. typedef LONG RexxExitHandler(LONG,
  605.                              LONG,
  606.                              PEXIT);
  607.  
  608. /***      RexxRegisterExitDll - Register a system exit. */
  609.  
  610. #pragma linkage(RexxRegisterExitDll,system)
  611. APIRET APIENTRY RexxRegisterExitDll (
  612.          PSZ,                          /* Name of the exit handler   */
  613.          PSZ,                          /* Name of the DLL            */
  614.          PSZ,                          /* Name of the procedure      */
  615.          PUCHAR,                       /* User area                  */
  616.          ULONG );                      /* Drop authority             */
  617.  
  618. /***   Uppercase Entry Point Name */
  619. #define REXXREGISTEREXITDLL  RexxRegisterExitDll
  620.  
  621.  
  622. /***      RexxRegisterExitExe - Register a system exit. */
  623.  
  624. #pragma linkage(RexxRegisterExitExe,system)
  625. APIRET APIENTRY RexxRegisterExitExe (
  626.          PSZ,                          /* Name of the exit handler   */
  627.          PFN,                          /* Address of exit handler    */
  628.          PUCHAR);                      /* User area                  */
  629.  
  630. /***   Uppercase Entry Point Name */
  631. #define REXXREGISTEREXITEXE  RexxRegisterExitExe
  632.  
  633.  
  634.  
  635. /***    RexxDeregisterExit - Drop registration of a system exit. */
  636.  
  637. #pragma linkage(RexxDeregisterExit,system)
  638. APIRET APIENTRY RexxDeregisterExit (
  639.          PSZ,                          /* Exit name                  */
  640.          PSZ ) ;                       /* DLL module name            */
  641.  
  642. /***   Uppercase Entry Point Name */
  643. #define REXXDEREGISTEREXIT  RexxDeregisterExit
  644.  
  645.  
  646.  
  647. /***    RexxQueryExit - Query an exit for existance. */
  648.  
  649. #pragma linkage(RexxQueryExit,system)
  650. APIRET APIENTRY RexxQueryExit (
  651.          PSZ,                          /* Exit name                  */
  652.          PSZ,                          /* DLL Module name.           */
  653.          PUSHORT,                      /* Existance flag.            */
  654.          PUCHAR );                     /* User data.                 */
  655.  
  656. /***   Uppercase Entry Point Name */
  657. #define REXXQUERYEXIT  RexxQueryExit
  658. /* XLATON */
  659.  
  660.  
  661. #endif /* INCL_RXSYSEXIT */
  662.  
  663.  
  664. /***    Asynchronous Request Interface */
  665. #ifdef INCL_RXARI
  666.  
  667. /* XLATOFF */
  668.  
  669. /***    RexxSetHalt - Request Program Halt */
  670.  
  671. #pragma linkage(RexxSetHalt,system)
  672. APIRET APIENTRY RexxSetHalt(
  673.          PID,                         /* Process Id                  */
  674.          TID);                        /* Thread Id                   */
  675.  
  676. /***   Uppercase Entry Point Name */
  677. #define REXXSETHALT  RexxSetHalt
  678.  
  679.  
  680. /***    RexxSetTrace - Request Program Trace */
  681.  
  682. #pragma linkage(RexxSetTrace,system)
  683. APIRET APIENTRY RexxSetTrace(
  684.          PID,                         /* Process Id                  */
  685.          TID);                        /* Thread Id                   */
  686.  
  687. /***   Uppercase Entry Point Name */
  688. #define REXXSETTRACE  RexxSetTrace
  689.  
  690.  
  691. /***    RexxResetTrace - Turn Off Program Trace */
  692.  
  693. #pragma linkage(RexxResetTrace,system)
  694. APIRET APIENTRY RexxResetTrace(
  695.          PID,                         /* Process Id                  */
  696.          TID);                        /* Thread Id                   */
  697.  
  698. /***   Uppercase Entry Point Name */
  699. #define REXXRESETTRACE  RexxResetTrace
  700.  
  701. /* XLATON */
  702.  
  703.  
  704. #endif /* INCL_RXARI */
  705.  
  706.  
  707. /***    Macro Space Interface */
  708. #ifdef INCL_RXMACRO
  709.  
  710. /* XLATOFF */
  711.  
  712. /***    RexxAddMacro - Register a function in the Macro Space        */
  713.  
  714. #pragma linkage(RexxAddMacro,system)
  715. APIRET APIENTRY RexxAddMacro (
  716.          PSZ,                         /* Function to add or change   */
  717.          PSZ,                         /* Name of file to get function*/
  718.          ULONG  );                    /* Flag indicating search pos  */
  719.  
  720. /***   Uppercase Entry Point Name */
  721. #define REXXADDMACRO  RexxAddMacro
  722.  
  723.  
  724.  
  725. /***    RexxDropMacro - Remove a function from the Macro Space       */
  726.  
  727. #pragma linkage(RexxDropMacro,system)
  728. APIRET APIENTRY RexxDropMacro (
  729.          PSZ );                        /* Name of function to remove */
  730.  
  731. /***   Uppercase Entry Point Name */
  732. #define REXXDROPMACRO  RexxDropMacro
  733.  
  734.  
  735.  
  736. /***    RexxSaveMacroSpace - Save Macro Space functions to a file    */
  737.  
  738. #pragma linkage(RexxSaveMacroSpace,system)
  739. APIRET APIENTRY RexxSaveMacroSpace (
  740.          ULONG ,                      /* Argument count (0==save all)*/
  741.          PSZ *,                       /* List of funct names to save */
  742.          PSZ);                        /* File to save functions in   */
  743.  
  744. /***   Uppercase Entry Point Name */
  745. #define REXXSAVEMACROSPACE  RexxSaveMacroSpace
  746.  
  747.  
  748.  
  749. /***    RexxLoadMacroSpace - Load Macro Space functions from a file  */
  750.  
  751. #pragma linkage(RexxLoadMacroSpace,system)
  752. APIRET APIENTRY RexxLoadMacroSpace (
  753.          ULONG ,                      /* Argument count (0==load all)*/
  754.          PSZ *,                       /* List of funct names to load */
  755.          PSZ);                        /* File to load functions from */
  756.  
  757. /***   Uppercase Entry Point Name */
  758. #define REXXLOADMACROSPACE  RexxLoadMacroSpace
  759.  
  760.  
  761.  
  762. /***    RexxQueryMacro - Find a function's search-order position     */
  763.  
  764. #pragma linkage(RexxQueryMacro,system)
  765. APIRET APIENTRY RexxQueryMacro (
  766.          PSZ,                         /* Function to search for      */
  767.          PUSHORT );                   /* Ptr for position flag return*/
  768.  
  769. /***   Uppercase Entry Point Name */
  770. #define REXXQUERYMACRO  RexxQueryMacro
  771.  
  772.  
  773.  
  774. /***    RexxReorderMacro - Change a function's search-order          */
  775. /***                            position                             */
  776.  
  777. #pragma linkage(RexxReorderMacro,system)
  778. APIRET APIENTRY RexxReorderMacro(
  779.          PSZ,                         /* Name of funct change order  */
  780.          ULONG  );                    /* New position for function   */
  781.  
  782. /***   Uppercase Entry Point Name */
  783. #define REXXREORDERMACRO  RexxReorderMacro
  784.  
  785.  
  786.  
  787. /***    RexxClearMacroSpace - Remove all functions from a MacroSpace */
  788.  
  789.  
  790. #pragma linkage(RexxClearMacroSpace,system)
  791. APIRET APIENTRY RexxClearMacroSpace(
  792.          VOID );                      /* No Arguments.               */
  793.  
  794. /***   Uppercase Entry Point Name */
  795. #define REXXCLEARMACROSPACE  RexxClearMacroSpace
  796.  
  797. /* XLATON */
  798.  
  799. #endif /* INCL_RXMACRO */
  800.  
  801. #endif /* REXXSAA_INCLUDED */
  802.