Source code of Windows XP (NT5)
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

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) 1997, Microsoft Corporation. All Rights Reserved.
  4. //
  5. /////////////////////////////////////////////////////////////////////////////
  6. //#include "stdafx.h"
  7. #include "pch.cxx"
  8. #include "Hash.h"
  9. //#ifdef _INSTRUMENT
  10. //#include "clog.h"
  11. //#endif
  12. BYTE CWordHash::m_lpHashTable[WORD_HASH_SIZE][20];
  13. BOOL CWordHash::Find(LPCTSTR searchWord, BYTE *pumsa)
  14. {
  15. UINT hashVal ;
  16. hashVal=CWordHash::Hash((const _TXCHAR*)searchWord);
  17. //#ifdef _INSTRUMENT
  18. // _Log.IncreaseTotalAccess(searchWord);
  19. //#endif
  20. if (lstrcmp((LPCTSTR)m_lpHashTable[hashVal], searchWord)==0) {
  21. *pumsa = m_lpHashTable[hashVal][19];
  22. //#ifdef _INSTRUMENT
  23. // _Log.IncreaseHit();
  24. //#endif
  25. return TRUE;
  26. }
  27. //#ifdef _INSTRUMENT
  28. // _Log.IncreaseFail();
  29. //#endif
  30. return FALSE;
  31. }