now that I got Hash.cs compiled and run, I’m amazed; make NZAAT (and NZAT!) all green with a small tweak; bit distribution and χ2 look OK as well

This commit is contained in:
tg 2011-07-18 00:35:46 +00:00
parent f51883e350
commit 6ce68e906f
3 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.476 2011/07/16 17:08:50 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.477 2011/07/18 00:35:44 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -25,7 +25,7 @@
# http://www.research.att.com/~gsf/public/ifs.sh
expected-stdout:
@(#)MIRBSD KSH R40 2011/07/15
@(#)MIRBSD KSH R40 2011/07/17
description:
Check version of shell.
stdin:
@ -6557,7 +6557,7 @@ stdin:
unset baz
print ${foo@#} ${bar@#} ${baz@#} .
expected-stdout:
3BA2B200 9072C3DA 00000001 .
D50219A0 20E5DB5B 00000001 .
---
name: varexpand-null-1
description:

View File

@ -1,5 +1,5 @@
# $Id$
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.63 2011/07/06 22:21:56 tg Exp $
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.64 2011/07/18 00:35:45 tg Exp $
#-
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
# Thorsten Glaser <tg@mirbsd.org>
@ -316,6 +316,8 @@ function Lnzathash_add {
(( u )) || set -U
}
function Lnzaathash_end {
((# Lnzathash_v *= 1025 ))
((# Lnzathash_v ^= Lnzathash_v >> 6 ))
((# Lnzathash_v += Lnzathash_v << 3 ))
((# Lnzathash_v = (Lnzathash_v ^
(Lnzathash_v >> 11)) * 32769 ))

8
sh.h
View File

@ -151,9 +151,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.487 2011/07/16 17:08:52 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.488 2011/07/18 00:35:46 tg Exp $");
#endif
#define MKSH_VERSION "R40 2011/07/15"
#define MKSH_VERSION "R40 2011/07/17"
#ifndef MKSH_INCLUDES_ONLY
@ -1474,7 +1474,7 @@ EXTERN struct timeval j_usrtime, j_systime;
/* NZAT/NZAAT hashes based on Bob Jenkins' one-at-a-time hash */
/* From: src/kern/include/nzat.h,v 1.1 2011/07/06 22:18:52 tg Exp $ */
/* From: src/kern/include/nzat.h,v 1.2 2011/07/18 00:35:40 tg Exp $ */
#define NZATInit(h) do { \
(h) = 0; \
@ -1515,6 +1515,8 @@ EXTERN struct timeval j_usrtime, j_systime;
/* NULs zählen an allen Teilen */
#define NZAATFinish(h) do { \
(h) += (h) << 10; \
(h) ^= (h) >> 6; \
(h) += (h) << 3; \
(h) ^= (h) >> 11; \
(h) += (h) << 15; \