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