adding dependency on equal.c in makefiles
adding a missing va_end minor change to hash function
This commit is contained in:
parent
1649e64ad3
commit
2e99f52b29
|
@ -25,8 +25,8 @@ test:
|
||||||
%.do: %.c
|
%.do: %.c
|
||||||
$(CC) $(DEBUGFLAGS) -c $< -o $@
|
$(CC) $(DEBUGFLAGS) -c $< -o $@
|
||||||
|
|
||||||
flisp.o: 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
|
flisp.do: flisp.c cvalues.c types.c flisp.h print.c read.c equal.c
|
||||||
|
|
||||||
$(LLT):
|
$(LLT):
|
||||||
cd $(LLTDIR) && make
|
cd $(LLTDIR) && make
|
||||||
|
|
|
@ -25,8 +25,8 @@ test:
|
||||||
%.do: %.c
|
%.do: %.c
|
||||||
$(CC) $(DEBUGFLAGS) -c $< -o $@
|
$(CC) $(DEBUGFLAGS) -c $< -o $@
|
||||||
|
|
||||||
flisp.o: 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
|
flisp.do: flisp.c cvalues.c types.c flisp.h print.c read.c equal.c
|
||||||
|
|
||||||
$(LLT):
|
$(LLT):
|
||||||
cd $(LLTDIR) && make
|
cd $(LLTDIR) && make
|
||||||
|
|
|
@ -329,7 +329,7 @@ static uptrint_t bounded_hash(value_t a, int bound, int *oob)
|
||||||
}
|
}
|
||||||
len = vector_size(a);
|
len = vector_size(a);
|
||||||
for(i=0; i < len; i++) {
|
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)
|
if (oob2)
|
||||||
bound/=2;
|
bound/=2;
|
||||||
*oob = *oob || oob2;
|
*oob = *oob || oob2;
|
||||||
|
@ -354,7 +354,7 @@ static uptrint_t bounded_hash(value_t a, int bound, int *oob)
|
||||||
*oob = *oob || oob2;
|
*oob = *oob || oob2;
|
||||||
a = cdr_(a);
|
a = cdr_(a);
|
||||||
} while (iscons(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;
|
*oob = *oob || oob2;
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
|
@ -659,6 +659,7 @@ value_t applyn(uint32_t n, value_t f, ...)
|
||||||
}
|
}
|
||||||
value_t v = _applyn(n);
|
value_t v = _applyn(n);
|
||||||
POPN(n+1);
|
POPN(n+1);
|
||||||
|
va_end(ap);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue