aboutsummaryrefslogtreecommitdiffstats
path: root/scm.h
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:25 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:25 -0800
commit3278b75942bdbe706f7a0fba87729bb1e935b68b (patch)
treedcad4048dfc0b38367047426b2b14501bf5ff257 /scm.h
parentdb04688faa20f3576257c0fe41752ec435beab9a (diff)
downloadscm-3278b75942bdbe706f7a0fba87729bb1e935b68b.tar.gz
scm-3278b75942bdbe706f7a0fba87729bb1e935b68b.zip
Import Upstream version 5d2upstream/5d2
Diffstat (limited to 'scm.h')
-rw-r--r--scm.h267
1 files changed, 175 insertions, 92 deletions
diff --git a/scm.h b/scm.h
index 1af22f1..03c2ee3 100644
--- a/scm.h
+++ b/scm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1990-1999 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111, USA.
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
@@ -56,10 +56,19 @@ typedef struct {SCM car, cdr;} cell;
typedef struct {long sname;SCM (*cproc)();} subr;
typedef struct {long sname;double (*dproc)();} dsubr;
typedef struct {const char *string;SCM (*cproc)();} iproc;
+typedef struct {const char *name;} subr_info;
#include <stdio.h>
#include "scmfig.h"
+typedef struct {
+ sizet eltsize;
+ sizet len;
+ sizet alloclen;
+ sizet maxlen;
+ char *what;
+ char *elts;} scm_gra;
+
#ifdef USE_ANSI_PROTOTYPES
# define P(s) s
#else
@@ -78,19 +87,31 @@ typedef struct {
} smobfuns;
typedef struct {
+ char *name;
SCM (*mark)P((SCM ptr));
int (*free)P((FILE *p));
int (*print)P((SCM exp, SCM port, int writing));
SCM (*equalp)P((SCM, SCM));
int (*fputc)P((int c, FILE *p));
- int (*fputs)P((char *s, FILE *p));
- sizet (*fwrite)P((char *s, sizet siz, sizet num, FILE *p));
+/* int (*fputs)P((char *s, FILE *p)); */
+/* sizet (*fwrite)P((char *s, sizet siz, sizet num, FILE *p)); */
+ int (*fputs)P((const char *s, FILE *p));
+ sizet (*fwrite)P((const void *s, sizet siz, sizet num, FILE *p));
int (*fflush)P((FILE *stream));
int (*fgetc)P((FILE *p));
int (*fclose)P((FILE *p));
} ptobfuns;
typedef struct {
+ long flags;
+ int unread;
+ long line;
+ short col;
+ short colprev;
+ SCM data;
+} port_info;
+
+typedef struct {
SCM v;
sizet base;
} array;
@@ -100,11 +121,6 @@ typedef struct {
long inc;
} array_dim;
-#ifndef INUMS_ONLY
-# define NUM_HP_MAX_REQ 4*sizeof(double)
-
-#endif
-
#ifdef FLOATS
typedef struct {char *string;double (*cproc)P((double));} dblproc;
# ifdef SINGLES
@@ -144,7 +160,7 @@ typedef struct {SCM type;double *real;} dbl;
#define IFLAGP(n) ((0x87 & (int)(n))==4)
#define ISYMNUM(n) (((int)((n)>>9)) & 0x7f)
#define ISYMVAL(n) ((int)((n)>>16))
-#define ISYMSETVAL(isym, val) ((isym) | ((long)(val) <<16))
+#define MAKISYMVAL(isym, val) ((isym) | ((long)(val) <<16))
#define ISYMCHARS(n) (isymnames[ISYMNUM(n)])
#define MAKSPCSYM(n) (((n)<<9)+((n)<<3)+4L)
#define MAKISYM(n) (((n)<<9)+0x74L)
@@ -211,15 +227,16 @@ extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
# define EOL MAKIFLAG(NUM_ISYMS+4)
#endif
#define UNSPECIFIED MAKIFLAG(NUM_ISYMS+5)
+#define NUM_IFLAGS NUM_ISYMS+6
-/* Now some unnamed flags used as magic cookies by repl_driver. */
+/* Now some unnamed flags used as magic cookies by scm_top_level. */
/* Argument n can range from -4 to 16 */
#ifdef SHORT_INT
# define COOKIE(n) (n)
# define UNCOOK(f) (f)
#else
-# define COOKIE(n) MAKIFLAG(NUM_ISYMS+6+4+n)
-# define UNCOOK(f) (ISYMNUM(f)-(NUM_ISYMS+6+4))
+# define COOKIE(n) MAKIFLAG(NUM_IFLAGS+4+n)
+# define UNCOOK(f) (ISYMNUM(f)-(NUM_IFLAGS+4))
#endif
#define FALSEP(x) (BOOL_F==(x))
@@ -267,8 +284,12 @@ extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
#else
# define SCM_ESTK_FRLEN 2
#endif
-#define SCM_ESTK_BASE (2*SCM_ESTK_FRLEN)
+#define SCM_ESTK_BASE 4
+#define SCM_ESTK_PARENT(v) (VELTS(v)[0])
+#define SCM_ESTK_PARENT_WRITABLEP(v) (VELTS(v)[1])
+#define SCM_ESTK_PARENT_INDEX(v) (VELTS(v)[2])
extern long tc16_env;
+#define ENVP(x) (tc16_env==TYP16(x))
#define PORTP(x) (TYP7(x)==tc7_port)
#define OPPORTP(x) (((0x7f | OPN) & CAR(x))==(tc7_port | OPN))
@@ -286,14 +307,15 @@ extern long tc16_env;
#define CLOSEDP(x) (!OPENP(x))
#define STREAM(x) ((FILE *)(CDR(x)))
#define SETSTREAM SETCDR
-#define CRDYP(port) (CAR(port) & CRDY)
-#define CLRDY(port) {CAR(port) &= CUC;}
-#define CGETUN(port) ((unsigned char)SRS(CAR(port), 22))
-#define CUNGET(c, port) {CAR(port) += ((long)c<<22) + CRDY;}
+#define CRDYP(port) ((CAR(port) & CRDY) && (EOF != CGETUN(port)))
+#define CLRDY(port) (CAR(port) &= (SCM_PORTFLAGS(port) | (~0xf0000)))
+ /* #define CRDYP(port) (CAR(port) & CRDY)
+ #define CLRDY(port) (CAR(port) &= (~CRDY)) */
+#define CGETUN(port) (scm_port_table[SCM_PORTNUM(port)].unread)
#define tc_socket (tc7_port | OPN)
#define SOCKP(x) (((0x7f | OPN | RDNG | WRTNG) & CAR(x))==(tc_socket))
-#define SOCKTYP(x) (CAR(x)>>24)
+#define SOCKTYP(x) (INUM(SCM_PORTDATA(x)))
#define DIRP(x) (NIMP(x) && (TYP16(x)==(tc16_dir)))
#define OPDIRP(x) (NIMP(x) && (CAR(x)==(tc16_dir | OPN)))
@@ -328,14 +350,16 @@ extern long tc16_env;
#define BIGP(x) (TYP16S(x)==tc16_bigpos)
#define BIGSIGN(x) (0x0100 & (int)CAR(x))
#define BDIGITS(x) ((BIGDIG *)(CDR(x)))
-#define NUMDIGS(x) ((sizet)(CAR(x)>>16))
-#define SETNUMDIGS(x, v, t) CAR(x) = (((v)+0L)<<16)+(t)
+#define NUMDIGS(x) ((sizet)(((unsigned long)CAR(x))>>16))
+#define MAKE_NUMDIGS(v, t) ((((v)+0L)<<16)+(t))
+#define SETNUMDIGS(x, v, t) CAR(x) = MAKE_NUMDIGS(v, t)
-#define SNAME(x) ((CAR(x)>>8)?(SCM)(heap_org+(CAR(x)>>8)):nullstr)
+#define SNAME(x) ((char *)(subr_table[NUMDIGS(x)].name))
#define SUBRF(x) (((subr *)(SCM2PTR(x)))->cproc)
#define DSUBRF(x) (((dsubr *)(SCM2PTR(x)))->dproc)
#define CCLO_SUBR(x) (VELTS(x)[0])
#define CCLO_LENGTH NUMDIGS
+#define CXR_OP SMOBNUM
#define SYMBOLP(x) (TYP7S(x)==tc7_ssymbol)
#define STRINGP(x) (TYP7(x)==tc7_string)
@@ -343,8 +367,9 @@ extern long tc16_env;
#define VECTORP(x) (TYP7(x)==tc7_vector)
#define NVECTORP(x) (!VECTORP(x))
#define LENGTH(x) (((unsigned long)CAR(x))>>8)
-#define LENGTH_MAX (0xffffffL)
-#define SETLENGTH(x, v, t) CAR(x) = ((v)<<8)+(t)
+#define LENGTH_MAX (((unsigned long)-1L)>>8)
+#define MAKE_LENGTH(v, t) ((((v)+0L)<<8) + (t))
+#define SETLENGTH(x, v, t) CAR(x) = MAKE_LENGTH(v, t)
#define CHARS(x) ((char *)(CDR(x)))
#define UCHARS(x) ((unsigned char *)(CDR(x)))
#define VELTS(x) ((SCM *)CDR(x))
@@ -364,8 +389,11 @@ extern long tc16_array;
#define FREEP(x) (CAR(x)==tc_free_cell)
#define NFREEP(x) (!FREEP(x))
-#define SMOBNUM(x) (0x0ff & (CAR(x)>>8));
-#define PTOBNUM(x) (0x0ff & (CAR(x)>>8));
+#define SMOBNUM(x) (0x0ff & (CAR(x)>>8))
+#define PTOBNUM(x) (0x0ff & (CAR(x)>>8))
+#define SCM_PORTNUM(x) ((int)(((unsigned long)CAR(x))>>20))
+#define SCM_PORTFLAGS(x) (scm_port_table[SCM_PORTNUM(x)].flags)
+#define SCM_PORTDATA(x) (scm_port_table[SCM_PORTNUM(x)].data)
#define DIGITS '0':case '1':case '2':case '3':case '4':\
case '5':case '6':case '7':case '8':case '9'
@@ -402,6 +430,9 @@ extern long tc16_array;
case tc7_subr_2o:case tc7_lsubr_2:case tc7_lsubr
#define tcs_symbols tc7_ssymbol:case tc7_msymbol
#define tcs_bignums tc16_bigpos:case tc16_bigneg
+#define tcs_uves tc7_string:case tc7_bvect:\
+ case tc7_uvect:case tc7_ivect:case tc7_svect:\
+ case tc7_fvect:case tc7_dvect:case tc7_cvect
#define tc3_cons_nimcar 0
#define tc3_cons_imcar 2:case 4:case 6
@@ -416,7 +447,8 @@ extern long tc16_array;
/* spare 23 */
#define tc7_ivect 29
#define tc7_uvect 31
-/* spare 37 39 */
+#define tc7_svect 37
+/* spare 39 */
#define tc7_fvect 45
#define tc7_dvect 47
#define tc7_cvect 53
@@ -444,6 +476,7 @@ extern long tc16_array;
#define tc16_apply (tc7_specfun | (0L<<8))
#define tc16_call_cc (tc7_specfun | (1L<<8))
#define tc16_cclo (tc7_specfun | (2L<<8))
+#define tc16_eval (tc7_specfun | (3L<<8))
#define tc16_flo 0x017f
#define tc_flo 0x017fL
@@ -459,14 +492,26 @@ extern long tc16_array;
#define OPN (1L<<16)
#define RDNG (2L<<16)
#define WRTNG (4L<<16)
-#define BUF0 (8L<<16)
-#define CRDY (32L<<16)
-#define CUC 0x001fffffL
-
-extern sizet numsmob, numptob;
-extern smobfuns *smobs;
-extern ptobfuns *ptobs;
-extern ptobfuns pipob;
+#define CRDY (8L<<16)
+#define TRACKED (16L<<16)
+#define BINARY (32L<<16)
+#define BUF0 (64L<<16)
+ /* LSB is used for gc mark */
+
+extern scm_gra subr_table_gra;
+#define subr_table ((subr_info *)(subr_table_gra.elts))
+/* extern sizet numsmob, numptob;
+ extern smobfuns *smobs;
+ extern ptobfuns *ptobs;
+ extern ptobfuns pipob; */
+extern scm_gra smobs_gra;
+#define numsmob (smobs_gra.len)
+#define smobs ((smobfuns *)(smobs_gra.elts))
+extern scm_gra ptobs_gra;
+#define numptob (ptobs_gra.len)
+#define ptobs ((ptobfuns *)(ptobs_gra.elts))
+extern port_info *scm_port_table;
+
#define tc16_fport (tc7_port + 0*256L)
#define tc16_pipe (tc7_port + 1*256L)
#define tc16_strport (tc7_port + 2*256L)
@@ -481,25 +526,31 @@ extern SCM sys_protects[];
#define def_outp sys_protects[4]
#define def_errp sys_protects[5]
#define sys_errp sys_protects[6]
-#define listofnull sys_protects[7]
-#define undefineds sys_protects[8]
-#define nullvect sys_protects[9]
-#define nullstr sys_protects[10]
-#define progargs sys_protects[11]
-#define transcript sys_protects[12]
-#define rootcont sys_protects[13]
-#define dynwinds sys_protects[14]
+#define sys_safep sys_protects[7]
+#define listofnull sys_protects[8]
+#define undefineds sys_protects[9]
+#define nullvect sys_protects[10]
+#define nullstr sys_protects[11]
+#define progargs sys_protects[12]
+#define loadports sys_protects[13]
+#define rootcont sys_protects[14]
+#define dynwinds sys_protects[15]
#ifdef FLOATS
-# define flo0 sys_protects[15]
-# define NUM_PROTECTS 16
+# define flo0 sys_protects[16]
+# define NUM_PROTECTS 17
#else
-# define NUM_PROTECTS 15
+# define NUM_PROTECTS 16
#endif
/* now for connects between source files */
-extern sizet num_finals;
-extern void (**finals)P((void));
+/* extern sizet num_finals;
+ extern void (**finals)P((void));
+ extern sizet num_finals; */
+extern scm_gra finals_gra;
+#define num_finals (finals_gra.len)
+#define finals ((void (**)())(finals_gra.elts))
+
extern unsigned char upcase[], downcase[];
extern SCM symhash;
extern int symhash_dim;
@@ -513,17 +564,20 @@ extern long mtrigger;
extern SCM *loc_loadpath;
extern SCM *loc_errobj;
extern SCM loadport;
-extern long linum;
-extern int errjmp_bad, ints_disabled, output_deferred;
+extern char *errjmp_bad;
+extern int ints_disabled, output_deferred;
extern unsigned long SIG_deferred;
extern SCM exitval;
extern int cursinit;
extern unsigned int poll_count, tick_count;
extern int dumped;
extern char *execpath;
+extern char s_no_execpath[];
extern int scm_verbose;
#define verbose (scm_verbose+0)
+extern const char dirsep[];
+
/* strings used in several source files */
extern char s_read[], s_write[], s_newline[], s_system[];
@@ -545,7 +599,7 @@ extern char s_call_cc[];
extern void (* deferred_proc) P((void));
void process_signals P((void));
int handle_it P((int i));
-SCM must_malloc_cell P((long len, char *what));
+SCM must_malloc_cell P((long len, SCM c, char *what));
void must_realloc_cell P((SCM z, long olen, long len, char *what));
char *must_malloc P((long len, char *what));
char *must_realloc P((char *where, long olen, long len, char *what));
@@ -559,12 +613,17 @@ SCM obhash P((SCM obj));
SCM obunhash P((SCM obj));
unsigned long strhash P((unsigned char *str, sizet len, unsigned long n));
unsigned long hasher P((SCM obj, unsigned long n, sizet d));
-SCM repl_driver P((char *initpath));
SCM lroom P((SCM args));
+SCM lflush P((SCM port));
+void scm_init_gra P((scm_gra *gra, sizet eltsize, sizet len,
+ sizet maxlen, char *what));
+int scm_grow_gra P((scm_gra *gra, char *elt));
+void scm_free_gra P((scm_gra *gra));
long newsmob P((smobfuns *smob));
long newptob P((ptobfuns *ptob));
+SCM scm_port_entry P((long ptype, long flags));
void prinport P((SCM exp, SCM port, char *type));
-void repl P((void));
+SCM repl P((void));
void growth_mon P((char *obj, long size, char *units, int grewp));
void gc_start P((char *what));
void gc_end P((void));
@@ -579,34 +638,50 @@ void intprint P((long n, int radix, SCM port));
void iprlist P((char *hdr, SCM exp, int tlr, SCM port, int writing));
void lputc P((int c, SCM port));
void lputs P((char *s, SCM port));
-int lfwrite P((char *ptr, sizet size, sizet nitems, SCM port));
+sizet lfwrite P((char *ptr, sizet size, sizet nitems, SCM port));
int lgetc P((SCM port));
void lungetc P((int c, SCM port));
char *grow_tok_buf P((SCM tok_buf));
-long mode_bits P((char *modes));
+long mode_bits P((char *modes, char *cmodes));
long time_in_msec P((long x));
SCM my_time P((void));
SCM your_time P((void));
void init_iprocs P((iproc *subra, int type));
+
+void init_sbrk P((void));
+int init_buf0 P((FILE *inport));
+void scm_init_from_argv P((int argc, char **argv, char *script_arg,
+ int iverbose, int buf0stdin));
+void init_signals P((void));
+SCM scm_top_level P((char *initpath, SCM (*toplvl_fun)()));
+void restore_signals P((void));
+void free_storage P((void));
+char *dld_find_executable P((const char* command));
+char *scm_find_execpath P((int argc, char **argv, char *script_arg));
void init_scm P((int iverbose, int buf0stdin, long init_heap_size));
SCM scm_init_extensions P((void));
+void init_user_scm P((void));
void ignore_signals P((void));
void unignore_signals P((void));
-void free_storage P((void));
+
void add_feature P((char *str));
int raprin1 P((SCM exp, SCM port, int writing));
SCM markcdr P((SCM ptr));
-SCM mark0 P((SCM ptr));
+#define mark0 (0) /*SCM mark0 P((SCM ptr)); */
SCM equal0 P((SCM ptr1, SCM ptr2));
sizet free0 P((CELLPTR ptr));
-void warn P((char *str1, char *str2));
+void scm_warn P((char *str1, char *str2));
void everr P((SCM exp, SCM env, SCM arg, char *pos, char *s_subr));
void wta P((SCM arg, char *pos, char *s_subr));
SCM intern P((char *name, sizet len));
SCM sysintern P((const char *name, SCM val));
SCM sym2vcell P((SCM sym));
SCM makstr P((long len));
+SCM scm_maksubr P((const char *name, int type, SCM (*fcn)()));
SCM make_subr P((const char *name, int type, SCM (*fcn)()));
+SCM make_synt P((const char *name, SCM (*macroizer)(), SCM (*fcn)()));
+SCM make_gsubr P((const char *name, int req, int opt, int rst,
+ SCM (*fcn)()));
SCM closure P((SCM code, int nargs));
SCM makprom P((SCM code));
SCM force P((SCM x));
@@ -616,6 +691,7 @@ SCM relarb P((SCM arb));
SCM ceval P((SCM x, SCM env));
SCM prolixity P((SCM arg));
SCM gc_for_newcell P((void));
+void gc_for_open_files P((void));
SCM gc P((SCM arg));
SCM tryload P((SCM filename));
SCM acons P((SCM w, SCM x, SCM y));
@@ -672,6 +748,8 @@ SCM string2number P((SCM str, SCM radix));
SCM istr2flo P((char *str, long len, long radix));
SCM mkbig P((sizet nlen, int sign));
SCM mkstrport P((SCM pos, SCM str, long modes, char *caller));
+SCM mksafeport P((int maxlen, SCM port));
+int reset_safeport P((SCM sfp, int maxlen, SCM port));
SCM long2big P((long n));
SCM ulong2big P((unsigned long n));
SCM big2inum P((SCM b, sizet l));
@@ -727,14 +805,17 @@ SCM vector2list P((SCM v));
SCM for_each P((SCM proc, SCM arg1, SCM args));
SCM procedurep P((SCM obj));
SCM apply P((SCM proc, SCM arg1, SCM args));
+SCM scm_cvapply P((SCM proc, long n, SCM *argv));
+int scm_arity_check P((SCM proc, long argc, char *what));
SCM map P((SCM proc, SCM arg1, SCM args));
SCM scm_make_cont P((void));
SCM copytree P((SCM obj));
SCM eval P((SCM obj));
-SCM identp P((SCM obj));
+SCM identp P((SCM obj));
SCM ident2sym P((SCM id));
-SCM ident_eqp P((SCM id1, SCM id2, SCM env));
-SCM renamed_ident P((SCM id, SCM env));
+SCM ident_eqp P((SCM id1, SCM id2, SCM env));
+SCM env2tree P((SCM env));
+SCM renamed_ident P((SCM id, SCM env));
SCM input_portp P((SCM x));
SCM output_portp P((SCM x));
SCM cur_input_port P((void));
@@ -754,6 +835,8 @@ SCM newline P((SCM port));
SCM write_char P((SCM chr, SCM port));
SCM file_position P((SCM port));
SCM file_set_position P((SCM port, SCM pos));
+SCM scm_port_line P((SCM port));
+SCM scm_port_col P((SCM port));
SCM lgetenv P((SCM nam));
SCM prog_args P((void));
SCM makacro P((SCM code));
@@ -783,6 +866,7 @@ void ints_warn P((char *s1, char* s2, char *fname, int linum));
void add_final P((void (*final)(void)));
SCM makcclo P((SCM proc, long len));
SCM make_uve P((long k, SCM prot));
+long scm_prot2type P((SCM prot));
SCM ra2contig P((SCM ra, int copy));
SCM sc2array P((SCM s, SCM ra, SCM prot));
SCM array_copy P((SCM src, SCM dst));
@@ -790,9 +874,6 @@ long aind P((SCM ra, SCM args, char *what));
SCM scm_eval_string P((SCM str));
SCM scm_load_string P((SCM str));
void scm_print_stack P((SCM stk));
-char * dld_find_executable P((const char* command));
-char * scm_find_executable P((void));
-SCM scm_find_impl P((SCM execpath));
SCM scm_unexec P((const SCM pathname));
SCM scm_log_aref P((SCM args));
SCM scm_log_aset P((SCM ra, SCM obj, SCM args));
@@ -808,8 +889,8 @@ SCM scm_bitfield P((SCM n, SCM start, SCM end));
SCM scm_logcount P((SCM n));
SCM scm_intlength P((SCM n));
SCM scm_copybit P((SCM index, SCM j1, SCM bit));
-SCM scm_bitif P((SCM mask, SCM n0, SCM n1));
-SCM scm_copybitfield P((SCM to, SCM start, SCM rest));
+SCM scm_bitif P((SCM mask, SCM n0, SCM n1));
+SCM scm_copybitfield P((SCM to, SCM start, SCM rest));
/* Defined in "rope.c" */
SCM long2num P((long n));
@@ -818,6 +899,7 @@ unsigned char num2uchar P((SCM num, char *pos, char *s_caller));
unsigned short num2ushort P((SCM num, char *pos, char *s_caller));
unsigned long num2ulong P((SCM num, char *pos, char *s_caller));
long num2long P((SCM num, char *pos, char *s_caller));
+ short num2short P((SCM num, char *pos, char *s_caller));
double num2dbl P((SCM num, char *pos, char *s_caller));
SCM makfromstr P((char *src, sizet len));
SCM makfromstrs P((int argc, char **argv));
@@ -829,6 +911,7 @@ void scm_ldstr P((char *str));
int scm_ldfile P((char *path));
int scm_ldprog P((char *path));
unsigned long scm_addr P((SCM args, char *name));
+unsigned long scm_base_addr P((SCM v, char *name));
int scm_cell_p P((SCM x));
#ifdef FLOATS
@@ -865,16 +948,16 @@ char * scm_try_path P((char *path));
char * script_find_executable P((const char *command));
char ** script_process_argv P((int argc, char **argv));
int script_count_argv P((char **argv));
-char * scm_find_impl_file P((char *exec_path, const char *generic_name,
- const char *initname, const char *sep));
+char * find_impl_file P((char *exec_path, const char *generic_name,
+ const char *initname, const char *sep));
/* environment cache functions */
void scm_ecache_report P((void));
-void scm_estk_reset P((void));
-void scm_estk_grow P((sizet inc));
+void scm_estk_reset P((sizet size));
void scm_env_cons P((SCM x, SCM y));
void scm_env_cons2 P((SCM w, SCM x, SCM y));
void scm_env_cons_tmp P((SCM x));
+void scm_env_v2lst P((int argc, SCM *argv));
void scm_extend_env P((SCM names));
void scm_egc P((void));
@@ -883,9 +966,10 @@ extern CELLPTR scm_ecache;
extern VOLATILE long scm_ecache_index, scm_ecache_len;
extern SCM scm_env, scm_env_tmp;
extern SCM scm_egc_roots[];
-extern long scm_egc_root_index;
+extern VOLATILE long scm_egc_root_index;
extern SCM scm_estk;
extern SCM *scm_estk_v, *scm_estk_ptr;
+extern long scm_estk_size;
#ifdef RECKLESS
# define ASSERT(_cond, _arg, _pos, _subr) ;
@@ -895,26 +979,27 @@ extern SCM *scm_estk_v, *scm_estk_ptr;
# define ASRTGO(_cond, _label) if(!(_cond)) goto _label;
#endif
-#define ARGn 0
-#define ARG1 1
-#define ARG2 2
-#define ARG3 3
-#define ARG4 4
-#define ARG5 5
+#define ARGn 1
+#define ARG1 2
+#define ARG2 3
+#define ARG3 4
+#define ARG4 5
+#define ARG5 6
/* following must match entry indexes in errmsgs[] */
-#define WNA 6
-#define OVFLOW 7
-#define OUTOFRANGE 8
-#define NALLOC 9
-#define THRASH 10
-#define EXIT 11
-#define HUP_SIGNAL 12
-#define INT_SIGNAL 13
-#define FPE_SIGNAL 14
-#define BUS_SIGNAL 15
-#define SEGV_SIGNAL 16
-#define ALRM_SIGNAL 17
-#define PROF_SIGNAL 18
+#define WNA 7
+#define OVFLOW 8
+#define OUTOFRANGE 9
+#define NALLOC 10
+#define THRASH 11
+#define EXIT 12
+#define HUP_SIGNAL 13
+#define INT_SIGNAL 14
+#define FPE_SIGNAL 15
+#define BUS_SIGNAL 16
+#define SEGV_SIGNAL 17
+#define ALRM_SIGNAL 18
+#define VTALRM_SIGNAL 19
+#define PROF_SIGNAL 20
#define EVAL(x, env) (IMP(x)?(x):ceval((x), (env)))
#define SIDEVAL(x, env) if NIMP(x) ceval((x), (env))
@@ -927,8 +1012,6 @@ extern SCM *scm_estk_v, *scm_estk_ptr;
ALLOW_INTS;}
*/
-int run_scm P((int argc, char **argv, int iverbose, int buf0stdin, char *initpath));
-
#ifdef __cplusplus
}
#endif