Add binary libs required to build Git with MSVC
[msvcgit.git] / 32bits / include / rexxsaa.h
blob960f3831348b01af55e7ae3a8af66e16fe1e75b8
1 /*
2 * The Regina Rexx Interpreter
3 * Copyright (C) 1993-1994 Anders Christensen <anders@pvv.unit.no>
4 *
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.
9 *
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.
18 */
19 /*
20 * $Id: rexxsaa.h,v 1.1.1.1 2008-03-07 10:35:25 mikep Exp $
21 */
23 #ifndef __REXXSAA_H_INCLUDED
24 #define __REXXSAA_H_INCLUDED
25 /* Remember to add prototypes for Rexx*() functions */
27 #if defined(WIN32) && (defined(__WATCOMC__) || defined(__BORLANDC__))
28 # include <windows.h>
29 #endif
31 #if defined(__RSXNT__) || defined(__MINGW32__)
32 # include <windows.h>
33 #endif
35 #if defined(_MSC_VER) && !defined(__WINS__)
36 # if _MSC_VER >= 1100
37 /* Stupid MSC can't compile own headers without warning at least in VC 5.0 */
38 # pragma warning(disable: 4115 4201 4214 4514)
39 # endif
40 # include <windows.h>
41 # if _MSC_VER >= 1100
42 # pragma warning(default: 4115 4201 4214)
43 # endif
44 # define VOID_TYPEDEFED
45 #endif
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
51 /*
52 * pack(1) was introduced in Regina 3.3 to become binary compatible in
53 * structures with OS/2, Object Rexx, etc.
54 */
55 #ifdef OREXX_BINARY_COMPATIBLE
56 # pragma pack(1)
57 #endif
59 #ifndef CONST
60 /* Introduced in Regina 2.0, may/should not exist in non-ANSI compilers.
61 * Everybody can see which params will change even if CONST is not defined.
62 * We don't use CONST at all places to be consistent with other
63 * implementations. You can see a "CONST" as a comment before each variable
64 * which is/must not be changed.
65 */
66 # define CONST const
67 #endif
69 #if defined(__MINGW32__)
70 # if defined(__REGINA_DLL)
71 # define EXTNAME(n) __declspec(dllexport)
72 # else
73 # define EXTNAME(n) __declspec(dllimport)
74 # endif
75 #else
76 #define EXTNAME(n)
77 #endif
79 #if !defined(OS2_VAC_C) && !defined(_OS2EMX_H) && !defined(__RSXNT__) && !defined(__MINGW32__)
81 # if !defined(VOID_TYPEDEFED) && !defined(VOID)
82 typedef void VOID ;
83 # define VOID_TYPEDEFED
84 # endif
86 # ifndef PVOID_TYPEDEFED
87 typedef void* PVOID ;
88 # define PVOID_TYPEDEFED
89 # endif
91 # ifndef CHAR_TYPEDEFED
92 typedef char CHAR;
93 # define CHAR_TYPEDEFED
94 # endif
95 # ifndef PCHAR_TYPEDEFED
96 typedef CHAR *PCHAR ;
97 # define PCHAR_TYPEDEFED
98 # endif
99 # ifndef UCHAR_TYPEDEFED
100 typedef unsigned char UCHAR ;
101 # define UCHAR_TYPEDEFED
102 # endif
103 # ifndef PUCHAR_TYPEDEFED
104 typedef UCHAR *PUCHAR;
105 # define PUCHAR_TYPEDEFED
106 # endif
108 # ifndef SHORT_TYPEDEFED
109 typedef short SHORT;
110 # define SHORT_TYPEDEFED
111 # endif
112 # ifndef PSHORT_TYPEDEFED
113 typedef SHORT *PSHORT ;
114 # define PSHORT_TYPEDEFED
115 # endif
116 # ifndef USHORT_TYPEDEFED
117 typedef unsigned short USHORT ;
118 # define USHORT_TYPEDEFED
119 # endif
120 # ifndef PUSHORT_TYPEDEFED
121 typedef USHORT *PUSHORT;
122 # define PUSHORT_TYPEDEFED
123 # endif
125 # ifndef LONG_TYPEDEFED
126 typedef long LONG;
127 # define LONG_TYPEDEFED
128 # endif
129 # ifndef PLONG_TYPEDEFED
130 typedef LONG *PLONG;
131 # define PLONG_TYPEDEFED
132 # endif
133 # ifndef ULONG_TYPEDEFED
134 typedef unsigned long ULONG ;
135 # define ULONG_TYPEDEFED
136 # endif
138 typedef char *PSZ ;
139 typedef CONST char *PCSZ ;
140 typedef CHAR *PCH ;
142 #endif
144 #ifdef __MINGW32__
145 typedef CONST char *PCSZ ;
146 #endif
148 #ifdef INCL_REXXSAA
149 # define INCL_RXSUBCOM
150 # define INCL_RXSHV
151 # define INCL_RXFUNC
152 # define INCL_RXSYSEXIT
153 # define INCL_RXMACRO
154 # define INCL_RXARI
155 # define INCL_RXQUEUE
156 # define INCL_RXMACRO
157 #endif
160 * For Innotek gcc, force use of _System calling convention
162 #if defined( __EMX__ ) && defined( __INNOTEK_LIBC__ )
163 # undef APIENTRY
164 # define APIENTRY _System
165 #endif
167 #if !defined(APIENTRY)
168 # define APIENTRY
169 #endif
171 #if !defined(APIRET)
172 # define APIRET ULONG
173 #endif
175 #if !defined(_OS2EMX_H) && !defined( PFN_TYPEDEFED )
176 typedef APIRET (APIENTRY *PFN)();
177 #endif
180 typedef struct RXSTRING_type
182 ULONG strlength ;
183 char* strptr ;
184 } RXSTRING ;
185 typedef RXSTRING *PRXSTRING ;
187 #if !defined(_OS2EMX_H)
188 typedef struct REXXDATETIME_type
190 USHORT hours; /* hour of the day (24-hour) */
191 USHORT minutes; /* minute of the hour */
192 USHORT seconds; /* second of the minute */
193 USHORT hundredths; /* hundredths of a second */
194 USHORT day; /* day of the month */
195 USHORT month; /* month of the year */
196 USHORT year; /* current year */
197 USHORT weekday; /* day of the week */
198 ULONG microseconds; /* microseconds */
199 ULONG yearday; /* day number within the year */
200 USHORT valid; /* valid time stamp marker */
201 } REXXDATETIME;
202 #define DATETIME REXXDATETIME
203 typedef REXXDATETIME *PDATETIME;
204 #endif
206 #define RXAUTOBUFLEN 256L
208 typedef struct {
209 char *sysexit_name ;
210 LONG sysexit_code ;
211 } RXSYSEXIT ;
212 typedef RXSYSEXIT *PRXSYSEXIT ;
214 typedef PUCHAR PEXIT ;
217 * typedefs for Rexx handler types
219 typedef APIRET APIENTRY RexxFunctionHandler(PCSZ name, ULONG argc, /* CONST */ PRXSTRING argv, PCSZ queuename, PRXSTRING returnstring) ;
220 typedef LONG APIENTRY RexxExitHandler( LONG, LONG, /* CONST */ PEXIT ) ;
221 typedef APIRET APIENTRY RexxSubcomHandler(/* CONST */ PRXSTRING, PUSHORT, PRXSTRING);
224 * -------------------------------------------------------------------
225 * System Exit Interface
226 *-------------------------------------------------------------------
228 #ifdef INCL_RXSYSEXIT
231 * The following are definition for the function codes and subcodes for
232 * System Exit Handlers. All RXxxx macros are function codes, while the
233 * RXxxxyyy macros are function subcodes for function code RXxxx.
235 #define RXFNC 2
236 # define RXFNCCAL 1
238 #define RXCMD 3
239 # define RXCMDHST 1
241 #define RXMSQ 4 /* Net yet implemented */
242 # define RXMSQPLL 1 /* Net yet implemented */
243 # define RXMSQPSH 2 /* Net yet implemented */
244 # define RXMSQSIZ 3 /* Net yet implemented */
245 # define RXMSQNAM 20 /* Net yet implemented */
247 #define RXSIO 5
248 # define RXSIOSAY 1
249 # define RXSIOTRC 2
250 # define RXSIOTRD 3
251 # define RXSIODTR 4
252 # define RXSIOTLL 5 /* Net yet implemented */
254 #define RXHLT 7
255 # define RXHLTCLR 1
256 # define RXHLTTST 2
258 #define RXTRC 8
259 # define RXTRCTST 1
261 #define RXINI 9
262 # define RXINIEXT 1
264 #define RXTER 10
265 # define RXTEREXT 1
267 #define RXDBG 11
268 # define RXDBGTST 1
270 #define RXENV 12 /* System Environment interface */
271 # define RXENVGET 1 /* Get System Environment Variable */
272 # define RXENVSET 2 /* Set System Environment Variable */
273 # define RXCWDGET 3 /* Get Current Working Directory */
274 # define RXCWDSET 4 /* Set Current Working Directory */
276 #define RXENDLST 0
277 #define RXNOOFEXITS 13 /* MUST be 1 more than last exit number */
279 /* Symbolic return codes for System Exit Handlers */
280 #define RXEXIT_HANDLED 0
281 #define RXEXIT_NOT_HANDLED 1
282 #define RXEXIT_RAISE_ERROR (-1)
284 #define RXEXIT_DROPPABLE 0x00
285 #define RXEXIT_NONDROP 0x01
287 /* Return Codes from RXEXIT interface */
289 #define RXEXIT_ISREG 0x01
290 #define RXEXIT_ERROR 0x01
291 #define RXEXIT_FAILURE 0x02
292 #define RXEXIT_BADENTRY 1001
293 #define RXEXIT_NOEMEM 1002
294 #define RXEXIT_BADTYPE 1003
295 #define RXEXIT_NOTINIT 1004
296 #define RXEXIT_OK 0
297 #define RXEXIT_DUP 10
298 #define RXEXIT_MAXREG 20
299 #define RXEXIT_NOTREG 30
300 #define RXEXIT_NOCANDROP 40
301 #define RXEXIT_LOADERR 50
302 #define RXEXIT_NOPROC 127
304 typedef struct {
305 struct {
306 unsigned rxfferr:1 ;
307 unsigned rxffnfnd:1 ;
308 unsigned rxffsub:1 ;
309 } rxfnc_flags ;
310 /* CONST */ PUCHAR rxfnc_name ;
311 USHORT rxfnc_namel ;
312 /* CONST */ PUCHAR rxfnc_que ;
313 USHORT rxfnc_quel ;
314 USHORT rxfnc_argc ;
315 /* CONST */ PRXSTRING rxfnc_argv ;
316 RXSTRING rxfnc_retc ;
317 } RXFNCCAL_PARM ;
319 typedef struct {
320 struct {
321 unsigned rxfcfail:1 ;
322 unsigned rxfcerr:1 ;
323 } rxcmd_flags ;
324 /* CONST */ PUCHAR rxcmd_address ;
325 USHORT rxcmd_addressl ;
326 /* CONST */ PUCHAR rxcmd_dll ;
327 USHORT rxcmd_dll_len ;
328 /* CONST */ RXSTRING rxcmd_command ;
329 RXSTRING rxcmd_retc ;
330 } RXCMDHST_PARM ;
332 typedef struct {
333 RXSTRING rxmsq_retc ;
334 } RXMSQPLL_PARM ;
336 typedef struct {
337 struct {
338 unsigned rxfmlifo:1 ;
339 } rxmsq_flags ;
340 /* CONST */ RXSTRING rxmsq_value ;
341 } RXMSQPSH_PARM ;
343 typedef struct {
344 ULONG rxmsq_size ;
345 } RXMSQSIZ_PARM ;
347 typedef struct {
348 RXSTRING rxmsq_name ;
349 } RXMSQNAM_PARM ;
351 typedef struct {
352 /* CONST */ RXSTRING rxsio_string ;
353 } RXSIOSAY_PARM ;
355 typedef struct {
356 /* CONST */ RXSTRING rxsio_string ;
357 } RXSIOTRC_PARM ;
359 typedef struct {
360 RXSTRING rxsiotrd_retc ;
361 } RXSIOTRD_PARM ;
363 typedef struct {
364 RXSTRING rxsiodtr_retc ;
365 } RXSIODTR_PARM ;
367 typedef struct {
368 struct {
369 unsigned rxfhhalt:1 ;
370 } rxhlt_flags ;
371 } RXHLTTST_PARM ;
373 typedef struct {
374 struct {
375 unsigned rxftrace:1 ;
376 } rxtrx_flags ;
377 } RXTRCTST_PARM ;
379 typedef struct {
380 RXSTRING rxenv_name ;
381 RXSTRING rxenv_value ;
382 } RXENVGET_PARM ;
384 typedef struct {
385 RXSTRING rxenv_name ;
386 RXSTRING rxenv_value ;
387 } RXENVSET_PARM ;
389 typedef struct {
390 RXSTRING rxcwd_value ;
391 } RXCWDGET_PARM ;
393 typedef struct {
394 RXSTRING rxcwd_value ;
395 } RXCWDSET_PARM ;
397 APIRET APIENTRY RexxRegisterExitExe(
398 PCSZ EnvName,
399 #ifdef RX_WEAKTYPING
400 PFN EntryPoint,
401 #else
402 RexxExitHandler *EntryPoint,
403 #endif
404 /* CONST */ PUCHAR UserArea )
405 EXTNAME("RexxRegisterExitExe");
406 #define REXXREGISTEREXITEXE RexxRegisterExitExe
408 APIRET APIENTRY RexxRegisterExitDll(
409 PCSZ EnvName,
410 PCSZ ModuleName,
411 PCSZ ProcedureName,
412 /* CONST */ PUCHAR UserArea,
413 ULONG DropAuth )
414 EXTNAME("RexxRegisterExitDll");
415 #define REXXREGISTEREXITDLL RexxRegisterExitDll
417 APIRET APIENTRY RexxDeregisterExit(
418 PCSZ EnvName,
419 PCSZ ModuleName )
420 EXTNAME("RexxDeregisterExit");
421 #define REXXDEREGISTEREXIT RexxDeregisterExit
423 APIRET APIENTRY RexxQueryExit (
424 PCSZ ExitName,
425 PCSZ ModuleName,
426 PUSHORT Flag,
427 PUCHAR UserArea)
428 EXTNAME("RexxQueryExit");
429 #define REXXQUERYEXIT RexxQueryExit
431 #endif /* INCL_RXSYSEXIT */
434 #define MAXENVNAMELEN 32767 /* at least, there is no limit */
436 #define MAKERXSTRING(x,c,l) ((x).strptr=(c),(x).strlength=(l))
437 #define RXNULLSTRING(x) (!(x).strptr)
438 #define RXSTRLEN(x) ((x).strptr ? (x).strlength : 0UL)
439 #define RXSTRPTR(x) ((x).strptr)
440 #define RXVALIDSTRING(x) ((x).strptr && (x).strlength)
441 #define RXZEROLENSTRING(x) ((x).strptr && !(x).strlength)
443 #define RXCOMMAND 0
444 #define RXSUBROUTINE 1
445 #define RXFUNCTION 2
447 * RXRESTRICTED is OR'ed with one of the above values to run Regina
448 * in "restricted" mode
450 #define RXRESTRICTED 256
453 #ifdef INCL_RXSHV
456 * Definitions and declarations for the Rexx variable pool interface.
459 # define RXSHV_OK 0x00 /* Everything OK */
460 # define RXSHV_NEWV 0x01 /* Var not previously set */
461 # define RXSHV_LVAR 0x02 /* Last var in a NEXTV sequence */
462 # define RXSHV_TRUNC 0x04 /* Name or value has been truncated */
463 # define RXSHV_BADN 0x08 /* Bad/invalid name */
464 # define RXSHV_MEMFL 0x10 /* Memory problem, e.g. out of memory */
465 # define RXSHV_BADF 0x80 /* Invalid function code */
467 # define RXSHV_NOAVL 0x90 /* Interface is not available */
470 * Note: Some documentation claims that RXSHV_BADF should have the
471 * value 0x80, but that can't be correct, can it?
474 # define RXSHV_SET 0x00 /* Set variable */
475 # define RXSHV_FETCH 0x01 /* Get value of variable */
476 # define RXSHV_DROPV 0x02 /* Drop variable */
477 # define RXSHV_SYSET 0x03 /* Set symbolic variable */
478 # define RXSHV_SYFET 0x04 /* Get value of symbolic variable */
479 # define RXSHV_SYDRO 0x05 /* Drop symbolic variable */
480 # define RXSHV_NEXTV 0x06 /* Get next var in a NEXTV sequence */
481 # define RXSHV_PRIV 0x07 /* Get private information */
482 # define RXSHV_EXIT 0x08 /* Set function exit value */
485 * Note: A symbolic variable is a symbol that will be 'expanded' before
486 * use, while a (normal) variable is used directly, without
487 * expanding it first.
490 typedef struct shvnode
492 struct shvnode *shvnext ;
493 RXSTRING shvname ;
494 RXSTRING shvvalue ;
495 ULONG shvnamelen ;
496 ULONG shvvaluelen ;
497 UCHAR shvcode ;
498 UCHAR shvret ;
499 } SHVBLOCK ;
501 typedef SHVBLOCK *PSHVBLOCK ;
503 APIRET APIENTRY RexxVariablePool(
504 PSHVBLOCK RequestBlockList )
505 EXTNAME("RexxVariablePool");
506 #define REXXVARIABLEPOOL RexxVariablePool
508 #endif /* INCL_RXSHV */
511 APIRET APIENTRY RexxFreeMemory(
512 PVOID MemoryBlock )
513 EXTNAME("RexxFreeMemory");
514 #define REXXFREEMEMORY RexxFreeMemory
516 PVOID APIENTRY RexxAllocateMemory(
517 ULONG size )
518 EXTNAME("RexxAllocateMemory");
519 #define REXXALLOCATEMEMORY RexxAllocateMemory
522 APIRET APIENTRY RexxStart(
523 LONG ArgCount,
524 /* CONST */ PRXSTRING ArgList,
525 PCSZ ProgramName,
526 /* CONST */ PRXSTRING Instore,
527 PCSZ EnvName,
528 LONG CallType,
529 /* CONST */ PRXSYSEXIT Exits,
530 PSHORT ReturnCode,
531 PRXSTRING Result )
532 EXTNAME("RexxStart");
533 #define REXXSTART RexxStart
536 * Return codes .... haha there doesn't seem to be a standard, except
537 * zero is OK, negative is an Rexx error, the positive error codes below
538 * are my own 'invention'
540 #define RX_START_OK 0
541 #define RX_START_BADP 1 /* Bad parameters */
542 #define RX_START_UNIMPL 2 /* Not yet implemented :-) */
543 #define RX_START_TOOMANYP 3 /* To many parameters */
544 #define RX_DIDNT_START 4 /* Unable to start interpreter */
546 APIRET APIENTRY RexxCallBack(
547 PCSZ ProcedureName,
548 LONG ArgCount,
549 PRXSTRING ArgList,
550 PSHORT ReturnCode,
551 PRXSTRING Result )
552 EXTNAME("RexxCallBack");
553 #define REXXCALLBACK RexxCallBack
556 * Return codes for RexxCallBack
558 #define RX_CB_OK 0
559 #define RX_CB_BADP 1 /* Bad parameters */
560 #define RX_CB_NOTSTARTED 2 /* Interface not running */
561 #define RX_CB_TOOMANYP 3 /* Too many parameters */
562 #define RX_CB_BADN 8 /* Procedure not found */
564 * -------------------------------------------------------------------
565 * Sub-command Interface
566 *-------------------------------------------------------------------
568 #ifdef INCL_RXSUBCOM
570 APIRET APIENTRY RexxRegisterSubcomExe(
571 PCSZ EnvName,
572 #ifdef RX_WEAKTYPING
573 PFN EntryPoint,
574 #else
575 RexxSubcomHandler *EntryPoint,
576 #endif
577 /* CONST */ PUCHAR UserArea )
578 EXTNAME("RexxRegisterSubcomExe");
579 #define REXXREGISTERSUBCOMEXE RexxRegisterSubcomExe
581 APIRET APIENTRY RexxDeregisterSubcom(
582 PCSZ EnvName,
583 PCSZ ModuleName )
584 EXTNAME("RexxDeregisterSubcom");
585 #define REXXDEREGISTERSUBCOM RexxDeregisterSubcom
587 APIRET APIENTRY RexxRegisterSubcomDll(
588 PCSZ EnvName,
589 PCSZ ModuleName,
590 PCSZ ProcedureName,
591 /* CONST */ PUCHAR UserArea,
592 ULONG DropAuth )
593 EXTNAME("RexxRegisterSubcomDll");
594 #define REXXREGISTERSUBCOMDLL RexxRegisterSubcomDll
596 APIRET APIENTRY RexxQuerySubcom(
597 PCSZ Envname,
598 PCSZ ModuleName,
599 PUSHORT Flag, /* Documentation diverges ... */
600 PUCHAR UserArea )
601 EXTNAME("RexxQuerySubcom");
602 #define REXXQUERYSUBCOM RexxQuerySubcom
604 #define RXSUBCOM_OK 0
605 #define RXSUBCOM_DUP 10
606 #define RXSUBCOM_MAXREG 20
607 #define RXSUBCOM_NOTREG 30
608 #define RXSUBCOM_NOCANDROP 40
609 #define RXSUBCOM_LOADERR 50
610 #define RXSUBCOM_NOPROC 127
612 #define RXSUBCOM_BADENTRY 1001
613 #define RXSUBCOM_NOEMEM 1002
614 #define RXSUBCOM_BADTYPE 1003
615 #define RXSUBCOM_NOTINIT 1004
617 /* I don't know the 'real' values of these */
618 #define RXSUBCOM_ERROR 0x01
619 #define RXSUBCOM_ISREG 0x01
620 #define RXSUBCOM_FAILURE 0x02
622 #define RXSUBCOM_DROPPABLE 0x00
623 #define RXSUBCOM_NONDROP 0x01
625 #endif /* INCL_RXSUBCOM */
629 * -------------------------------------------------------------------
630 * External Function Interface
631 *-------------------------------------------------------------------
633 #ifdef INCL_RXFUNC
635 #define RXFUNC_OK 0
636 #define RXFUNC_DEFINED 10
637 #define RXFUNC_NOMEM 20
638 #define RXFUNC_NOTREG 30
639 #define RXFUNC_MODNOTFND 40
640 #define RXFUNC_ENTNOTFND 50
641 #define RXFUNC_NOTINIT 60
642 #define RXFUNC_BADTYPE 70
643 #define RXFUNC_NOEMEM 1002
645 APIRET APIENTRY RexxRegisterFunctionExe(
646 PCSZ name,
647 #ifdef RX_WEAKTYPING
648 PFN EntryPoint )
649 #else
650 RexxFunctionHandler *EntryPoint )
651 #endif
652 EXTNAME("RexxRegisterFunctionExe");
653 #define REXXREGISTERFUNCTIONEXE RexxRegisterFunctionExe
655 APIRET APIENTRY RexxRegisterFunctionDll(
656 PCSZ ExternalName,
657 PCSZ LibraryName,
658 PCSZ InternalName )
659 EXTNAME("RexxRegisterFunctionDll");
660 #define REXXREGISTERFUNCTIONDLL RexxRegisterFunctionDll
662 APIRET APIENTRY RexxDeregisterFunction(
663 PCSZ name )
664 EXTNAME("RexxDeregisterFunction");
665 #define REXXDEREGISTERFUNCTION RexxDeregisterFunction
667 APIRET APIENTRY RexxQueryFunction(
668 PCSZ name )
669 EXTNAME("RexxQueryFunction");
670 #define REXXQUERYFUNCTION RexxQueryFunction
672 #endif /* INCL_RXFUNC */
675 * -------------------------------------------------------------------
676 * Asynchronous Request Interface
677 *-------------------------------------------------------------------
679 #ifdef INCL_RXARI
681 /*** Return Codes from Asynchronous Request interface */
683 #define RXARI_OK 0
684 #define RXARI_NOT_FOUND 1
685 #define RXARI_PROCESSING_ERROR 2
687 APIRET APIENTRY RexxSetHalt(
688 LONG pid,
689 LONG tid)
690 EXTNAME("RexxSetHalt");
691 #define REXXSETHALT RexxSetHalt
693 #endif /* INCL_RXARI */
696 * -------------------------------------------------------------------
697 * External Queue Interface
698 *-------------------------------------------------------------------
700 #ifdef INCL_RXQUEUE
702 ULONG APIENTRY RexxCreateQueue (
703 PSZ,
704 ULONG,
705 PSZ,
706 ULONG* )
707 EXTNAME("RexxCreateQueue");
708 #define REXXCREATEQUEUE RexxCreateQueue
710 ULONG APIENTRY RexxDeleteQueue (
711 PSZ )
712 EXTNAME("RexxDeleteQueue");
713 #define REXXDELETEQUEUE RexxDeleteQueue
715 ULONG APIENTRY RexxQueryQueue (
716 PSZ,
717 ULONG* )
718 EXTNAME("RexxQueryQueue");
719 #define REXXQUERYQUEUE RexxQueryQueue
721 ULONG APIENTRY RexxAddQueue (
722 PSZ,
723 PRXSTRING,
724 ULONG )
725 EXTNAME("RexxAddQueue");
726 #define REXXADDQUEUE RexxAddQueue
728 ULONG APIENTRY RexxPullQueue (
729 PSZ,
730 PRXSTRING,
731 PDATETIME,
732 ULONG )
733 EXTNAME("RexxPullQueue");
734 #define REXXPULLQUEUE RexxPullQueue
736 /* Request flags for External Data Queue access --------------------- */
737 #define RXQUEUE_FIFO 0 /* Access queue first-in-first-out */
738 #define RXQUEUE_LIFO 1 /* Access queue last-in-first-out */
740 #define RXQUEUE_NOWAIT 0 /* Wait for data if queue empty */
741 #define RXQUEUE_WAIT 1 /* Don't wait on an empty queue */
743 /* Return Codes from RxQueue interface ------------------------------ */
744 #define RXQUEUE_OK 0 /* Successful return */
745 #define RXQUEUE_NOTINIT 1000 /* Queues not initialized */
747 #define RXQUEUE_STORAGE 1 /* Ret info buf not big enough */
748 #define RXQUEUE_SIZE 2 /* Data size > 64K-64 */
749 #define RXQUEUE_DUP 3 /* Attempt-duplicate queue name*/
750 #define RXQUEUE_NOEMEM 4 /* Not enough available memory */
751 #define RXQUEUE_BADQNAME 5 /* Not a valid queue name */
752 #define RXQUEUE_PRIORITY 6 /* Not accessed as LIFO|FIFO */
753 #define RXQUEUE_BADWAITFLAG 7 /* Not accessed as WAIT|NOWAIT */
754 #define RXQUEUE_EMPTY 8 /* No data in queue */
755 #define RXQUEUE_NOTREG 9 /* Queue does not exist */
756 #define RXQUEUE_ACCESS 10 /* Queue busy and wait active */
757 #define RXQUEUE_MAXREG 11 /* No memory to create a queue */
758 #define RXQUEUE_MEMFAIL 12 /* Failure in memory management*/
759 #define RXQUEUE_NETERROR 100 /* Network error */
761 #endif /* INCL_RXQUEUE */
764 * -------------------------------------------------------------------
765 * Macrospace Interface
766 *-------------------------------------------------------------------
768 #ifdef INCL_RXMACRO
770 APIRET APIENTRY RexxAddMacro (
771 PSZ, /* Function to add or change */
772 PSZ, /* Name of file to get function */
773 ULONG ) /* Flag indicating search pos */
774 EXTNAME("RexxAddMacro");
775 #define REXXADDMACRO RexxAddMacro
777 APIRET APIENTRY RexxDropMacro (
778 PSZ ) /* Name of function to remove */
779 EXTNAME("RexxDropMacro");
780 #define REXXDROPMACRO RexxDropMacro
782 APIRET APIENTRY RexxSaveMacroSpace (
783 ULONG , /* Argument count (0==save all) */
784 PSZ *, /* List of funct names to save */
785 PSZ) /* File to save functions in */
786 EXTNAME("RexxSaveMacroSpace");
787 #define REXXSAVEMACROSPACE RexxSaveMacroSpace
789 APIRET APIENTRY RexxLoadMacroSpace (
790 ULONG , /* Argument count (0==load all) */
791 PSZ *, /* List of funct names to load */
792 PSZ) /* File to load functions from */
793 EXTNAME("RexxLoadMacroSpace");
794 #define REXXLOADMACROSPACE RexxLoadMacroSpace
796 APIRET APIENTRY RexxQueryMacro (
797 PSZ, /* Function to search for */
798 PUSHORT ) /* Ptr for position flag return */
799 EXTNAME("RexxQueryMacro");
800 #define REXXQUERYMACRO RexxQueryMacro
802 APIRET APIENTRY RexxReorderMacro(
803 PSZ, /* Name of funct change order */
804 ULONG ) /* New position for function */
805 EXTNAME("RexxReorderMacro");
806 #define REXXREORDERMACRO RexxReorderMacro
808 APIRET APIENTRY RexxClearMacroSpace(
810 EXTNAME("RexxClearMacroSpace");
811 #define REXXCLEARMACROSPACE RexxClearMacroSpace
813 /* Registration Search Order Flags ---------------------------------- */
814 #define RXMACRO_SEARCH_BEFORE 1 /* Beginning of search order */
815 #define RXMACRO_SEARCH_AFTER 2 /* End of search order */
817 /* Return Codes from RxMacroSpace interface ------------------------- */
818 #define RXMACRO_OK 0 /* Macro interface completed */
819 #define RXMACRO_NO_STORAGE 1 /* Not Enough Storage Available */
820 #define RXMACRO_NOT_FOUND 2 /* Requested function not found */
821 #define RXMACRO_EXTENSION_REQUIRED 3 /* File ext required for save */
822 #define RXMACRO_ALREADY_EXISTS 4 /* Macro functions exist */
823 #define RXMACRO_FILE_ERROR 5 /* File I/O error in save/load */
824 #define RXMACRO_SIGNATURE_ERROR 6 /* Incorrect format for load */
825 #define RXMACRO_SOURCE_NOT_FOUND 7 /* Requested cannot be found */
826 #define RXMACRO_INVALID_POSITION 8 /* Invalid search order pos */
827 #define RXMACRO_NOT_INIT 9 /* API not initialized */
829 #endif /* INCL_RXMACRO */
832 /* REGINA EXTENSIONS *********************************************************/
833 /* The following functions are an extension to the standard. Never try to
834 * address the function directly if you want to be compatible. Use the dynamic
835 * linking machanism of your operating system instead.
838 * ReginaVersion returns informations about the version of the library.
839 * This function was introduced in version 2.0.
840 * Returns: ULONG, in lower byte the two-digit fraction part of the version.
841 * The higher bytes will hold the integer part of the version.
842 * Examples: 0x10A codes the Version "1.10".
843 * VersionString will be filled if VersionString is non-NULL.
844 * If VersionString is non-NULL then there are two possibilities:
845 * a) VersionString->strlength == 0: VersionString is filled with the
846 * appropriate values. VersionString->strptr
847 * is always created.
848 * b) VersionString->strlength != 0: VersionString->strptr is filled up to
849 * this value. VersionString->strlength will
850 * hold the copied bytes.
851 * Note: A terminating ASCII-zero is appended if there is enough space
852 * although it is never counted in VersionString.strlength.
853 * RexxAllocateMemory is used if needed.
855 APIRET APIENTRY ReginaVersion(
856 PRXSTRING VersionString )
857 EXTNAME("ReginaVersion");
858 #define REGINAVERSION ReginaVersion
861 * ReginaCleanup performs a graceful cleanup. This is done automatically
862 * on many systems but you can't be sure in all cases. The cleanup operations
863 * destroys all informations that are collected so far by one thread.
864 * It works for a single process or thread too. Although all memory is
865 * freed, some open handles may remain open. It is necessary to perform
866 * the appropriate "RexxDeregister<whatever>" calls before this routine
867 * is called.
868 * This function was introduced in version 3.3.
869 * Returns: ULONG, 0 if this call hasn't done anything.
870 * 1 if at least something could be freed.
871 * It is allowed to reuse every API function after this call but this routine
872 * must not be used when some parts of the Regina core are in use.
874 APIRET APIENTRY ReginaCleanup( )
875 EXTNAME("ReginaCleanup");
876 #define REGINACLEANUP ReginaCleanup
878 #ifdef OREXX_BINARY_COMPATIBLE
879 # pragma pack()
880 #endif
882 #ifdef __cplusplus
884 #endif
886 #endif /* __REXXSAA_H_INCLUDED */