int lib_hash(char *s, int h)
{
 int tot=h;
 char *ss=s;
 for (;*s!=0;s++) {
  tot = tot & 0x0ffffff;
  tot += *s + *s * (h & 0xff);
  tot *= 16;
 }
 for (s=ss;*s!=0;s++) {
  tot += *s;
 }
 tot+=h;
 tot = tot & 0x0ffffff;
 return tot;
}
