home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
program
/
compiler
/
nasm20b
/
nasm_src
/
hash.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-19
|
1KB
|
39 lines
/* ---------------------------------------------------------------------- */
/* Copyright (C) 1991 by Natürlich! */
/* This file is copyrighted! */
/* Refer to the documentation for details. */
/* ---------------------------------------------------------------------- */
#include "defines.h"
extern char hash_tab[];
lword calc_hash( s)
register char *s;
{
register byte *p = (byte *) hash_tab,
c;
register lword res;
if( res = p[ *s++])
if( c = p[ *s++])
{
res = (res << 5) | c;
if( c = p[ *s++])
{
res = (res << 5) | c;
if( c = p[ *s++])
{
res = (res << 5) | c;
if( c = p[ *s++])
{
res = (res << 5) | c;
if( c = p[ *s])
res = (res << 5) | c;
}
}
}
}
return( res);
}