adding dependency on equal.c in makefiles

adding a missing va_end
minor change to hash function
This commit is contained in:
JeffBezanson 2010-02-05 19:56:10 +00:00
parent 1649e64ad3
commit 2e99f52b29
4 changed files with 7 additions and 6 deletions

View File

@ -25,8 +25,8 @@ test:
%.do: %.c
$(CC) $(DEBUGFLAGS) -c $< -o $@
flisp.o: flisp.c cvalues.c types.c flisp.h print.c read.c
flisp.do: flisp.c cvalues.c types.c flisp.h print.c read.c
flisp.o: flisp.c cvalues.c types.c flisp.h print.c read.c equal.c
flisp.do: flisp.c cvalues.c types.c flisp.h print.c read.c equal.c
$(LLT):
cd $(LLTDIR) && make

View File

@ -25,8 +25,8 @@ test:
%.do: %.c
$(CC) $(DEBUGFLAGS) -c $< -o $@
flisp.o: flisp.c cvalues.c types.c flisp.h print.c read.c
flisp.do: flisp.c cvalues.c types.c flisp.h print.c read.c
flisp.o: flisp.c cvalues.c types.c flisp.h print.c read.c equal.c
flisp.do: flisp.c cvalues.c types.c flisp.h print.c read.c equal.c
$(LLT):
cd $(LLTDIR) && make

View File

@ -329,7 +329,7 @@ static uptrint_t bounded_hash(value_t a, int bound, int *oob)
}
len = vector_size(a);
for(i=0; i < len; i++) {
h = MIX(h, bounded_hash(vector_elt(a,i), bound/2, &oob2)+1);
h = MIX(h, bounded_hash(vector_elt(a,i), bound/2, &oob2)^1);
if (oob2)
bound/=2;
*oob = *oob || oob2;
@ -354,7 +354,7 @@ static uptrint_t bounded_hash(value_t a, int bound, int *oob)
*oob = *oob || oob2;
a = cdr_(a);
} while (iscons(a));
h = MIX(h, bounded_hash(a, bound-1, &oob2)+2);
h = MIX(h, bounded_hash(a, bound-1, &oob2)^2);
*oob = *oob || oob2;
return h;
}

View File

@ -659,6 +659,7 @@ value_t applyn(uint32_t n, value_t f, ...)
}
value_t v = _applyn(n);
POPN(n+1);
va_end(ap);
return v;
}