2 * The Regina Rexx Interpreter
3 * Copyright (C) 1993-1994 Anders Christensen <anders@pvv.unit.no>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __REXXSAA_H_INCLUDED
20 #define __REXXSAA_H_INCLUDED
21 /* Remember to add prototypes for Rexx*() functions */
23 #if defined(WIN32) && (defined(__WATCOMC__) || defined(__BORLANDC__))
27 #if defined(__RSXNT__) || defined(__MINGW32__)
31 #if defined(_MSC_VER) && !defined(__WINS__)
33 /* Stupid MSC can't compile own headers without warning at least in VC 5.0 */
34 # pragma warning(disable: 4115 4201 4214 4514)
38 # pragma warning(default: 4115 4201 4214)
40 # define VOID_TYPEDEFED
48 * pack(1) was introduced in Regina 3.3 to become binary compatible in
49 * structures with OS/2, Object Rexx, etc.
51 #ifdef OREXX_BINARY_COMPATIBLE
56 /* Introduced in Regina 2.0, may/should not exist in non-ANSI compilers.
57 * Everybody can see which params will change even if CONST is not defined.
58 * We don't use CONST at all places to be consistent with other
59 * implementations. You can see a "CONST" as a comment before each variable
60 * which is/must not be changed.
65 #if defined(__MINGW32__)
66 # if defined(__REGINA_DLL)
67 # define EXTNAME(n) __declspec(dllexport)
69 # define EXTNAME(n) __declspec(dllimport)
75 #if !defined(OS2_VAC_C) && !defined(_OS2EMX_H) && !defined(__RSXNT__) && !defined(__MINGW32__) && !defined(__AROS__) && !defined(_AMIGA)
77 # if !defined(VOID_TYPEDEFED) && !defined(VOID)
79 # define VOID_TYPEDEFED
82 # ifndef PVOID_TYPEDEFED
84 # define PVOID_TYPEDEFED
87 # ifndef CHAR_TYPEDEFED
89 # define CHAR_TYPEDEFED
91 # ifndef PCHAR_TYPEDEFED
93 # define PCHAR_TYPEDEFED
95 # ifndef UCHAR_TYPEDEFED
96 typedef unsigned char UCHAR
;
97 # define UCHAR_TYPEDEFED
99 # ifndef PUCHAR_TYPEDEFED
100 typedef UCHAR
*PUCHAR
;
101 # define PUCHAR_TYPEDEFED
104 # ifndef SHORT_TYPEDEFED
106 # define SHORT_TYPEDEFED
108 # ifndef PSHORT_TYPEDEFED
109 typedef SHORT
*PSHORT
;
110 # define PSHORT_TYPEDEFED
112 # ifndef USHORT_TYPEDEFED
113 typedef unsigned short USHORT
;
114 # define USHORT_TYPEDEFED
116 # ifndef PUSHORT_TYPEDEFED
117 typedef USHORT
*PUSHORT
;
118 # define PUSHORT_TYPEDEFED
121 # ifndef LONG_TYPEDEFED
123 # define LONG_TYPEDEFED
125 # ifndef PLONG_TYPEDEFED
127 # define PLONG_TYPEDEFED
129 # ifndef ULONG_TYPEDEFED
130 typedef unsigned long ULONG
;
131 # define ULONG_TYPEDEFED
135 typedef CONST
char *PCSZ
;
138 #elif defined(__AROS__) || defined(_AMIGA)
139 /* For AROS make SAA functions also internal
142 # include <exec/types.h>
145 #define USHORT_TYPEDEFED
150 typedef CONST
char *PCSZ
;
156 typedef CHAR
*PCHAR
;
157 typedef SHORT
*PSHORT
;
158 typedef LONG
*PLONG
;
160 # ifndef UCHAR_TYPEDEFED
161 typedef UBYTE UCHAR
;
162 # define UCHAR_TYPEDEFED
164 # ifndef USHORT_TYPEDEFED
165 typedef UWORD USHORT
;
166 # define USHORT_TYPEDEFED
168 # ifndef ULONG_TYPEDEFED
169 # define ULONG_TYPEDEFED
172 typedef USHORT
*PUSHORT
;
174 typedef UCHAR
*PUCHAR
;
178 typedef CONST
char *PCSZ
;
182 # define INCL_RXSUBCOM
185 # define INCL_RXSYSEXIT
186 # define INCL_RXMACRO
188 # define INCL_RXQUEUE
189 # define INCL_RXMACRO
193 * For Innotek gcc, force use of _System calling convention
195 #if defined( __EMX__ ) && defined( __INNOTEK_LIBC__ )
197 # define APIENTRY _System
200 #if !defined(APIENTRY)
205 # define APIRET ULONG
208 #if !defined(_OS2EMX_H) && !defined( PFN_TYPEDEFED )
209 typedef APIRET (APIENTRY
*PFN
)();
214 typedef struct RXSTRING_type
219 typedef RXSTRING
*PRXSTRING
;
221 #if !defined(_OS2EMX_H)
222 typedef struct REXXDATETIME_type
224 USHORT hours
; /* hour of the day (24-hour) */
225 USHORT minutes
; /* minute of the hour */
226 USHORT seconds
; /* second of the minute */
227 USHORT hundredths
; /* hundredths of a second */
228 USHORT day
; /* day of the month */
229 USHORT month
; /* month of the year */
230 USHORT year
; /* current year */
231 USHORT weekday
; /* day of the week */
232 ULONG microseconds
; /* microseconds */
233 ULONG yearday
; /* day number within the year */
234 USHORT valid
; /* valid time stamp marker */
236 #define DATETIME REXXDATETIME
237 typedef REXXDATETIME
*PDATETIME
;
240 #define RXAUTOBUFLEN 256L
246 typedef RXSYSEXIT
*PRXSYSEXIT
;
248 typedef PUCHAR PEXIT
;
251 * typedefs for Rexx handler types
253 typedef APIRET APIENTRY
RexxFunctionHandler(PCSZ name
, ULONG argc
, /* CONST */ PRXSTRING argv
, PCSZ queuename
, PRXSTRING returnstring
) ;
254 typedef LONG APIENTRY
RexxExitHandler( LONG
, LONG
, /* CONST */ PEXIT
) ;
255 typedef APIRET APIENTRY
RexxSubcomHandler(/* CONST */ PRXSTRING
, PUSHORT
, PRXSTRING
);
258 * -------------------------------------------------------------------
259 * System Exit Interface
260 *-------------------------------------------------------------------
262 #ifdef INCL_RXSYSEXIT
265 * The following are definition for the function codes and subcodes for
266 * System Exit Handlers. All RXxxx macros are function codes, while the
267 * RXxxxyyy macros are function subcodes for function code RXxxx.
275 #define RXMSQ 4 /* Net yet implemented */
276 # define RXMSQPLL 1 /* Net yet implemented */
277 # define RXMSQPSH 2 /* Net yet implemented */
278 # define RXMSQSIZ 3 /* Net yet implemented */
279 # define RXMSQNAM 20 /* Net yet implemented */
286 # define RXSIOTLL 5 /* Net yet implemented */
304 #define RXENV 12 /* System Environment interface */
305 # define RXENVGET 1 /* Get System Environment Variable */
306 # define RXENVSET 2 /* Set System Environment Variable */
307 # define RXCWDGET 3 /* Get Current Working Directory */
308 # define RXCWDSET 4 /* Set Current Working Directory */
311 #define RXNOOFEXITS 13 /* MUST be 1 more than last exit number */
313 /* Symbolic return codes for System Exit Handlers */
314 #define RXEXIT_HANDLED 0
315 #define RXEXIT_NOT_HANDLED 1
316 #define RXEXIT_RAISE_ERROR (-1)
318 #define RXEXIT_DROPPABLE 0x00
319 #define RXEXIT_NONDROP 0x01
321 /* Return Codes from RXEXIT interface */
323 #define RXEXIT_ISREG 0x01
324 #define RXEXIT_ERROR 0x01
325 #define RXEXIT_FAILURE 0x02
326 #define RXEXIT_BADENTRY 1001
327 #define RXEXIT_NOEMEM 1002
328 #define RXEXIT_BADTYPE 1003
329 #define RXEXIT_NOTINIT 1004
331 #define RXEXIT_DUP 10
332 #define RXEXIT_MAXREG 20
333 #define RXEXIT_NOTREG 30
334 #define RXEXIT_NOCANDROP 40
335 #define RXEXIT_LOADERR 50
336 #define RXEXIT_NOPROC 127
341 unsigned rxffnfnd
:1 ;
344 /* CONST */ PUCHAR rxfnc_name
;
346 /* CONST */ PUCHAR rxfnc_que
;
349 /* CONST */ PRXSTRING rxfnc_argv
;
350 RXSTRING rxfnc_retc
;
355 unsigned rxfcfail
:1 ;
358 /* CONST */ PUCHAR rxcmd_address
;
359 USHORT rxcmd_addressl
;
360 /* CONST */ PUCHAR rxcmd_dll
;
361 USHORT rxcmd_dll_len
;
362 /* CONST */ RXSTRING rxcmd_command
;
363 RXSTRING rxcmd_retc
;
367 RXSTRING rxmsq_retc
;
372 unsigned rxfmlifo
:1 ;
374 /* CONST */ RXSTRING rxmsq_value
;
382 RXSTRING rxmsq_name
;
386 /* CONST */ RXSTRING rxsio_string
;
390 /* CONST */ RXSTRING rxsio_string
;
394 RXSTRING rxsiotrd_retc
;
398 RXSTRING rxsiodtr_retc
;
403 unsigned rxfhhalt
:1 ;
409 unsigned rxftrace
:1 ;
414 RXSTRING rxenv_name
;
415 RXSTRING rxenv_value
;
419 RXSTRING rxenv_name
;
420 RXSTRING rxenv_value
;
424 RXSTRING rxcwd_value
;
428 RXSTRING rxcwd_value
;
431 APIRET APIENTRY
RexxRegisterExitExe(
436 RexxExitHandler
*EntryPoint
,
438 /* CONST */ PUCHAR UserArea
)
439 EXTNAME("RexxRegisterExitExe");
440 #define REXXREGISTEREXITEXE RexxRegisterExitExe
442 APIRET APIENTRY
RexxRegisterExitDll(
446 /* CONST */ PUCHAR UserArea
,
448 EXTNAME("RexxRegisterExitDll");
449 #define REXXREGISTEREXITDLL RexxRegisterExitDll
451 APIRET APIENTRY
RexxDeregisterExit(
454 EXTNAME("RexxDeregisterExit");
455 #define REXXDEREGISTEREXIT RexxDeregisterExit
457 APIRET APIENTRY
RexxQueryExit (
462 EXTNAME("RexxQueryExit");
463 #define REXXQUERYEXIT RexxQueryExit
465 #endif /* INCL_RXSYSEXIT */
468 #define MAXENVNAMELEN 32767 /* at least, there is no limit */
470 #define MAKERXSTRING(x,c,l) ((x).strptr=(c),(x).strlength=(l))
471 #define RXNULLSTRING(x) (!(x).strptr)
472 #define RXSTRLEN(x) ((x).strptr ? (x).strlength : 0UL)
473 #define RXSTRPTR(x) ((x).strptr)
474 #define RXVALIDSTRING(x) ((x).strptr && (x).strlength)
475 #define RXZEROLENSTRING(x) ((x).strptr && !(x).strlength)
478 #define RXSUBROUTINE 1
481 * RXRESTRICTED is OR'ed with one of the above values to run Regina
482 * in "restricted" mode
484 #define RXRESTRICTED 256
490 * Definitions and declarations for the Rexx variable pool interface.
493 # define RXSHV_OK 0x00 /* Everything OK */
494 # define RXSHV_NEWV 0x01 /* Var not previously set */
495 # define RXSHV_LVAR 0x02 /* Last var in a NEXTV sequence */
496 # define RXSHV_TRUNC 0x04 /* Name or value has been truncated */
497 # define RXSHV_BADN 0x08 /* Bad/invalid name */
498 # define RXSHV_MEMFL 0x10 /* Memory problem, e.g. out of memory */
499 # define RXSHV_BADF 0x80 /* Invalid function code */
501 # define RXSHV_NOAVL 0x90 /* Interface is not available */
504 * Note: Some documentation claims that RXSHV_BADF should have the
505 * value 0x80, but that can't be correct, can it?
508 # define RXSHV_SET 0x00 /* Set variable */
509 # define RXSHV_FETCH 0x01 /* Get value of variable */
510 # define RXSHV_DROPV 0x02 /* Drop variable */
511 # define RXSHV_SYSET 0x03 /* Set symbolic variable */
512 # define RXSHV_SYFET 0x04 /* Get value of symbolic variable */
513 # define RXSHV_SYDRO 0x05 /* Drop symbolic variable */
514 # define RXSHV_NEXTV 0x06 /* Get next var in a NEXTV sequence */
515 # define RXSHV_PRIV 0x07 /* Get private information */
516 # define RXSHV_EXIT 0x08 /* Set function exit value */
519 * Note: A symbolic variable is a symbol that will be 'expanded' before
520 * use, while a (normal) variable is used directly, without
521 * expanding it first.
524 typedef struct shvnode
526 struct shvnode
*shvnext
;
535 typedef SHVBLOCK
*PSHVBLOCK
;
537 APIRET APIENTRY
RexxVariablePool(
538 PSHVBLOCK RequestBlockList
)
539 EXTNAME("RexxVariablePool");
540 #define REXXVARIABLEPOOL RexxVariablePool
542 #endif /* INCL_RXSHV */
545 APIRET APIENTRY
RexxFreeMemory(
547 EXTNAME("RexxFreeMemory");
548 #define REXXFREEMEMORY RexxFreeMemory
550 PVOID APIENTRY
RexxAllocateMemory(
552 EXTNAME("RexxAllocateMemory");
553 #define REXXALLOCATEMEMORY RexxAllocateMemory
556 APIRET APIENTRY
RexxStart(
558 /* CONST */ PRXSTRING ArgList
,
560 /* CONST */ PRXSTRING Instore
,
563 /* CONST */ PRXSYSEXIT Exits
,
566 EXTNAME("RexxStart");
567 #define REXXSTART RexxStart
570 * Return codes .... haha there doesn't seem to be a standard, except
571 * zero is OK, negative is an Rexx error, the positive error codes below
572 * are my own 'invention'
574 #define RX_START_OK 0
575 #define RX_START_BADP 1 /* Bad parameters */
576 #define RX_START_UNIMPL 2 /* Not yet implemented :-) */
577 #define RX_START_TOOMANYP 3 /* To many parameters */
578 #define RX_DIDNT_START 4 /* Unable to start interpreter */
580 APIRET APIENTRY
RexxCallBack(
586 EXTNAME("RexxCallBack");
587 #define REXXCALLBACK RexxCallBack
590 * Return codes for RexxCallBack
593 #define RX_CB_BADP 1 /* Bad parameters */
594 #define RX_CB_NOTSTARTED 2 /* Interface not running */
595 #define RX_CB_TOOMANYP 3 /* Too many parameters */
596 #define RX_CB_BADN 8 /* Procedure not found */
598 * -------------------------------------------------------------------
599 * Sub-command Interface
600 *-------------------------------------------------------------------
604 APIRET APIENTRY
RexxRegisterSubcomExe(
609 RexxSubcomHandler
*EntryPoint
,
611 /* CONST */ PUCHAR UserArea
)
612 EXTNAME("RexxRegisterSubcomExe");
613 #define REXXREGISTERSUBCOMEXE RexxRegisterSubcomExe
615 APIRET APIENTRY
RexxDeregisterSubcom(
618 EXTNAME("RexxDeregisterSubcom");
619 #define REXXDEREGISTERSUBCOM RexxDeregisterSubcom
621 APIRET APIENTRY
RexxRegisterSubcomDll(
625 /* CONST */ PUCHAR UserArea
,
627 EXTNAME("RexxRegisterSubcomDll");
628 #define REXXREGISTERSUBCOMDLL RexxRegisterSubcomDll
630 APIRET APIENTRY
RexxQuerySubcom(
633 PUSHORT Flag
, /* Documentation diverges ... */
635 EXTNAME("RexxQuerySubcom");
636 #define REXXQUERYSUBCOM RexxQuerySubcom
638 #define RXSUBCOM_OK 0
639 #define RXSUBCOM_DUP 10
640 #define RXSUBCOM_MAXREG 20
641 #define RXSUBCOM_NOTREG 30
642 #define RXSUBCOM_NOCANDROP 40
643 #define RXSUBCOM_LOADERR 50
644 #define RXSUBCOM_NOPROC 127
646 #define RXSUBCOM_BADENTRY 1001
647 #define RXSUBCOM_NOEMEM 1002
648 #define RXSUBCOM_BADTYPE 1003
649 #define RXSUBCOM_NOTINIT 1004
651 /* I don't know the 'real' values of these */
652 #define RXSUBCOM_ERROR 0x01
653 #define RXSUBCOM_ISREG 0x01
654 #define RXSUBCOM_FAILURE 0x02
656 #define RXSUBCOM_DROPPABLE 0x00
657 #define RXSUBCOM_NONDROP 0x01
659 #endif /* INCL_RXSUBCOM */
663 * -------------------------------------------------------------------
664 * External Function Interface
665 *-------------------------------------------------------------------
670 #define RXFUNC_DEFINED 10
671 #define RXFUNC_NOMEM 20
672 #define RXFUNC_NOTREG 30
673 #define RXFUNC_MODNOTFND 40
674 #define RXFUNC_ENTNOTFND 50
675 #define RXFUNC_NOTINIT 60
676 #define RXFUNC_BADTYPE 70
677 #define RXFUNC_NOEMEM 1002
679 APIRET APIENTRY
RexxRegisterFunctionExe(
684 RexxFunctionHandler
*EntryPoint
)
686 EXTNAME("RexxRegisterFunctionExe");
687 #define REXXREGISTERFUNCTIONEXE RexxRegisterFunctionExe
689 APIRET APIENTRY
RexxRegisterFunctionDll(
693 EXTNAME("RexxRegisterFunctionDll");
694 #define REXXREGISTERFUNCTIONDLL RexxRegisterFunctionDll
696 APIRET APIENTRY
RexxDeregisterFunction(
698 EXTNAME("RexxDeregisterFunction");
699 #define REXXDEREGISTERFUNCTION RexxDeregisterFunction
701 APIRET APIENTRY
RexxQueryFunction(
703 EXTNAME("RexxQueryFunction");
704 #define REXXQUERYFUNCTION RexxQueryFunction
706 #endif /* INCL_RXFUNC */
709 * -------------------------------------------------------------------
710 * Asynchronous Request Interface
711 *-------------------------------------------------------------------
715 /*** Return Codes from Asynchronous Request interface */
718 #define RXARI_NOT_FOUND 1
719 #define RXARI_PROCESSING_ERROR 2
721 APIRET APIENTRY
RexxSetHalt(
724 EXTNAME("RexxSetHalt");
725 #define REXXSETHALT RexxSetHalt
727 #endif /* INCL_RXARI */
730 * -------------------------------------------------------------------
731 * External Queue Interface
732 *-------------------------------------------------------------------
736 ULONG APIENTRY
RexxCreateQueue (
741 EXTNAME("RexxCreateQueue");
742 #define REXXCREATEQUEUE RexxCreateQueue
744 ULONG APIENTRY
RexxDeleteQueue (
746 EXTNAME("RexxDeleteQueue");
747 #define REXXDELETEQUEUE RexxDeleteQueue
749 ULONG APIENTRY
RexxQueryQueue (
752 EXTNAME("RexxQueryQueue");
753 #define REXXQUERYQUEUE RexxQueryQueue
755 ULONG APIENTRY
RexxAddQueue (
759 EXTNAME("RexxAddQueue");
760 #define REXXADDQUEUE RexxAddQueue
762 ULONG APIENTRY
RexxPullQueue (
767 EXTNAME("RexxPullQueue");
768 #define REXXPULLQUEUE RexxPullQueue
770 /* Request flags for External Data Queue access --------------------- */
771 #define RXQUEUE_FIFO 0 /* Access queue first-in-first-out */
772 #define RXQUEUE_LIFO 1 /* Access queue last-in-first-out */
774 #define RXQUEUE_NOWAIT 0 /* Wait for data if queue empty */
775 #define RXQUEUE_WAIT 1 /* Don't wait on an empty queue */
777 /* Return Codes from RxQueue interface ------------------------------ */
778 #define RXQUEUE_OK 0 /* Successful return */
779 #define RXQUEUE_NOTINIT 1000 /* Queues not initialized */
781 #define RXQUEUE_STORAGE 1 /* Ret info buf not big enough */
782 #define RXQUEUE_SIZE 2 /* Data size > 64K-64 */
783 #define RXQUEUE_DUP 3 /* Attempt-duplicate queue name*/
784 #define RXQUEUE_NOEMEM 4 /* Not enough available memory */
785 #define RXQUEUE_BADQNAME 5 /* Not a valid queue name */
786 #define RXQUEUE_PRIORITY 6 /* Not accessed as LIFO|FIFO */
787 #define RXQUEUE_BADWAITFLAG 7 /* Not accessed as WAIT|NOWAIT */
788 #define RXQUEUE_EMPTY 8 /* No data in queue */
789 #define RXQUEUE_NOTREG 9 /* Queue does not exist */
790 #define RXQUEUE_ACCESS 10 /* Queue busy and wait active */
791 #define RXQUEUE_MAXREG 11 /* No memory to create a queue */
792 #define RXQUEUE_MEMFAIL 12 /* Failure in memory management*/
793 #define RXQUEUE_NETERROR 100 /* Network error */
795 #endif /* INCL_RXQUEUE */
798 * -------------------------------------------------------------------
799 * Macrospace Interface
800 *-------------------------------------------------------------------
804 APIRET APIENTRY
RexxAddMacro (
805 PSZ
, /* Function to add or change */
806 PSZ
, /* Name of file to get function */
807 ULONG
) /* Flag indicating search pos */
808 EXTNAME("RexxAddMacro");
809 #define REXXADDMACRO RexxAddMacro
811 APIRET APIENTRY
RexxDropMacro (
812 PSZ
) /* Name of function to remove */
813 EXTNAME("RexxDropMacro");
814 #define REXXDROPMACRO RexxDropMacro
816 APIRET APIENTRY
RexxSaveMacroSpace (
817 ULONG
, /* Argument count (0==save all) */
818 PSZ
*, /* List of funct names to save */
819 PSZ
) /* File to save functions in */
820 EXTNAME("RexxSaveMacroSpace");
821 #define REXXSAVEMACROSPACE RexxSaveMacroSpace
823 APIRET APIENTRY
RexxLoadMacroSpace (
824 ULONG
, /* Argument count (0==load all) */
825 PSZ
*, /* List of funct names to load */
826 PSZ
) /* File to load functions from */
827 EXTNAME("RexxLoadMacroSpace");
828 #define REXXLOADMACROSPACE RexxLoadMacroSpace
830 APIRET APIENTRY
RexxQueryMacro (
831 PSZ
, /* Function to search for */
832 PUSHORT
) /* Ptr for position flag return */
833 EXTNAME("RexxQueryMacro");
834 #define REXXQUERYMACRO RexxQueryMacro
836 APIRET APIENTRY
RexxReorderMacro(
837 PSZ
, /* Name of funct change order */
838 ULONG
) /* New position for function */
839 EXTNAME("RexxReorderMacro");
840 #define REXXREORDERMACRO RexxReorderMacro
842 APIRET APIENTRY
RexxClearMacroSpace(
844 EXTNAME("RexxClearMacroSpace");
845 #define REXXCLEARMACROSPACE RexxClearMacroSpace
847 /* Registration Search Order Flags ---------------------------------- */
848 #define RXMACRO_SEARCH_BEFORE 1 /* Beginning of search order */
849 #define RXMACRO_SEARCH_AFTER 2 /* End of search order */
851 /* Return Codes from RxMacroSpace interface ------------------------- */
852 #define RXMACRO_OK 0 /* Macro interface completed */
853 #define RXMACRO_NO_STORAGE 1 /* Not Enough Storage Available */
854 #define RXMACRO_NOT_FOUND 2 /* Requested function not found */
855 #define RXMACRO_EXTENSION_REQUIRED 3 /* File ext required for save */
856 #define RXMACRO_ALREADY_EXISTS 4 /* Macro functions exist */
857 #define RXMACRO_FILE_ERROR 5 /* File I/O error in save/load */
858 #define RXMACRO_SIGNATURE_ERROR 6 /* Incorrect format for load */
859 #define RXMACRO_SOURCE_NOT_FOUND 7 /* Requested cannot be found */
860 #define RXMACRO_INVALID_POSITION 8 /* Invalid search order pos */
861 #define RXMACRO_NOT_INIT 9 /* API not initialized */
863 #endif /* INCL_RXMACRO */
866 /* REGINA EXTENSIONS *********************************************************/
867 /* The following functions are an extension to the standard. Never try to
868 * address the function directly if you want to be compatible. Use the dynamic
869 * linking machanism of your operating system instead.
872 * ReginaVersion returns informations about the version of the library.
873 * This function was introduced in version 2.0.
874 * Returns: ULONG, in lower byte the two-digit fraction part of the version.
875 * The higher bytes will hold the integer part of the version.
876 * Examples: 0x10A codes the Version "1.10".
877 * VersionString will be filled if VersionString is non-NULL.
878 * If VersionString is non-NULL then there are two possibilities:
879 * a) VersionString->strlength == 0: VersionString is filled with the
880 * appropriate values. VersionString->strptr
882 * b) VersionString->strlength != 0: VersionString->strptr is filled up to
883 * this value. VersionString->strlength will
884 * hold the copied bytes.
885 * Note: A terminating ASCII-zero is appended if there is enough space
886 * although it is never counted in VersionString.strlength.
887 * RexxAllocateMemory is used if needed.
889 APIRET APIENTRY
ReginaVersion(
890 PRXSTRING VersionString
)
891 EXTNAME("ReginaVersion");
892 #define REGINAVERSION ReginaVersion
895 * ReginaCleanup performs a graceful cleanup. This is done automatically
896 * on many systems but you can't be sure in all cases. The cleanup operations
897 * destroys all informations that are collected so far by one thread.
898 * It works for a single process or thread too. Although all memory is
899 * freed, some open handles may remain open. It is necessary to perform
900 * the appropriate "RexxDeregister<whatever>" calls before this routine
902 * This function was introduced in version 3.3.
903 * Returns: ULONG, 0 if this call hasn't done anything.
904 * 1 if at least something could be freed.
905 * It is allowed to reuse every API function after this call but this routine
906 * must not be used when some parts of the Regina core are in use.
908 APIRET APIENTRY
ReginaCleanup( )
909 EXTNAME("ReginaCleanup");
910 #define REGINACLEANUP ReginaCleanup
912 #ifdef OREXX_BINARY_COMPATIBLE
920 #endif /* __REXXSAA_H_INCLUDED */