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.
23 /* JH 20-10-99 */ /* To make Direct setting of stems Direct and not Symbolic. */
27 * Routines in lexsrc.l
30 extern YY_CHAR_TYPE
*yysptr
, yysbuf
[] ;
32 void fetch_file(tsd_t
*TSD
,
34 internal_parser_type
*ipt
);
35 void fetch_string(tsd_t
*TSD
,
37 internal_parser_type
*ipt
);
40 * Routines in parsing.c
42 int bmstrstr( const streng
*heystack
, int start
, const streng
*needle
) ;
43 void doparse( tsd_t
*TSD
, const streng
*source
, cnodeptr subtree
) ;
44 void parseargtree(tsd_t
*TSD
, cparamboxptr argbox
, cnodeptr
this, int upper
);
50 void dumpvars( const tsd_t
*TSD
, cvariableptr
*hashptr
) ;
51 void dumptree( const tsd_t
*TSD
, const treenode
*this, int level
, int newline
) ;
52 streng
*getsourceline( const tsd_t
*TSD
, int line
, int charnr
, const internal_parser_type
*ipt
) ;
54 void marksource( clineboxptr
) ;
61 streng
*readkbdline( tsd_t
*TSD
) ;
62 void mark_filetable( const tsd_t
*TSD
) ;
63 void purge_filetable( tsd_t
*TSD
) ;
64 int init_filetable( tsd_t
*TSD
) ;
65 void fixup_file( tsd_t
*TSD
, const streng
* ) ;
66 void get_external_routine(const tsd_t
*TSD
,const char *env
,const char *inname
, FILE **fp
, char *retname
, int startup
) ;
67 void find_shared_library(const tsd_t
*TSD
,const char *, const char *, char *);
68 void CloseOpenFiles ( const tsd_t
*TSD
) ;
69 streng
*ConfigStreamQualified( tsd_t
*TSD
, const streng
*name
);
70 streng
*std_charin( tsd_t
*TSD
, cparamboxptr parms
) ;
71 streng
*std_charout( tsd_t
*TSD
, cparamboxptr parms
) ;
72 streng
*std_chars( tsd_t
*TSD
, cparamboxptr parms
) ;
73 streng
*std_linein( tsd_t
*TSD
, cparamboxptr parms
) ;
74 streng
*std_lineout( tsd_t
*TSD
, cparamboxptr parms
) ;
75 streng
*std_lines( tsd_t
*TSD
, cparamboxptr parms
) ;
76 streng
*std_stream( tsd_t
*TSD
, cparamboxptr parms
) ;
77 void closefile( tsd_t
*TSD
, const streng
*name
) ;
78 void *addr_reopen_file( tsd_t
*TSD
, const streng
*filename
, char code
) ;
79 streng
*addr_io_file( tsd_t
*TSD
, void *fileptr
, const streng
*line
) ;
81 streng
*dbg_dumpfiles( tsd_t
*TSD
, cparamboxptr parms
) ;
83 #ifdef OLD_REGINA_FEATURES
84 streng
*unx_open( tsd_t
*TSD
, cparamboxptr parms
) ;
85 streng
*unx_close( tsd_t
*TSD
, cparamboxptr parms
) ;
87 #if !defined(HAVE__SPLITPATH2) && !defined(HAVE__SPLITPATH) && !defined(__EMX__) && !defined(DJGPP)
88 int my_splitpath2( const char *in
, char *out
, char **drive
, char **dir
, char **name
, char **ext
) ;
90 #if !defined(HAVE__FULLPATH) && !defined(HAVE__TRUENAME)
91 int my_fullpath( char *dst
, const char *src
, int size
) ;
93 streng
*arexx_exists( tsd_t
*TSD
, cparamboxptr parms
) ;
98 int isboolean( tsd_t
*TSD
, nodeptr
) ;
99 num_descr
*calcul( tsd_t
*TSD
, nodeptr
, num_descr
** ) ;
100 int init_expr( tsd_t
*TSD
) ;
101 streng
*evaluate( tsd_t
*TSD
, nodeptr
this, streng
**kill
) ;
104 * Routines in cmsfuncs.c
106 streng
*cms_sleep( tsd_t
*TSD
, cparamboxptr parms
) ;
107 streng
*cms_makebuf( tsd_t
*TSD
, cparamboxptr parms
) ;
108 streng
*cms_justify( tsd_t
*TSD
, cparamboxptr parms
) ;
109 streng
*cms_find( tsd_t
*TSD
, cparamboxptr parms
) ;
110 streng
*cms_index( tsd_t
*TSD
, cparamboxptr parms
) ;
111 streng
*cms_desbuf( tsd_t
*TSD
, cparamboxptr parms
) ;
112 streng
*cms_buftype( tsd_t
*TSD
, cparamboxptr parms
) ;
113 streng
*cms_dropbuf( tsd_t
*TSD
, cparamboxptr parms
) ;
114 streng
*cms_state( tsd_t
*TSD
, cparamboxptr parms
) ;
117 * Routines in memory.c
119 int init_memory( tsd_t
*TSD
) ;
121 void *get_a_chunk( int bytes
) ;
122 void *get_a_chunkTSD( const tsd_t
*TSD
, int bytes
) ;
123 streng
*get_a_streng( int bytes
) ;
124 streng
*get_a_strengTSD( const tsd_t
*TSD
, int bytes
) ;
125 void give_a_chunk( void *ptr
) ;
126 void give_a_chunkTSD( const tsd_t
*TSD
, void *ptr
) ;
127 void give_a_streng( streng
*ptr
) ;
128 void give_a_strengTSD( const tsd_t
*TSD
, streng
*ptr
) ;
129 int show_free_lists(const tsd_t
*TSD
);
130 void purge_flists(const tsd_t
*TSD
);
133 void *mymalloc( int bytes
) ;
134 void *mymallocTSD( const tsd_t
*TSD
, int bytes
) ;
135 void myfree( void *ptr
) ;
136 void myfreeTSD( const tsd_t
*TSD
, void *ptr
) ;
137 void regmarker( const tsd_t
*TSD
, void (*func
)(const tsd_t
*TSD
) ) ;
138 int have_allocated( tsd_t
*TSD
, int flag
) ;
139 void markmemory( void *ptr
, int i
) ;
140 int listleaked( const tsd_t
*TSD
, int pflag
) ;
141 void memory_stats( const tsd_t
*TSD
) ;
142 void mark_listleaked_params( const tsd_t
*TSD
) ;
143 #endif /* TRACEMEM */
146 # define Malloc(bytes) mymalloc(bytes)
147 # define Malloc_TSD(TSD,bytes) mymallocTSD(TSD,bytes)
148 # define MallocTSD(bytes) mymallocTSD(TSD,bytes)
149 # define Free(ptr) myfree(ptr)
150 # define Free_TSD(TSD,ptr) myfreeTSD(TSD,ptr)
151 # define FreeTSD(ptr) myfreeTSD(TSD,ptr)
152 # define Free_string(ptr) myfree(ptr)
153 # define Free_string_TSD(TSD,ptr) myfreeTSD(TSD,ptr)
154 # define Free_stringTSD(ptr) myfreeTSD(TSD,ptr)
155 #elif defined(FLISTS)
156 # define Malloc(bytes) get_a_chunk(bytes)
157 # define Malloc_TSD(TSD,bytes) get_a_chunkTSD(TSD,bytes)
158 # define MallocTSD(bytes) get_a_chunkTSD(TSD,bytes)
159 # define Free(ptr) give_a_chunk(ptr)
160 # define Free_TSD(TSD,ptr) give_a_chunkTSD(TSD,ptr)
161 # define FreeTSD(ptr) give_a_chunkTSD(TSD,ptr)
162 # define Free_string(ptr) give_a_streng(ptr)
163 # define Free_string_TSD(TSD,ptr) give_a_strengTSD(TSD,ptr)
164 # define Free_stringTSD(ptr) give_a_strengTSD(TSD,ptr)
165 #else /* neither TRACEMEM nor FLISTS */
166 # define Malloc(bytes) Malloc_TSD(__regina_get_tsd(),bytes)
167 # define Malloc_TSD(TSD,bytes) TSD->MTMalloc(TSD,bytes)
168 # define MallocTSD(bytes) Malloc_TSD(TSD,bytes)
169 # define Free(ptr) Free_TSD(__regina_get_tsd(),ptr)
170 # define Free_TSD(TSD,ptr) TSD->MTFree(TSD,ptr)
171 # define FreeTSD(ptr) Free_TSD(TSD,ptr)
173 void give_a_streng( streng
*ptr
) ;
174 void give_a_strengTSD( const tsd_t
*TSD
, streng
*ptr
) ;
175 # define Free_string(ptr) give_a_streng(ptr)
176 # define Free_string_TSD(TSD,ptr) give_a_strengTSD(TSD,ptr)
177 # define Free_stringTSD(ptr) give_a_strengTSD(TSD,ptr)
179 # define Free_string(ptr) Free_string_TSD(__regina_get_tsd(),ptr)
180 # define Free_string_TSD(TSD,ptr) TSD->MTFree(TSD,ptr)
181 # define Free_stringTSD(ptr) Free_string_TSD(TSD,ptr)
182 # endif /* CHECK_MEMORY */
183 #endif /* ifdef TRACEMEM */
187 * Routines in stack.c
189 int init_stacks( tsd_t
*TSD
) ;
190 int external_queues_used( const tsd_t
*TSD
) ;
191 void purge_stacks( const tsd_t
*TSD
) ;
192 streng
*popline( tsd_t
*TSD
, streng
*queue_name
, int *result
, unsigned long waitflag
) ;
193 int stack_lifo( tsd_t
*TSD
, streng
*line
, streng
*queue_name
) ;
194 int stack_fifo( tsd_t
*TSD
, streng
*line
, streng
*queue_name
) ;
195 int lines_in_stack( tsd_t
*TSD
, streng
*queue_name
) ;
196 int stack_empty( const tsd_t
*TSD
) ;
198 void mark_stack( const tsd_t
*TSD
) ;
199 #endif /* TRACEMEM */
200 int drop_buffer( const tsd_t
*TSD
, int num
) ;
201 int make_buffer( tsd_t
*TSD
) ;
202 void type_buffer( tsd_t
*TSD
) ;
203 void tmp_stack( tsd_t
*TSD
, streng
*, int ) ;
204 void fill_input_queue(tsd_t
*TSD
, streng
*stemname
, int stem0
);
205 streng
*get_input_queue(const tsd_t
*TSD
);
206 void purge_input_queue(const tsd_t
*TSD
);
207 void flush_stack( const tsd_t
*TSD
, int is_fifo
) ;
208 streng
*stack_to_line( const tsd_t
*TSD
);
209 int create_queue( tsd_t
*TSD
, streng
*queue_name
, streng
**result
);
210 int delete_queue( tsd_t
*TSD
, streng
*queue_name
);
211 int timeout_queue( tsd_t
*TSD
, streng
*timeout
, streng
*queue_name
);
212 streng
*get_queue( tsd_t
*TSD
);
213 streng
*set_queue( tsd_t
*TSD
, streng
*queue_name
);
219 streng
*upcase( streng
*text
) ;
220 const char *system_type( void ) ;
221 double cpu_time( void ) ;
222 void getsecs( time_t *secs
, time_t *usecs
) ;
223 unsigned hashvalue(const char *string
, int length
) ;
224 unsigned hashvalue_ic(const char *string
, int length
) ;
229 * Routines in error.c
231 int init_error( tsd_t
*TSD
) ;
232 const char *errortext( const tsd_t
*TSD
, int errorno
, int suberrnum
, int request_english
, int apply_inserts
) ;
233 void exiterror( int errorno
, int suberrorno
, ... ) ;
234 void __reginaerror( char *errtext
) ;
235 const char *getsym( int numb
) ;
236 int lineno_of( cnodeptr
) ;
240 * Routines in variable.c
242 void detach( const tsd_t
*TSD
, variableptr ptr
) ;
243 int init_vars( tsd_t
*TSD
) ;
244 void expand_to_str( const tsd_t
*TSD
, variableptr ptr
) ;
245 int var_was_found( const tsd_t
*TSD
) ;
246 variableptr
*create_new_varpool( const tsd_t
*TSD
) ;
247 void setdirvalue( const tsd_t
*TSD
, const streng
*name
, streng
*value
) ;
248 void setvalue( const tsd_t
*TSD
, const streng
*name
, streng
*value
) ;
249 num_descr
*fix_compoundnum( tsd_t
*TSD
, nodeptr
this, num_descr
*new ) ;
250 void setshortcutnum( const tsd_t
*TSD
, nodeptr
this, num_descr
*value
) ;
251 void setdirvalue_compound( const tsd_t
*TSD
, const streng
*name
, streng
*value
) ;
252 const streng
*getdirvalue_compound( tsd_t
*TSD
, const streng
*name
) ;
253 const streng
*getdirvalue( tsd_t
*TSD
, const streng
*name
, int trace
) ;
254 const streng
*getvalue( tsd_t
*TSD
, const streng
*name
, int trace
) ;
255 const streng
*isvariable( tsd_t
*TSD
, const streng
*name
) ;
256 const streng
*get_it_anyway( tsd_t
*TSD
, const streng
*name
) ;
257 const streng
*get_it_anyway_compound( tsd_t
*TSD
, const streng
*str
) ;
258 void expose_var( const tsd_t
*TSD
, const streng
*name
) ;
259 void drop_var( const tsd_t
*TSD
, const streng
*name
) ;
260 void drop_dirvar( const tsd_t
*TSD
, const streng
*name
) ;
261 void upper_var( tsd_t
*TSD
, const streng
*name
) ;
262 void set_ignore_novalue( const tsd_t
*TSD
) ;
263 int valid_var_symbol( const streng
*symbol
) ;
264 void clear_ignore_novalue( const tsd_t
*TSD
) ;
266 void markvariables( const tsd_t
*TSD
, cproclevel
) ;
267 #endif /* TRACEMEM */
268 const streng
*shortcut( tsd_t
*TSD
, nodeptr
) ;
269 num_descr
*shortcutnum( tsd_t
*TSD
, nodeptr
) ;
270 void setshortcut( const tsd_t
*TSD
, nodeptr
this, streng
*value
) ;
271 streng
*fix_compound( tsd_t
*TSD
, nodeptr
this, streng
*value
) ;
272 void kill_variables( const tsd_t
*TSD
, variableptr
*array
) ;
273 variableptr
get_next_variable( tsd_t
*TSD
, int reset
) ;
277 * Routines in shell.c
279 const streng
*stem_access( tsd_t
*TSD
, environpart
*e
, int pos
, const streng
*value
);
280 void open_env_io( tsd_t
*TSD
, environpart
*e
);
281 void put_stem( tsd_t
*TSD
, environpart
*e
, streng
*str
);
282 int init_shell( tsd_t
*TSD
) ;
283 void cleanup_envirpart(const tsd_t
*TSD
, environpart
*ep
);
284 int posix_do_command( tsd_t
*TSD
, const streng
*command
, int flag
, environment
*env
) ;
289 * Routines in tracing.c
291 int init_tracing( tsd_t
*TSD
) ;
292 void set_trace( tsd_t
*TSD
, const streng
* ) ;
293 void set_trace_char( tsd_t
*TSD
, char ) ;
294 void flush_trace_chars( tsd_t
*TSD
) ;
295 void queue_trace_char( const tsd_t
*TSD
, char ch
) ;
296 void tracenumber( const tsd_t
*TSD
, const num_descr
*num
, char type
) ;
297 void tracebool( const tsd_t
*TSD
, int value
, char type
) ;
298 int pushcallstack( const tsd_t
*TSD
, treenode
*this ) ;
299 void popcallstack( const tsd_t
*TSD
, int value
) ;
300 void traceerror( const tsd_t
*TSD
, const treenode
*this, int RC
) ;
301 void tracecompound( const tsd_t
*TSD
, const streng
*stem
, int length
, const streng
*index
, char trch
) ;
302 void starttrace( const tsd_t
*TSD
) ;
303 int intertrace( tsd_t
*TSD
) ;
304 void tracevalue( const tsd_t
*TSD
, const streng
*str
, char type
) ;
305 void traceline( const tsd_t
*TSD
, const treenode
*this, char tch
, int offset
) ;
306 void traceback( const tsd_t
*TSD
) ;
310 * Routines in interp.c
312 streng
*dointerpret( tsd_t
*TSD
, streng
*string
) ;
317 * Routines in interpret.c
319 void update_envirs( const tsd_t
*TSD
, proclevel level
) ;
320 proclevel
newlevel( tsd_t
*TSD
, proclevel oldlevel
) ;
321 void set_sigl( const tsd_t
*TSD
, int line
) ;
322 #define IPRT_BUFSIZE 2 /* buffer elements for the state in InterpreterStatus */
323 void SaveInterpreterStatus(const tsd_t
*TSD
,unsigned *state
);
324 void RestoreInterpreterStatus(const tsd_t
*TSD
,const unsigned *state
);
325 streng
*interpret( tsd_t
*TSD
, nodeptr rootnode
) ;
326 nodeptr
getlabel( const tsd_t
*TSD
, const streng
*name
) ;
327 void removelevel( tsd_t
*TSD
, proclevel level
) ;
328 int init_spec_vars( tsd_t
*TSD
) ;
332 * Routines in yaccsrc.y
335 int __reginaparse( void ) ;
336 void kill_lines( const tsd_t
*TSD
, lineboxptr first
) ;
337 void destroytree( const tsd_t
*TSD
, nodeptr
this ) ;
338 void newlabel( const tsd_t
*TSD
, internal_parser_type
*ipt
, nodeptr
this ) ;
343 * Routines in funcs.c
345 streng
*buildtinfunc( tsd_t
*TSD
, nodeptr
this ) ;
346 void deallocplink( tsd_t
*TSD
, paramboxptr first
) ;
347 paramboxptr
initplist( tsd_t
*TSD
, cnodeptr
this ) ;
348 int myatol( const tsd_t
*TSD
, const streng
*text
) ;
349 void checkparam( cparamboxptr params
, int min
, int max
, const char *name
) ;
350 char getoptionchar( tsd_t
*TSD
, const streng
*param
, const char *bif
, int argnum
, const char *ansi_options
, const char *regina_options
) ;
351 int atozpos( tsd_t
*TSD
, const streng
*text
, const char *bif
, int argnum
) ;
352 int atopos( tsd_t
*TSD
, const streng
*text
, const char *bif
, int argnum
) ;
353 int atoposorzero( tsd_t
*TSD
, const streng
*text
, const char *bif
, int argnum
) ;
354 char getonechar( tsd_t
*TSD
, const streng
*text
, const char *bif
, int argnum
) ;
355 const streng
*param( cparamboxptr ptr
, int num
) ;
356 streng
*int_to_streng( const tsd_t
*TSD
, int input
) ;
357 int convert_date(const streng
*, char, struct tm
*);
358 int convert_time(const tsd_t
*TSD
,const streng
*, char, struct tm
*, time_t *);
361 void mark_param_cache( const tsd_t
*TSD
) ;
363 void addtwostrings( char *one
, char *two
, char *answer
) ;
367 * Routines in cmath.c
369 double myatof( const tsd_t
*TSD
, const streng
*string
) ;
370 int myisnumber( const streng
*string
) ;
371 int myisinteger( const streng
*string
) ;
378 int APIENTRY
__regina_faked_main(int argc
,char *argv
[]) ;
380 int main(int argc
,char *argv
[]) ;
382 int __regina_reexecute_main(int argc
, char **argv
);
383 void mark_systeminfo( const tsd_t
*TSD
) ;
384 nodeptr
treadit( cnodeptr
) ;
385 sysinfobox
*creat_sysinfo( const tsd_t
*TSD
, streng
*envir
) ;
389 * Functions in signals.h
391 trap
*gettraps( const tsd_t
*TSD
, proclevel level
) ;
392 sigtype
*getsigs( proclevel level
) ;
393 void mark_signals( const tsd_t
*TSD
) ;
394 signal_handler
regina_signal(int signum
, signal_handler action
);
395 int condition_hook( tsd_t
*TSD
, int, int, int, int, streng
*, streng
* ) ;
396 void signal_setup( const tsd_t
*TSD
) ;
397 int identify_trap( int type
) ;
398 void set_rexx_halt( void ) ;
401 * Routines in library.c
403 int init_library( tsd_t
*TSD
) ;
404 void purge_library( const tsd_t
*TSD
);
405 void *loaded_lib_func( const tsd_t
*TSD
, const streng
*name
) ;
406 void set_err_message( const tsd_t
*TSD
, const char *message1
, const char *message2
) ;
407 int loadrxfunc( const tsd_t
*TSD
, struct library
*lptr
, const streng
*rxname
, const streng
*objnam
) ;
408 streng
*rex_rxfuncerrmsg( tsd_t
*TSD
, cparamboxptr parms
) ;
409 streng
*rex_rxfuncquery( tsd_t
*TSD
, cparamboxptr parms
) ;
410 streng
*rex_rxfuncadd( tsd_t
*TSD
, cparamboxptr parms
) ;
411 streng
*rex_rxfuncdrop( tsd_t
*TSD
, cparamboxptr parms
) ;
412 int rex_rxfuncdlldrop( tsd_t
*TSD
, const streng
* ) ;
413 int rex_rxfuncdllquery( tsd_t
*TSD
, const streng
* ) ;
416 * Functions in extlib.c
418 int addfunc( tsd_t
*TSD
, streng
*name
, int type
) ;
419 int delfunc( tsd_t
*TSD
, const streng
*name
) ;
420 int external_func( const tsd_t
*TSD
, const streng
*name
) ;
424 * functions in macros.c
426 void killsystem( tsd_t
*TSD
, sysinfo systm
) ;
427 internal_parser_type
enter_macro( tsd_t
*TSD
, const streng
*source
,
428 streng
*name
, void **ept
,
429 unsigned long *extlength
);
430 streng
*do_instore( tsd_t
*TSD
, const streng
*name
, paramboxptr args
,
431 const streng
*envir
, int *RetCode
, int hooks
,
432 const void *instore
, unsigned long instore_length
,
433 const char *instore_source
,
434 unsigned long instore_source_length
,
435 const internal_parser_type
*ipt
,
437 streng
*execute_external( tsd_t
*TSD
, const streng
*command
, paramboxptr args
, const streng
*envir
, int *RetCode
, int hooks
, int ctype
) ;
438 int count_params( cparamboxptr ptr
, int soft
) ;
439 streng
*get_parameter( paramboxptr ptr
, int number
) ;
443 * Functions in envir.c
445 streng
*perform( tsd_t
*TSD
, const streng
*command
, const streng
*envir
, cnodeptr
this ) ;
446 void add_envir( tsd_t
*TSD
, const streng
*name
, int type
, int subtype
) ;
447 int envir_exists( const tsd_t
*TSD
, const streng
*name
);
448 int init_envir( tsd_t
*TSD
) ;
449 void del_envir( tsd_t
*TSD
, const streng
*name
) ;
450 int set_envir( const tsd_t
*TSD
, const streng
*envirname
, const nodeptr ios
) ;
451 streng
*run_popen( tsd_t
*TSD
, const streng
*command
, const streng
*envir
) ;
455 * Functions in client.c
457 int init_client( tsd_t
*TSD
) ;
458 int hookup( const tsd_t
*TSD
, int type
) ;
459 int hookup_output( const tsd_t
*TSD
, int type
, const streng
*outdata
) ;
460 int hookup_output2( const tsd_t
*TSD
, int type
, const streng
*outdata1
, const streng
*outdata2
) ;
461 int hookup_input( const tsd_t
*TSD
, int type
, streng
**indata
) ;
462 int hookup_input_output( const tsd_t
*TSD
, int type
, const streng
*outdata
, streng
**indata
) ;
463 streng
*do_an_external_exe( tsd_t
*TSD
, const streng
*name
, cparamboxptr parms
, char exitonly
, char called
) ;
464 streng
*do_an_external_dll( tsd_t
*TSD
, const void *vbox
, cparamboxptr parms
, char called
) ;
465 streng
*SubCom( const tsd_t
*TSD
, const streng
*command
, const streng
*envir
, int *rc
) ;
469 * Routines in doscmd.c
471 int my_win32_setenv( const char *name
, const char *value
) ;
472 int fork_exec(tsd_t
*TSD
, environment
*env
, const char *cmdline
, void *async_info
);
473 int __regina_wait(int process
);
474 int open_subprocess_connection(const tsd_t
*TSD
, environpart
*ep
, void *async_info
);
475 void unblock_handle( int *handle
, void *async_info
);
476 void restart_file(int hdl
);
477 int __regina_close(int handle
, void *async_info
);
478 int __regina_read(int hdl
, void *buf
, unsigned size
, void *async_info
) ;
479 int __regina_write(int hdl
, const void *buf
, unsigned size
, void *async_info
) ;
480 void *create_async_info(const tsd_t
*TSD
);
481 void delete_async_info(void *async_info
);
482 void reset_async_info(void *async_info
);
483 void add_async_waiter(void *async_info
, int handle
, int add_as_read_handle
);
484 void wait_async_info(void *async_info
);
487 * Routines in aroscmd.c
494 * Routines in options.c
496 void do_options( const tsd_t
*TSD
, streng
*options
, int ) ;
497 int get_options_flag( cproclevel
, int ) ;
498 void set_options_flag( proclevel
, int, int ) ;
502 * Routines in rexxext.c
504 char *mygetenv( const tsd_t
*TSD
, const char *name
, char *buf
, int bufsize
) ;
505 streng
*rex_userid( tsd_t
*TSD
, cparamboxptr parms
) ;
506 streng
*rex_rxqueue( tsd_t
*TSD
, cparamboxptr parms
) ;
507 #if defined(WIN32) && !defined(__WINS__) && !defined(__EPOC32__)
508 void set_pause_at_exit( void );
509 void dont_pause_at_exit( void );
513 * Routines in vmscmd.c
515 int init_vms( tsd_t
*TSD
) ;
516 int vms_do_command( tsd_t
*TSD
, const streng
*cmd
, int in
, int out
, int fout
, environment
*env
) ;
517 int vms_killproc( void ) ;
518 streng
*vms_resolv_symbol( tsd_t
*TSD
, streng
*name
, streng
*new, streng
*pool
) ;
521 * Routines in builtin.c
523 int init_builtin( tsd_t
*TSD
) ;
524 streng
*std_abbrev( tsd_t
*TSD
, cparamboxptr parms
) ;
525 streng
*std_abs( tsd_t
*TSD
, cparamboxptr parms
) ;
526 streng
*std_address( tsd_t
*TSD
, cparamboxptr parms
) ;
527 streng
*std_arg( tsd_t
*TSD
, cparamboxptr parms
) ;
528 streng
*std_bitand( tsd_t
*TSD
, cparamboxptr parms
) ;
529 streng
*std_bitor( tsd_t
*TSD
, cparamboxptr parms
) ;
530 streng
*std_bitxor( tsd_t
*TSD
, cparamboxptr parms
) ;
531 streng
*std_center( tsd_t
*TSD
, cparamboxptr parms
) ;
532 streng
*std_changestr( tsd_t
*TSD
, cparamboxptr parms
) ;
533 streng
*std_compare( tsd_t
*TSD
, cparamboxptr parms
) ;
534 streng
*std_condition( tsd_t
*TSD
, cparamboxptr parms
) ;
535 streng
*std_copies( tsd_t
*TSD
, cparamboxptr parms
) ;
536 streng
*std_countstr( tsd_t
*TSD
, cparamboxptr parms
) ;
537 streng
*std_datatype( tsd_t
*TSD
, cparamboxptr parms
) ;
538 streng
*std_date( tsd_t
*TSD
, cparamboxptr parms
) ;
539 streng
*std_delstr( tsd_t
*TSD
, cparamboxptr parms
) ;
540 streng
*std_delword( tsd_t
*TSD
, cparamboxptr parms
) ;
541 streng
*std_digits( tsd_t
*TSD
, cparamboxptr parms
) ;
542 streng
*std_errortext( tsd_t
*TSD
, cparamboxptr parms
) ;
543 streng
*std_form( tsd_t
*TSD
, cparamboxptr parms
) ;
544 streng
*std_format( tsd_t
*TSD
, cparamboxptr parms
) ;
545 streng
*std_fuzz( tsd_t
*TSD
, cparamboxptr parms
) ;
546 streng
*std_insert( tsd_t
*TSD
, cparamboxptr parms
) ;
547 streng
*std_lastpos( tsd_t
*TSD
, cparamboxptr parms
) ;
548 streng
*std_length( tsd_t
*TSD
, cparamboxptr parms
) ;
549 streng
*std_left( tsd_t
*TSD
, cparamboxptr parms
) ;
550 streng
*std_max( tsd_t
*TSD
, cparamboxptr parms
) ;
551 streng
*std_min( tsd_t
*TSD
, cparamboxptr parms
) ;
552 streng
*std_overlay( tsd_t
*TSD
, cparamboxptr parms
) ;
553 streng
*std_pos( tsd_t
*TSD
, cparamboxptr parms
) ;
554 streng
*std_qualify( tsd_t
*TSD
, cparamboxptr parms
) ;
555 streng
*std_queued( tsd_t
*TSD
, cparamboxptr parms
) ;
556 streng
*std_right( tsd_t
*TSD
, cparamboxptr parms
) ;
557 streng
*std_reverse( tsd_t
*TSD
, cparamboxptr parms
) ;
558 streng
*std_random( tsd_t
*TSD
, cparamboxptr parms
) ;
559 streng
*std_sign( tsd_t
*TSD
, cparamboxptr parms
) ;
560 streng
*std_sourceline( tsd_t
*TSD
, cparamboxptr parms
) ;
561 streng
*std_space( tsd_t
*TSD
, cparamboxptr parms
) ;
562 streng
*std_strip( tsd_t
*TSD
, cparamboxptr parms
) ;
563 streng
*std_substr( tsd_t
*TSD
, cparamboxptr parms
) ;
564 streng
*std_subword( tsd_t
*TSD
, cparamboxptr parms
) ;
565 streng
*std_symbol( tsd_t
*TSD
, cparamboxptr parms
) ;
566 streng
*std_time( tsd_t
*TSD
, cparamboxptr parms
) ;
567 streng
*std_trace( tsd_t
*TSD
, cparamboxptr parms
) ;
568 streng
*std_translate( tsd_t
*TSD
, cparamboxptr parms
) ;
569 streng
*std_trunc( tsd_t
*TSD
, cparamboxptr parms
) ;
570 streng
*std_value( tsd_t
*TSD
, cparamboxptr parms
) ;
571 streng
*std_verify( tsd_t
*TSD
, cparamboxptr parms
) ;
572 streng
*std_word( tsd_t
*TSD
, cparamboxptr parms
) ;
573 streng
*std_wordindex( tsd_t
*TSD
, cparamboxptr parms
) ;
574 streng
*std_wordlength( tsd_t
*TSD
, cparamboxptr parms
) ;
575 streng
*std_wordpos( tsd_t
*TSD
, cparamboxptr parms
) ;
576 streng
*std_words( tsd_t
*TSD
, cparamboxptr parms
) ;
577 streng
*std_xrange( tsd_t
*TSD
, cparamboxptr parms
) ;
580 * Routines in convert.c
582 streng
*std_b2x( tsd_t
*TSD
, cparamboxptr parms
) ;
583 streng
*std_c2d( tsd_t
*TSD
, cparamboxptr parms
) ;
584 streng
*std_c2x( tsd_t
*TSD
, cparamboxptr parms
) ;
585 streng
*std_d2c( tsd_t
*TSD
, cparamboxptr parms
) ;
586 streng
*std_d2x( tsd_t
*TSD
, cparamboxptr parms
) ;
587 streng
*std_x2b( tsd_t
*TSD
, cparamboxptr parms
) ;
588 streng
*std_x2c( tsd_t
*TSD
, cparamboxptr parms
) ;
589 streng
*std_x2d( tsd_t
*TSD
, cparamboxptr parms
) ;
592 * Routines in dbgfuncs.c
595 streng
*dbg_freelists( tsd_t
*TSD
, cparamboxptr parms
) ;
599 streng
*dbg_allocated( tsd_t
*TSD
, cparamboxptr parms
) ;
601 streng
*dbg_dumpvars( tsd_t
*TSD
, cparamboxptr parms
) ;
602 streng
*dbg_dumptree( tsd_t
*TSD
, cparamboxptr parms
) ;
604 streng
*dbg_listleaked( tsd_t
*TSD
, cparamboxptr parms
) ;
605 streng
*dbg_memorystats( tsd_t
*TSD
, cparamboxptr parms
) ;
606 # endif /* TRACEMEM */
608 streng
*dbg_traceback( tsd_t
*TSD
, cparamboxptr parms
) ;
611 * Routines in vmsfuncs.c
614 streng
*vms_f_directory( tsd_t
*TSD
, cparamboxptr parms
) ;
615 streng
*vms_f_file_attributes( tsd_t
*TSD
, cparamboxptr parms
) ;
616 streng
*vms_f_getdvi( tsd_t
*TSD
, cparamboxptr parms
) ;
617 streng
*vms_f_getjpi( tsd_t
*TSD
, cparamboxptr parms
) ;
618 streng
*vms_f_getqui( tsd_t
*TSD
, cparamboxptr parms
) ;
619 streng
*vms_f_getsyi( tsd_t
*TSD
, cparamboxptr parms
) ;
620 streng
*vms_f_identifier( tsd_t
*TSD
, cparamboxptr parms
) ;
621 streng
*vms_f_message( tsd_t
*TSD
, cparamboxptr parms
) ;
622 streng
*vms_f_mode( tsd_t
*TSD
, cparamboxptr parms
) ;
623 streng
*vms_f_pid( tsd_t
*TSD
, cparamboxptr parms
) ;
624 streng
*vms_f_privilege( tsd_t
*TSD
, cparamboxptr parms
) ;
625 streng
*vms_f_process( tsd_t
*TSD
, cparamboxptr parms
) ;
626 streng
*vms_f_string( tsd_t
*TSD
, cparamboxptr parms
) ;
627 streng
*vms_f_time( tsd_t
*TSD
, cparamboxptr parms
) ;
628 streng
*vms_f_setprv( tsd_t
*TSD
, cparamboxptr parms
) ;
629 streng
*vms_f_user( tsd_t
*TSD
, cparamboxptr parms
) ;
630 streng
*vms_f_locate( tsd_t
*TSD
, cparamboxptr parms
) ;
631 streng
*vms_f_length( tsd_t
*TSD
, cparamboxptr parms
) ;
632 streng
*vms_f_integer( tsd_t
*TSD
, cparamboxptr parms
) ;
633 streng
*vms_f_trnlnm( tsd_t
*TSD
, cparamboxptr parms
) ;
634 streng
*vms_f_logical( tsd_t
*TSD
, cparamboxptr parms
) ;
635 streng
*vms_f_parse( tsd_t
*TSD
, cparamboxptr parms
) ;
636 streng
*vms_f_search( tsd_t
*TSD
, cparamboxptr parms
) ;
637 streng
*vms_f_type( tsd_t
*TSD
, cparamboxptr parms
) ;
638 streng
*vms_f_file_attributes( tsd_t
*TSD
, cparamboxptr parms
) ;
639 streng
*vms_f_extract( tsd_t
*TSD
, cparamboxptr parms
) ;
640 streng
*vms_f_element( tsd_t
*TSD
, cparamboxptr parms
) ;
641 streng
*vms_f_cvui( tsd_t
*TSD
, cparamboxptr parms
) ;
642 streng
*vms_f_cvsi( tsd_t
*TSD
, cparamboxptr parms
) ;
643 streng
*vms_f_cvtime( tsd_t
*TSD
, cparamboxptr parms
) ;
644 streng
*vms_f_fao( tsd_t
*TSD
, cparamboxptr parms
) ;
648 * Routines in unxfuncs.c
650 streng
*unx_getpath( tsd_t
*TSD
, cparamboxptr dummy
) ;
651 streng
*unx_popen( tsd_t
*TSD
, cparamboxptr parms
) ;
652 streng
*unx_getpid( tsd_t
*TSD
, cparamboxptr parms
) ;
653 streng
*unx_gettid( tsd_t
*TSD
, cparamboxptr parms
) ;
654 streng
*unx_eof( tsd_t
*TSD
, cparamboxptr parms
) ;
655 streng
*unx_uname( tsd_t
*TSD
, cparamboxptr parms
) ;
656 streng
*unx_fork( tsd_t
*TSD
, cparamboxptr parms
) ;
657 streng
*unx_unixerror( tsd_t
*TSD
, cparamboxptr parms
) ;
658 streng
*unx_chdir( tsd_t
*TSD
, cparamboxptr parms
) ;
659 streng
*unx_getenv( tsd_t
*TSD
, cparamboxptr parms
) ;
660 streng
*unx_crypt( tsd_t
*TSD
, cparamboxptr parms
) ;
663 * Routines in os2funcs.c
665 streng
*os2_directory( tsd_t
*TSD
, cparamboxptr parms
) ;
666 streng
*os2_beep( tsd_t
*TSD
, cparamboxptr parms
) ;
667 streng
*os2_filespec( tsd_t
*TSD
, cparamboxptr parms
) ;
670 * Routines in rexxsaa.c
672 int init_rexxsaa( tsd_t
*TSD
) ;
673 void deinit_rexxsaa( tsd_t
*TSD
) ;
676 * Routines in vmsfuncs.c
678 int init_vmf( tsd_t
*TSD
) ;
681 * Routines in wrappers.c
683 void *wrapper_load( const tsd_t
*TSD
, const streng
*module
) ;
684 PFN
wrapper_get_addr( const tsd_t
*TSD
, const struct library
*lptr
, const streng
*name
) ;
687 * Routines in strings.c
688 * string and streng routines are ugly but we need the speedup of passing the
689 * TSD to take profit from flists in the multi-threading environment.
691 #if !defined(FLISTS) || defined(TRACEMEM)
692 streng
*__regina_Str_make( int size
) ;
693 streng
*__regina_Str_make_TSD( const tsd_t
*TSD
, int size
) ;
694 # define Str_make(a) __regina_Str_make(a)
695 # define Str_make_TSD(TSD,a) __regina_Str_make_TSD(TSD,a)
696 # define Str_makeTSD(size) Str_make_TSD(TSD,size)
698 # define Str_make(a) get_a_streng(a)
699 # define Str_make_TSD(TSD,a) get_a_strengTSD(TSD,a)
700 # define Str_makeTSD(a) get_a_strengTSD(TSD,a)
702 #define nullstringptr() Str_makeTSD(0)
703 streng
*Str_ndup( const streng
*name
, int length
) ;
704 streng
*Str_ndup_TSD( const tsd_t
*TSD
, const streng
*name
, int length
) ;
705 #define Str_ndupTSD(name,length) Str_ndup_TSD(TSD,name,length)
706 streng
*Str_nodup( const streng
*name
, int length
, int offset
) ;
707 streng
*Str_nodup_TSD( const tsd_t
*TSD
, const streng
*name
, int offset
, int length
) ;
708 #define Str_nodupTSD(name,length,offset) Str_nodup_TSD(TSD,name,length,offset)
709 streng
*Str_dup( const streng
*name
) ;
710 streng
*Str_dup_TSD( const tsd_t
*TSD
, const streng
*input
) ;
711 #define Str_dupTSD(name) Str_dup_TSD(TSD,name)
712 streng
*Str_dupstr( const streng
*name
) ;
713 streng
*Str_dupstr_TSD( const tsd_t
*TSD
, const streng
*input
) ;
714 #define Str_dupstrTSD(name) Str_dupstr_TSD(TSD,name)
715 streng
*Str_ncpy( streng
*to
, const streng
*from
, int length
) ;
716 streng
*Str_ncpy_TSD( const tsd_t
*TSD
, streng
*to
, const streng
*from
, int length
) ;
717 #define Str_ncpyTSD(to,from,length) Str_ncpy_TSD(TSD,to,from,length)
718 streng
*Str_ncre( const char *from
, int length
) ;
719 streng
*Str_ncre_TSD( const tsd_t
*TSD
, const char *from
, int length
) ;
720 #define Str_ncreTSD(from,length) Str_ncre_TSD(TSD,from,length)
721 streng
*Str_cat( streng
*to
, const streng
*from
) ;
722 streng
*Str_cat_TSD( const tsd_t
*TSD
, streng
*first
, const streng
*second
) ;
723 #define Str_catTSD(first,second) Str_cat_TSD(TSD,first,second)
724 streng
*Str_ncat( streng
*to
, const streng
*from
, int length
) ;
725 streng
*Str_ncat_TSD( const tsd_t
*TSD
, streng
*first
, const streng
*second
, int length
) ;
726 #define Str_ncatTSD(first,second,length) Str_ncat_TSD(TSD,first,second,length)
727 streng
*Str_nocat( streng
*to
, const streng
*from
, int length
, int offset
) ;
728 streng
*Str_nocat_TSD( const tsd_t
*TSD
, streng
*first
, const streng
*second
, int length
, int offset
) ;
729 #define Str_nocatTSD(first,second,length,offset) Str_nocat_TSD(TSD,first,second,length,offset)
730 int Str_ncmp( const streng
*one
, const streng
*two
, int length
) ;
731 int Str_cmp( const streng
*one
, const streng
*two
) ;
732 int Str_ccmp( const streng
*one
, const streng
*two
) ;
733 int Str_cncmp( const streng
*one
, const streng
*two
, int length
) ;
734 int Str_cnocmp( const streng
*one
, const streng
*two
, int length
, int offset
) ;
735 streng
*Str_cre( const char *value
) ;
736 streng
*Str_cre_TSD( const tsd_t
*TSD
, const char *input
) ;
737 #define Str_creTSD(value) Str_cre_TSD(TSD,value)
738 streng
*Str_crestr( const char *value
);
739 streng
*Str_crestr_TSD( const tsd_t
*TSD
, const char *input
) ;
740 #define Str_crestrTSD(input) Str_crestr_TSD(TSD,input)
741 streng
*Str_catstr( streng
*in
, const char *more
) ;
742 streng
*Str_catstr_TSD( const tsd_t
*TSD
, streng
*base
, const char *append
) ;
743 #define Str_catstrTSD(base,append) Str_catstr_TSD(TSD,base,append)
744 streng
*Str_ncatstr( streng
*base
, const char *input
, int length
) ;
745 streng
*Str_ncatstr_TSD( const tsd_t
*TSD
, streng
*base
, const char *input
, int length
) ;
746 #define Str_ncatstrTSD(base,input,length) Str_ncatstr_TSD(TSD,base,input,length)
747 char *str_of( const tsd_t
*TSD
, const streng
*input
) ;
748 #define str_ofTSD(input) str_of(TSD,input)
749 volatile char *tmpstr_of( tsd_t
*TSD
, const streng
*input
) ;
750 streng
*Str_upper( streng
*in
) ;
751 char *str_trans( char *str
, char oldch
, char newch
) ;
752 streng
*Str_strp( streng
* input
, char chr
, char opt
) ;
753 int mem_cmpic( const char *buf1
, const char *buf2
, int len
) ;
756 * Routines in strmath.c
758 #define DIVTYPE_NORMAL 0
759 #define DIVTYPE_INTEGER 1
760 #define DIVTYPE_REMINDER 2
761 #define DIVTYPE_BOTH 3 /* use only with str_div directly ! */
763 int descr_sign( const void * ) ;
764 streng
*str_add( const tsd_t
*TSD
, const void*, const streng
* ) ;
765 streng
*str_trunc( const tsd_t
*TSD
, const streng
*, int ) ;
766 streng
*str_normalize( const tsd_t
*TSD
, const streng
* ) ;
767 streng
*str_digitize( const tsd_t
*TSD
, const streng
*, int, int ) ;
768 streng
*str_format( tsd_t
*TSD
, const streng
*, int, int, int, int ) ;
769 streng
*str_binerize( const tsd_t
*TSD
, const streng
*, int ) ;
770 int str_true( const tsd_t
*TSD
, const streng
* ) ;
771 streng
*str_abs( const tsd_t
*TSD
, const streng
* ) ;
772 num_descr
* get_a_descr( const tsd_t
*TSD
, const streng
* ) ;
773 void free_a_descr( const tsd_t
*TSD
, num_descr
* ) ;
775 void mark_descrs( const tsd_t
*TSD
) ;
777 int init_math( tsd_t
*TSD
) ;
778 void descr_copy( const tsd_t
*TSD
, const num_descr
*f
, num_descr
*s
) ;
779 num_descr
*string_incr( const tsd_t
*TSD
, num_descr
* ) ;
780 void string_mul( const tsd_t
*TSD
, const num_descr
*f
, const num_descr
*s
, num_descr
*r
) ;
781 void string_div( const tsd_t
*TSD
, const num_descr
*f
, const num_descr
*s
, num_descr
*r
, num_descr
*r2
, int type
) ;
782 int myiswnumber( const tsd_t
*TSD
, const streng
*number
) ;
783 void str_round( num_descr
*descr
, int size
) ;
784 void string_pow( const tsd_t
*TSD
, const num_descr
*num
, int power
, num_descr
*acc
, num_descr
*res
) ;
785 int descr_to_int( const num_descr
*input
) ;
786 num_descr
*is_a_descr( const tsd_t
*TSD
, const streng
*input
) ;
787 int getdescr( const tsd_t
*TSD
, const streng
*num
, num_descr
*descr
) ;
788 int string_test( const tsd_t
*TSD
, const num_descr
*fdescr
, const num_descr
*sdescr
) ;
789 void string_add( const tsd_t
*TSD
, const num_descr
*f
, const num_descr
*s
, num_descr
*r
) ;
790 void str_strip( num_descr
*num
) ;
791 streng
*str_norm( const tsd_t
*TSD
, num_descr
*in
, streng
*try ) ;
792 int streng_to_int( const tsd_t
*TSD
, const streng
*input
, int *error
) ;
795 * Routines in instore.c
798 void EndProg(nodeptr Start
);
799 nodeptr
FreshNode(void);
800 void RejectNode(nodeptr NoLongerUsed
);
801 offsrcline
*FreshLine(void);
802 void DestroyInternalParsingTree(const tsd_t
*TSD
, internal_parser_type
*ipt
);
803 external_parser_type
*TinTree(const tsd_t
*TSD
,
804 const internal_parser_type
*ipt
,
805 unsigned long *length
);
806 internal_parser_type
ExpandTinnedTree(const tsd_t
*TSD
,
807 const external_parser_type
*ept
,
808 unsigned long length
,
809 const char *incore_source
,
810 unsigned long incore_source_length
);
811 int IsValidTin(const external_parser_type
*ept
, unsigned long eptlen
);
814 * Routines in arexxfuncs.c
816 int init_arexxf( tsd_t
*TSD
);
817 streng
*arexx_open ( tsd_t
*TSD
, cparamboxptr parm1
);
818 streng
*arexx_close( tsd_t
*TSD
, cparamboxptr parm1
);
819 streng
*arexx_writech( tsd_t
*TSD
, cparamboxptr parm1
);
820 streng
*arexx_writeln( tsd_t
*TSD
, cparamboxptr parm1
);
821 streng
*arexx_seek( tsd_t
*TSD
, cparamboxptr parm1
);
822 streng
*arexx_readch( tsd_t
*TSD
, cparamboxptr parm1
);
823 streng
*arexx_readln( tsd_t
*TSD
, cparamboxptr parm1
);
824 streng
*arexx_eof( tsd_t
*TSD
, cparamboxptr parm1
);
825 streng
*arexx_b2c( tsd_t
*TSD
, cparamboxptr parm1
);
826 streng
*arexx_c2b( tsd_t
*TSD
, cparamboxptr parm1
);
827 streng
*arexx_bitchg( tsd_t
*TSD
, cparamboxptr parm1
);
828 streng
*arexx_bitclr( tsd_t
*TSD
, cparamboxptr parm1
);
829 streng
*arexx_bitset( tsd_t
*TSD
, cparamboxptr parm1
);
830 streng
*arexx_bittst( tsd_t
*TSD
, cparamboxptr parm1
);
831 streng
*arexx_bitcomp( tsd_t
*TSD
, cparamboxptr parm1
);
832 streng
*arexx_hash( tsd_t
*TSD
, cparamboxptr parm1
);
833 streng
*arexx_compress( tsd_t
*TSD
, cparamboxptr parm1
);
834 streng
*arexx_trim( tsd_t
*TSD
, cparamboxptr parm1
);
835 streng
*arexx_upper( tsd_t
*TSD
, cparamboxptr parm1
);
836 streng
*arexx_randu( tsd_t
*TSD
, cparamboxptr parm1
);
837 streng
*arexx_getspace( tsd_t
*TSD
, cparamboxptr parm1
);
838 streng
*arexx_freespace( tsd_t
*TSD
, cparamboxptr parm1
);
839 streng
*arexx_import( tsd_t
*TSD
, cparamboxptr parm1
);
840 streng
*arexx_export( tsd_t
*TSD
, cparamboxptr parm1
);
841 streng
*arexx_storage( tsd_t
*TSD
, cparamboxptr parm1
);
842 streng
*arexx_show( tsd_t
*TSD
, cparamboxptr parm1
);
844 #if defined(_AMIGA) || defined(__AROS__)
846 * Routines in amigafuncs.c
848 int init_amigaf( tsd_t
*TSD
);
849 streng
*amiga_show( tsd_t
*TSD
, cparamboxptr parm1
);
850 streng
*amiga_addlib( tsd_t
*TSD
, cparamboxptr parm1
);
851 streng
*amiga_remlib( tsd_t
*TSD
, cparamboxptr parm1
);
852 streng
*try_func_amiga( tsd_t
*TSD
, const streng
*name
, cparamboxptr parms
, char called
);
853 streng
*amiga_setclip( tsd_t
*TSD
, cparamboxptr parm1
);
854 streng
*amiga_getclip( tsd_t
*TSD
, cparamboxptr parm1
);
855 streng
*amiga_pragma( tsd_t
*TSD
, cparamboxptr parm1
);
859 ******************************************************************************
860 ******************************************************************************
861 ******************************************************************************
865 /* externals which are protected by regina_parser (see lexsrc.l) */
866 extern internal_parser_type parser_data
;
867 extern int retlength
; /* value shared by lexsrc.l and yaccsrc.y only */
868 extern char retvalue
[] ; /* value shared by lexsrc.l and yaccsrc.y only */
869 extern char *__reginatext
; /* value shared by lexsrc.l and yaccsrc.y only */
870 extern unsigned SymbolDetect
; /* value shared by lexsrc.l and yaccsrc.y only */
871 #define SD_INPUT 0x00000001
872 #define SD_OUTPUT 0x00000002
873 #define SD_ERROR 0x00000004
874 #define SD_NORMAL 0x00000008
875 #define SD_APPEND 0x00000010
876 #define SD_REPLACE 0x00000020
877 #define SD_STREAM 0x00000040
878 #define SD_STEM 0x00000080
879 #define SD_LIFO 0x00000100
880 #define SD_FIFO 0x00000200
881 #define SD_ADDRWITH 0x000003FF /* All the above */
883 extern int __reginadebug
;
885 /* end of externals protected by regina_parser (see lexsrc.l) */
887 extern unsigned countthreads
; /* Not protected and not save in use! */
889 extern const char *months
[];
890 extern const char *signalnames
[];
891 extern const streng RC_name
;
892 extern const streng SIGL_name
;
893 extern const streng
*RESULT_name
;
894 extern const streng
*dotRS_name
;
895 extern const unsigned char u_to_l
[];
896 extern const char *numeric_forms
[] ;
897 extern const char *invo_strings
[] ;
898 extern const char *argv0
;
900 /* Don't terminate the following lines by a semicolon */
901 EXPORT_GLOBAL_PROTECTION_VAR(regina_globals
)