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.

47 lines
1.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Copyright (C) Microsoft Corporation, 1992 - 1996
  4. //
  5. // File: cphash.hxx
  6. //
  7. // Contents: Hash table that maps strings to codepages
  8. //
  9. // Note: Most of this file was copied from htmlfilt/cphash.hxx with
  10. // only minor modifications
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. class CCodePageEntry
  15. {
  16. public:
  17. WCHAR const * pwcName;
  18. ULONG ulCodePage;
  19. };
  20. //+-------------------------------------------------------------------------
  21. //
  22. // Class: CCodePageTable
  23. //
  24. // Purpose: Hash table that maps strings to codepages
  25. //
  26. //--------------------------------------------------------------------------
  27. class CCodePageTable
  28. {
  29. public:
  30. static BOOL Lookup( WCHAR const * pwcName,
  31. unsigned cwcName,
  32. ULONG & ulCodePage );
  33. private:
  34. static int __cdecl EntryCompare( WCHAR const * pwcName,
  35. CCodePageEntry const * pEntry );
  36. static const unsigned _cEntries;
  37. static const CCodePageEntry _aEntries[];
  38. };