$NetBSD: patch-ab,v 1.3 2004/05/23 23:28:29 danw Exp $ --- scheme.c.orig Tue Jan 7 14:40:51 2003 +++ scheme.c @@ -57,9 +57,7 @@ #include #include -#ifndef macintosh -# include -#else +#ifdef macintosh static int stricmp(const char *s1, const char *s2) { unsigned char c1, c2; @@ -91,8 +89,16 @@ static const char *strlwr(char *s) { # define prompt "> " #endif +#ifndef TINYSCHEMEPREFIX +# define TINYSCHEMEPREFIX "" +#endif + +#ifndef TINYSCHEMEDIR +# define TINYSCHEMEDIR "" +#endif + #ifndef InitFile -# define InitFile "init.scm" +# define InitFile TINYSCHEMEPREFIX TINYSCHEMEDIR "init.scm" #endif #ifndef FIRST_CELLSEGS @@ -569,7 +575,7 @@ static int alloc_cellseg(scheme *sc, int i = ++sc->last_cell_seg ; sc->alloc_seg[i] = cp; /* adjust in TYPE_BITS-bit boundary */ - if(((int)cp)%adj!=0) { + if(((long)cp)%adj!=0) { cp=(char*)(adj*((long)cp/adj+1)); } /* insert new segment in address order */ @@ -2055,7 +2061,7 @@ struct dump_stack_frame { static void s_save(scheme *sc, enum scheme_opcodes op, pointer args, pointer code) { - int nframes = (int)sc->dump; + long nframes = (long)sc->dump; struct dump_stack_frame *next_frame; /* enough room for the next frame? */ @@ -2075,7 +2081,7 @@ static void s_save(scheme *sc, enum sche static pointer _s_return(scheme *sc, pointer a) { - int nframes = (int)sc->dump; + long nframes = (long)sc->dump; struct dump_stack_frame *frame; sc->value = (a); @@ -2115,7 +2121,7 @@ static void dump_stack_free(scheme *sc) static INLINE void dump_stack_mark(scheme *sc) { - int nframes = (int)sc->dump; + long nframes = (long)sc->dump; int i; for(i=0; i