Lock object fixes.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@476 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
ahodgkinson
2006-05-30 21:22:20 +00:00
parent edfeb2f59c
commit ee7956d7ea
3 changed files with 109 additions and 61 deletions

View File

@@ -2165,3 +2165,32 @@ Exit:
*ppHashTblRV = pHashTbl;
return( rc);
}
/****************************************************************************
Desc: This routine determines the hash bucket for a string.
****************************************************************************/
FLMUINT FLMAPI f_strHashBucket(
char * pszStr,
FBUCKET * pHashTbl,
FLMUINT uiNumBuckets)
{
FLMUINT uiHashIndex;
if ((uiHashIndex = (FLMUINT)*pszStr) >= uiNumBuckets)
{
uiHashIndex -= uiNumBuckets;
}
while (*pszStr)
{
if ((uiHashIndex =
(FLMUINT)((pHashTbl [uiHashIndex].uiHashValue) ^ (FLMUINT)(f_toupper( *pszStr)))) >=
uiNumBuckets)
{
uiHashIndex -= uiNumBuckets;
}
pszStr++;
}
return( uiHashIndex);
}