home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / cplus / os2h / rexxsaa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-30  |  28.9 KB  |  773 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. LONG   APIENTRY RexxStart(LONG ,                        /* Num of args passed to rexx */
  311.          PRXSTRING,                    /* Array of args passed to rex */
  312.          PCSZ,                          /* [d:][path] filename[.ext]  */
  313.          PRXSTRING,                    /* Loc of rexx proc in memory */
  314.          PCSZ,                          /* 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. typedef ULONG APIENTRY RexxSubcomHandler(PRXSTRING,
  333.                                 PUSHORT,
  334.                                 PRXSTRING);
  335.  
  336. /***   RexxRegisterSubcomDll -- Register a DLL entry point           */
  337. /***   as a Subcommand handler */
  338.  
  339. APIRET APIENTRY RexxRegisterSubcomDll(PCSZ,                          /* Name of subcom handler     */
  340.          PCSZ,                          /* Name of DLL                */
  341.          PCSZ,                          /* Name of procedure in DLL   */
  342.          PUCHAR,                       /* User area                  */
  343.          ULONG  );                     /* Drop authority.            */
  344.  
  345. /***   Uppercase Entry Point Name */
  346. #define REXXREGISTERSUBCOMDLL  RexxRegisterSubcomDll
  347.  
  348.  
  349. /***   RexxRegisterSubcomExe -- Register an EXE entry point          */
  350. /***   as a Subcommand handler */
  351.  
  352. APIRET APIENTRY RexxRegisterSubcomExe(PCSZ,                          /* Name of subcom handler     */
  353.          PFN,                          /* address of handler in EXE  */
  354.          PUCHAR);                      /* User area                  */
  355.  
  356. /***   Uppercase Entry Point Name */
  357. #define REXXREGISTERSUBCOMEXE  RexxRegisterSubcomExe
  358.  
  359.  
  360.  
  361. /***    RexxQuerySubcom - Query an environment for Existance */
  362.  
  363. APIRET APIENTRY RexxQuerySubcom(PCSZ,                          /* Name of the Environment    */
  364.          PCSZ,                          /* 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. APIRET APIENTRY RexxDeregisterSubcom(PCSZ,                          /* Name of the Environment    */
  377.          PCSZ );                        /* DLL Module Name            */
  378.  
  379. /***   Uppercase Entry Point Name */
  380. #define REXXDEREGISTERSUBCOM  RexxDeregisterSubcom
  381.  
  382.  
  383. /* XLATON */
  384. #endif /* INCL_RXSUBCOM */
  385.  
  386.  
  387.  
  388. /***    Shared Variable Pool Interface */
  389. #ifdef INCL_RXSHV
  390.  
  391. /* XLATOFF */
  392.  
  393. /***    RexxVariablePool - Request Variable Pool Service */
  394.  
  395. APIRET APIENTRY RexxVariablePool(PSHVBLOCK);                  /* Pointer to list of SHVBLOCKs */
  396.  
  397. /***   Uppercase Entry Point Name */
  398. #define REXXVARIABLEPOOL  RexxVariablePool
  399. /* XLATON */
  400.  
  401.  
  402. #endif /* INCL_RXSHV */
  403.  
  404.  
  405. /***    External Function Interface */
  406. #ifdef INCL_RXFUNC
  407.  
  408. /* XLATOFF */
  409.  
  410. /* This typedef simplifies coding of an External Function.           */
  411. typedef ULONG APIENTRY RexxFunctionHandler(PSZ,
  412.                                   ULONG,
  413.                                   PRXSTRING,
  414.                                   PSZ,
  415.                                   PRXSTRING);
  416.  
  417. /***    RexxRegisterFunctionDll - Register a function in the AFT */
  418.  
  419. APIRET APIENTRY RexxRegisterFunctionDll(PCSZ,                           /* Name of function to add    */
  420.         PCSZ,                           /* Dll file name (if in dll)  */
  421.         PCSZ);                          /* Entry in dll               */
  422.  
  423. /***   Uppercase Entry Point Name */
  424. #define REXXREGISTERFUNCTIONDLL  RexxRegisterFunctionDll
  425.  
  426.  
  427. /***    RexxRegisterFunctionExe - Register a function in the AFT */
  428.  
  429. APIRET APIENTRY RexxRegisterFunctionExe(PCSZ,                           /* Name of function to add    */
  430.         RexxFunctionHandler *);        /* Entry point in EXE         */
  431.  
  432. /***   Uppercase Entry Point Name */
  433. #define REXXREGISTERFUNCTIONEXE  RexxRegisterFunctionExe
  434.  
  435.  
  436.  
  437. /***    RexxDeregisterFunction - Delete a function from the AFT */
  438.  
  439. APIRET APIENTRY RexxDeregisterFunction(PCSZ );                         /* Name of function to remove */
  440.  
  441. /***   Uppercase Entry Point Name */
  442. #define REXXDEREGISTERFUNCTION  RexxDeregisterFunction
  443.  
  444.  
  445.  
  446. /***    RexxQueryFunction - Scan the AFT for a function */
  447.  
  448. APIRET APIENTRY RexxQueryFunction(PCSZ );                         /* Name of function to find   */
  449.  
  450. /***   Uppercase Entry Point Name */
  451. #define REXXQUERYFUNCTION  RexxQueryFunction
  452.  
  453.  
  454.  
  455. /* XLATON */
  456.  
  457.  
  458. #endif /* INCL_RXFUNC */
  459.  
  460.  
  461. /***   System Exits */
  462. #ifdef INCL_RXSYSEXIT
  463.  
  464. /***    Subfunction RXFNCCAL - External Function Calls */
  465. #pragma pack(1)
  466.  
  467. typedef struct _RXFNC_FLAGS {          /* fl */
  468.    unsigned rxfferr  : 1;              /* Invalid call to routine.   */
  469.    unsigned rxffnfnd : 1;              /* Function not found.        */
  470.    unsigned rxffsub  : 1;              /* Called as a subroutine     */
  471. }  RXFNC_FLAGS ;
  472.  
  473. typedef struct _RXFNCCAL_PARM {        /* fnc */
  474.    RXFNC_FLAGS       rxfnc_flags ;     /* function flags             */
  475.    PUCHAR            rxfnc_name;       /* Pointer to function name.  */
  476.    USHORT            rxfnc_namel;      /* Length of function name.   */
  477.    PUCHAR            rxfnc_que;        /* Current queue name.        */
  478.    USHORT            rxfnc_quel;       /* Length of queue name.      */
  479.    USHORT            rxfnc_argc;       /* Number of args in list.    */
  480.    PRXSTRING         rxfnc_argv;       /* Pointer to argument list.  */
  481.    RXSTRING          rxfnc_retc;       /* Return value.              */
  482. }  RXFNCCAL_PARM;
  483.  
  484.  
  485. /***    Subfunction RXCMDHST -- Process Host Commands     */
  486.  
  487. typedef struct _RXCMD_FLAGS {          /* fl */
  488.    unsigned rxfcfail : 1;              /* Command failed.            */
  489.    unsigned rxfcerr  : 1;              /* Command ERROR occurred.    */
  490. }  RXCMD_FLAGS;
  491.  
  492. typedef struct _RXCMDHST_PARM {        /* rx */
  493.    RXCMD_FLAGS       rxcmd_flags;      /* error/failure flags        */
  494.    PUCHAR            rxcmd_address;    /* Pointer to address name.   */
  495.    USHORT            rxcmd_addressl;   /* Length of address name.    */
  496.    PUCHAR            rxcmd_dll;        /* dll name for command.      */
  497.    USHORT            rxcmd_dll_len;    /* Length of dll name.        */
  498.    RXSTRING          rxcmd_command;    /* The command string.        */
  499.    RXSTRING          rxcmd_retc;       /* Pointer to return buffer   */
  500. }  RXCMDHST_PARM;
  501.  
  502.  
  503. #pragma pack()
  504. /***     Subfunction RXMSQPLL -- Pull Entry from Queue */
  505.  
  506. typedef struct _RXMSQPLL_PARM {        /* pll */
  507.    RXSTRING          rxmsq_retc;       /* Pointer to dequeued entry  */
  508.                                        /* buffer.  User allocated.   */
  509. } RXMSQPLL_PARM;
  510.  
  511.  
  512. /***    Subfunction RXMSQPSH -- Push Entry on Queue */
  513. #pragma pack(1)
  514.  
  515. typedef struct _RXMSQ_FLAGS {          /* fl */
  516.    unsigned rxfmlifo : 1;              /* Stack entry LIFO if set    */
  517. }  RXMSQ_FLAGS;
  518.  
  519. typedef struct _RXMSQPSH_PARM {        /* psh */
  520.    RXMSQ_FLAGS       rxmsq_flags;      /* LIFO/FIFO flag             */
  521.    RXSTRING          rxmsq_value;      /* The entry to be pushed.    */
  522. }  RXMSQPSH_PARM;
  523.  
  524.  
  525. #pragma pack()
  526. /***    Subfunction RXMSQSIZ -- Return the Current Queue Size */
  527.  
  528. typedef struct _RXMSQSIZ_PARM {        /* siz */
  529.    ULONG             rxmsq_size;       /* Number of Lines in Queue   */
  530. }  RXMSQSIZ_PARM;
  531.  
  532.  
  533. /***    Subfunction RXMSQNAM -- Set Current Queue Name */
  534.  
  535. typedef struct _RXMSQNAM_PARM {        /* nam */
  536.    RXSTRING          rxmsq_name;       /* RXSTRING containing        */
  537.                                        /* queue name.                */
  538. }  RXMSQNAM_PARM;
  539.  
  540.  
  541. /***    Subfunction RXSIOSAY -- Perform SAY Clause */
  542.  
  543. typedef struct _RXSIOSAY_PARM {        /* say */
  544.    RXSTRING          rxsio_string;     /* String to display.         */
  545. }  RXSIOSAY_PARM;
  546.  
  547.  
  548. /***    Subfunction RXSIOTRC -- Write Trace Output */
  549.  
  550. typedef struct _RXSIOTRC_PARM { /* trcparm */
  551.    RXSTRING          rxsio_string;     /* Trace line to display.     */
  552. }  RXSIOTRC_PARM;
  553.  
  554.  
  555. /***    Subfunction RXSIOTRD -- Read Input from the Terminal */
  556.  
  557. typedef struct _RXSIOTRD_PARM {        /* trd */
  558.    RXSTRING          rxsiotrd_retc;    /* RXSTRING for output.       */
  559. }  RXSIOTRD_PARM;
  560.  
  561.  
  562. /***    Subfunction RXSIODTR -- Read Debug Input from the Terminal */
  563.  
  564. typedef struct _RXSIODTR_PARM {        /* dtr */
  565.    RXSTRING          rxsiodtr_retc;    /* RXSTRING for output.       */
  566. }  RXSIODTR_PARM;
  567.  
  568.  
  569. /***    Subfunction RXHSTTST -- Test for HALT Condition */
  570.  
  571. typedef struct _RXHLT_FLAGS {          /* fl Halt flag               */
  572.    unsigned rxfhhalt : 1;              /* Set if HALT occurred.      */
  573. }  RXHLT_FLAGS;
  574.  
  575. typedef struct _RXHLTTST_PARM {        /* tst */
  576.    RXHLT_FLAGS rxhlt_flags;            /* Set if HALT occurred       */
  577. }  RXHLTTST_PARM;
  578.  
  579.  
  580. /***    Subfunction RXTRCTST -- Test for TRACE Condition */
  581.  
  582. typedef struct _RXTRC_FLAGS {          /* fl Trace flags             */
  583.    unsigned rxftrace : 1;              /* Set to run external trace. */
  584. }  RXTRC_FLAGS;
  585.  
  586. typedef struct _RXTRCTST_PARM {        /* tst */
  587.    RXTRC_FLAGS rxtrc_flags;            /* Set to run external trace  */
  588. }  RXTRCTST_PARM;
  589.  
  590.  
  591. /* XLATOFF */
  592.  
  593. /* This typedef simplifies coding of an Exit handler.                */
  594. typedef LONG APIENTRY RexxExitHandler(LONG,
  595.                              LONG,
  596.                              PEXIT);
  597.  
  598. /***      RexxRegisterExitDll - Register a system exit. */
  599.  
  600. APIRET APIENTRY RexxRegisterExitDll(PCSZ,                          /* Name of the exit handler   */
  601.          PCSZ,                          /* Name of the DLL            */
  602.          PCSZ,                          /* Name of the procedure      */
  603.          PUCHAR,                       /* User area                  */
  604.          ULONG );                      /* Drop authority             */
  605.  
  606. /***   Uppercase Entry Point Name */
  607. #define REXXREGISTEREXITDLL  RexxRegisterExitDll
  608.  
  609.  
  610. /***      RexxRegisterExitExe - Register a system exit. */
  611.  
  612. APIRET APIENTRY RexxRegisterExitExe(PCSZ,                          /* Name of the exit handler   */
  613.          PFN,                          /* Address of exit handler    */
  614.          PUCHAR);                      /* User area                  */
  615.  
  616. /***   Uppercase Entry Point Name */
  617. #define REXXREGISTEREXITEXE  RexxRegisterExitExe
  618.  
  619.  
  620.  
  621. /***    RexxDeregisterExit - Drop registration of a system exit. */
  622.  
  623. APIRET APIENTRY RexxDeregisterExit(PCSZ,                          /* Exit name                  */
  624.          PCSZ ) ;                       /* DLL module name            */
  625.  
  626. /***   Uppercase Entry Point Name */
  627. #define REXXDEREGISTEREXIT  RexxDeregisterExit
  628.  
  629.  
  630.  
  631. /***    RexxQueryExit - Query an exit for existance. */
  632.  
  633. APIRET APIENTRY RexxQueryExit(PCSZ,                          /* Exit name                  */
  634.          PCSZ,                          /* DLL Module name.           */
  635.          PUSHORT,                      /* Existance flag.            */
  636.          PUCHAR );                     /* User data.                 */
  637.  
  638. /***   Uppercase Entry Point Name */
  639. #define REXXQUERYEXIT  RexxQueryExit
  640. /* XLATON */
  641.  
  642.  
  643. #endif /* INCL_RXSYSEXIT */
  644.  
  645.  
  646. /***    Asynchronous Request Interface */
  647. #ifdef INCL_RXARI
  648.  
  649. /* XLATOFF */
  650.  
  651. /***    RexxSetHalt - Request Program Halt */
  652.  
  653. APIRET APIENTRY RexxSetHalt(PID,                         /* Process Id                  */
  654.          TID);                        /* Thread Id                   */
  655.  
  656. /***   Uppercase Entry Point Name */
  657. #define REXXSETHALT  RexxSetHalt
  658.  
  659.  
  660. /***    RexxSetTrace - Request Program Trace */
  661.  
  662. APIRET APIENTRY RexxSetTrace(PID,                         /* Process Id                  */
  663.          TID);                        /* Thread Id                   */
  664.  
  665. /***   Uppercase Entry Point Name */
  666. #define REXXSETTRACE  RexxSetTrace
  667.  
  668.  
  669. /***    RexxResetTrace - Turn Off Program Trace */
  670.  
  671. APIRET APIENTRY RexxResetTrace(PID,                         /* Process Id                  */
  672.          TID);                        /* Thread Id                   */
  673.  
  674. /***   Uppercase Entry Point Name */
  675. #define REXXRESETTRACE  RexxResetTrace
  676.  
  677. /* XLATON */
  678.  
  679.  
  680. #endif /* INCL_RXARI */
  681.  
  682.  
  683. /***    Macro Space Interface */
  684. #ifdef INCL_RXMACRO
  685.  
  686. /* XLATOFF */
  687.  
  688. /***    RexxAddMacro - Register a function in the Macro Space        */
  689.  
  690. APIRET APIENTRY RexxAddMacro(PCSZ,                         /* Function to add or change   */
  691.          PCSZ,                         /* Name of file to get function*/
  692.          ULONG  );                    /* Flag indicating search pos  */
  693.  
  694. /***   Uppercase Entry Point Name */
  695. #define REXXADDMACRO  RexxAddMacro
  696.  
  697.  
  698.  
  699. /***    RexxDropMacro - Remove a function from the Macro Space       */
  700.  
  701. APIRET APIENTRY RexxDropMacro(PCSZ );                        /* Name of function to remove */
  702.  
  703. /***   Uppercase Entry Point Name */
  704. #define REXXDROPMACRO  RexxDropMacro
  705.  
  706.  
  707.  
  708. /***    RexxSaveMacroSpace - Save Macro Space functions to a file    */
  709.  
  710. APIRET APIENTRY RexxSaveMacroSpace(ULONG ,                      /* Argument count (0==save all) */
  711.          PCSZ *,                       /* List of funct names to save */
  712.          PCSZ);                        /* File to save functions in   */
  713.  
  714. /***   Uppercase Entry Point Name */
  715. #define REXXSAVEMACROSPACE  RexxSaveMacroSpace
  716.  
  717.  
  718.  
  719. /***    RexxLoadMacroSpace - Load Macro Space functions from a file  */
  720.  
  721. APIRET APIENTRY RexxLoadMacroSpace(ULONG ,                      /* Argument count (0==load all) */
  722.          PCSZ *,                       /* List of funct names to load */
  723.          PCSZ);                        /* File to load functions from */
  724.  
  725. /***   Uppercase Entry Point Name */
  726. #define REXXLOADMACROSPACE  RexxLoadMacroSpace
  727.  
  728.  
  729.  
  730. /***    RexxQueryMacro - Find a function's search-order position     */
  731.  
  732. APIRET APIENTRY RexxQueryMacro(PCSZ,                         /* Function to search for      */
  733.          PUSHORT );                   /* Ptr for position flag return */
  734.  
  735. /***   Uppercase Entry Point Name */
  736. #define REXXQUERYMACRO  RexxQueryMacro
  737.  
  738.  
  739.  
  740. /***    RexxReorderMacro - Change a function's search-order          */
  741. /***                            position                             */
  742.  
  743. APIRET APIENTRY RexxReorderMacro(PCSZ,                         /* Name of funct change order  */
  744.          ULONG  );                    /* New position for function   */
  745.  
  746. /***   Uppercase Entry Point Name */
  747. #define REXXREORDERMACRO  RexxReorderMacro
  748.  
  749.  
  750.  
  751. /***    RexxClearMacroSpace - Remove all functions from a MacroSpace */
  752.  
  753.  
  754. APIRET APIENTRY RexxClearMacroSpace(VOID );                      /* No Arguments.               */
  755.  
  756. /***   Uppercase Entry Point Name */
  757. #define REXXCLEARMACROSPACE  RexxClearMacroSpace
  758.  
  759. /* XLATON */
  760.  
  761. #endif /* INCL_RXMACRO */
  762.  
  763. #endif /* REXXSAA_INCLUDED */
  764.  
  765. #ifdef __cplusplus
  766.         }
  767. #endif
  768. #pragma info( none )
  769.    #ifndef __CHKHDR__
  770.       #pragma info( restore )
  771.    #endif
  772. #pragma info( restore )
  773.