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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user