/* ---------------------------------------------------------------------- */
/*                   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);
}

