mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
903 B
38 lines
903 B
/////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) 1997, Microsoft Corporation. All Rights Reserved.
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//#include "stdafx.h"
|
|
#include "pch.cxx"
|
|
|
|
#include "Hash.h"
|
|
|
|
//#ifdef _INSTRUMENT
|
|
//#include "clog.h"
|
|
//#endif
|
|
|
|
BYTE CWordHash::m_lpHashTable[WORD_HASH_SIZE][20];
|
|
|
|
BOOL CWordHash::Find(LPCTSTR searchWord, BYTE *pumsa)
|
|
{
|
|
UINT hashVal ;
|
|
|
|
hashVal=CWordHash::Hash((const _TXCHAR*)searchWord);
|
|
|
|
//#ifdef _INSTRUMENT
|
|
// _Log.IncreaseTotalAccess(searchWord);
|
|
//#endif
|
|
|
|
if (lstrcmp((LPCTSTR)m_lpHashTable[hashVal], searchWord)==0) {
|
|
*pumsa = m_lpHashTable[hashVal][19];
|
|
//#ifdef _INSTRUMENT
|
|
// _Log.IncreaseHit();
|
|
//#endif
|
|
return TRUE;
|
|
}
|
|
//#ifdef _INSTRUMENT
|
|
// _Log.IncreaseFail();
|
|
//#endif
|
|
return FALSE;
|
|
}
|