add Loaathash1 (iv=0x100 ipv 0)
This commit is contained in:
parent
2e9654ffa4
commit
bbb4a1a70f
15
dot.mkshrc
15
dot.mkshrc
@ -1,7 +1,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.52 2009/12/12 22:27:14 tg Exp $
|
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.53 2010/01/25 14:29:34 tg Exp $
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009
|
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010
|
||||||
# Thorsten Glaser <tg@mirbsd.org>
|
# Thorsten Glaser <tg@mirbsd.org>
|
||||||
#
|
#
|
||||||
# Provided that these terms and disclaimer and all copyright notices
|
# Provided that these terms and disclaimer and all copyright notices
|
||||||
@ -310,14 +310,21 @@ function Loaathash_add {
|
|||||||
|
|
||||||
(( u )) || set -U
|
(( u )) || set -U
|
||||||
}
|
}
|
||||||
function Loaathash {
|
function Loaathash_do {
|
||||||
Loaathash_result=0 # hmm...
|
|
||||||
Loaathash_add "$@"
|
Loaathash_add "$@"
|
||||||
((# Loaathash_result += Loaathash_result << 3 ))
|
((# Loaathash_result += Loaathash_result << 3 ))
|
||||||
((# Loaathash_result = (Loaathash_result ^
|
((# Loaathash_result = (Loaathash_result ^
|
||||||
(Loaathash_result >> 11)) * 32769 ))
|
(Loaathash_result >> 11)) * 32769 ))
|
||||||
print ${Loaathash_result#16#}
|
print ${Loaathash_result#16#}
|
||||||
}
|
}
|
||||||
|
function Loaathash {
|
||||||
|
Loaathash_result=0
|
||||||
|
Loaathash_do "$@"
|
||||||
|
}
|
||||||
|
function Loaathash1 {
|
||||||
|
Loaathash_result=0x100
|
||||||
|
Loaathash_do "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# strip comments (and leading/trailing whitespace if IFS is set) from
|
# strip comments (and leading/trailing whitespace if IFS is set) from
|
||||||
# any file(s) given as argument, or stdin if none, and spew to stdout
|
# any file(s) given as argument, or stdin if none, and spew to stdout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user