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