home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vp21beta.zip / ARTLSRC.RAR / REXX.PAS < prev    next >
Pascal/Delphi Source File  |  2000-08-15  |  23KB  |  546 lines

  1. //█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
  2. //█                                                       █
  3. //█      Virtual Pascal Runtime Library.  Version 2.1.    █
  4. //█      REXX interface unit                              █
  5. //█      ─────────────────────────────────────────────────█
  6. //█      Copyright (C) 1995-2000 vpascal.com              █
  7. //█                                                       █
  8. //▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  9.  
  10. {&AlignRec-,OrgName+,Use32-}
  11.  
  12. {$IFDEF WIN32}
  13.   {&StdCall+}
  14. {$ELSE}
  15.   {&CDecl+}
  16. {$ENDIF}
  17.  
  18. unit Rexx;
  19.  
  20. interface
  21.  
  22. {$IFDEF WIN32}
  23.   // For Win32, specify import library
  24.   {$L Regina.Lib}
  25. {$ENDIF}
  26.  
  27. { Type definitions, shared for both Windows and OS/2 REXX }
  28.  
  29. type
  30.   ULong   = Longint;
  31.   Long    = Longint;
  32.   ApiRet  = Longint;
  33.   PFn     = Pointer;
  34.   LHandle = Longint;
  35.   Pid     = LHandle;
  36.   Tid     = LHandle;
  37.  
  38. { Common }
  39. { This section defines return codes and constants that are the }
  40. { same for both 16-bit and 32-bit REXX calls.                  }
  41.  
  42. const
  43.   rxAutoBufLen                  = 256;
  44.  
  45. { Record for external interface string (RXSTRING) }
  46.  
  47. type
  48.   PRxString = ^RxString;
  49.   RxString = record
  50.     strlength: ULong;           { length of string  }
  51.     strptr:    PChar;           { pointer to string }
  52.   end;
  53.  
  54.  
  55. { Record for system exit block (RXSYSEXIT) 32-bit }
  56.  
  57.   PRxSysExit = ^RxSysExit;
  58.   RxSysExit = record
  59.      sysexit_name: PChar;       { subcom enviro for sysexit  }
  60.      sysexit_code: Long;        { sysexit function code      }
  61.   end;
  62.  
  63. { Call type codes for use on interpreter startup }
  64. const
  65.   rxCommand                     = 0;    { Program called as Command    }
  66.   rxSubroutine                  = 1;    { Program called as Subroutine }
  67.   rxFunction                    = 2;    { Program called as Function   }
  68.  
  69. { Subcommand Interface defines}
  70.  
  71. { Drop Authority for RXSUBCOM interface }
  72.  
  73.   rxsubcom_Droppable            = $00;  { handler to be dropped by all }
  74.   rxsubcom_NonDrop              = $01;  { process with same PID as the }
  75.                                         { registrant may drop environ  }
  76. { Return Codes from RXSUBCOM interface }
  77.  
  78.   rxsubcom_IsReg                = $01;  { Subcommand is registered    }
  79.   rxsubcom_Error                = $01;  { Subcommand Ended in Error   }
  80.   rxsubcom_Failure              = $02;  { Subcommand Ended in Failure }
  81.   rxsubcom_BadEntry             = 1001; { Invalid Entry Conditions    }
  82.   rxsubcom_NoEMem               = 1002; { Insuff stor to complete req }
  83.   rxsubcom_BadType              = 1003; { Bad registration type.      }
  84.   rxsubcom_NotInit              = 1004; { API system not initialized. }
  85.   rxsubcom_Ok                   = 0;    { Function Complete           }
  86.   rxsubcom_Dup                  = 10;   { Duplicate Environment Name- }
  87.                                         { but Registration Completed  }
  88.   rxsubcom_MaxReg               = 20;   { Cannot register more        }
  89.                                         { handlers                    }
  90.   rxsubcom_NotReg               = 30;   { Name Not Registered         }
  91.   rxsubcom_NoCanDrop            = 40;   { Name not droppable          }
  92.   rxsubcom_LoadErr              = 50;   { Could not load function     }
  93.   rxsubcom_NoProc               = 127;  { RXSUBCOM routine - not found}
  94.  
  95. { Shared Variable Pool Interface defines }
  96. { Function Codes for Variable Pool Interface (shvcode) }
  97.  
  98.   rxshv_Set                     = $00;  { Set var from given value    }
  99.   rxshv_Fetch                   = $01;  { Copy value of var to buffer }
  100.   rxshv_DropV                   = $02;  { Drop variable               }
  101.   rxshv_SySet                   = $03;  { Symbolic name Set variable  }
  102.   rxshv_SyFet                   = $04;  { Symbolic name Fetch variable}
  103.   rxshv_SyDro                   = $05;  { Symbolic name Drop variable }
  104.   rxshv_NextV                   = $06;  { Fetch "next" variable       }
  105.   rxshv_Priv                    = $07;  { Fetch private information   }
  106.   rxshv_Exit                    = $08;  { Set function exit value     }
  107.  
  108. {  Return Codes for Variable Pool Interface }
  109.  
  110.   rxshv_NoAvl                   = 144;  { Interface not available     }
  111.  
  112. { Return Code Flags for Variable Pool Interface (shvret) }
  113.  
  114.   rxshv_Ok                      = $00;  { Execution was OK            }
  115.   rxshv_NewV                    = $01;  { Variable did not exist      }
  116.   rxshv_LVar                    = $02;  { Last var trans via SHVNEXTV }
  117.   rxshv_Trunc                   = $04;  { Truncation occurred-Fetch   }
  118.   rxshv_BadN                    = $08;  { Invalid variable name       }
  119.   rxshv_MemFl                   = $10;  { Out of memory failure       }
  120.   rxshv_BadF                    = $80;  { Invalid funct code (shvcode)}
  121.  
  122. { Record of Shared Variable Request Block (SHVBLOCK) }
  123. type
  124.   PShvBlock = ^ShvBlock;
  125.   ShvBlock = record
  126.     shvnext:     PShvBlock;           { pointer to the next block   }
  127.     shvname:     RxString;            { Pointer to the name buffer  }
  128.     shvvalue:    RxString;            { Pointer to the value buffer }
  129.     shvnamelen:  ULong;               { Length of the name value    }
  130.     shvvaluelen: ULong;               { Length of the fetch value   }
  131.     shvcode:     Byte;                { Function code for this block}
  132.     shvret:      Byte;                { Individual Return Code Flags}
  133.   end;
  134.  
  135. { External Function Interface }
  136. { Registration Type Identifiers for Available Function Table }
  137. const
  138.   rxfunc_DynaLink               = 1;  { Function Available in DLL  }
  139.   rxfunc_CallEntry              = 2;  { Registered as mem entry pt.}
  140.  
  141. { Return Codes from RxFunction interface }
  142.  
  143.   rxfunc_Ok                     = 0;  { REXX-API Call Successful   }
  144.   rxfunc_Defined                = 10; { Function Defined in AFT    }
  145.   rxfunc_NoMem                  = 20; { Not Enough Mem to Add      }
  146.   rxfunc_NotReg                 = 30; { Funct Not Registered in AFT}
  147.   rxfunc_ModNotFnd              = 40; { Funct Dll Module Not Found }
  148.   rxfunc_EntNotFnd              = 50; { Funct Entry Point Not Found}
  149.   rxfunc_NotInit                = 60; { API not initialized        }
  150.   rxfunc_BadType                = 70; { Bad function type          }
  151.  
  152. { System Exits defines }
  153. { Drop Authority for Rexx Exit interface }
  154.  
  155.   exit_Droppable                = 0;  { handle to be dropped by all }
  156.   exit_NonDrop                  = 1;  { process with same PID as the}
  157.                                       { registrant may drop environ }
  158. { Exit return actions }
  159.  
  160.   exit_Handled                  = 0;  { Exit handled exit event     }
  161.   exit_Not_Handled              = 1;  { Exit passes on exit event   }
  162.   exit_Raise_Error              = -1; { Exit handler error occurred }
  163.  
  164. { Return Codes from RXEXIT interface }
  165.  
  166.   rxexit_IsReg                  = $01;  { Exit is registered          }
  167.   rxexit_Error                  = $01;  { Exit Ended in Error         }
  168.   rxexit_Failure                = $02;  { Exit Ended in Failure       }
  169.   rxexit_BadEntry               = 1001; { Invalid Entry Conditions    }
  170.   rxexit_NoEmem                 = 1002; { Insuff stor to complete req }
  171.   rxexit_BadType                = 1003; { Bad registration type.      }
  172.   rxexit_NotInit                = 1004; { API system not initialized. }
  173.   rxexit_Ok                     = 0;    { Function Complete           }
  174.   rxexit_Dup                    = 10;   { Duplicate Exit Name-        }
  175.                                         { but Registration Completed  }
  176.   rxexit_MaxReg                 = 20;   { Cannot register more        }
  177.                                         { handlers                    }
  178.   rxexit_NotReg                 = 30;   { Name Not Registered         }
  179.   rxexit_NoCanDrop              = 40;   { Name not droppable          }
  180.   rxexit_LoadErr                = 50;   { Could not load function     }
  181.   rxexit_NoProc                 = 127;  { RXEXIT routine - not found  }
  182.  
  183. { System Exit function and sub-function definitions }
  184.  
  185.   rxEndLst                      = 0;    { End of exit list.           }
  186.   rxFnc                         = 2;    { Process external functions. }
  187.   rxFncCal                      = 1;    { subcode value.              }
  188.   rxCmd                         = 3;    { Process host commands.      }
  189.   rxCmdHst                      = 1;    { subcode value.              }
  190.   rxMsq                         = 4;    { Manipulate queue.           }
  191.   rxMsqPll                      = 1;    { Pull a line from queue      }
  192.   rxMsqPsh                      = 2;    { Place a line on queue       }
  193.   rxMsqSiz                      = 3;    { Return num of lines on queue}
  194.   rxMsqNam                      = 20;   { Set active queue name       }
  195.   rxSio                         = 5;    { Session I/O.                }
  196.   rxSioSay                      = 1;    { SAY a line to STDOUT        }
  197.   rxSioTrc                      = 2;    { Trace output                }
  198.   rxSioTrd                      = 3;    { Read from char stream       }
  199.   rxSioDtr                      = 4;    { DEBUG read from char stream }
  200.   rxSioTll                      = 5;    { Return linelength(N/A OS/2) }
  201.   rxHlt                         = 7;    { Halt processing.            }
  202.   rxHltClr                      = 1;    { Clear HALT indicator        }
  203.   rxHltTst                      = 2;    { Test HALT indicator         }
  204.   rxTrc                         = 8;    { Test ext trace indicator.   }
  205.   rxTrcTst                      = 1;    { subcode value.              }
  206.   rxIni                         = 9;    { Initialization processing.  }
  207.   rxIniExt                      = 1;    { subcode value.              }
  208.   rxTer                         = 10;   { Termination processing.     }
  209.   rxTerExt                      = 1;    { subcode value.              }
  210.   rxNoOfExits                   = 11;   { 1 + largest exit number.    }
  211.  
  212. type
  213.   PExit = ^Byte;                        { ptr to exit parameter block }
  214.  
  215. { Asynchronous Request Interface defines }
  216. { Return Codes from Asynchronous Request interface }
  217. const
  218.   rxari_Ok                      = 0;    { Interface completed         }
  219.   rxari_Not_Found               = 1;    { Target program not found    }
  220.   rxari_Processing_Error        = 2;    { Error processing request    }
  221.  
  222. {  Macro Space Interface defines }
  223. {  Registration Search Order Flags }
  224.  
  225.   rxmacro_Search_Before         = 1; { Beginning of search order   }
  226.   rxmacro_Search_After          = 2; { End of search order         }
  227.  
  228.  
  229. { Return Codes from RxMacroSpace interface }
  230.  
  231.   rxmacro_Ok                    = 0; { Macro interface completed   }
  232.   rxmacro_No_Storage            = 1; { Not Enough Storage Available}
  233.   rxmacro_Not_Found             = 2; { Requested function not found}
  234.   rxmacro_Extension_Required    = 3; { File ext required for save  }
  235.   rxmacro_Already_Exists        = 4; { Macro functions exist       }
  236.   rxmacro_File_Error            = 5; { File I/O error in save/load }
  237.   rxmacro_Signature_Error       = 6; { Incorrect format for load   }
  238.   rxmacro_Source_Not_Found      = 7; { Requested cannot be found   }
  239.   rxmacro_Invalid_Position      = 8; { Invalid search order pos    }
  240.   rxmacro_Not_Init              = 9; { API not initialized         }
  241.  
  242. { 32-bit }
  243. { Main Entry Point to the REXXSAA Interpreter }
  244.  
  245. function RexxStart (
  246.          ArgC:     Long;        { Num of args passed to rexx }
  247.          ArgV:     PRxString;   { Array of args passed to rex}
  248.          FileName: PChar;       { [d:][path] filename[.ext]  }
  249.          Proc:     PRxString;   { Loc of rexx proc in memory }
  250.          Env:      PChar;       { ASCIIZ initial environment.}
  251.          rType:    Long;        { type (command,subrtn,funct)}
  252.          Exit:     PRxSysExit;  { SysExit env. names &  codes}
  253.      var Ret:      Word;        { Ret code from if numeric   }
  254.      var RetVal:   RxString     { Retvalue from the rexx proc}
  255.          ): Long;
  256.  
  257. { Subcommand Interface }
  258. { RexxRegisterSubcomDll -- Register a DLL entry point }
  259. { as a Subcommand handler }
  260.  
  261. function RexxRegisterSubcomDll(
  262.          HName:    PChar;       { Name of subcom handler     }
  263.          DllName:  PChar;       { Name of DLL                }
  264.          ProcName: PChar;       { Name of procedure in DLL   }
  265.          UserArea: Pointer;     { User area                  }
  266.          Drop: ULong): ApiRet;  { Drop authority.            }
  267.  
  268. { RexxRegisterSubcomExe -- Register an EXE entry point }
  269. { as a Subcommand handler }
  270.  
  271. function RexxRegisterSubcomExe (
  272.          HName:       PChar;            { Name of subcom handler     }
  273.          HandlerAddr: PFn;              { address of handler in EXE  }
  274.          UserArea:    Pointer): ApiRet; { User area                  }
  275.  
  276. { RexxQuerySubcom - Query an environment for Existance }
  277.  
  278. function RexxQuerySubcom(
  279.          EnvName: PChar;                { Name of the Environment    }
  280.          DllName: PChar;                { DLL Module Name            }
  281.      var ExCode:  Word;                 { Stor for existance code    }
  282.      var User:    Word): ApiRet;        { Stor for user word         }
  283.  
  284. { RexxDeregisterSubcom - Drop registration of a Subcommand environment }
  285.  
  286. function RexxDeregisterSubcom(
  287.          EnvName: PChar;                { Name of the Environment    }
  288.          DllName: PChar): ApiRet;       { DLL Module Name            }
  289.  
  290. { Shared Variable Pool Interface }
  291.  
  292. { RexxVariablePool - Request Variable Pool Service }
  293.  
  294. function RexxVariablePool(var Pool: ShvBlock): ApiRet; { Pointer to list of SHVBLOCKs}
  295.  
  296. { External Function Interface }
  297. { RexxRegisterFunctionDll - Register a function in the AFT }
  298.  
  299. function RexxRegisterFunctionDll (
  300.         FnName:  PChar;                 { Name of function to add    }
  301.         DllName: PChar;                 { Dll file name (if in dll)  }
  302.         Entry:   PChar): ApiRet;        { Entry in dll               }
  303.  
  304. { RexxRegisterFunctionExe - Register a function in the AFT }
  305.  
  306. function RexxRegisterFunctionExe (
  307.         FnName: PChar;                  { Name of function to add    }
  308.         Entry:  PFn): ApiRet;           { Entry point in EXE         }
  309.  
  310. { RexxDeregisterFunction - Delete a function from the AFT }
  311.  
  312. function RexxDeregisterFunction(FnName: PChar): ApiRet; { Name of function to remove }
  313.  
  314. { RexxQueryFunction - Scan the AFT for a function }
  315.  
  316. function RexxQueryFunction(FnName: PChar): ApiRet; { Name of function to find }
  317.  
  318. { System Exits }
  319. { Subfunction RXFNCCAL - External Function Calls }
  320.  
  321. const
  322. { rxfnc_flags flags }
  323.   rxfferr                       = $01;  { Invalid call to routine.   }
  324.   rxffnfnd                      = $02;  { Function not found.        }
  325.   rxffsub                       = $04;  { Called as a subroutine     }
  326. type
  327.  
  328.   RxFnCCal_Parm = record
  329.     rxfnc_flags: Byte;          { function flags             }
  330.     rxfnc_name:  PChar;         { Pointer to function name.  }
  331.     rxfnc_namel: Word;          { Length of function name.   }
  332.     rxfnc_que:   PChar;         { Current queue name.        }
  333.     rxfnc_quel:  Word;          { Length of queue name.      }
  334.     rxfnc_argc:  Word;          { Number of args in list.    }
  335.     rxfnc_argv:  PRxString;     { Pointer to argument list.  }
  336.     rxfnc_retc:  RxString;      { Return value.              }
  337.   end;
  338.  
  339. { Subfunction RXCMDHST -- Process Host Commands }
  340. const
  341. { rxcmd_flags flags }
  342.   rxfcfail                      = $01;  { Command failed.            }
  343.   rxfcerr                       = $02;  { Command ERROR occurred.    }
  344. type
  345.   RxCmdHst_Parm = record
  346.     rxcmd_flags:    Byte;               { error/failure flags        }
  347.     rxcmd_address:  PChar;              { Pointer to address name.   }
  348.     rxcmd_addressl: Word;               { Length of address name.    }
  349.     rxcmd_dll:      PChar;              { dll name for command.      }
  350.     rxcmd_dll_len:  Word;               { Length of dll name.        }
  351.     rxcmd_command:  RxString;           { The command string.        }
  352.     rxcmd_retc:     RxString;           { Pointer to return buffer   }
  353.   end;
  354.  
  355. { Subfunction RXMSQPLL -- Pull Entry from Queue }
  356.  
  357.   RxMsqPll_Parm = record
  358.     rxmsq_retc: RxString;               { Pointer to dequeued entry  }
  359.   end;                                  { buffer.  User allocated.   }
  360.  
  361. {  Subfunction RXMSQPSH -- Push Entry on Queue }
  362. const
  363. { rxmsq_flags flags }
  364.    rxfmlifo                     = $01;  { Stack entry LIFO if set    }
  365. type
  366.   RxMsqPsh_Parm = record
  367.      rxmsq_flags: Byte;                 { LIFO/FIFO flag             }
  368.      rxmsq_value: RxString              { The entry to be pushed.    }
  369.   end;
  370.  
  371. {  Subfunction RXMSQSIZ -- Return the Current Queue Size }
  372.  
  373.   RxMsqSiz_Parm = record
  374.     rxmsq_size: ULong;                  { Number of Lines in Queue   }
  375.   end;
  376.  
  377. { Subfunction RXMSQNAM -- Set Current Queue Name }
  378.  
  379.   RxMsqNam_Parm = record
  380.     rxmsq_name: RxString;               { RxString containing        }
  381.   end;                                  { queue name.                }
  382.  
  383. { Subfunction RXSIOSAY -- Perform SAY Clause }
  384.  
  385.   RxSioSay_Parm = record
  386.     rxsio_string: RxString;             { String to display.         }
  387.   end;
  388.  
  389. { Subfunction RXSIOTRC -- Write Trace Output }
  390.  
  391.   RxSioTrc_Parm = record
  392.     rxsio_string: RxString;             { Trace line to display.     }
  393.   end;
  394.  
  395. { Subfunction RXSIOTRD -- Read Input from the Terminal }
  396.  
  397.   RxSioTrd_Parm = record
  398.     rxsiotrd_retc: RxString;            { RxString for output.       }
  399.   end;
  400.  
  401. { Subfunction RXSIODTR -- Read Debug Input from the Terminal }
  402.  
  403.   RxSioDtr_Parm = record
  404.     rxsiodtr_retc: RxString;            { RxString for output.       }
  405.   end;
  406.  
  407. { Subfunction RXHSTTST -- Test for HALT Condition }
  408. const
  409. { rxhlt_flags flags }
  410.   rxfhhalt                      = $01;  { Set if HALT occurred.      }
  411. type
  412.   RxHltTst_Parm = record
  413.     rxhlt_flags: Byte;                  { Set if HALT occurred       }
  414.   end;
  415.  
  416. { Subfunction RXTRCTST -- Test for TRACE Condition }
  417. const
  418. { rxtrc_flags flags }
  419.   rxftrace                      = $01;  { Set to run external trace. }
  420. type
  421.   RxTrcTst_Parm = record
  422.     rxtrc_flags: Byte;                  { Set to run external trace  }
  423.   end;
  424.  
  425. { RexxRegisterExitDll - Register a system exit. }
  426.  
  427. function RexxRegisterExitDll (
  428.          HExit:    PChar;               { Name of the exit handler   }
  429.          DllName:  PChar;               { Name of the DLL            }
  430.          ProcName: PChar;               { Name of the procedure      }
  431.          UserArea: Pointer;             { User area                  }
  432.          Drop:     ULong): ApiRet;      { Drop authority             }
  433.  
  434. { RexxRegisterExitExe - Register a system exit. }
  435.  
  436. function RexxRegisterExitExe (
  437.          HExit: PChar;                  { Name of the exit handler   }
  438.          HandlerAddr: PFn;              { Address of exit handler    }
  439.          UserArea: Pointer): ApiRet;    { User area                  }
  440.  
  441. { RexxDeregisterExit - Drop registration of a system exit. }
  442.  
  443. function RexxDeregisterExit (
  444.          ExitName: PChar;               { Exit name                  }
  445.          DllName:  PChar): ApiRet ;     { DLL module name            }
  446.  
  447. { RexxQueryExit - Query an exit for existance. }
  448.  
  449. function RexxQueryExit (
  450.          ExitName: PChar;               { Exit name                  }
  451.          DllName:  PChar;               { DLL Module name.           }
  452.      var ExFlag:   Word;                { Existance flag.            }
  453.          UserArea: Pointer): ApiRet;    { User data.                 }
  454.  
  455. { Asynchronous Request Interface }
  456. { RexxSetHalt - Request Program Halt }
  457.  
  458. function RexxSetHalt(
  459.          Pid: Pid;                      { Process Id                  }
  460.          Tid: Tid): ApiRet;             { Thread Id                   }
  461.  
  462. { RexxSetTrace - Request Program Trace }
  463.  
  464. function RexxSetTrace(
  465.          Pid: Pid;                      { Process Id                  }
  466.          Tid: Tid): ApiRet;             { Thread Id                   }
  467.  
  468. { RexxResetTrace - Turn Off Program Trace }
  469.  
  470. function RexxResetTrace(
  471.          Pid: Pid;                      { Process Id                  }
  472.          Tid: Tid): ApiRet;             { Thread Id                   }
  473.  
  474. { Macro Space Interface }
  475. { RexxAddMacro - Register a function in the Macro Space }
  476.  
  477. function RexxAddMacro (
  478.          FnName:   PChar;               { Function to add or change   }
  479.          FileName: PChar;               { Name of file to get function}
  480.          SrchPos:  ULong): ApiRet;      { Flag indicating search pos  }
  481.  
  482. { RexxDropMacro - Remove a function from the Macro Space }
  483.  
  484. function RexxDropMacro(FnName: PChar): ApiRet; { Name of function to remove }
  485.  
  486. { RexxSaveMacroSpace - Save Macro Space functions to a file }
  487.  
  488. function RexxSaveMacroSpace (
  489.          ArgC: ULong;                   { Argument count (0==save all)}
  490.      var NameLst: PChar;                { List of funct names to save }
  491.          FileName: PChar): ApiRet;      { File to save functions in   }
  492.  
  493. { RexxLoadMacroSpace - Load Macro Space functions from a file  }
  494.  
  495. function RexxLoadMacroSpace (
  496.          ArgC:     ULong;               { Argument count (0==load all)}
  497.      var NameLst:  PChar;               { List of funct names to load }
  498.          FileName: PChar): ApiRet;      { File to load functions from }
  499.  
  500. { RexxQueryMacro - Find a function's search-order position }
  501.  
  502. function RexxQueryMacro (
  503.          FnName: PChar;                 { Function to search for       }
  504.      var PtrPos: Word): ApiRet;         { Ptr for position flag return }
  505.  
  506. { RexxReorderMacro - Change a function's search-order position }
  507.  
  508. function RexxReorderMacro(
  509.          FnName: PChar;                 { Name of funct change order  }
  510.          NewPos: ULong): ApiRet;        { New position for function   }
  511.  
  512. { RexxClearMacroSpace - Remove all functions from a MacroSpace }
  513.  
  514. function RexxClearMacroSpace: ApiRet;   { No Arguments.               }
  515.  
  516. implementation
  517.  
  518. function RexxAddMacro;            external;
  519. function RexxClearMacroSpace;     external;
  520. function RexxDeregisterExit;      external;
  521. function RexxDeregisterFunction;  external;
  522. function RexxDeregisterSubcom;    external;
  523. function RexxDropMacro;           external;
  524. function RexxLoadMacroSpace;      external;
  525. function RexxQueryExit;           external;
  526. function RexxQueryFunction;       external;
  527. function RexxQueryMacro;          external;
  528. function RexxQuerySubcom;         external;
  529. function RexxRegisterExitDll;     external;
  530. function RexxRegisterExitExe;     external;
  531. function RexxRegisterFunctionDll; external;
  532. function RexxRegisterFunctionExe; external;
  533. function RexxRegisterSubcomDll;   external;
  534. function RexxRegisterSubcomExe;   external;
  535. function RexxReorderMacro;        external;
  536. function RexxResetTrace;          external;
  537. function RexxSaveMacroSpace;      external;
  538. function RexxSetHalt;             external;
  539. function RexxSetTrace;            external;
  540. function RexxStart;               external;
  541. function RexxVariablePool;        external;
  542.  
  543. end.
  544.  
  545.  
  546.