summaryrefslogtreecommitdiffstats
path: root/scm.h
diff options
context:
space:
mode:
Diffstat (limited to 'scm.h')
-rw-r--r--scm.h925
1 files changed, 475 insertions, 450 deletions
diff --git a/scm.h b/scm.h
index 81b6232..504f849 100644
--- a/scm.h
+++ b/scm.h
@@ -45,6 +45,14 @@
extern "C" {
#endif
+#ifdef _WIN32
+# include <windows.h>
+#endif
+
+#ifdef _WIN32_WCE
+# include <windows.h>
+#endif
+
#ifdef hpux
# ifndef __GNUC__
# define const /**/
@@ -71,6 +79,27 @@ typedef struct {const char *name;} subr_info;
#include <stdio.h>
#include "scmfig.h"
+#ifdef _WIN32
+# ifdef DLLSCM
+# define SCM_DLL_EXPORT __declspec(dllexport)
+# define SCM_DLL_IMPORT __declspec(dllimport)
+# ifdef SCM_DLL
+# define SCM_EXPORT SCM_DLL_EXPORT
+# else
+# define SCM_EXPORT SCM_DLL_IMPORT
+# endif
+# else
+# define SCM_DLL_EXPORT /**/
+# define SCM_DLL_IMPORT extern
+# define SCM_EXPORT extern
+# endif
+#else
+# define SCM_DLL_EXPORT /**/
+# define SCM_DLL_IMPORT extern
+# define SCM_EXPORT extern
+#endif
+
+
typedef struct {
sizet eltsize;
sizet len;
@@ -178,7 +207,7 @@ typedef struct {SCM type;double *real;} dbl;
as in backtraces, make a little more sense. */
#define MAKSPCSYM2(work, look) ((127L & (work)) | ((127L<<9) & (look)))
-extern char *isymnames[];
+SCM_EXPORT char *isymnames[];
#define NUM_ISPCSYM 14
#define IM_AND MAKSPCSYM(0)
#define IM_BEGIN MAKSPCSYM(1)
@@ -213,7 +242,7 @@ extern char *isymnames[];
#define s_quasiquote (ISYMCHARS(IM_QUASIQUOTE)+2)
#define s_let_syntax (ISYMCHARS(IM_LET_SYNTAX)+2)
-extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
+SCM_EXPORT SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
#define s_apply (ISYMCHARS(IM_APPLY)+2)
/* each symbol defined here must have a unique number which
@@ -301,8 +330,14 @@ extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
#define GCCDR(x) (~1L & CDR(x))
#define SETCDR(x, v) CDR(x) = (SCM)(v)
+#ifdef _M_ARM
+/* MS CLARM compiler bug workaround. */
+volatile SCM MS_CLARM_dumy;
+# define CODE(x) (MS_CLARM_dumy = (CAR(x)-tc3_closure))
+#else
+# define CODE(x) (CAR(x)-tc3_closure)
+#endif
#define CLOSUREP(x) (TYP3(x)==tc3_closure)
-#define CODE(x) (CAR(x)-tc3_closure)
#define SETCODE(x, e) CAR(x) = (e)+tc3_closure
#define ENV(x) ((~7L & CDR(x)) ? (~7L & CDR(x)) : EOL)
#define GCENV ENV
@@ -316,7 +351,7 @@ extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
#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, tc16_ident;
+SCM_EXPORT long tc16_env, tc16_ident;
#define ENVP(x) (tc16_env==TYP16(x))
#define SCM_ENV_FORMALS CAR
#ifdef MACRO
@@ -360,8 +395,6 @@ extern long tc16_env, tc16_ident;
#define SETSTREAM SETCDR
#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)
@@ -427,7 +460,7 @@ extern long tc16_env, tc16_ident;
#define SETCHARS SETCDR
#define SETVELTS SETCDR
-extern long tc16_array;
+SCM_EXPORT long tc16_array;
#define ARRAYP(a) (tc16_array==TYP16(a))
#define ARRAY_V(a) (((array *)CDR(a))->v)
/*#define ARRAY_NDIM(x) NUMDIGS(x)*/
@@ -567,28 +600,28 @@ extern long tc16_array;
#define EXCLUSIVE (128L<<16)
/* LSB is used for gc mark */
-extern scm_gra subrs_gra;
+SCM_EXPORT scm_gra subrs_gra;
#define subrs ((subr_info *)(subrs_gra.elts))
-/* extern sizet numsmob, numptob;
- extern smobfuns *smobs;
- extern ptobfuns *ptobs;
- extern ptobfuns pipob; */
-extern scm_gra smobs_gra;
+/* SCM_EXPORT sizet numsmob, numptob;
+ SCM_EXPORT smobfuns *smobs;
+ SCM_EXPORT ptobfuns *ptobs;
+ SCM_EXPORT ptobfuns pipob; */
+SCM_EXPORT scm_gra smobs_gra;
#define numsmob (smobs_gra.len)
#define smobs ((smobfuns *)(smobs_gra.elts))
-extern scm_gra ptobs_gra;
+SCM_EXPORT scm_gra ptobs_gra;
#define numptob (ptobs_gra.len)
#define ptobs ((ptobfuns *)(ptobs_gra.elts))
-extern port_info *scm_port_table;
+SCM_EXPORT 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)
#define tc16_sfport (tc7_port + 3*256L)
-extern long tc16_dir;
-extern long tc16_clport;
+SCM_EXPORT long tc16_dir;
+SCM_EXPORT long tc16_clport;
-extern SCM sys_protects[];
+SCM_EXPORT SCM sys_protects[];
#define cur_inp sys_protects[0]
#define cur_outp sys_protects[1]
#define cur_errp sys_protects[2]
@@ -615,484 +648,476 @@ extern SCM sys_protects[];
/* now for connects between source files */
-/* extern sizet num_finals;
- extern void (**finals)P((void));
- extern sizet num_finals; */
-extern scm_gra finals_gra;
+/* SCM_EXPORT sizet num_finals;
+ SCM_EXPORT void (**finals)P((void));
+ SCM_EXPORT sizet num_finals; */
+SCM_EXPORT 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;
-extern long heap_cells;
-extern CELLPTR heap_org;
-extern VOLATILE SCM freelist;
-extern long gc_cells_collected, gc_malloc_collected, gc_ports_collected;
-extern long gc_syms_collected;
-extern long cells_allocated, lcells_allocated, mallocated, lmallocated;
-extern long mtrigger;
-extern SCM *loc_loadpath;
-extern SCM *loc_errobj;
-extern SCM loadport;
-extern char *errjmp_bad;
-extern int ints_disabled, output_deferred, gc_hook_pending, gc_hook_active;
-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;
+SCM_EXPORT unsigned char upcase[], downcase[];
+SCM_EXPORT SCM symhash;
+SCM_EXPORT int symhash_dim;
+SCM_EXPORT long heap_cells;
+SCM_EXPORT CELLPTR heap_org;
+SCM_EXPORT VOLATILE SCM freelist;
+SCM_EXPORT long gc_cells_collected, gc_malloc_collected, gc_ports_collected;
+SCM_EXPORT long gc_syms_collected;
+SCM_EXPORT long cells_allocated, lcells_allocated, mallocated, lmallocated;
+SCM_EXPORT long mtrigger;
+SCM_EXPORT SCM *loc_loadpath;
+SCM_EXPORT SCM *loc_errobj;
+SCM_EXPORT SCM loadport;
+SCM_EXPORT char *errjmp_bad;
+SCM_EXPORT int ints_disabled, output_deferred, gc_hook_pending, gc_hook_active;
+SCM_EXPORT unsigned long SIG_deferred;
+SCM_EXPORT SCM exitval;
+SCM_EXPORT int cursinit;
+SCM_EXPORT unsigned int poll_count, tick_count;
+SCM_EXPORT int dumped;
+SCM_EXPORT char *execpath;
+SCM_EXPORT char s_no_execpath[];
+SCM_EXPORT int scm_verbose;
#define verbose (scm_verbose+0)
-extern const char dirsep[];
+SCM_EXPORT const char dirsep[];
/* strings used in several source files */
-extern char s_read[], s_write[], s_newline[], s_system[];
-extern char s_make_string[], s_make_vector[], s_list[], s_op_pipe[];
+SCM_EXPORT char s_read[], s_write[], s_newline[], s_system[];
+SCM_EXPORT char s_make_string[], s_make_vector[], s_list[], s_op_pipe[];
#define s_string (s_make_string+5)
#define s_vector (s_make_vector+5)
#define s_pipe (s_op_pipe+5)
-extern char s_make_sh_array[];
+SCM_EXPORT char s_make_sh_array[];
+SCM_EXPORT char s_array_fill[];
#define s_array (s_make_sh_array+12)
-extern char s_ccl[];
+SCM_EXPORT char s_ccl[];
#define s_limit (s_ccl+10)
-extern char s_close_port[];
+SCM_EXPORT char s_close_port[];
#define s_port_type (s_close_port+6)
-extern char s_call_cc[];
+SCM_EXPORT char s_call_cc[];
#define s_cont (s_call_cc+18)
-extern char s_try_create_file[];
-extern char s_badenv[];
+SCM_EXPORT char s_try_create_file[];
+SCM_EXPORT char s_badenv[];
+
+SCM_EXPORT void (*init_user_scm) P((void));
/* function prototypes */
-extern void (* deferred_proc) P((void));
-void process_signals P((void));
-int handle_it P((int i));
-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));
-void must_free P((char *obj, sizet len));
-void scm_protect_temp P((SCM *ptr));
-long ilength P((SCM sx));
-SCM hash P((SCM obj, SCM n));
-SCM hashv P((SCM obj, SCM n));
-SCM hashq P((SCM obj, SCM n));
-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 lroom P((SCM args));
-SCM lflush P((SCM port));
-void scm_init_gra P((scm_gra *gra, sizet eltsize, sizet len,
+SCM_EXPORT void (* deferred_proc) P((void));
+SCM_EXPORT void process_signals P((void));
+SCM_EXPORT int handle_it P((int i));
+SCM_EXPORT SCM must_malloc_cell P((long len, SCM c, char *what));
+SCM_EXPORT void must_realloc_cell P((SCM z, long olen, long len, char *what));
+SCM_EXPORT char *must_malloc P((long len, char *what));
+SCM_EXPORT char *must_realloc P((char *where, long olen, long len, char *what));
+SCM_EXPORT void must_free P((char *obj, sizet len));
+SCM_EXPORT void scm_protect_temp P((SCM *ptr));
+SCM_EXPORT long ilength P((SCM sx));
+SCM_EXPORT SCM hash P((SCM obj, SCM n));
+SCM_EXPORT SCM hashv P((SCM obj, SCM n));
+SCM_EXPORT SCM hashq P((SCM obj, SCM n));
+SCM_EXPORT SCM obhash P((SCM obj));
+SCM_EXPORT SCM obunhash P((SCM obj));
+SCM_EXPORT unsigned long strhash P((unsigned char *str, sizet len, unsigned long n));
+SCM_EXPORT unsigned long hasher P((SCM obj, unsigned long n, sizet d));
+SCM_EXPORT SCM lroom P((SCM args));
+SCM_EXPORT SCM lflush P((SCM port));
+SCM_EXPORT 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_trim_gra P((scm_gra *gra));
-void scm_free_gra P((scm_gra *gra));
-long newsmob P((smobfuns *smob));
-long newptob P((ptobfuns *ptob));
-SCM scm_port_entry P((FILE *stream, long ptype, long flags));
-SCM scm_open_ports P((void));
-void prinport P((SCM exp, SCM port, char *type));
-SCM repl P((void));
-void repl_report 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));
-void gc_mark P((SCM p));
-void scm_gc_hook P((void));
-SCM scm_gc_protect P((SCM obj));
-SCM scm_add_finalizer P((SCM value, SCM finalizer));
-void scm_run_finalizers P((int exiting));
-void scm_egc_start P((void));
-void scm_egc_end P((void));
-void heap_report P((void));
-void gra_report P((void));
-void exit_report P((void));
-void stack_report P((void));
-SCM scm_stack_trace P((SCM contin));
-SCM scm_scope_trace P((SCM env));
-SCM scm_frame_trace P((SCM contin, SCM nf));
-SCM scm_frame2env P((SCM contin, SCM nf));
-SCM scm_frame_eval P((SCM contin, SCM nf, SCM expr));
-void iprin1 P((SCM exp, SCM port, int writing));
-void intprint P((long n, int radix, SCM port));
-void iprlist P((char *hdr, SCM exp, int tlr, SCM port, int writing));
-SCM scm_env_lookup P((SCM var, SCM stenv));
-SCM scm_env_rlookup P((SCM addr, SCM stenv, char *what));
-SCM scm_env_getprop P((SCM prop, SCM env));
-SCM scm_env_addprop P((SCM prop, SCM val, SCM env));
-long num_frames P((SCM estk, int i));
-SCM *estk_frame P((SCM estk, int i, int nf));
-SCM *cont_frame P((SCM contin, int nf));
-SCM stacktrace1 P((SCM estk, int i));
-void scm_princode P((SCM code, SCM env, SCM port, int writing));
-void scm_princlosure P((SCM proc, SCM port, int writing));
-void lputc P((int c, SCM port));
-void lputs P((char *s, 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, 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 final_scm P((int));
-void init_sbrk P((void));
-int init_buf0 P((FILE *inport));
-void scm_init_from_argv P((int argc, char **argv, char *script_arg,
+SCM_EXPORT int scm_grow_gra P((scm_gra *gra, char *elt));
+SCM_EXPORT void scm_trim_gra P((scm_gra *gra));
+SCM_EXPORT void scm_free_gra P((scm_gra *gra));
+SCM_EXPORT long newsmob P((smobfuns *smob));
+SCM_EXPORT long newptob P((ptobfuns *ptob));
+SCM_EXPORT SCM scm_port_entry P((FILE *stream, long ptype, long flags));
+SCM_EXPORT SCM scm_open_ports P((void));
+SCM_EXPORT void prinport P((SCM exp, SCM port, char *type));
+SCM_EXPORT SCM repl P((void));
+SCM_EXPORT void repl_report P((void));
+SCM_EXPORT void growth_mon P((char *obj, long size, char *units, int grewp));
+SCM_EXPORT void gc_start P((char *what));
+SCM_EXPORT void gc_end P((void));
+SCM_EXPORT void gc_mark P((SCM p));
+SCM_EXPORT void scm_gc_hook P((void));
+SCM_EXPORT SCM scm_gc_protect P((SCM obj));
+SCM_EXPORT SCM scm_add_finalizer P((SCM value, SCM finalizer));
+SCM_EXPORT void scm_run_finalizers P((int exiting));
+SCM_EXPORT void scm_egc_start P((void));
+SCM_EXPORT void scm_egc_end P((void));
+SCM_EXPORT void heap_report P((void));
+SCM_EXPORT void gra_report P((void));
+SCM_EXPORT void exit_report P((void));
+SCM_EXPORT void stack_report P((void));
+SCM_EXPORT SCM scm_stack_trace P((SCM contin));
+SCM_EXPORT SCM scm_scope_trace P((SCM env));
+SCM_EXPORT SCM scm_frame_trace P((SCM contin, SCM nf));
+SCM_EXPORT SCM scm_frame2env P((SCM contin, SCM nf));
+SCM_EXPORT SCM scm_frame_eval P((SCM contin, SCM nf, SCM expr));
+SCM_EXPORT void iprin1 P((SCM exp, SCM port, int writing));
+SCM_EXPORT void intprint P((long n, int radix, SCM port));
+SCM_EXPORT void iprlist P((char *hdr, SCM exp, int tlr, SCM port, int writing));
+SCM_EXPORT SCM scm_env_lookup P((SCM var, SCM stenv));
+SCM_EXPORT SCM scm_env_rlookup P((SCM addr, SCM stenv, char *what));
+SCM_EXPORT SCM scm_env_getprop P((SCM prop, SCM env));
+SCM_EXPORT SCM scm_env_addprop P((SCM prop, SCM val, SCM env));
+SCM_EXPORT long num_frames P((SCM estk, int i));
+SCM_EXPORT SCM *estk_frame P((SCM estk, int i, int nf));
+SCM_EXPORT SCM *cont_frame P((SCM contin, int nf));
+SCM_EXPORT SCM stacktrace1 P((SCM estk, int i));
+SCM_EXPORT void scm_princode P((SCM code, SCM env, SCM port, int writing));
+SCM_EXPORT void scm_princlosure P((SCM proc, SCM port, int writing));
+SCM_EXPORT void lputc P((int c, SCM port));
+SCM_EXPORT void lputs P((char *s, SCM port));
+SCM_EXPORT sizet lfwrite P((char *ptr, sizet size, sizet nitems, SCM port));
+SCM_EXPORT int lgetc P((SCM port));
+SCM_EXPORT void lungetc P((int c, SCM port));
+SCM_EXPORT char *grow_tok_buf P((SCM tok_buf));
+SCM_EXPORT long mode_bits P((char *modes, char *cmodes));
+SCM_EXPORT long time_in_msec P((long x));
+SCM_EXPORT SCM my_time P((void));
+SCM_EXPORT SCM your_time P((void));
+SCM_EXPORT void init_iprocs P((iproc *subra, int type));
+
+SCM_EXPORT void final_scm P((int));
+SCM_EXPORT void init_sbrk P((void));
+SCM_EXPORT int init_buf0 P((FILE *inport));
+SCM_EXPORT 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));
-void scm_init_INITS P((void));
-SCM scm_init_extensions P((void));
-void init_user_scm P((void));
-void ignore_signals P((void));
-void unignore_signals P((void));
-
-void add_feature P((char *str));
-int raprin1 P((SCM exp, SCM port, int writing));
-SCM markcdr P((SCM ptr));
+SCM_EXPORT void init_signals P((void));
+SCM_EXPORT SCM scm_top_level P((char *initpath, SCM (*toplvl_fun)()));
+SCM_EXPORT void restore_signals P((void));
+SCM_EXPORT void free_storage P((void));
+SCM_EXPORT char *dld_find_executable P((const char* command));
+SCM_EXPORT char *scm_find_execpath P((int argc, char **argv, char *script_arg));
+SCM_EXPORT void init_scm P((int iverbose, int buf0stdin, long init_heap_size));
+SCM_EXPORT void scm_init_INITS P((void));
+SCM_EXPORT SCM scm_init_extensions P((void));
+SCM_EXPORT void ignore_signals P((void));
+SCM_EXPORT void unignore_signals P((void));
+
+SCM_EXPORT void add_feature P((char *str));
+SCM_EXPORT int raprin1 P((SCM exp, SCM port, int writing));
+SCM_EXPORT SCM markcdr P((SCM ptr));
#define mark0 (0) /*SCM mark0 P((SCM ptr)); */
-SCM equal0 P((SCM ptr1, SCM ptr2));
-sizet free0 P((CELLPTR ptr));
-void scm_warn P((char *str1, char *str2, SCM obj));
-void everr P((SCM exp, SCM env, SCM arg, char *pos, char *s_subr, int codep));
-void wta P((SCM arg, char *pos, char *s_subr));
-void scm_experr 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, long flags, SCM (*fcn)()));
-SCM make_gsubr P((const char *name, int req, int opt, int rst,
+SCM_EXPORT SCM equal0 P((SCM ptr1, SCM ptr2));
+SCM_EXPORT sizet free0 P((CELLPTR ptr));
+SCM_EXPORT void scm_warn P((char *str1, char *str2, SCM obj));
+SCM_EXPORT void everr P((SCM exp, SCM env, SCM arg, char *pos, char *s_subr, int codep));
+SCM_EXPORT void wta P((SCM arg, char *pos, char *s_subr));
+SCM_EXPORT void scm_experr P((SCM arg, char *pos, char *s_subr));
+SCM_EXPORT SCM intern P((char *name, sizet len));
+SCM_EXPORT SCM sysintern P((const char *name, SCM val));
+SCM_EXPORT SCM sym2vcell P((SCM sym));
+SCM_EXPORT SCM makstr P((long len));
+SCM_EXPORT SCM scm_maksubr P((const char *name, int type, SCM (*fcn)()));
+SCM_EXPORT SCM make_subr P((const char *name, int type, SCM (*fcn)()));
+SCM_EXPORT SCM make_synt P((const char *name, long flags, SCM (*fcn)()));
+SCM_EXPORT 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));
-SCM makarb P((SCM name));
-SCM tryarb P((SCM arb));
-SCM relarb P((SCM arb));
-SCM ceval P((SCM x, SCM static_env, SCM env));
-SCM scm_wrapcode P((SCM code, SCM env));
-SCM scm_current_env P((void));
-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 reader));
-SCM acons P((SCM w, SCM x, SCM y));
-SCM cons2 P((SCM w, SCM x, SCM y));
-SCM resizuve P((SCM vect, SCM len));
-SCM lnot P((SCM x));
-SCM booleanp P((SCM obj));
-SCM eq P((SCM x, SCM y));
-SCM equal P((SCM x, SCM y));
-SCM consp P((SCM x));
-SCM cons P((SCM x, SCM y));
-SCM nullp P((SCM x));
-SCM setcar P((SCM pair, SCM value));
-SCM setcdr P((SCM pair, SCM value));
-SCM listp P((SCM x));
-SCM list P((SCM objs));
-SCM length P((SCM x));
-SCM append P((SCM args));
-SCM reverse P((SCM lst));
-SCM list_ref P((SCM lst, SCM k));
-SCM memq P((SCM x, SCM lst));
-SCM member P((SCM x, SCM lst));
-SCM memv P((SCM x, SCM lst));
-SCM assq P((SCM x, SCM alist));
-SCM assoc P((SCM x, SCM alist));
-SCM symbolp P((SCM x));
-SCM symbol2string P((SCM s));
-SCM string2symbol P((SCM s));
-SCM numberp P((SCM x));
-SCM exactp P((SCM x));
-SCM inexactp P((SCM x));
-SCM eqp P((SCM x, SCM y));
-SCM lessp P((SCM x, SCM y));
-SCM greaterp P((SCM x, SCM y));
-SCM leqp P((SCM x, SCM y));
-SCM greqp P((SCM x, SCM y));
-SCM zerop P((SCM z));
-SCM positivep P((SCM x));
-SCM negativep P((SCM x));
-SCM oddp P((SCM n));
-SCM evenp P((SCM n));
-SCM lmax P((SCM x, SCM y));
-SCM lmin P((SCM x, SCM y));
-SCM sum P((SCM x, SCM y));
-SCM difference P((SCM x, SCM y));
-SCM product P((SCM x, SCM y));
-SCM divide P((SCM x, SCM y));
-SCM lquotient P((SCM x, SCM y));
-SCM absval P((SCM x));
-SCM lremainder P((SCM x, SCM y));
-SCM modulo P((SCM x, SCM y));
-SCM lgcd P((SCM x, SCM y));
-SCM llcm P((SCM n1, SCM n2));
-SCM number2string P((SCM x, SCM radix));
-SCM istring2number P((char *str, long len, long radix));
-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));
-sizet iint2str P((long num, int rad, char *p));
-SCM floequal P((SCM x, SCM y));
-SCM uve_equal P((SCM u, SCM v));
-SCM raequal P((SCM ra0, SCM ra1));
-SCM array_equal P((SCM u, SCM v));
-SCM array_rank P((SCM ra));
-int rafill P((SCM ra, SCM fill, SCM ignore));
-SCM uve_fill P((SCM uve, SCM fill));
-SCM array_fill P((SCM ra, SCM fill));
-SCM array_prot P((SCM ra));
-SCM array_rank P((SCM ra));
-int bigprint P((SCM exp, SCM port, int writing));
-int floprint P((SCM sexp, SCM port, int writing));
-SCM istr2int P((char *str, long len, long radix));
-SCM istr2bve P((char *str, long len));
-void ipruk P((char *hdr, SCM ptr, SCM port));
-SCM charp P((SCM x));
-SCM char_lessp P((SCM x, SCM y));
-SCM chci_eq P((SCM x, SCM y));
-SCM chci_lessp P((SCM x, SCM y));
-SCM char_alphap P((SCM chr));
-SCM char_nump P((SCM chr));
-SCM char_whitep P((SCM chr));
-SCM char_upperp P((SCM chr));
-SCM char_lowerp P((SCM chr));
-SCM char2int P((SCM chr));
-SCM int2char P((SCM n));
-SCM char_upcase P((SCM chr));
-SCM char_downcase P((SCM chr));
-SCM stringp P((SCM x));
-SCM string P((SCM chrs));
-SCM make_string P((SCM k, SCM chr));
-SCM string2list P((SCM str));
-SCM st_length P((SCM str));
-SCM st_ref P((SCM str, SCM k));
-SCM st_set P((SCM str, SCM k, SCM chr));
-SCM st_equal P((SCM s1, SCM s2));
-SCM stci_equal P((SCM s1, SCM s2));
-SCM st_lessp P((SCM s1, SCM s2));
-SCM stci_lessp P((SCM s1, SCM s2));
-SCM substring P((SCM str, SCM start, SCM end));
-SCM st_append P((SCM args));
-SCM vectorp P((SCM x));
-SCM vector_length P((SCM v));
-SCM vector P((SCM l));
-SCM vector_ref P((SCM v, SCM k));
-SCM vector_set P((SCM v, SCM k, SCM obj));
-SCM make_vector P((SCM k, SCM fill));
-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 scm_values P((SCM arg1, SCM arg2, SCM rest, char *what));
-SCM scm_eval_values P((SCM x, SCM static_env, SCM env));
-SCM identp P((SCM obj));
-SCM ident2sym P((SCM id));
-SCM ident_eqp P((SCM id1, SCM id2, SCM env));
-int scm_nullenv_p P((SCM env));
-SCM env2tree P((SCM env));
-SCM renamed_ident P((SCM id, SCM env));
-SCM scm_check_linum P((SCM x, SCM *linum));
-SCM scm_add_linum P((SCM linum, SCM x));
-SCM input_portp P((SCM x));
-SCM output_portp P((SCM x));
-SCM cur_input_port P((void));
-SCM cur_output_port P((void));
-SCM i_setbuf0 P((SCM port));
-SCM try_open_file P((SCM filename, SCM modes));
-SCM open_file P((SCM filename, SCM modes));
-SCM open_pipe P((SCM pipestr, SCM modes));
-SCM close_port P((SCM port));
-SCM lread P((SCM port));
-SCM scm_read_char P((SCM port));
-SCM peek_char P((SCM port));
-SCM eof_objectp P((SCM x));
-int scm_io_error P((SCM port, char *what));
-SCM lwrite P((SCM obj, SCM port));
-SCM display P((SCM obj, SCM port));
-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));
-void scm_line_msg P((SCM file, SCM linum, SCM port));
-void scm_err_line P((char *what, SCM file, SCM linum, SCM port));
-SCM lgetenv P((SCM nam));
-SCM prog_args P((void));
-SCM makacro P((SCM code));
-SCM makmacro P((SCM code));
-SCM makmmacro P((SCM code));
-SCM makidmacro P((SCM code));
-void poll_routine P((void));
-void tick_signal P((void));
-void stack_check P((void));
-SCM list2ura P((SCM ndim, SCM prot, SCM lst));
-SCM make_ra P((int ndim));
-SCM makflo P((float x));
-SCM arrayp P((SCM v, SCM prot));
-SCM array_contents P((SCM ra, SCM strict));
-SCM uve_read P((SCM v, SCM port));
-SCM uve_write P((SCM v, SCM port));
-SCM ura_read P((SCM v, SCM port));
-SCM ura_write P((SCM v, SCM port));
-SCM aset P((SCM v, SCM obj, SCM args));
-SCM aref P((SCM v, SCM args));
-SCM scm_array_ref P((SCM args));
-SCM cvref P((SCM v, sizet pos, SCM last));
-SCM quit P((SCM n));
+SCM_EXPORT SCM closure P((SCM code, int nargs));
+SCM_EXPORT SCM makprom P((SCM code));
+SCM_EXPORT SCM force P((SCM x));
+SCM_EXPORT SCM makarb P((SCM name));
+SCM_EXPORT SCM tryarb P((SCM arb));
+SCM_EXPORT SCM relarb P((SCM arb));
+SCM_EXPORT SCM ceval P((SCM x, SCM static_env, SCM env));
+SCM_EXPORT SCM scm_wrapcode P((SCM code, SCM env));
+SCM_EXPORT SCM scm_current_env P((void));
+SCM_EXPORT SCM prolixity P((SCM arg));
+SCM_EXPORT SCM gc_for_newcell P((void));
+SCM_EXPORT void gc_for_open_files P((void));
+SCM_EXPORT SCM gc P((SCM arg));
+SCM_EXPORT SCM tryload P((SCM filename, SCM reader));
+SCM_EXPORT SCM acons P((SCM w, SCM x, SCM y));
+SCM_EXPORT SCM cons2 P((SCM w, SCM x, SCM y));
+SCM_EXPORT SCM resizuve P((SCM vect, SCM len));
+SCM_EXPORT SCM lnot P((SCM x));
+SCM_EXPORT SCM booleanp P((SCM obj));
+SCM_EXPORT SCM eq P((SCM x, SCM y));
+SCM_EXPORT SCM equal P((SCM x, SCM y));
+SCM_EXPORT SCM consp P((SCM x));
+SCM_EXPORT SCM cons P((SCM x, SCM y));
+SCM_EXPORT SCM nullp P((SCM x));
+SCM_EXPORT SCM setcar P((SCM pair, SCM value));
+SCM_EXPORT SCM setcdr P((SCM pair, SCM value));
+SCM_EXPORT SCM listp P((SCM x));
+SCM_EXPORT SCM list P((SCM objs));
+SCM_EXPORT SCM length P((SCM x));
+SCM_EXPORT SCM append P((SCM args));
+SCM_EXPORT SCM reverse P((SCM lst));
+SCM_EXPORT SCM list_ref P((SCM lst, SCM k));
+SCM_EXPORT SCM memq P((SCM x, SCM lst));
+SCM_EXPORT SCM member P((SCM x, SCM lst));
+SCM_EXPORT SCM memv P((SCM x, SCM lst));
+SCM_EXPORT SCM assq P((SCM x, SCM alist));
+SCM_EXPORT SCM assoc P((SCM x, SCM alist));
+SCM_EXPORT SCM symbolp P((SCM x));
+SCM_EXPORT SCM symbol2string P((SCM s));
+SCM_EXPORT SCM string2symbol P((SCM s));
+SCM_EXPORT SCM numberp P((SCM x));
+SCM_EXPORT SCM exactp P((SCM x));
+SCM_EXPORT SCM inexactp P((SCM x));
+SCM_EXPORT SCM eqp P((SCM x, SCM y));
+SCM_EXPORT SCM lessp P((SCM x, SCM y));
+SCM_EXPORT SCM greaterp P((SCM x, SCM y));
+SCM_EXPORT SCM leqp P((SCM x, SCM y));
+SCM_EXPORT SCM greqp P((SCM x, SCM y));
+SCM_EXPORT SCM zerop P((SCM z));
+SCM_EXPORT SCM positivep P((SCM x));
+SCM_EXPORT SCM negativep P((SCM x));
+SCM_EXPORT SCM oddp P((SCM n));
+SCM_EXPORT SCM evenp P((SCM n));
+SCM_EXPORT SCM lmax P((SCM x, SCM y));
+SCM_EXPORT SCM lmin P((SCM x, SCM y));
+SCM_EXPORT SCM sum P((SCM x, SCM y));
+SCM_EXPORT SCM difference P((SCM x, SCM y));
+SCM_EXPORT SCM product P((SCM x, SCM y));
+SCM_EXPORT SCM divide P((SCM x, SCM y));
+SCM_EXPORT SCM lquotient P((SCM x, SCM y));
+SCM_EXPORT SCM absval P((SCM x));
+SCM_EXPORT SCM lremainder P((SCM x, SCM y));
+SCM_EXPORT SCM modulo P((SCM x, SCM y));
+SCM_EXPORT SCM lgcd P((SCM x, SCM y));
+SCM_EXPORT SCM llcm P((SCM n1, SCM n2));
+SCM_EXPORT SCM number2string P((SCM x, SCM radix));
+SCM_EXPORT SCM istring2number P((char *str, long len, long radix));
+SCM_EXPORT SCM string2number P((SCM str, SCM radix));
+SCM_EXPORT SCM istr2flo P((char *str, long len, long radix));
+SCM_EXPORT SCM mkbig P((sizet nlen, int sign));
+SCM_EXPORT SCM mkstrport P((SCM pos, SCM str, long modes, char *caller));
+SCM_EXPORT SCM mksafeport P((int maxlen, SCM port));
+SCM_EXPORT int reset_safeport P((SCM sfp, int maxlen, SCM port));
+SCM_EXPORT SCM long2big P((long n));
+SCM_EXPORT SCM ulong2big P((unsigned long n));
+SCM_EXPORT SCM big2inum P((SCM b, sizet l));
+SCM_EXPORT sizet iint2str P((long num, int rad, char *p));
+SCM_EXPORT SCM floequal P((SCM x, SCM y));
+SCM_EXPORT SCM uve_equal P((SCM u, SCM v));
+SCM_EXPORT SCM uve_read P((SCM v, SCM port));
+SCM_EXPORT SCM uve_write P((SCM v, SCM port));
+SCM_EXPORT SCM raequal P((SCM ra0, SCM ra1));
+SCM_EXPORT SCM array_equal P((SCM u, SCM v));
+SCM_EXPORT SCM array_rank P((SCM ra));
+SCM_EXPORT int rafill P((SCM ra, SCM fill, SCM ignore));
+SCM_EXPORT SCM uve_fill P((SCM uve, SCM fill));
+SCM_EXPORT SCM array_fill P((SCM ra, SCM fill));
+SCM_EXPORT SCM array_prot P((SCM ra));
+SCM_EXPORT SCM array_rank P((SCM ra));
+SCM_EXPORT SCM array_contents P((SCM ra, SCM strict));
+SCM_EXPORT int bigprint P((SCM exp, SCM port, int writing));
+SCM_EXPORT int floprint P((SCM sexp, SCM port, int writing));
+SCM_EXPORT SCM istr2int P((char *str, long len, long radix));
+SCM_EXPORT SCM istr2bve P((char *str, long len));
+SCM_EXPORT void ipruk P((char *hdr, SCM ptr, SCM port));
+SCM_EXPORT SCM charp P((SCM x));
+SCM_EXPORT SCM char_lessp P((SCM x, SCM y));
+SCM_EXPORT SCM chci_eq P((SCM x, SCM y));
+SCM_EXPORT SCM chci_lessp P((SCM x, SCM y));
+SCM_EXPORT SCM char_alphap P((SCM chr));
+SCM_EXPORT SCM char_nump P((SCM chr));
+SCM_EXPORT SCM char_whitep P((SCM chr));
+SCM_EXPORT SCM char_upperp P((SCM chr));
+SCM_EXPORT SCM char_lowerp P((SCM chr));
+SCM_EXPORT SCM char2int P((SCM chr));
+SCM_EXPORT SCM int2char P((SCM n));
+SCM_EXPORT SCM char_upcase P((SCM chr));
+SCM_EXPORT SCM char_downcase P((SCM chr));
+SCM_EXPORT SCM stringp P((SCM x));
+SCM_EXPORT SCM string P((SCM chrs));
+SCM_EXPORT SCM make_string P((SCM k, SCM chr));
+SCM_EXPORT SCM string2list P((SCM str));
+SCM_EXPORT SCM st_length P((SCM str));
+SCM_EXPORT SCM st_ref P((SCM str, SCM k));
+SCM_EXPORT SCM st_set P((SCM str, SCM k, SCM chr));
+SCM_EXPORT SCM st_equal P((SCM s1, SCM s2));
+SCM_EXPORT SCM stci_equal P((SCM s1, SCM s2));
+SCM_EXPORT SCM st_lessp P((SCM s1, SCM s2));
+SCM_EXPORT SCM stci_lessp P((SCM s1, SCM s2));
+SCM_EXPORT SCM substring P((SCM str, SCM start, SCM end));
+SCM_EXPORT SCM st_append P((SCM args));
+SCM_EXPORT SCM vectorp P((SCM x));
+SCM_EXPORT SCM vector_length P((SCM v));
+SCM_EXPORT SCM vector P((SCM l));
+SCM_EXPORT SCM vector_ref P((SCM v, SCM k));
+SCM_EXPORT SCM vector_set P((SCM v, SCM k, SCM obj));
+SCM_EXPORT SCM make_vector P((SCM k, SCM fill));
+SCM_EXPORT SCM vector2list P((SCM v));
+SCM_EXPORT SCM for_each P((SCM proc, SCM arg1, SCM args));
+SCM_EXPORT SCM procedurep P((SCM obj));
+SCM_EXPORT SCM apply P((SCM proc, SCM arg1, SCM args));
+SCM_EXPORT SCM scm_cvapply P((SCM proc, long n, SCM *argv));
+SCM_EXPORT int scm_arity_check P((SCM proc, long argc, char *what));
+SCM_EXPORT SCM map P((SCM proc, SCM arg1, SCM args));
+SCM_EXPORT SCM scm_make_cont P((void));
+SCM_EXPORT SCM copytree P((SCM obj));
+SCM_EXPORT SCM eval P((SCM obj));
+SCM_EXPORT SCM scm_values P((SCM arg1, SCM arg2, SCM rest, char *what));
+SCM_EXPORT SCM scm_eval_values P((SCM x, SCM static_env, SCM env));
+SCM_EXPORT SCM identp P((SCM obj));
+SCM_EXPORT SCM ident2sym P((SCM id));
+SCM_EXPORT SCM ident_eqp P((SCM id1, SCM id2, SCM env));
+SCM_EXPORT int scm_nullenv_p P((SCM env));
+SCM_EXPORT SCM env2tree P((SCM env));
+SCM_EXPORT SCM renamed_ident P((SCM id, SCM env));
+SCM_EXPORT SCM scm_check_linum P((SCM x, SCM *linum));
+SCM_EXPORT SCM scm_add_linum P((SCM linum, SCM x));
+SCM_EXPORT SCM input_portp P((SCM x));
+SCM_EXPORT SCM output_portp P((SCM x));
+SCM_EXPORT SCM cur_input_port P((void));
+SCM_EXPORT SCM cur_output_port P((void));
+SCM_EXPORT SCM i_setbuf0 P((SCM port));
+SCM_EXPORT SCM try_open_file P((SCM filename, SCM modes));
+SCM_EXPORT SCM open_file P((SCM filename, SCM modes));
+SCM_EXPORT SCM open_pipe P((SCM pipestr, SCM modes));
+SCM_EXPORT SCM close_port P((SCM port));
+SCM_EXPORT SCM scm_read P((SCM port));
+SCM_EXPORT SCM scm_read_char P((SCM port));
+SCM_EXPORT SCM peek_char P((SCM port));
+SCM_EXPORT SCM eof_objectp P((SCM x));
+SCM_EXPORT int scm_io_error P((SCM port, char *what));
+SCM_EXPORT SCM lwrite P((SCM obj, SCM port));
+SCM_EXPORT SCM display P((SCM obj, SCM port));
+SCM_EXPORT SCM newline P((SCM port));
+SCM_EXPORT SCM write_char P((SCM chr, SCM port));
+SCM_EXPORT SCM scm_port_line P((SCM port));
+SCM_EXPORT SCM scm_port_col P((SCM port));
+SCM_EXPORT void scm_line_msg P((SCM file, SCM linum, SCM port));
+SCM_EXPORT void scm_err_line P((char *what, SCM file, SCM linum, SCM port));
+SCM_EXPORT SCM lgetenv P((SCM nam));
+SCM_EXPORT SCM prog_args P((void));
+SCM_EXPORT SCM makacro P((SCM code));
+SCM_EXPORT SCM makmacro P((SCM code));
+SCM_EXPORT SCM makmmacro P((SCM code));
+SCM_EXPORT SCM makidmacro P((SCM code));
+SCM_EXPORT void poll_routine P((void));
+SCM_EXPORT void tick_signal P((void));
+SCM_EXPORT void stack_check P((void));
+SCM_EXPORT SCM list2ura P((SCM ndim, SCM prot, SCM lst));
+SCM_EXPORT SCM make_ra P((int ndim));
+SCM_EXPORT SCM makflo P((float x));
+SCM_EXPORT SCM arrayp P((SCM v, SCM prot));
+SCM_EXPORT SCM aset P((SCM v, SCM obj, SCM args));
+SCM_EXPORT SCM aref P((SCM v, SCM args));
+SCM_EXPORT SCM scm_array_ref P((SCM args));
+SCM_EXPORT SCM cvref P((SCM v, sizet pos, SCM last));
+SCM_EXPORT SCM quit P((SCM n));
#ifdef CAREFUL_INTS
-void ints_viol P((ints_infot *info, int sense));
-void ints_warn P((char *s1, char* s2, char *fname, int linum));
+SCM_EXPORT void ints_viol P((ints_infot *info, int sense));
+SCM_EXPORT void ints_warn P((char *s1, char* s2, char *fname, int linum));
#endif
-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));
-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));
-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));
-SCM scm_logbitp P((SCM index, SCM j1));
-SCM scm_logtest P((SCM x, SCM y));
-SCM scm_logxor P((SCM x, SCM y));
-SCM scm_logand P((SCM x, SCM y));
-SCM scm_logior P((SCM x, SCM y));
-SCM scm_lognot P((SCM n));
-SCM scm_intexpt P((SCM z1, SCM z2));
-SCM scm_ash P((SCM n, SCM cnt));
-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_EXPORT void add_final P((void (*final)(void)));
+SCM_EXPORT SCM makcclo P((SCM proc, long len));
+SCM_EXPORT SCM make_uve P((long k, SCM prot));
+SCM_EXPORT long scm_prot2type P((SCM prot));
+SCM_EXPORT long aind P((SCM ra, SCM args, char *what));
+SCM_EXPORT SCM scm_eval_string P((SCM str));
+SCM_EXPORT SCM scm_load_string P((SCM str));
+SCM_EXPORT SCM scm_unexec P((const SCM pathname));
+SCM_EXPORT SCM scm_logbitp P((SCM index, SCM j1));
+SCM_EXPORT SCM scm_logtest P((SCM x, SCM y));
+SCM_EXPORT SCM scm_logxor P((SCM x, SCM y));
+SCM_EXPORT SCM scm_logand P((SCM x, SCM y));
+SCM_EXPORT SCM scm_logior P((SCM x, SCM y));
+SCM_EXPORT SCM scm_lognot P((SCM n));
+SCM_EXPORT SCM scm_intexpt P((SCM z1, SCM z2));
+SCM_EXPORT SCM scm_ash P((SCM n, SCM cnt));
+SCM_EXPORT SCM scm_bitfield P((SCM n, SCM start, SCM end));
+SCM_EXPORT SCM scm_logcount P((SCM n));
+SCM_EXPORT SCM scm_intlength P((SCM n));
+SCM_EXPORT SCM scm_copybit P((SCM index, SCM j1, SCM bit));
+SCM_EXPORT SCM scm_bitif P((SCM mask, SCM n0, SCM n1));
+SCM_EXPORT SCM scm_copybitfield P((SCM to, SCM start, SCM rest));
/* Defined in "rope.c" */
-SCM long2num P((long n));
-SCM ulong2num P((unsigned long n));
-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));
-SCM makfrom0str P((char *scr));
-char **makargvfrmstrs P((SCM args, char *s_v));
-void must_free_argv P((char **argv));
-SCM scm_evstr P((char *str));
-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));
+SCM_EXPORT SCM long2num P((long n));
+SCM_EXPORT SCM ulong2num P((unsigned long n));
+SCM_EXPORT unsigned char num2uchar P((SCM num, char *pos, char *s_caller));
+SCM_EXPORT unsigned short num2ushort P((SCM num, char *pos, char *s_caller));
+SCM_EXPORT unsigned long num2ulong P((SCM num, char *pos, char *s_caller));
+SCM_EXPORT long num2long P((SCM num, char *pos, char *s_caller));
+SCM_EXPORT short num2short P((SCM num, char *pos, char *s_caller));
+SCM_EXPORT double num2dbl P((SCM num, char *pos, char *s_caller));
+SCM_EXPORT SCM makfromstr P((char *src, sizet len));
+SCM_EXPORT SCM makfromstrs P((int argc, char **argv));
+SCM_EXPORT SCM makfrom0str P((char *scr));
+SCM_EXPORT char **makargvfrmstrs P((SCM args, char *s_v));
+SCM_EXPORT void must_free_argv P((char **argv));
+SCM_EXPORT SCM scm_evstr P((char *str));
+SCM_EXPORT void scm_ldstr P((char *str));
+SCM_EXPORT int scm_ldfile P((char *path));
+SCM_EXPORT int scm_ldprog P((char *path));
+SCM_EXPORT unsigned long scm_addr P((SCM args, char *name));
+SCM_EXPORT unsigned long scm_base_addr P((SCM v, char *name));
+SCM_EXPORT int scm_cell_p P((SCM x));
#ifdef FLOATS
-SCM makdbl P((double x, double y));
-SCM dbl2big P((double d));
-double big2dbl P((SCM b));
-double lasinh P((double x));
-double lacosh P((double x));
-double latanh P((double x));
-double ltrunc P((double x));
-double scm_round P((double x));
-double floident P((double x));
+SCM_EXPORT SCM makdbl P((double x, double y));
+SCM_EXPORT SCM dbl2big P((double d));
+SCM_EXPORT double big2dbl P((SCM b));
+SCM_EXPORT double lasinh P((double x));
+SCM_EXPORT double lacosh P((double x));
+SCM_EXPORT double latanh P((double x));
+SCM_EXPORT double ltrunc P((double x));
+SCM_EXPORT double scm_round P((double x));
+SCM_EXPORT double floident P((double x));
#endif
#ifdef BIGDIG
-void longdigs P((long x, BIGDIG digs[DIGSPERLONG]));
-SCM adjbig P((SCM b, sizet nlen));
-SCM normbig P((SCM b));
-SCM copybig P((SCM b, int sign));
-SCM addbig P((BIGDIG *x, sizet nx, int xsgn, SCM bigy, int sgny));
-SCM mulbig P((BIGDIG *x, sizet nx, BIGDIG *y, sizet ny, int sgn));
-unsigned int divbigdig P((BIGDIG *ds, sizet h, BIGDIG div));
-SCM divbigint P((SCM x, long z, int sgn, int mode));
-SCM divbigbig P((BIGDIG *x, sizet nx, BIGDIG *y, sizet ny, int sgn,
+SCM_EXPORT void longdigs P((long x, BIGDIG digs[DIGSPERLONG]));
+SCM_EXPORT SCM adjbig P((SCM b, sizet nlen));
+SCM_EXPORT SCM normbig P((SCM b));
+SCM_EXPORT SCM copybig P((SCM b, int sign));
+SCM_EXPORT SCM addbig P((BIGDIG *x, sizet nx, int xsgn, SCM bigy, int sgny));
+SCM_EXPORT SCM mulbig P((BIGDIG *x, sizet nx, BIGDIG *y, sizet ny, int sgn));
+SCM_EXPORT unsigned int divbigdig P((BIGDIG *ds, sizet h, BIGDIG div));
+SCM_EXPORT SCM divbigint P((SCM x, long z, int sgn, int mode));
+SCM_EXPORT SCM divbigbig P((BIGDIG *x, sizet nx, BIGDIG *y, sizet ny, int sgn,
int modes));
-long pseudolong P((long x));
+SCM_EXPORT long pseudolong P((long x));
#endif
-int bigcomp P((SCM x, SCM y));
-SCM bigequal P((SCM x, SCM y));
-int scm_bigdblcomp P((SCM b, double d));
+SCM_EXPORT int bigcomp P((SCM x, SCM y));
+SCM_EXPORT SCM bigequal P((SCM x, SCM y));
+SCM_EXPORT int scm_bigdblcomp P((SCM b, double d));
/* "script.c" functions */
-char * scm_cat_path P((char *str1, const char *str2, long n));
-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 * find_impl_file P((char *exec_path, const char *generic_name,
+SCM_EXPORT char * scm_cat_path P((char *str1, const char *str2, long n));
+SCM_EXPORT char * scm_try_path P((char *path));
+SCM_EXPORT char * script_find_executable P((const char *command));
+SCM_EXPORT char ** script_process_argv P((int argc, char **argv));
+SCM_EXPORT int script_count_argv P((char **argv));
+SCM_EXPORT 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((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_cons3 P((SCM v, SCM w, SCM x, SCM y));
-void scm_env_v2lst P((long argc, SCM *argv));
-void scm_extend_env P((void));
-void scm_egc P((void));
+SCM_EXPORT void scm_ecache_report P((void));
+SCM_EXPORT void scm_estk_reset P((sizet size));
+SCM_EXPORT void scm_env_cons P((SCM x, SCM y));
+SCM_EXPORT void scm_env_cons2 P((SCM w, SCM x, SCM y));
+SCM_EXPORT void scm_env_cons3 P((SCM v, SCM w, SCM x, SCM y));
+SCM_EXPORT void scm_env_v2lst P((long argc, SCM *argv));
+SCM_EXPORT void scm_extend_env P((void));
+SCM_EXPORT void scm_egc P((void));
/* Global state for environment cache */
-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 VOLATILE long scm_egc_root_index;
-extern SCM scm_estk;
-extern SCM *scm_estk_v, *scm_estk_ptr;
-extern long scm_estk_size;
+SCM_EXPORT CELLPTR scm_ecache;
+SCM_EXPORT VOLATILE long scm_ecache_index, scm_ecache_len;
+SCM_EXPORT SCM scm_env, scm_env_tmp;
+SCM_EXPORT SCM scm_egc_roots[];
+SCM_EXPORT VOLATILE long scm_egc_root_index;
+SCM_EXPORT SCM scm_estk;
+SCM_EXPORT SCM *scm_estk_v, *scm_estk_ptr;
+SCM_EXPORT long scm_estk_size;
#ifndef RECKLESS
-extern SCM scm_trace, scm_trace_env;
+SCM_EXPORT SCM scm_trace, scm_trace_env;
#endif
#ifdef RECKLESS
-# define ASSERT(_cond, _arg, _pos, _subr) ;
+# define ASRTER(_cond, _arg, _pos, _subr) ;
# define ASRTGO(_cond, _label) ;
#else
-# define ASSERT(_cond, _arg, _pos, _subr) if(!(_cond))wta(_arg, (char *)(_pos), _subr);
+# define ASRTER(_cond, _arg, _pos, _subr) if(!(_cond))wta(_arg, (char *)(_pos), _subr);
# define ASRTGO(_cond, _label) if(!(_cond)) goto _label;
#endif