1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
$NetBSD: patch-ab,v 1.2 2004/04/08 15:47:49 kristerw Exp $
--- scheme.c.orig 2003-01-07 20:40:51.000000000 +0100
+++ scheme.c 2004-04-08 17:40:03.000000000 +0200
@@ -91,8 +91,16 @@
# 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 +577,7 @@
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 +2063,7 @@
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 +2083,7 @@
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 +2123,7 @@
static INLINE void dump_stack_mark(scheme *sc)
{
- int nframes = (int)sc->dump;
+ long nframes = (long)sc->dump;
int i;
for(i=0; i<nframes; i++) {
struct dump_stack_frame *frame;
|