Release calc version 2.12.1.11

This commit is contained in:
Landon Curt Noll
2007-02-11 02:34:00 -08:00
parent 7d0cc52afe
commit c773ee736f
89 changed files with 2469 additions and 2381 deletions

View File

@@ -1,7 +1,7 @@
/*
* quickhash - quickly hash a calc value using a quasi Fowler/Noll/Vo hash
*
* Copyright (C) 1999-2002 Landon Curt Noll
* Copyright (C) 1999-2007 Landon Curt Noll
*
* Calc is open software; you can redistribute it and/or modify it under
* the terms of the version 2.1 of the GNU Lesser General Public License
@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.13 $
* @(#) $Id: quickhash.c,v 29.13 2006/06/25 23:24:16 chongo Exp $
* @(#) $Revision: 29.14 $
* @(#) $Id: quickhash.c,v 29.14 2007/02/11 10:19:14 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/quickhash.c,v $
*
* Under source code control: 1995/03/04 11:34:23
@@ -41,19 +41,19 @@
/*
* forward declarations
*/
static QCKHASH assochash(ASSOC *ap, QCKHASH val);
static QCKHASH listhash(LIST *lp, QCKHASH val);
static QCKHASH mathash(MATRIX *m, QCKHASH val);
static QCKHASH objhash(OBJECT *op, QCKHASH val);
static QCKHASH randhash(RAND *r, QCKHASH val);
static QCKHASH randomhash(RANDOM *state, QCKHASH val);
static QCKHASH config_hash(CONFIG *cfg, QCKHASH val);
static QCKHASH fnv_strhash(char *ch, QCKHASH val);
static QCKHASH fnv_STRhash(STRING *str, QCKHASH val);
static QCKHASH fnv_fullhash(FULL *v, LEN len, QCKHASH val);
static QCKHASH fnv_zhash(ZVALUE z, QCKHASH val);
static QCKHASH hash_hash(HASH *hash, QCKHASH val);
static QCKHASH blk_hash(BLOCK *blk, QCKHASH val);
S_FUNC QCKHASH assochash(ASSOC *ap, QCKHASH val);
S_FUNC QCKHASH listhash(LIST *lp, QCKHASH val);
S_FUNC QCKHASH mathash(MATRIX *m, QCKHASH val);
S_FUNC QCKHASH objhash(OBJECT *op, QCKHASH val);
S_FUNC QCKHASH randhash(RAND *r, QCKHASH val);
S_FUNC QCKHASH randomhash(RANDOM *state, QCKHASH val);
S_FUNC QCKHASH config_hash(CONFIG *cfg, QCKHASH val);
S_FUNC QCKHASH fnv_strhash(char *ch, QCKHASH val);
S_FUNC QCKHASH fnv_STRhash(STRING *str, QCKHASH val);
S_FUNC QCKHASH fnv_fullhash(FULL *v, LEN len, QCKHASH val);
S_FUNC QCKHASH fnv_zhash(ZVALUE z, QCKHASH val);
S_FUNC QCKHASH hash_hash(HASH *hash, QCKHASH val);
S_FUNC QCKHASH blk_hash(BLOCK *blk, QCKHASH val);
/*
@@ -233,7 +233,7 @@ hashvalue(VALUE *vp, QCKHASH val)
/*
* Return a trivial hash value for an association.
*/
static QCKHASH
S_FUNC QCKHASH
assochash(ASSOC *ap, QCKHASH val)
{
/*
@@ -249,7 +249,7 @@ assochash(ASSOC *ap, QCKHASH val)
/*
* Return a trivial hash value for a list.
*/
static QCKHASH
S_FUNC QCKHASH
listhash(LIST *lp, QCKHASH val)
{
/*
@@ -275,7 +275,7 @@ listhash(LIST *lp, QCKHASH val)
/*
* Return a trivial hash value for a matrix.
*/
static QCKHASH
S_FUNC QCKHASH
mathash(MATRIX *m, QCKHASH val)
{
long skip;
@@ -325,7 +325,7 @@ mathash(MATRIX *m, QCKHASH val)
/*
* Return a trivial hash value for an object.
*/
static QCKHASH
S_FUNC QCKHASH
objhash(OBJECT *op, QCKHASH val)
{
int i;
@@ -348,7 +348,7 @@ objhash(OBJECT *op, QCKHASH val)
* returns:
* trivial hash integer
*/
static QCKHASH
S_FUNC QCKHASH
randhash(RAND *r, QCKHASH val)
{
/*
@@ -380,7 +380,7 @@ randhash(RAND *r, QCKHASH val)
* returns:
* trivial hash integer
*/
static QCKHASH
S_FUNC QCKHASH
randomhash(RANDOM *state, QCKHASH val)
{
/*
@@ -408,7 +408,7 @@ randomhash(RANDOM *state, QCKHASH val)
/*
* config_hash - return a trivial hash for a configuration state
*/
static QCKHASH
S_FUNC QCKHASH
config_hash(CONFIG *cfg, QCKHASH val)
{
USB32 value; /* value to hash from hash elements */
@@ -515,7 +515,7 @@ config_hash(CONFIG *cfg, QCKHASH val)
* returns:
* a 32 bit QCKHASH value
*/
static QCKHASH
S_FUNC QCKHASH
fnv_strhash(char *ch, QCKHASH val)
{
/*
@@ -537,7 +537,7 @@ fnv_strhash(char *ch, QCKHASH val)
* returns:
* a 32 bit QCKHASH value
*/
static QCKHASH
S_FUNC QCKHASH
fnv_STRhash(STRING *str, QCKHASH val)
{
char *ch;
@@ -567,7 +567,7 @@ fnv_STRhash(STRING *str, QCKHASH val)
* returns:
* a 32 bit QCKHASH value
*/
static QCKHASH
S_FUNC QCKHASH
fnv_fullhash(FULL *v, LEN len, QCKHASH val)
{
/*
@@ -590,7 +590,7 @@ fnv_fullhash(FULL *v, LEN len, QCKHASH val)
* returns:
* a 32 bit QCKHASH value
*/
static QCKHASH
S_FUNC QCKHASH
fnv_zhash(ZVALUE z, QCKHASH val)
{
LEN n;
@@ -638,7 +638,7 @@ fnv_zhash(ZVALUE z, QCKHASH val)
* returns:
* a 32 bit QCKHASH value
*/
static QCKHASH
S_FUNC QCKHASH
hash_hash(HASH *hash, QCKHASH val)
{
int i;
@@ -663,7 +663,7 @@ hash_hash(HASH *hash, QCKHASH val)
* returns:
* a 32 bit QCKHASH value
*/
static QCKHASH
S_FUNC QCKHASH
blk_hash(BLOCK *blk, QCKHASH val)
{
int i;