Added an icon with c:iconx as default tools.
[AROS-Contrib.git] / regina / rxiface.h
blobf1035472f8835f81f7a7c6781bdfeaccfb78774e
1 /*
2 * The Regina Rexx Interpreter
3 * Copyright (C) 1992-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.
21 * $Id$
24 #include "wrappers.h"
26 /* <<<<<<<<<<< Things you might want to configure >>>>>>>>>>>>>> */
28 * Although you'd probably better off compiling rxiface.c with these
29 * symbols set at the commandline than actually changing this file
33 * The cpp symbol RXPROG contains the name of the rexx interpreter to
34 * start. If not defined elsewhere (like on the command line), a default
35 * value is used. It is invoked using exec*p*, so you don't need to
36 * specify a full path unless 'rexx' is located somewhere outside PATH.
38 #ifndef RXPROG
39 # define RXPROG "rexx"
40 #endif
43 * When the application starts up the interpreter, a version number is
44 * sent from the interpreter to the application, as the first thing.
45 * This piece of information serves two purposes: If the interpreter
46 * was not properly started, that will be sensed and an apropriate
47 * errormessage can be returned to the calling routine in the application.
48 * Secondly, if the interpreter and the application have different
49 * versions of the interfacing software, that will be detected.
51 * MAKE SURE THAT YOU CHANGE THE VERSION NUMBER WHENEVER YOU CHANGE
52 * THE DEFINITION OF THE INTERFACE! At worst, pick a number at random,
53 * just choose a version number that isn't likely to have been chosen
54 * by somebody else.
56 * NOTE: I've taken the liberty to 'reserve' 0xdeadbeef as the version
57 * number for the versions I write and distribute. If you change
58 * anything, make sure that you set RXVERSION_MAJ to something
59 * else. -anders <anders@pvv.unit.no>
60 * The version number for my changes is 0xbadab0de :-)
61 * Mark - <M.Hessling@qut.edu.au>
63 #ifndef RXVERSION_MAJ
64 # define RXVERSION_MAJ 0xbadab0de
65 # define RXVERSION_MIN 0x00002000
66 #endif
69 * These are the commands sent through the communication channel. Their
70 * format is fixed.
72 RX_RETURN int=code, int=rval
73 RX_SCOMRET int=code, int=flag, str=retvalue
74 RX_SUBCOM
77 #define RX_RETURN 1
78 #define RX_SUBCOM 2
79 #define RX_GETVAR 3
80 #define RX_SETVAR 4
81 #define RX_EXECUTE 5
82 #define RX_VALUE 6
83 #define RX_ENVIR 7
84 #define RX_RETVOID 8
85 #define RX_SYNCREQ 9
86 #define RX_SYNCACK 10
87 #define RX_SETEXIT 11
88 #define RX_CLREXIT 12
89 #define RX_DO_HOOK 13
90 #define RX_TYPE_EXTERNAL 14
91 #define RX_TYPE_INSTORE 15
92 #define RX_TYPE_MACRO 16
93 #define RX_TYPE_SOURCE 17
94 #define RX_INSTORE 18
95 #define RX_DROP_INSTORE 19
96 #define RX_GETSVAR 20
97 #define RX_SETSVAR 21
98 #define RX_CODE_SOURCE 22
99 #define RX_CODE_VERSION 23
100 #define RX_CODE_QUEUE 24
101 #define RX_CODE_PARAM 25
102 #define RX_TYPE_COMMAND 26
103 #define RX_TYPE_FUNCTION 27
104 #define RX_TYPE_SUBROUTINE 28
105 #define RX_VERSION 29
106 #define RX_STRINGS 30
107 #define RX_NEXTVAR 31
108 #define RX_ADDFUNC 32
109 #define RX_DELFUNC 33
110 #define RX_EXECFUNC 34
111 #define RX_CODE_PARAMS 35
113 #define RX_CODE_OK 0
114 #define RX_CODE_NOVALUE 1
115 #define RX_CODE_INVNAME 2
116 #define RX_CODE_EXISTS 3
117 #define RX_CODE_NOSUCH 4
118 #define RX_CODE_NOMEM 5
120 #define RX_HOOK_GO_ON 0
121 #define RX_HOOK_NOPE 1
122 #define RX_HOOK_ERROR 2
124 #define RX_NO_STRING (-1)
126 #define RX_EXIT_STDOUT 0
127 #define RX_EXIT_STDERR 1
128 #define RX_EXIT_TRCIN 2
129 #define RX_EXIT_PULL 3
130 #define RX_EXIT_INIT 4
131 #define RX_EXIT_TERMIN 5
132 #define RX_EXIT_SUBCOM 6
133 #define RX_EXIT_FUNC 7
134 #define RX_EXIT_GETENV 8
135 #define RX_EXIT_SETENV 9
137 #define RX_LASTHOOK 32
139 #define RXFLAG_OK 0x0000
141 #define RXFLAG_ERROR 0x0001
142 #define RXFLAG_FAILURE 0x0002
144 #define RXFLAG_NOVALUE 0x0001
146 #define RXFLAG_NOTREG 30
148 int IfcStartUp( tsd_t *TSD, char *name, int *Major, int *Minor ) ;
149 int IfcExecScript( int NameLen, const char *Name,
150 int ArgCount, const int *ParLengths, const char **ParStrings,
151 int CallType, int ExitFlags, int EnvLen, const char *EnvName,
152 int SourceCode, int restricted,
153 const char *SourceString, unsigned long SourceStringLen,
154 const void *TinnedTree, unsigned long TinnedTreeLen,
155 int *RetLen, char **RetString, void **instore_buf,
156 unsigned long *instore_length ) ;
158 int IfcVarPool( tsd_t *TSD, int Code, int *Lengths, char *Strings[] ) ;
159 int IfcRegFunc( tsd_t *TSD, const char *Name ) ;
160 int IfcDelFunc( tsd_t *TSD, const char *Name ) ;
161 int IfcQueryFunc( tsd_t *TSD, const char *Name ) ;
163 int IfcSubCmd( const tsd_t *TSD, int EnvLen, const char *EnvStr, int CmdLen,
164 const char *CmdStr, int *RetLen, char **RetStr ) ;
165 int IfcDoExit( const tsd_t *TSD, int Code,
166 int OutputLength1, char *OutputString1,
167 int OutputLength2, char *OutputString2,
168 int *InputLength, char **InputString ) ;
169 int IfcExecFunc( const tsd_t *TSD, PFN Func, char *Name, int Params,
170 int *Lengths, char **Strings,
171 int *RetLength, char **RetString,
172 int *RC, char exitonly, char called ) ;
173 int IfcRegDllFunc( const tsd_t *TSD, const char* rxname, const char* module, const char* objnam ) ;
175 int IfcHaveFunctionExit(const tsd_t *TSD);
177 unsigned long IfcFreeMemory( void *);
178 void *IfcAllocateMemory( unsigned long );
180 int IfcCreateQueue( tsd_t *TSD, const char *qname, const int qlen, char *data, unsigned long *dupflag, unsigned long buflen );
181 int IfcDeleteQueue( tsd_t *TSD, const char *qname, const int qlen );
182 int IfcQueryQueue( tsd_t *TSD, const char *qname, const int qlen, unsigned long *count );
183 int IfcAddQueue( tsd_t *TSD, const char *qname, const int qlen, const char *data, const int datalen, unsigned long addlifo );
184 int IfcPullQueue( tsd_t *TSD, const char *qname, const int qlen, char **data, int *datalen, unsigned long waitforline );